From 4440fe1eda42e325fb06db22023010f31ae3ec74 Mon Sep 17 00:00:00 2001 From: "Zian(Andy) Zheng" <62330719+Orion-Zheng@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:35:04 +0000 Subject: [PATCH] Add Personal Info --- _config.yml | 36 +- images/avatar.jpeg | Bin 0 -> 119810 bytes node_modules/.bin/atob | 1 + node_modules/.bin/npm-run-all | 1 + node_modules/.bin/onchange | 1 + node_modules/.bin/ps-tree | 1 + node_modules/.bin/resolve | 1 + node_modules/.bin/semver | 1 + node_modules/.bin/uglifyjs | 1 + node_modules/.bin/which | 1 + node_modules/.package-lock.json | 3372 ++++++ node_modules/align-text/LICENSE | 21 + node_modules/align-text/README.md | 236 + node_modules/align-text/index.js | 52 + node_modules/align-text/package.json | 52 + node_modules/ansi-regex/index.js | 4 + node_modules/ansi-regex/license | 21 + node_modules/ansi-regex/package.json | 64 + node_modules/ansi-regex/readme.md | 39 + node_modules/ansi-styles/index.js | 65 + node_modules/ansi-styles/license | 21 + node_modules/ansi-styles/package.json | 50 + node_modules/ansi-styles/readme.md | 86 + node_modules/anymatch/LICENSE | 15 + node_modules/anymatch/README.md | 98 + node_modules/anymatch/index.js | 67 + node_modules/anymatch/package.json | 47 + node_modules/arr-diff/LICENSE | 21 + node_modules/arr-diff/README.md | 74 + node_modules/arr-diff/index.js | 58 + node_modules/arr-diff/package.json | 49 + 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 | 76 + 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 | 76 + .../array-buffer-byte-length/.eslintrc | 5 + .../.github/FUNDING.yml | 12 + node_modules/array-buffer-byte-length/.nycrc | 13 + .../array-buffer-byte-length/CHANGELOG.md | 15 + node_modules/array-buffer-byte-length/LICENSE | 21 + .../array-buffer-byte-length/README.md | 40 + .../array-buffer-byte-length/index.js | 13 + .../array-buffer-byte-length/package.json | 81 + .../array-buffer-byte-length/test/index.js | 26 + node_modules/array-unique/LICENSE | 21 + node_modules/array-unique/README.md | 51 + node_modules/array-unique/index.js | 28 + node_modules/array-unique/package.json | 37 + .../arraybuffer.prototype.slice/.editorconfig | 13 + .../arraybuffer.prototype.slice/.eslintrc | 34 + .../arraybuffer.prototype.slice/.nycrc | 9 + .../arraybuffer.prototype.slice/CHANGELOG.md | 31 + .../arraybuffer.prototype.slice/LICENSE | 21 + .../arraybuffer.prototype.slice/README.md | 61 + .../arraybuffer.prototype.slice/auto.js | 3 + .../implementation.js | 84 + .../arraybuffer.prototype.slice/index.js | 18 + .../arraybuffer.prototype.slice/package.json | 103 + .../arraybuffer.prototype.slice/polyfill.js | 21 + .../arraybuffer.prototype.slice/shim.js | 18 + .../test/implementation.js | 32 + .../arraybuffer.prototype.slice/test/index.js | 29 + .../test/shimmed.js | 54 + .../arraybuffer.prototype.slice/test/tests.js | 81 + node_modules/arrify/index.js | 8 + node_modules/arrify/license | 21 + node_modules/arrify/package.json | 33 + node_modules/arrify/readme.md | 36 + 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 | 40 + node_modules/async-each/LICENSE | 21 + node_modules/async-each/README.md | 35 + node_modules/async-each/index.js | 39 + node_modules/async-each/package.json | 38 + node_modules/atob/LICENSE | 230 + node_modules/atob/LICENSE.DOCS | 319 + node_modules/atob/README.md | 49 + node_modules/atob/bin/atob.js | 6 + node_modules/atob/bower.json | 24 + node_modules/atob/browser-atob.js | 44 + node_modules/atob/node-atob.js | 7 + node_modules/atob/package.json | 24 + node_modules/atob/test.js | 18 + .../available-typed-arrays/.eslintignore | 1 + node_modules/available-typed-arrays/.eslintrc | 9 + .../.github/FUNDING.yml | 12 + node_modules/available-typed-arrays/.nycrc | 9 + .../available-typed-arrays/CHANGELOG.md | 79 + node_modules/available-typed-arrays/LICENSE | 21 + node_modules/available-typed-arrays/README.md | 52 + node_modules/available-typed-arrays/index.js | 27 + .../available-typed-arrays/package.json | 82 + .../available-typed-arrays/test/index.js | 18 + 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 | 16 + .../babel-runtime/regenerator/index.js | 1 + .../balanced-match/.github/FUNDING.yml | 2 + node_modules/balanced-match/LICENSE.md | 21 + node_modules/balanced-match/README.md | 97 + node_modules/balanced-match/index.js | 62 + node_modules/balanced-match/package.json | 48 + 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 | 62 + .../base/node_modules/isobject/LICENSE | 21 + .../base/node_modules/isobject/README.md | 122 + .../base/node_modules/isobject/index.d.ts | 5 + .../base/node_modules/isobject/index.js | 12 + .../base/node_modules/isobject/package.json | 74 + node_modules/base/package.json | 111 + .../binary-extensions/binary-extensions.json | 252 + node_modules/binary-extensions/license | 9 + node_modules/binary-extensions/package.json | 36 + node_modules/binary-extensions/readme.md | 33 + 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 | 47 + node_modules/braces/LICENSE | 21 + node_modules/braces/README.md | 248 + node_modules/braces/index.js | 399 + node_modules/braces/package.json | 83 + node_modules/cache-base/LICENSE | 21 + node_modules/cache-base/README.md | 291 + node_modules/cache-base/index.js | 261 + .../cache-base/node_modules/isobject/LICENSE | 21 + .../node_modules/isobject/README.md | 122 + .../node_modules/isobject/index.d.ts | 5 + .../cache-base/node_modules/isobject/index.js | 12 + .../node_modules/isobject/package.json | 74 + node_modules/cache-base/package.json | 82 + node_modules/call-bind/.eslintignore | 1 + node_modules/call-bind/.eslintrc | 16 + node_modules/call-bind/.github/FUNDING.yml | 12 + node_modules/call-bind/.nycrc | 9 + node_modules/call-bind/CHANGELOG.md | 77 + node_modules/call-bind/LICENSE | 21 + node_modules/call-bind/README.md | 64 + node_modules/call-bind/callBound.js | 15 + node_modules/call-bind/index.js | 44 + node_modules/call-bind/package.json | 90 + node_modules/call-bind/test/callBound.js | 54 + node_modules/call-bind/test/index.js | 80 + node_modules/camelcase/index.js | 27 + node_modules/camelcase/license | 21 + node_modules/camelcase/package.json | 38 + node_modules/camelcase/readme.md | 56 + node_modules/center-align/LICENSE | 21 + node_modules/center-align/README.md | 74 + node_modules/center-align/index.js | 16 + node_modules/center-align/package.json | 51 + node_modules/center-align/utils.js | 40 + node_modules/chalk/index.js | 116 + node_modules/chalk/license | 21 + node_modules/chalk/package.json | 70 + node_modules/chalk/readme.md | 213 + node_modules/chokidar/CHANGELOG.md | 264 + node_modules/chokidar/index.js | 695 ++ node_modules/chokidar/lib/fsevents-handler.js | 396 + node_modules/chokidar/lib/nodefs-handler.js | 481 + node_modules/chokidar/package.json | 55 + 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 | 51 + .../node_modules/is-descriptor/.editorconfig | 14 + .../node_modules/is-descriptor/.eslintrc | 16 + .../node_modules/is-descriptor/.gitattributes | 10 + .../is-descriptor/.github/FUNDING.yml | 12 + .../node_modules/is-descriptor/.nycrc | 9 + .../node_modules/is-descriptor/CHANGELOG.md | 144 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 134 + .../node_modules/is-descriptor/index.js | 16 + .../node_modules/is-descriptor/package.json | 88 + .../node_modules/is-descriptor/test/index.js | 116 + .../class-utils/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 | 74 + node_modules/class-utils/package.json | 90 + node_modules/cliui/.coveralls.yml | 1 + node_modules/cliui/.npmignore | 2 + node_modules/cliui/.travis.yml | 7 + node_modules/cliui/LICENSE.txt | 14 + node_modules/cliui/README.md | 104 + node_modules/cliui/index.js | 273 + node_modules/cliui/package.json | 59 + node_modules/cliui/test/cliui.js | 349 + 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 | 76 + node_modules/component-emitter/LICENSE | 24 + node_modules/component-emitter/Readme.md | 74 + node_modules/component-emitter/index.js | 175 + node_modules/component-emitter/package.json | 28 + 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 | 43 + node_modules/concat-map/test/map.js | 39 + node_modules/copy-descriptor/LICENSE | 21 + node_modules/copy-descriptor/index.js | 81 + node_modules/copy-descriptor/package.json | 56 + node_modules/core-js/CHANGELOG.md | 711 ++ node_modules/core-js/Gruntfile.js | 3 + node_modules/core-js/LICENSE | 19 + node_modules/core-js/README.md | 2307 +++++ 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 | 275 + node_modules/core-js/build/index.js | 104 + node_modules/core-js/client/core.js | 9100 +++++++++++++++++ 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 | 8168 +++++++++++++++ node_modules/core-js/client/library.min.js | 10 + .../core-js/client/library.min.js.map | 1 + node_modules/core-js/client/shim.js | 8663 ++++++++++++++++ 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 | 139 + 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 | 9 + 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 | 10 + 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 | 139 + 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 | 9 + 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 | 10 + .../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 + .../library/modules/_advance-string-index.js | 8 + .../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 | 62 + .../library/modules/_fails-is-regexp.js | 12 + .../core-js/library/modules/_fails.js | 7 + .../core-js/library/modules/_fix-re-wks.js | 96 + .../core-js/library/modules/_flags.js | 13 + .../library/modules/_flatten-into-array.js | 39 + .../core-js/library/modules/_for-of.js | 25 + .../library/modules/_function-to-string.js | 1 + .../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 | 69 + .../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 | 69 + .../library/modules/_native-weak-map.js | 4 + .../modules/_new-promise-capability.js | 18 + .../core-js/library/modules/_object-assign.js | 38 + .../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 | 21 + .../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 + .../library/modules/_regexp-exec-abstract.js | 1 + .../core-js/library/modules/_regexp-exec.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 | 12 + .../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 | 286 + .../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 | 33 + .../library/modules/es6.regexp.constructor.js | 1 + .../library/modules/es6.regexp.exec.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 | 246 + .../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 | 60 + .../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 | 15 + .../library/modules/es7.string.match-all.js | 30 + .../library/modules/es7.string.pad-end.js | 14 + .../library/modules/es7.string.pad-start.js | 14 + .../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 | 198 + 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 + .../core-js/modules/_advance-string-index.js | 8 + 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 | 96 + 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 + .../core-js/modules/_function-to-string.js | 1 + 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 | 69 + 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 | 69 + .../core-js/modules/_native-weak-map.js | 4 + .../modules/_new-promise-capability.js | 18 + .../core-js/modules/_object-assign.js | 38 + .../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 | 21 + 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 + .../core-js/modules/_regexp-exec-abstract.js | 21 + node_modules/core-js/modules/_regexp-exec.js | 58 + 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 | 12 + .../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 | 286 + .../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 | 33 + .../core-js/modules/es6.regexp.constructor.js | 43 + .../core-js/modules/es6.regexp.exec.js | 9 + .../core-js/modules/es6.regexp.flags.js | 5 + .../core-js/modules/es6.regexp.match.js | 40 + .../core-js/modules/es6.regexp.replace.js | 118 + .../core-js/modules/es6.regexp.search.js | 31 + .../core-js/modules/es6.regexp.split.js | 134 + .../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 | 246 + .../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 | 60 + 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 | 15 + .../core-js/modules/es7.string.match-all.js | 30 + .../core-js/modules/es7.string.pad-end.js | 14 + .../core-js/modules/es7.string.pad-start.js | 14 + .../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 | 62 + .../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 + .../modules/library/_regexp-exec-abstract.js | 1 + .../core-js/modules/library/_regexp-exec.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.exec.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 | 73 + node_modules/core-js/postinstall.js | 58 + node_modules/core-js/shim.js | 198 + 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/lib/util.js | 107 + node_modules/core-util-is/package.json | 38 + node_modules/cross-spawn-async/.editorconfig | 15 + node_modules/cross-spawn-async/.eslintrc | 7 + node_modules/cross-spawn-async/.npmignore | 3 + node_modules/cross-spawn-async/.travis.yml | 7 + node_modules/cross-spawn-async/LICENSE | 19 + node_modules/cross-spawn-async/README.md | 58 + node_modules/cross-spawn-async/appveyor.yml | 30 + node_modules/cross-spawn-async/index.js | 27 + node_modules/cross-spawn-async/lib/enoent.js | 51 + node_modules/cross-spawn-async/lib/parse.js | 128 + .../cross-spawn-async/lib/resolveCommand.js | 38 + node_modules/cross-spawn-async/package.json | 46 + node_modules/cross-spawn/LICENSE | 19 + node_modules/cross-spawn/README.md | 71 + node_modules/cross-spawn/index.js | 59 + node_modules/cross-spawn/lib/enoent.js | 73 + .../cross-spawn/lib/hasBrokenSpawn.js | 11 + node_modules/cross-spawn/lib/parse.js | 140 + .../cross-spawn/lib/resolveCommand.js | 31 + node_modules/cross-spawn/package.json | 51 + 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 | 49 + 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 | 38 + node_modules/decamelize/readme.md | 48 + node_modules/decode-uri-component/index.js | 94 + node_modules/decode-uri-component/license | 9 + .../decode-uri-component/package.json | 37 + node_modules/decode-uri-component/readme.md | 83 + node_modules/define-data-property/.eslintrc | 24 + .../define-data-property/.github/FUNDING.yml | 12 + node_modules/define-data-property/.nycrc | 13 + .../define-data-property/CHANGELOG.md | 41 + node_modules/define-data-property/LICENSE | 21 + node_modules/define-data-property/README.md | 67 + node_modules/define-data-property/index.d.ts | 3 + .../define-data-property/index.d.ts.map | 1 + node_modules/define-data-property/index.js | 68 + .../define-data-property/package.json | 113 + .../define-data-property/test/index.js | 392 + .../define-data-property/tsconfig.json | 59 + node_modules/define-properties/.editorconfig | 13 + node_modules/define-properties/.eslintrc | 19 + .../define-properties/.github/FUNDING.yml | 12 + node_modules/define-properties/.nycrc | 9 + node_modules/define-properties/CHANGELOG.md | 91 + node_modules/define-properties/LICENSE | 21 + node_modules/define-properties/README.md | 84 + node_modules/define-properties/index.js | 47 + node_modules/define-properties/package.json | 88 + 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/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 | 74 + node_modules/define-property/package.json | 67 + node_modules/duplexer/.travis.yml | 6 + node_modules/duplexer/LICENCE | 19 + node_modules/duplexer/README.md | 49 + node_modules/duplexer/index.js | 87 + node_modules/duplexer/package.json | 42 + node_modules/duplexer/test/index.js | 31 + node_modules/error-ex/LICENSE | 21 + node_modules/error-ex/README.md | 144 + node_modules/error-ex/index.js | 141 + node_modules/error-ex/package.json | 46 + node_modules/es-abstract/.editorconfig | 15 + node_modules/es-abstract/.eslintrc | 88 + node_modules/es-abstract/.nycrc | 15 + .../2015/AbstractEqualityComparison.js | 37 + .../2015/AbstractRelationalComparison.js | 63 + .../es-abstract/2015/AdvanceStringIndex.js | 47 + node_modules/es-abstract/2015/ArrayCreate.js | 54 + .../es-abstract/2015/ArraySetLength.js | 85 + .../es-abstract/2015/ArraySpeciesCreate.js | 47 + node_modules/es-abstract/2015/Call.js | 20 + .../2015/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2015/Canonicalize.js | 55 + .../es-abstract/2015/CharacterRange.js | 31 + .../2015/CompletePropertyDescriptor.js | 39 + .../es-abstract/2015/CompletionRecord.js | 53 + .../es-abstract/2015/CreateDataProperty.js | 27 + .../2015/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2015/CreateHTML.js | 30 + .../2015/CreateIterResultObject.js | 19 + .../2015/CreateListFromArrayLike.js | 45 + .../es-abstract/2015/CreateMethodProperty.js | 40 + node_modules/es-abstract/2015/DateFromTime.js | 54 + node_modules/es-abstract/2015/Day.js | 11 + node_modules/es-abstract/2015/DayFromYear.js | 10 + .../es-abstract/2015/DayWithinYear.js | 11 + node_modules/es-abstract/2015/DaysInYear.js | 18 + .../es-abstract/2015/DefinePropertyOrThrow.js | 50 + .../es-abstract/2015/DeletePropertyOrThrow.js | 27 + .../es-abstract/2015/DetachArrayBuffer.js | 34 + .../es-abstract/2015/EnumerableOwnNames.js | 19 + .../2015/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2015/Get.js | 25 + .../es-abstract/2015/GetGlobalObject.js | 9 + node_modules/es-abstract/2015/GetIterator.js | 34 + node_modules/es-abstract/2015/GetMethod.js | 36 + .../es-abstract/2015/GetOwnPropertyKeys.js | 31 + .../2015/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2015/GetSubstitution.js | 100 + node_modules/es-abstract/2015/GetV.js | 25 + .../es-abstract/2015/GetValueFromBuffer.js | 97 + .../es-abstract/2015/HasOwnProperty.js | 22 + node_modules/es-abstract/2015/HasProperty.js | 20 + node_modules/es-abstract/2015/HourFromTime.js | 14 + node_modules/es-abstract/2015/InLeapYear.js | 21 + .../es-abstract/2015/InstanceofOperator.js | 30 + node_modules/es-abstract/2015/Invoke.js | 24 + .../es-abstract/2015/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2015/IsArray.js | 4 + node_modules/es-abstract/2015/IsCallable.js | 5 + .../2015/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2015/IsConcatSpreadable.js | 25 + .../es-abstract/2015/IsConstructor.js | 40 + .../es-abstract/2015/IsDataDescriptor.js | 23 + .../es-abstract/2015/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2015/IsExtensible.js | 18 + .../es-abstract/2015/IsGenericDescriptor.js | 23 + node_modules/es-abstract/2015/IsInteger.js | 9 + node_modules/es-abstract/2015/IsPromise.js | 24 + .../es-abstract/2015/IsPropertyDescriptor.js | 19 + .../es-abstract/2015/IsPropertyKey.js | 7 + node_modules/es-abstract/2015/IsRegExp.js | 24 + node_modules/es-abstract/2015/IsWordChar.js | 39 + .../es-abstract/2015/IteratorClose.js | 51 + .../es-abstract/2015/IteratorComplete.js | 18 + node_modules/es-abstract/2015/IteratorNext.js | 18 + node_modules/es-abstract/2015/IteratorStep.js | 13 + .../es-abstract/2015/IteratorValue.js | 18 + node_modules/es-abstract/2015/MakeDate.js | 13 + node_modules/es-abstract/2015/MakeDay.js | 33 + node_modules/es-abstract/2015/MakeTime.js | 23 + node_modules/es-abstract/2015/MinFromTime.js | 14 + .../es-abstract/2015/MonthFromTime.js | 47 + .../es-abstract/2015/NewPromiseCapability.js | 36 + .../es-abstract/2015/NormalCompletion.js | 9 + node_modules/es-abstract/2015/ObjectCreate.js | 50 + .../2015/ObjectDefineProperties.js | 38 + .../2015/OrdinaryCreateFromConstructor.js | 20 + .../2015/OrdinaryDefineOwnProperty.js | 61 + .../2015/OrdinaryGetOwnProperty.js | 44 + .../es-abstract/2015/OrdinaryHasInstance.js | 25 + .../es-abstract/2015/OrdinaryHasProperty.js | 20 + .../es-abstract/2015/QuoteJSONString.js | 52 + node_modules/es-abstract/2015/RegExpCreate.js | 21 + node_modules/es-abstract/2015/RegExpExec.js | 32 + .../2015/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2015/SameValue.js | 13 + .../es-abstract/2015/SameValueZero.js | 9 + node_modules/es-abstract/2015/SecFromTime.js | 14 + node_modules/es-abstract/2015/Set.js | 47 + .../es-abstract/2015/SetFunctionName.js | 44 + .../es-abstract/2015/SetIntegrityLevel.js | 57 + .../es-abstract/2015/SetValueInBuffer.js | 120 + .../es-abstract/2015/SpeciesConstructor.js | 32 + node_modules/es-abstract/2015/SplitMatch.js | 39 + .../2015/StrictEqualityComparison.js | 17 + node_modules/es-abstract/2015/StringCreate.js | 40 + .../2015/StringGetIndexProperty.js | 52 + .../2015/SymbolDescriptiveString.js | 20 + .../es-abstract/2015/TestIntegrityLevel.js | 42 + node_modules/es-abstract/2015/TimeClip.js | 21 + node_modules/es-abstract/2015/TimeFromYear.js | 11 + .../es-abstract/2015/TimeWithinDay.js | 12 + node_modules/es-abstract/2015/ToBoolean.js | 5 + node_modules/es-abstract/2015/ToDateString.js | 23 + node_modules/es-abstract/2015/ToInt16.js | 10 + node_modules/es-abstract/2015/ToInt32.js | 9 + node_modules/es-abstract/2015/ToInt8.js | 10 + node_modules/es-abstract/2015/ToInteger.js | 12 + node_modules/es-abstract/2015/ToLength.js | 12 + node_modules/es-abstract/2015/ToNumber.js | 48 + node_modules/es-abstract/2015/ToObject.js | 14 + node_modules/es-abstract/2015/ToPrimitive.js | 12 + .../es-abstract/2015/ToPropertyDescriptor.js | 52 + .../es-abstract/2015/ToPropertyKey.js | 15 + node_modules/es-abstract/2015/ToString.js | 15 + node_modules/es-abstract/2015/ToUint16.js | 19 + node_modules/es-abstract/2015/ToUint32.js | 9 + node_modules/es-abstract/2015/ToUint8.js | 20 + node_modules/es-abstract/2015/ToUint8Clamp.js | 19 + node_modules/es-abstract/2015/Type.js | 12 + .../ValidateAndApplyPropertyDescriptor.js | 170 + .../es-abstract/2015/ValidateTypedArray.js | 30 + node_modules/es-abstract/2015/WeekDay.js | 10 + node_modules/es-abstract/2015/YearFromTime.js | 16 + node_modules/es-abstract/2015/abs.js | 11 + node_modules/es-abstract/2015/floor.js | 11 + node_modules/es-abstract/2015/max.js | 7 + node_modules/es-abstract/2015/min.js | 7 + node_modules/es-abstract/2015/modulo.js | 9 + node_modules/es-abstract/2015/msFromTime.js | 11 + .../es-abstract/2015/thisBooleanValue.js | 15 + .../es-abstract/2015/thisNumberValue.js | 18 + .../es-abstract/2015/thisStringValue.js | 15 + .../es-abstract/2015/thisTimeValue.js | 9 + .../2016/AbstractEqualityComparison.js | 37 + .../2016/AbstractRelationalComparison.js | 63 + .../es-abstract/2016/AdvanceStringIndex.js | 47 + node_modules/es-abstract/2016/ArrayCreate.js | 54 + .../es-abstract/2016/ArraySetLength.js | 85 + .../es-abstract/2016/ArraySpeciesCreate.js | 47 + node_modules/es-abstract/2016/Call.js | 20 + .../2016/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2016/Canonicalize.js | 55 + .../es-abstract/2016/CharacterRange.js | 31 + .../2016/CompletePropertyDescriptor.js | 39 + .../es-abstract/2016/CompletionRecord.js | 53 + .../es-abstract/2016/CreateDataProperty.js | 27 + .../2016/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2016/CreateHTML.js | 30 + .../2016/CreateIterResultObject.js | 19 + .../2016/CreateListFromArrayLike.js | 45 + .../es-abstract/2016/CreateMethodProperty.js | 40 + node_modules/es-abstract/2016/DateFromTime.js | 54 + node_modules/es-abstract/2016/Day.js | 11 + node_modules/es-abstract/2016/DayFromYear.js | 10 + .../es-abstract/2016/DayWithinYear.js | 11 + node_modules/es-abstract/2016/DaysInYear.js | 18 + .../es-abstract/2016/DefinePropertyOrThrow.js | 50 + .../es-abstract/2016/DeletePropertyOrThrow.js | 27 + .../es-abstract/2016/DetachArrayBuffer.js | 34 + .../es-abstract/2016/EnumerableOwnNames.js | 19 + .../2016/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2016/Get.js | 25 + .../es-abstract/2016/GetGlobalObject.js | 9 + node_modules/es-abstract/2016/GetIterator.js | 34 + node_modules/es-abstract/2016/GetMethod.js | 36 + .../es-abstract/2016/GetOwnPropertyKeys.js | 31 + .../2016/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2016/GetSubstitution.js | 100 + node_modules/es-abstract/2016/GetV.js | 25 + .../es-abstract/2016/GetValueFromBuffer.js | 97 + .../es-abstract/2016/HasOwnProperty.js | 22 + node_modules/es-abstract/2016/HasProperty.js | 20 + node_modules/es-abstract/2016/HourFromTime.js | 14 + node_modules/es-abstract/2016/InLeapYear.js | 21 + .../es-abstract/2016/InstanceofOperator.js | 30 + node_modules/es-abstract/2016/Invoke.js | 24 + .../es-abstract/2016/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2016/IsArray.js | 4 + node_modules/es-abstract/2016/IsCallable.js | 5 + .../2016/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2016/IsConcatSpreadable.js | 25 + .../es-abstract/2016/IsConstructor.js | 40 + .../es-abstract/2016/IsDataDescriptor.js | 23 + .../es-abstract/2016/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2016/IsExtensible.js | 18 + .../es-abstract/2016/IsGenericDescriptor.js | 23 + node_modules/es-abstract/2016/IsInteger.js | 9 + node_modules/es-abstract/2016/IsPromise.js | 24 + .../es-abstract/2016/IsPropertyDescriptor.js | 19 + .../es-abstract/2016/IsPropertyKey.js | 7 + node_modules/es-abstract/2016/IsRegExp.js | 24 + node_modules/es-abstract/2016/IsWordChar.js | 39 + .../es-abstract/2016/IterableToArrayLike.js | 39 + .../es-abstract/2016/IteratorClose.js | 51 + .../es-abstract/2016/IteratorComplete.js | 18 + node_modules/es-abstract/2016/IteratorNext.js | 18 + node_modules/es-abstract/2016/IteratorStep.js | 13 + .../es-abstract/2016/IteratorValue.js | 18 + node_modules/es-abstract/2016/MakeDate.js | 13 + node_modules/es-abstract/2016/MakeDay.js | 33 + node_modules/es-abstract/2016/MakeTime.js | 23 + node_modules/es-abstract/2016/MinFromTime.js | 14 + .../es-abstract/2016/MonthFromTime.js | 47 + .../es-abstract/2016/NewPromiseCapability.js | 36 + .../es-abstract/2016/NormalCompletion.js | 9 + node_modules/es-abstract/2016/ObjectCreate.js | 50 + .../2016/ObjectDefineProperties.js | 38 + .../2016/OrdinaryCreateFromConstructor.js | 20 + .../2016/OrdinaryDefineOwnProperty.js | 61 + .../2016/OrdinaryGetOwnProperty.js | 44 + .../2016/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2016/OrdinaryHasInstance.js | 25 + .../es-abstract/2016/OrdinaryHasProperty.js | 20 + .../2016/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2016/QuoteJSONString.js | 52 + node_modules/es-abstract/2016/RegExpCreate.js | 21 + node_modules/es-abstract/2016/RegExpExec.js | 32 + .../2016/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2016/SameValue.js | 13 + .../es-abstract/2016/SameValueNonNumber.js | 16 + .../es-abstract/2016/SameValueZero.js | 9 + node_modules/es-abstract/2016/SecFromTime.js | 14 + node_modules/es-abstract/2016/Set.js | 47 + .../es-abstract/2016/SetFunctionName.js | 44 + .../es-abstract/2016/SetIntegrityLevel.js | 57 + .../es-abstract/2016/SetValueInBuffer.js | 120 + .../es-abstract/2016/SpeciesConstructor.js | 32 + node_modules/es-abstract/2016/SplitMatch.js | 39 + .../2016/StrictEqualityComparison.js | 17 + node_modules/es-abstract/2016/StringCreate.js | 40 + .../2016/SymbolDescriptiveString.js | 20 + .../es-abstract/2016/TestIntegrityLevel.js | 42 + node_modules/es-abstract/2016/TimeClip.js | 21 + node_modules/es-abstract/2016/TimeFromYear.js | 11 + .../es-abstract/2016/TimeWithinDay.js | 12 + node_modules/es-abstract/2016/ToBoolean.js | 5 + node_modules/es-abstract/2016/ToDateString.js | 23 + node_modules/es-abstract/2016/ToInt16.js | 10 + node_modules/es-abstract/2016/ToInt32.js | 9 + node_modules/es-abstract/2016/ToInt8.js | 10 + node_modules/es-abstract/2016/ToInteger.js | 12 + node_modules/es-abstract/2016/ToLength.js | 12 + node_modules/es-abstract/2016/ToNumber.js | 48 + node_modules/es-abstract/2016/ToObject.js | 14 + node_modules/es-abstract/2016/ToPrimitive.js | 12 + .../es-abstract/2016/ToPropertyDescriptor.js | 52 + .../es-abstract/2016/ToPropertyKey.js | 15 + node_modules/es-abstract/2016/ToString.js | 15 + node_modules/es-abstract/2016/ToUint16.js | 19 + node_modules/es-abstract/2016/ToUint32.js | 9 + node_modules/es-abstract/2016/ToUint8.js | 20 + node_modules/es-abstract/2016/ToUint8Clamp.js | 19 + node_modules/es-abstract/2016/Type.js | 12 + .../es-abstract/2016/TypedArrayCreate.js | 50 + .../2016/TypedArraySpeciesCreate.js | 39 + node_modules/es-abstract/2016/UTF16Decode.js | 21 + .../es-abstract/2016/UTF16Encoding.js | 25 + .../ValidateAndApplyPropertyDescriptor.js | 170 + .../es-abstract/2016/ValidateTypedArray.js | 30 + node_modules/es-abstract/2016/WeekDay.js | 10 + node_modules/es-abstract/2016/YearFromTime.js | 16 + node_modules/es-abstract/2016/abs.js | 11 + node_modules/es-abstract/2016/floor.js | 11 + node_modules/es-abstract/2016/max.js | 7 + node_modules/es-abstract/2016/min.js | 7 + node_modules/es-abstract/2016/modulo.js | 9 + node_modules/es-abstract/2016/msFromTime.js | 11 + .../es-abstract/2016/thisBooleanValue.js | 15 + .../es-abstract/2016/thisNumberValue.js | 18 + .../es-abstract/2016/thisStringValue.js | 15 + .../es-abstract/2016/thisTimeValue.js | 9 + .../2017/AbstractEqualityComparison.js | 37 + .../2017/AbstractRelationalComparison.js | 63 + .../es-abstract/2017/AdvanceStringIndex.js | 47 + node_modules/es-abstract/2017/ArrayCreate.js | 54 + .../es-abstract/2017/ArraySetLength.js | 85 + .../es-abstract/2017/ArraySpeciesCreate.js | 47 + node_modules/es-abstract/2017/Call.js | 20 + .../2017/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2017/Canonicalize.js | 55 + .../es-abstract/2017/CharacterRange.js | 31 + .../2017/CompletePropertyDescriptor.js | 39 + .../es-abstract/2017/CompletionRecord.js | 53 + .../es-abstract/2017/CreateDataProperty.js | 27 + .../2017/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2017/CreateHTML.js | 30 + .../2017/CreateIterResultObject.js | 19 + .../2017/CreateListFromArrayLike.js | 45 + .../es-abstract/2017/CreateMethodProperty.js | 40 + node_modules/es-abstract/2017/DateFromTime.js | 54 + node_modules/es-abstract/2017/Day.js | 11 + node_modules/es-abstract/2017/DayFromYear.js | 10 + .../es-abstract/2017/DayWithinYear.js | 11 + node_modules/es-abstract/2017/DaysInYear.js | 18 + .../es-abstract/2017/DefinePropertyOrThrow.js | 50 + .../es-abstract/2017/DeletePropertyOrThrow.js | 27 + .../es-abstract/2017/DetachArrayBuffer.js | 35 + .../2017/EnumerableOwnProperties.js | 43 + .../2017/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2017/Get.js | 25 + .../es-abstract/2017/GetGlobalObject.js | 9 + node_modules/es-abstract/2017/GetIterator.js | 34 + node_modules/es-abstract/2017/GetMethod.js | 36 + .../es-abstract/2017/GetOwnPropertyKeys.js | 31 + .../2017/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2017/GetSubstitution.js | 100 + node_modules/es-abstract/2017/GetV.js | 25 + .../es-abstract/2017/GetValueFromBuffer.js | 108 + .../es-abstract/2017/HasOwnProperty.js | 22 + node_modules/es-abstract/2017/HasProperty.js | 20 + node_modules/es-abstract/2017/HourFromTime.js | 14 + node_modules/es-abstract/2017/InLeapYear.js | 21 + .../es-abstract/2017/InstanceofOperator.js | 30 + node_modules/es-abstract/2017/Invoke.js | 24 + .../es-abstract/2017/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2017/IsArray.js | 4 + node_modules/es-abstract/2017/IsCallable.js | 5 + .../2017/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2017/IsConcatSpreadable.js | 25 + .../es-abstract/2017/IsConstructor.js | 40 + .../es-abstract/2017/IsDataDescriptor.js | 23 + .../es-abstract/2017/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2017/IsExtensible.js | 18 + .../es-abstract/2017/IsGenericDescriptor.js | 23 + node_modules/es-abstract/2017/IsInteger.js | 9 + node_modules/es-abstract/2017/IsPromise.js | 24 + .../es-abstract/2017/IsPropertyDescriptor.js | 19 + .../es-abstract/2017/IsPropertyKey.js | 7 + node_modules/es-abstract/2017/IsRegExp.js | 24 + .../es-abstract/2017/IsSharedArrayBuffer.js | 19 + node_modules/es-abstract/2017/IsWordChar.js | 48 + .../es-abstract/2017/IterableToList.js | 24 + .../es-abstract/2017/IteratorClose.js | 51 + .../es-abstract/2017/IteratorComplete.js | 18 + node_modules/es-abstract/2017/IteratorNext.js | 18 + node_modules/es-abstract/2017/IteratorStep.js | 13 + .../es-abstract/2017/IteratorValue.js | 18 + node_modules/es-abstract/2017/MakeDate.js | 13 + node_modules/es-abstract/2017/MakeDay.js | 33 + node_modules/es-abstract/2017/MakeTime.js | 23 + node_modules/es-abstract/2017/MinFromTime.js | 14 + .../es-abstract/2017/MonthFromTime.js | 47 + .../es-abstract/2017/NewPromiseCapability.js | 36 + .../es-abstract/2017/NormalCompletion.js | 9 + .../es-abstract/2017/NumberToRawBytes.js | 74 + node_modules/es-abstract/2017/ObjectCreate.js | 50 + .../2017/ObjectDefineProperties.js | 38 + .../2017/OrdinaryCreateFromConstructor.js | 20 + .../2017/OrdinaryDefineOwnProperty.js | 61 + .../2017/OrdinaryGetOwnProperty.js | 44 + .../2017/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2017/OrdinaryHasInstance.js | 25 + .../es-abstract/2017/OrdinaryHasProperty.js | 20 + .../2017/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2017/OrdinaryToPrimitive.js | 38 + .../es-abstract/2017/QuoteJSONString.js | 52 + .../es-abstract/2017/RawBytesToNumber.js | 74 + node_modules/es-abstract/2017/RegExpCreate.js | 21 + node_modules/es-abstract/2017/RegExpExec.js | 32 + .../2017/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2017/SameValue.js | 13 + .../es-abstract/2017/SameValueNonNumber.js | 16 + .../es-abstract/2017/SameValueZero.js | 9 + node_modules/es-abstract/2017/SecFromTime.js | 14 + node_modules/es-abstract/2017/Set.js | 47 + .../es-abstract/2017/SetFunctionName.js | 44 + .../es-abstract/2017/SetIntegrityLevel.js | 57 + .../es-abstract/2017/SetValueInBuffer.js | 120 + .../es-abstract/2017/SpeciesConstructor.js | 32 + node_modules/es-abstract/2017/SplitMatch.js | 39 + .../2017/StrictEqualityComparison.js | 17 + node_modules/es-abstract/2017/StringCreate.js | 40 + .../es-abstract/2017/StringGetOwnProperty.js | 48 + .../2017/SymbolDescriptiveString.js | 20 + .../es-abstract/2017/TestIntegrityLevel.js | 42 + node_modules/es-abstract/2017/TimeClip.js | 21 + node_modules/es-abstract/2017/TimeFromYear.js | 11 + .../es-abstract/2017/TimeWithinDay.js | 12 + node_modules/es-abstract/2017/ToBoolean.js | 5 + node_modules/es-abstract/2017/ToDateString.js | 23 + node_modules/es-abstract/2017/ToIndex.js | 26 + node_modules/es-abstract/2017/ToInt16.js | 10 + node_modules/es-abstract/2017/ToInt32.js | 9 + node_modules/es-abstract/2017/ToInt8.js | 10 + node_modules/es-abstract/2017/ToInteger.js | 12 + node_modules/es-abstract/2017/ToLength.js | 12 + node_modules/es-abstract/2017/ToNumber.js | 48 + node_modules/es-abstract/2017/ToObject.js | 14 + node_modules/es-abstract/2017/ToPrimitive.js | 12 + .../es-abstract/2017/ToPropertyDescriptor.js | 52 + .../es-abstract/2017/ToPropertyKey.js | 15 + node_modules/es-abstract/2017/ToString.js | 15 + node_modules/es-abstract/2017/ToUint16.js | 19 + node_modules/es-abstract/2017/ToUint32.js | 9 + node_modules/es-abstract/2017/ToUint8.js | 20 + node_modules/es-abstract/2017/ToUint8Clamp.js | 19 + node_modules/es-abstract/2017/Type.js | 12 + .../es-abstract/2017/TypedArrayCreate.js | 50 + .../2017/TypedArraySpeciesCreate.js | 39 + node_modules/es-abstract/2017/UTF16Decode.js | 21 + .../es-abstract/2017/UTF16Encoding.js | 25 + .../ValidateAndApplyPropertyDescriptor.js | 170 + .../es-abstract/2017/ValidateAtomicAccess.js | 36 + .../es-abstract/2017/ValidateTypedArray.js | 30 + node_modules/es-abstract/2017/WeekDay.js | 10 + .../es-abstract/2017/WordCharacters.js | 49 + node_modules/es-abstract/2017/YearFromTime.js | 16 + node_modules/es-abstract/2017/abs.js | 11 + node_modules/es-abstract/2017/floor.js | 11 + node_modules/es-abstract/2017/max.js | 7 + node_modules/es-abstract/2017/min.js | 7 + node_modules/es-abstract/2017/modulo.js | 9 + node_modules/es-abstract/2017/msFromTime.js | 11 + .../es-abstract/2017/thisBooleanValue.js | 15 + .../es-abstract/2017/thisNumberValue.js | 18 + .../es-abstract/2017/thisStringValue.js | 15 + .../es-abstract/2017/thisTimeValue.js | 9 + .../2018/AbstractEqualityComparison.js | 37 + .../2018/AbstractRelationalComparison.js | 61 + .../es-abstract/2018/AdvanceStringIndex.js | 47 + node_modules/es-abstract/2018/ArrayCreate.js | 54 + .../es-abstract/2018/ArraySetLength.js | 85 + .../es-abstract/2018/ArraySpeciesCreate.js | 47 + .../es-abstract/2018/AsyncIteratorClose.js | 62 + node_modules/es-abstract/2018/Call.js | 20 + .../2018/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2018/Canonicalize.js | 55 + .../es-abstract/2018/CharacterRange.js | 31 + .../2018/CompletePropertyDescriptor.js | 39 + .../es-abstract/2018/CompletionRecord.js | 53 + .../es-abstract/2018/CopyDataProperties.js | 68 + .../2018/CreateAsyncFromSyncIterator.js | 155 + .../es-abstract/2018/CreateDataProperty.js | 27 + .../2018/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2018/CreateHTML.js | 30 + .../2018/CreateIterResultObject.js | 19 + .../2018/CreateListFromArrayLike.js | 45 + .../es-abstract/2018/CreateMethodProperty.js | 40 + node_modules/es-abstract/2018/DateFromTime.js | 54 + node_modules/es-abstract/2018/DateString.js | 30 + node_modules/es-abstract/2018/Day.js | 11 + node_modules/es-abstract/2018/DayFromYear.js | 10 + .../es-abstract/2018/DayWithinYear.js | 11 + node_modules/es-abstract/2018/DaysInYear.js | 18 + .../es-abstract/2018/DefinePropertyOrThrow.js | 50 + .../es-abstract/2018/DeletePropertyOrThrow.js | 27 + .../es-abstract/2018/DetachArrayBuffer.js | 43 + .../2018/EnumerableOwnPropertyNames.js | 43 + .../2018/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2018/Get.js | 25 + .../es-abstract/2018/GetGlobalObject.js | 9 + node_modules/es-abstract/2018/GetIterator.js | 34 + node_modules/es-abstract/2018/GetMethod.js | 36 + .../es-abstract/2018/GetOwnPropertyKeys.js | 31 + .../2018/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2018/GetSubstitution.js | 124 + node_modules/es-abstract/2018/GetV.js | 25 + .../es-abstract/2018/GetValueFromBuffer.js | 108 + .../es-abstract/2018/HasOwnProperty.js | 22 + node_modules/es-abstract/2018/HasProperty.js | 20 + node_modules/es-abstract/2018/HourFromTime.js | 14 + node_modules/es-abstract/2018/InLeapYear.js | 21 + .../es-abstract/2018/InstanceofOperator.js | 30 + node_modules/es-abstract/2018/Invoke.js | 24 + .../es-abstract/2018/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2018/IsArray.js | 4 + node_modules/es-abstract/2018/IsCallable.js | 5 + .../2018/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2018/IsConcatSpreadable.js | 25 + .../es-abstract/2018/IsConstructor.js | 40 + .../es-abstract/2018/IsDataDescriptor.js | 23 + .../es-abstract/2018/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2018/IsExtensible.js | 18 + .../es-abstract/2018/IsGenericDescriptor.js | 23 + node_modules/es-abstract/2018/IsInteger.js | 9 + node_modules/es-abstract/2018/IsPromise.js | 24 + .../es-abstract/2018/IsPropertyKey.js | 7 + node_modules/es-abstract/2018/IsRegExp.js | 24 + .../es-abstract/2018/IsSharedArrayBuffer.js | 19 + .../es-abstract/2018/IsStringPrefix.js | 47 + node_modules/es-abstract/2018/IsWordChar.js | 48 + .../es-abstract/2018/IterableToList.js | 24 + .../es-abstract/2018/IteratorClose.js | 51 + .../es-abstract/2018/IteratorComplete.js | 18 + node_modules/es-abstract/2018/IteratorNext.js | 18 + node_modules/es-abstract/2018/IteratorStep.js | 13 + .../es-abstract/2018/IteratorValue.js | 18 + node_modules/es-abstract/2018/MakeDate.js | 13 + node_modules/es-abstract/2018/MakeDay.js | 33 + node_modules/es-abstract/2018/MakeTime.js | 23 + node_modules/es-abstract/2018/MinFromTime.js | 14 + .../es-abstract/2018/MonthFromTime.js | 47 + .../es-abstract/2018/NewPromiseCapability.js | 36 + .../es-abstract/2018/NormalCompletion.js | 9 + .../es-abstract/2018/NumberToRawBytes.js | 74 + .../es-abstract/2018/NumberToString.js | 19 + node_modules/es-abstract/2018/ObjectCreate.js | 50 + .../2018/ObjectDefineProperties.js | 38 + .../2018/OrdinaryCreateFromConstructor.js | 20 + .../2018/OrdinaryDefineOwnProperty.js | 61 + .../2018/OrdinaryGetOwnProperty.js | 44 + .../2018/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2018/OrdinaryHasInstance.js | 25 + .../es-abstract/2018/OrdinaryHasProperty.js | 20 + .../2018/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2018/OrdinaryToPrimitive.js | 38 + .../es-abstract/2018/PromiseResolve.js | 17 + .../es-abstract/2018/QuoteJSONString.js | 48 + .../es-abstract/2018/RawBytesToNumber.js | 74 + node_modules/es-abstract/2018/RegExpCreate.js | 21 + node_modules/es-abstract/2018/RegExpExec.js | 32 + .../2018/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2018/SameValue.js | 13 + .../es-abstract/2018/SameValueNonNumber.js | 16 + .../es-abstract/2018/SameValueZero.js | 9 + node_modules/es-abstract/2018/SecFromTime.js | 14 + node_modules/es-abstract/2018/Set.js | 47 + .../es-abstract/2018/SetFunctionLength.js | 32 + .../es-abstract/2018/SetFunctionName.js | 44 + .../es-abstract/2018/SetIntegrityLevel.js | 57 + .../es-abstract/2018/SetValueInBuffer.js | 120 + .../es-abstract/2018/SpeciesConstructor.js | 32 + node_modules/es-abstract/2018/SplitMatch.js | 39 + .../2018/StrictEqualityComparison.js | 17 + node_modules/es-abstract/2018/StringCreate.js | 40 + .../es-abstract/2018/StringGetOwnProperty.js | 48 + .../2018/SymbolDescriptiveString.js | 20 + .../es-abstract/2018/TestIntegrityLevel.js | 42 + .../es-abstract/2018/ThrowCompletion.js | 9 + node_modules/es-abstract/2018/TimeClip.js | 21 + node_modules/es-abstract/2018/TimeFromYear.js | 11 + node_modules/es-abstract/2018/TimeString.js | 25 + .../es-abstract/2018/TimeWithinDay.js | 12 + node_modules/es-abstract/2018/ToBoolean.js | 5 + node_modules/es-abstract/2018/ToDateString.js | 23 + node_modules/es-abstract/2018/ToIndex.js | 26 + node_modules/es-abstract/2018/ToInt16.js | 10 + node_modules/es-abstract/2018/ToInt32.js | 9 + node_modules/es-abstract/2018/ToInt8.js | 10 + node_modules/es-abstract/2018/ToInteger.js | 12 + node_modules/es-abstract/2018/ToLength.js | 12 + node_modules/es-abstract/2018/ToNumber.js | 48 + node_modules/es-abstract/2018/ToObject.js | 14 + node_modules/es-abstract/2018/ToPrimitive.js | 12 + .../es-abstract/2018/ToPropertyDescriptor.js | 52 + .../es-abstract/2018/ToPropertyKey.js | 15 + node_modules/es-abstract/2018/ToString.js | 15 + node_modules/es-abstract/2018/ToUint16.js | 19 + node_modules/es-abstract/2018/ToUint32.js | 9 + node_modules/es-abstract/2018/ToUint8.js | 20 + node_modules/es-abstract/2018/ToUint8Clamp.js | 19 + node_modules/es-abstract/2018/Type.js | 12 + .../es-abstract/2018/TypedArrayCreate.js | 50 + .../2018/TypedArraySpeciesCreate.js | 39 + node_modules/es-abstract/2018/UTF16Decode.js | 21 + .../es-abstract/2018/UTF16Encoding.js | 25 + .../es-abstract/2018/UnicodeEscape.js | 26 + .../ValidateAndApplyPropertyDescriptor.js | 170 + .../es-abstract/2018/ValidateAtomicAccess.js | 36 + .../es-abstract/2018/ValidateTypedArray.js | 30 + node_modules/es-abstract/2018/WeekDay.js | 10 + .../es-abstract/2018/WordCharacters.js | 49 + node_modules/es-abstract/2018/YearFromTime.js | 16 + node_modules/es-abstract/2018/abs.js | 11 + node_modules/es-abstract/2018/floor.js | 11 + node_modules/es-abstract/2018/max.js | 7 + node_modules/es-abstract/2018/min.js | 7 + node_modules/es-abstract/2018/modulo.js | 9 + node_modules/es-abstract/2018/msFromTime.js | 11 + .../es-abstract/2018/thisBooleanValue.js | 15 + .../es-abstract/2018/thisNumberValue.js | 18 + .../es-abstract/2018/thisStringValue.js | 15 + .../es-abstract/2018/thisSymbolValue.js | 19 + .../es-abstract/2018/thisTimeValue.js | 9 + .../2019/AbstractEqualityComparison.js | 37 + .../2019/AbstractRelationalComparison.js | 61 + .../2019/AddEntriesFromIterable.js | 47 + .../es-abstract/2019/AdvanceStringIndex.js | 47 + node_modules/es-abstract/2019/ArrayCreate.js | 54 + .../es-abstract/2019/ArraySetLength.js | 85 + .../es-abstract/2019/ArraySpeciesCreate.js | 47 + .../2019/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2019/AsyncIteratorClose.js | 62 + node_modules/es-abstract/2019/Call.js | 20 + .../2019/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2019/Canonicalize.js | 55 + .../es-abstract/2019/CharacterRange.js | 31 + .../2019/CompletePropertyDescriptor.js | 39 + .../es-abstract/2019/CompletionRecord.js | 53 + .../es-abstract/2019/CopyDataProperties.js | 68 + .../2019/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2019/CreateDataProperty.js | 27 + .../2019/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2019/CreateHTML.js | 30 + .../2019/CreateIterResultObject.js | 19 + .../2019/CreateListFromArrayLike.js | 45 + .../es-abstract/2019/CreateMethodProperty.js | 40 + node_modules/es-abstract/2019/DateFromTime.js | 54 + node_modules/es-abstract/2019/DateString.js | 30 + node_modules/es-abstract/2019/Day.js | 11 + node_modules/es-abstract/2019/DayFromYear.js | 10 + .../es-abstract/2019/DayWithinYear.js | 11 + node_modules/es-abstract/2019/DaysInYear.js | 18 + .../es-abstract/2019/DefinePropertyOrThrow.js | 50 + .../es-abstract/2019/DeletePropertyOrThrow.js | 27 + .../es-abstract/2019/DetachArrayBuffer.js | 43 + .../2019/EnumerableOwnPropertyNames.js | 43 + .../es-abstract/2019/FlattenIntoArray.js | 57 + .../2019/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2019/Get.js | 25 + .../es-abstract/2019/GetGlobalObject.js | 9 + node_modules/es-abstract/2019/GetIterator.js | 34 + node_modules/es-abstract/2019/GetMethod.js | 36 + .../es-abstract/2019/GetOwnPropertyKeys.js | 31 + .../2019/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2019/GetSubstitution.js | 124 + node_modules/es-abstract/2019/GetV.js | 25 + .../es-abstract/2019/GetValueFromBuffer.js | 106 + .../es-abstract/2019/HasOwnProperty.js | 22 + node_modules/es-abstract/2019/HasProperty.js | 20 + node_modules/es-abstract/2019/HourFromTime.js | 14 + node_modules/es-abstract/2019/InLeapYear.js | 21 + .../es-abstract/2019/InstanceofOperator.js | 30 + node_modules/es-abstract/2019/Invoke.js | 24 + .../es-abstract/2019/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2019/IsArray.js | 4 + node_modules/es-abstract/2019/IsCallable.js | 5 + .../2019/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2019/IsConcatSpreadable.js | 25 + .../es-abstract/2019/IsConstructor.js | 40 + .../es-abstract/2019/IsDataDescriptor.js | 23 + .../es-abstract/2019/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2019/IsExtensible.js | 18 + .../es-abstract/2019/IsGenericDescriptor.js | 23 + node_modules/es-abstract/2019/IsInteger.js | 9 + node_modules/es-abstract/2019/IsPromise.js | 24 + .../es-abstract/2019/IsPropertyKey.js | 7 + node_modules/es-abstract/2019/IsRegExp.js | 24 + .../es-abstract/2019/IsSharedArrayBuffer.js | 19 + .../es-abstract/2019/IsStringPrefix.js | 47 + node_modules/es-abstract/2019/IsWordChar.js | 48 + .../es-abstract/2019/IterableToList.js | 24 + .../es-abstract/2019/IteratorClose.js | 51 + .../es-abstract/2019/IteratorComplete.js | 18 + node_modules/es-abstract/2019/IteratorNext.js | 18 + node_modules/es-abstract/2019/IteratorStep.js | 13 + .../es-abstract/2019/IteratorValue.js | 18 + node_modules/es-abstract/2019/MakeDate.js | 13 + node_modules/es-abstract/2019/MakeDay.js | 33 + node_modules/es-abstract/2019/MakeTime.js | 23 + node_modules/es-abstract/2019/MinFromTime.js | 14 + .../es-abstract/2019/MonthFromTime.js | 47 + .../es-abstract/2019/NewPromiseCapability.js | 36 + .../es-abstract/2019/NormalCompletion.js | 9 + .../es-abstract/2019/NumberToRawBytes.js | 74 + .../es-abstract/2019/NumberToString.js | 19 + node_modules/es-abstract/2019/ObjectCreate.js | 50 + .../2019/ObjectDefineProperties.js | 38 + .../2019/OrdinaryCreateFromConstructor.js | 20 + .../2019/OrdinaryDefineOwnProperty.js | 61 + .../2019/OrdinaryGetOwnProperty.js | 44 + .../2019/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2019/OrdinaryHasInstance.js | 25 + .../es-abstract/2019/OrdinaryHasProperty.js | 20 + .../2019/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2019/OrdinaryToPrimitive.js | 38 + .../es-abstract/2019/PromiseResolve.js | 17 + .../es-abstract/2019/QuoteJSONString.js | 54 + .../es-abstract/2019/RawBytesToNumber.js | 74 + node_modules/es-abstract/2019/RegExpCreate.js | 21 + node_modules/es-abstract/2019/RegExpExec.js | 32 + .../2019/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2019/SameValue.js | 13 + .../es-abstract/2019/SameValueNonNumber.js | 16 + .../es-abstract/2019/SameValueZero.js | 9 + node_modules/es-abstract/2019/SecFromTime.js | 14 + node_modules/es-abstract/2019/Set.js | 47 + .../es-abstract/2019/SetFunctionLength.js | 32 + .../es-abstract/2019/SetFunctionName.js | 44 + .../es-abstract/2019/SetIntegrityLevel.js | 57 + .../es-abstract/2019/SetValueInBuffer.js | 120 + .../es-abstract/2019/SpeciesConstructor.js | 32 + node_modules/es-abstract/2019/SplitMatch.js | 39 + .../2019/StrictEqualityComparison.js | 17 + node_modules/es-abstract/2019/StringCreate.js | 40 + .../es-abstract/2019/StringGetOwnProperty.js | 48 + .../2019/SymbolDescriptiveString.js | 20 + .../es-abstract/2019/TestIntegrityLevel.js | 42 + .../es-abstract/2019/ThrowCompletion.js | 9 + node_modules/es-abstract/2019/TimeClip.js | 21 + node_modules/es-abstract/2019/TimeFromYear.js | 11 + node_modules/es-abstract/2019/TimeString.js | 25 + .../es-abstract/2019/TimeWithinDay.js | 12 + node_modules/es-abstract/2019/ToBoolean.js | 5 + node_modules/es-abstract/2019/ToDateString.js | 23 + node_modules/es-abstract/2019/ToIndex.js | 26 + node_modules/es-abstract/2019/ToInt16.js | 10 + node_modules/es-abstract/2019/ToInt32.js | 9 + node_modules/es-abstract/2019/ToInt8.js | 10 + node_modules/es-abstract/2019/ToInteger.js | 12 + node_modules/es-abstract/2019/ToLength.js | 12 + node_modules/es-abstract/2019/ToNumber.js | 48 + node_modules/es-abstract/2019/ToObject.js | 14 + node_modules/es-abstract/2019/ToPrimitive.js | 12 + .../es-abstract/2019/ToPropertyDescriptor.js | 52 + .../es-abstract/2019/ToPropertyKey.js | 15 + node_modules/es-abstract/2019/ToString.js | 15 + node_modules/es-abstract/2019/ToUint16.js | 19 + node_modules/es-abstract/2019/ToUint32.js | 9 + node_modules/es-abstract/2019/ToUint8.js | 20 + node_modules/es-abstract/2019/ToUint8Clamp.js | 19 + node_modules/es-abstract/2019/TrimString.js | 29 + node_modules/es-abstract/2019/Type.js | 12 + .../es-abstract/2019/TypedArrayCreate.js | 50 + .../2019/TypedArraySpeciesCreate.js | 39 + node_modules/es-abstract/2019/UTF16Decode.js | 21 + .../es-abstract/2019/UTF16Encoding.js | 25 + .../es-abstract/2019/UnicodeEscape.js | 26 + .../ValidateAndApplyPropertyDescriptor.js | 170 + .../es-abstract/2019/ValidateAtomicAccess.js | 36 + .../es-abstract/2019/ValidateTypedArray.js | 30 + node_modules/es-abstract/2019/WeekDay.js | 10 + .../es-abstract/2019/WordCharacters.js | 49 + node_modules/es-abstract/2019/YearFromTime.js | 16 + node_modules/es-abstract/2019/abs.js | 11 + node_modules/es-abstract/2019/floor.js | 11 + node_modules/es-abstract/2019/max.js | 7 + node_modules/es-abstract/2019/min.js | 7 + node_modules/es-abstract/2019/modulo.js | 9 + node_modules/es-abstract/2019/msFromTime.js | 11 + .../es-abstract/2019/thisBooleanValue.js | 15 + .../es-abstract/2019/thisNumberValue.js | 18 + .../es-abstract/2019/thisStringValue.js | 15 + .../es-abstract/2019/thisSymbolValue.js | 19 + .../es-abstract/2019/thisTimeValue.js | 9 + .../2020/AbstractEqualityComparison.js | 57 + .../2020/AbstractRelationalComparison.js | 82 + .../2020/AddEntriesFromIterable.js | 47 + .../es-abstract/2020/AdvanceStringIndex.js | 34 + node_modules/es-abstract/2020/ArrayCreate.js | 54 + .../es-abstract/2020/ArraySetLength.js | 85 + .../es-abstract/2020/ArraySpeciesCreate.js | 47 + .../2020/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2020/AsyncIteratorClose.js | 62 + node_modules/es-abstract/2020/BigInt/add.js | 18 + .../es-abstract/2020/BigInt/bitwiseAND.js | 17 + .../es-abstract/2020/BigInt/bitwiseNOT.js | 17 + .../es-abstract/2020/BigInt/bitwiseOR.js | 17 + .../es-abstract/2020/BigInt/bitwiseXOR.js | 17 + .../es-abstract/2020/BigInt/divide.js | 22 + node_modules/es-abstract/2020/BigInt/equal.js | 17 + .../es-abstract/2020/BigInt/exponentiate.js | 31 + node_modules/es-abstract/2020/BigInt/index.js | 43 + .../es-abstract/2020/BigInt/leftShift.js | 18 + .../es-abstract/2020/BigInt/lessThan.js | 18 + .../es-abstract/2020/BigInt/multiply.js | 18 + .../es-abstract/2020/BigInt/remainder.js | 30 + .../es-abstract/2020/BigInt/sameValue.js | 18 + .../es-abstract/2020/BigInt/sameValueZero.js | 18 + .../2020/BigInt/signedRightShift.js | 18 + .../es-abstract/2020/BigInt/subtract.js | 18 + .../es-abstract/2020/BigInt/toString.js | 18 + .../es-abstract/2020/BigInt/unaryMinus.js | 24 + .../2020/BigInt/unsignedRightShift.js | 17 + .../es-abstract/2020/BigIntBitwiseOp.js | 66 + node_modules/es-abstract/2020/BinaryAnd.js | 14 + node_modules/es-abstract/2020/BinaryOr.js | 14 + node_modules/es-abstract/2020/BinaryXor.js | 14 + node_modules/es-abstract/2020/Call.js | 20 + .../2020/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2020/Canonicalize.js | 55 + .../es-abstract/2020/CharacterRange.js | 31 + node_modules/es-abstract/2020/CodePointAt.js | 58 + .../2020/CompletePropertyDescriptor.js | 39 + .../es-abstract/2020/CompletionRecord.js | 53 + .../es-abstract/2020/CopyDataProperties.js | 64 + .../2020/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2020/CreateDataProperty.js | 27 + .../2020/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2020/CreateHTML.js | 30 + .../2020/CreateIterResultObject.js | 19 + .../2020/CreateListFromArrayLike.js | 46 + .../es-abstract/2020/CreateMethodProperty.js | 40 + .../2020/CreateRegExpStringIterator.js | 100 + node_modules/es-abstract/2020/DateFromTime.js | 54 + node_modules/es-abstract/2020/DateString.js | 30 + node_modules/es-abstract/2020/Day.js | 11 + node_modules/es-abstract/2020/DayFromYear.js | 10 + .../es-abstract/2020/DayWithinYear.js | 11 + node_modules/es-abstract/2020/DaysInYear.js | 18 + .../es-abstract/2020/DefinePropertyOrThrow.js | 50 + .../es-abstract/2020/DeletePropertyOrThrow.js | 27 + .../es-abstract/2020/DetachArrayBuffer.js | 43 + .../2020/EnumerableOwnPropertyNames.js | 43 + .../es-abstract/2020/FlattenIntoArray.js | 57 + .../2020/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2020/Get.js | 25 + .../es-abstract/2020/GetGlobalObject.js | 9 + node_modules/es-abstract/2020/GetIterator.js | 66 + node_modules/es-abstract/2020/GetMethod.js | 36 + .../es-abstract/2020/GetOwnPropertyKeys.js | 31 + .../2020/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2020/GetSubstitution.js | 124 + node_modules/es-abstract/2020/GetV.js | 25 + .../es-abstract/2020/GetValueFromBuffer.js | 110 + .../es-abstract/2020/HasOwnProperty.js | 22 + node_modules/es-abstract/2020/HasProperty.js | 20 + node_modules/es-abstract/2020/HourFromTime.js | 14 + node_modules/es-abstract/2020/InLeapYear.js | 21 + .../es-abstract/2020/InstanceofOperator.js | 30 + node_modules/es-abstract/2020/Invoke.js | 24 + .../es-abstract/2020/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2020/IsArray.js | 4 + .../es-abstract/2020/IsBigIntElementType.js | 7 + node_modules/es-abstract/2020/IsCallable.js | 5 + .../2020/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2020/IsConcatSpreadable.js | 25 + .../es-abstract/2020/IsConstructor.js | 40 + .../es-abstract/2020/IsDataDescriptor.js | 23 + .../es-abstract/2020/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2020/IsExtensible.js | 18 + .../es-abstract/2020/IsGenericDescriptor.js | 23 + node_modules/es-abstract/2020/IsInteger.js | 9 + .../es-abstract/2020/IsNoTearConfiguration.js | 16 + .../es-abstract/2020/IsNonNegativeInteger.js | 9 + node_modules/es-abstract/2020/IsPromise.js | 24 + .../es-abstract/2020/IsPropertyKey.js | 7 + node_modules/es-abstract/2020/IsRegExp.js | 24 + .../es-abstract/2020/IsSharedArrayBuffer.js | 19 + .../es-abstract/2020/IsStringPrefix.js | 47 + .../2020/IsUnclampedIntegerElementType.js | 12 + .../es-abstract/2020/IsUnsignedElementType.js | 11 + .../es-abstract/2020/IsValidIntegerIndex.js | 30 + node_modules/es-abstract/2020/IsWordChar.js | 48 + .../es-abstract/2020/IterableToList.js | 24 + .../es-abstract/2020/IteratorClose.js | 51 + .../es-abstract/2020/IteratorComplete.js | 18 + node_modules/es-abstract/2020/IteratorNext.js | 18 + node_modules/es-abstract/2020/IteratorStep.js | 13 + .../es-abstract/2020/IteratorValue.js | 18 + .../es-abstract/2020/LengthOfArrayLike.js | 20 + node_modules/es-abstract/2020/MakeDate.js | 13 + node_modules/es-abstract/2020/MakeDay.js | 33 + node_modules/es-abstract/2020/MakeTime.js | 23 + node_modules/es-abstract/2020/MinFromTime.js | 14 + .../es-abstract/2020/MonthFromTime.js | 47 + .../es-abstract/2020/NewPromiseCapability.js | 36 + .../es-abstract/2020/NormalCompletion.js | 9 + node_modules/es-abstract/2020/Number/add.js | 44 + .../es-abstract/2020/Number/bitwiseAND.js | 17 + .../es-abstract/2020/Number/bitwiseNOT.js | 19 + .../es-abstract/2020/Number/bitwiseOR.js | 17 + .../es-abstract/2020/Number/bitwiseXOR.js | 17 + .../es-abstract/2020/Number/divide.js | 22 + node_modules/es-abstract/2020/Number/equal.js | 21 + .../es-abstract/2020/Number/exponentiate.js | 77 + node_modules/es-abstract/2020/Number/index.js | 43 + .../es-abstract/2020/Number/leftShift.js | 24 + .../es-abstract/2020/Number/lessThan.js | 26 + .../es-abstract/2020/Number/multiply.js | 33 + .../es-abstract/2020/Number/remainder.js | 32 + .../es-abstract/2020/Number/sameValue.js | 21 + .../es-abstract/2020/Number/sameValueZero.js | 24 + .../2020/Number/signedRightShift.js | 24 + .../es-abstract/2020/Number/subtract.js | 16 + .../es-abstract/2020/Number/toString.js | 18 + .../es-abstract/2020/Number/unaryMinus.js | 21 + .../2020/Number/unsignedRightShift.js | 24 + .../es-abstract/2020/NumberBitwiseOp.js | 29 + .../es-abstract/2020/NumberToBigInt.js | 27 + .../es-abstract/2020/NumericToRawBytes.js | 80 + .../2020/ObjectDefineProperties.js | 38 + .../2020/OrdinaryCreateFromConstructor.js | 20 + .../2020/OrdinaryDefineOwnProperty.js | 61 + .../2020/OrdinaryGetOwnProperty.js | 44 + .../2020/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2020/OrdinaryHasInstance.js | 25 + .../es-abstract/2020/OrdinaryHasProperty.js | 20 + .../es-abstract/2020/OrdinaryObjectCreate.js | 56 + .../2020/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2020/OrdinaryToPrimitive.js | 38 + .../es-abstract/2020/PromiseResolve.js | 17 + .../es-abstract/2020/QuoteJSONString.js | 54 + .../es-abstract/2020/RawBytesToNumeric.js | 84 + node_modules/es-abstract/2020/RegExpCreate.js | 21 + node_modules/es-abstract/2020/RegExpExec.js | 32 + .../2020/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2020/SameValue.js | 13 + .../es-abstract/2020/SameValueNonNumeric.js | 21 + .../es-abstract/2020/SameValueZero.js | 9 + node_modules/es-abstract/2020/SecFromTime.js | 14 + node_modules/es-abstract/2020/Set.js | 47 + .../es-abstract/2020/SetFunctionLength.js | 31 + .../es-abstract/2020/SetFunctionName.js | 44 + .../es-abstract/2020/SetIntegrityLevel.js | 57 + .../es-abstract/2020/SetValueInBuffer.js | 109 + .../es-abstract/2020/SpeciesConstructor.js | 32 + node_modules/es-abstract/2020/SplitMatch.js | 39 + .../2020/StrictEqualityComparison.js | 17 + node_modules/es-abstract/2020/StringCreate.js | 40 + .../es-abstract/2020/StringGetOwnProperty.js | 48 + node_modules/es-abstract/2020/StringPad.js | 43 + .../es-abstract/2020/StringToBigInt.js | 23 + .../2020/SymbolDescriptiveString.js | 20 + .../es-abstract/2020/TestIntegrityLevel.js | 42 + .../es-abstract/2020/ThrowCompletion.js | 9 + node_modules/es-abstract/2020/TimeClip.js | 21 + node_modules/es-abstract/2020/TimeFromYear.js | 11 + node_modules/es-abstract/2020/TimeString.js | 25 + .../es-abstract/2020/TimeWithinDay.js | 12 + node_modules/es-abstract/2020/ToBigInt.js | 53 + node_modules/es-abstract/2020/ToBigInt64.js | 25 + node_modules/es-abstract/2020/ToBigUint64.js | 22 + node_modules/es-abstract/2020/ToBoolean.js | 5 + node_modules/es-abstract/2020/ToDateString.js | 23 + node_modules/es-abstract/2020/ToIndex.js | 26 + node_modules/es-abstract/2020/ToInt16.js | 10 + node_modules/es-abstract/2020/ToInt32.js | 9 + node_modules/es-abstract/2020/ToInt8.js | 10 + node_modules/es-abstract/2020/ToInteger.js | 15 + node_modules/es-abstract/2020/ToLength.js | 12 + node_modules/es-abstract/2020/ToNumber.js | 51 + node_modules/es-abstract/2020/ToNumeric.js | 21 + node_modules/es-abstract/2020/ToObject.js | 14 + node_modules/es-abstract/2020/ToPrimitive.js | 12 + .../es-abstract/2020/ToPropertyDescriptor.js | 52 + .../es-abstract/2020/ToPropertyKey.js | 15 + node_modules/es-abstract/2020/ToString.js | 15 + node_modules/es-abstract/2020/ToUint16.js | 19 + node_modules/es-abstract/2020/ToUint32.js | 9 + node_modules/es-abstract/2020/ToUint8.js | 20 + node_modules/es-abstract/2020/ToUint8Clamp.js | 19 + node_modules/es-abstract/2020/TrimString.js | 29 + node_modules/es-abstract/2020/Type.js | 15 + .../es-abstract/2020/TypedArrayCreate.js | 50 + .../2020/TypedArraySpeciesCreate.js | 39 + .../es-abstract/2020/UTF16DecodeString.js | 29 + .../2020/UTF16DecodeSurrogatePair.js | 19 + .../es-abstract/2020/UTF16Encoding.js | 25 + .../es-abstract/2020/UnicodeEscape.js | 27 + .../ValidateAndApplyPropertyDescriptor.js | 170 + .../es-abstract/2020/ValidateAtomicAccess.js | 36 + .../es-abstract/2020/ValidateTypedArray.js | 30 + node_modules/es-abstract/2020/WeekDay.js | 10 + .../es-abstract/2020/WordCharacters.js | 49 + node_modules/es-abstract/2020/YearFromTime.js | 16 + node_modules/es-abstract/2020/abs.js | 11 + node_modules/es-abstract/2020/floor.js | 16 + node_modules/es-abstract/2020/max.js | 7 + node_modules/es-abstract/2020/min.js | 7 + node_modules/es-abstract/2020/modulo.js | 9 + node_modules/es-abstract/2020/msFromTime.js | 11 + .../es-abstract/2020/thisBigIntValue.js | 22 + .../es-abstract/2020/thisBooleanValue.js | 15 + .../es-abstract/2020/thisNumberValue.js | 18 + .../es-abstract/2020/thisStringValue.js | 15 + .../es-abstract/2020/thisSymbolValue.js | 19 + .../es-abstract/2020/thisTimeValue.js | 9 + .../2021/AbstractEqualityComparison.js | 57 + .../2021/AbstractRelationalComparison.js | 82 + .../2021/AddEntriesFromIterable.js | 47 + .../es-abstract/2021/AddToKeptObjects.js | 21 + .../es-abstract/2021/AdvanceStringIndex.js | 34 + .../ApplyStringOrNumericBinaryOperator.js | 80 + node_modules/es-abstract/2021/ArrayCreate.js | 54 + .../es-abstract/2021/ArraySetLength.js | 85 + .../es-abstract/2021/ArraySpeciesCreate.js | 49 + .../2021/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2021/AsyncIteratorClose.js | 68 + node_modules/es-abstract/2021/BigInt/add.js | 18 + .../es-abstract/2021/BigInt/bitwiseAND.js | 17 + .../es-abstract/2021/BigInt/bitwiseNOT.js | 17 + .../es-abstract/2021/BigInt/bitwiseOR.js | 17 + .../es-abstract/2021/BigInt/bitwiseXOR.js | 17 + .../es-abstract/2021/BigInt/divide.js | 22 + node_modules/es-abstract/2021/BigInt/equal.js | 17 + .../es-abstract/2021/BigInt/exponentiate.js | 31 + node_modules/es-abstract/2021/BigInt/index.js | 43 + .../es-abstract/2021/BigInt/leftShift.js | 18 + .../es-abstract/2021/BigInt/lessThan.js | 18 + .../es-abstract/2021/BigInt/multiply.js | 18 + .../es-abstract/2021/BigInt/remainder.js | 30 + .../es-abstract/2021/BigInt/sameValue.js | 18 + .../es-abstract/2021/BigInt/sameValueZero.js | 18 + .../2021/BigInt/signedRightShift.js | 18 + .../es-abstract/2021/BigInt/subtract.js | 18 + .../es-abstract/2021/BigInt/toString.js | 18 + .../es-abstract/2021/BigInt/unaryMinus.js | 24 + .../2021/BigInt/unsignedRightShift.js | 17 + .../es-abstract/2021/BigIntBitwiseOp.js | 66 + node_modules/es-abstract/2021/BinaryAnd.js | 14 + node_modules/es-abstract/2021/BinaryOr.js | 14 + node_modules/es-abstract/2021/BinaryXor.js | 14 + .../es-abstract/2021/ByteListBitwiseOp.js | 44 + .../es-abstract/2021/ByteListEqual.js | 33 + node_modules/es-abstract/2021/Call.js | 20 + .../2021/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2021/Canonicalize.js | 55 + .../es-abstract/2021/CharacterRange.js | 31 + .../es-abstract/2021/ClearKeptObjects.js | 12 + .../es-abstract/2021/CloneArrayBuffer.js | 49 + node_modules/es-abstract/2021/CodePointAt.js | 58 + .../es-abstract/2021/CodePointsToString.js | 27 + .../2021/CompletePropertyDescriptor.js | 39 + .../es-abstract/2021/CompletionRecord.js | 53 + .../es-abstract/2021/CopyDataProperties.js | 70 + .../2021/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2021/CreateDataProperty.js | 27 + .../2021/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2021/CreateHTML.js | 30 + .../2021/CreateIterResultObject.js | 19 + .../2021/CreateListFromArrayLike.js | 46 + .../es-abstract/2021/CreateMethodProperty.js | 40 + .../2021/CreateRegExpStringIterator.js | 100 + node_modules/es-abstract/2021/DateFromTime.js | 54 + node_modules/es-abstract/2021/DateString.js | 30 + node_modules/es-abstract/2021/Day.js | 11 + node_modules/es-abstract/2021/DayFromYear.js | 10 + .../es-abstract/2021/DayWithinYear.js | 11 + node_modules/es-abstract/2021/DaysInYear.js | 18 + .../es-abstract/2021/DefinePropertyOrThrow.js | 50 + .../es-abstract/2021/DeletePropertyOrThrow.js | 27 + .../es-abstract/2021/DetachArrayBuffer.js | 43 + .../2021/EnumerableOwnPropertyNames.js | 43 + .../es-abstract/2021/FlattenIntoArray.js | 57 + .../2021/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2021/Get.js | 25 + .../es-abstract/2021/GetGlobalObject.js | 9 + node_modules/es-abstract/2021/GetIterator.js | 66 + node_modules/es-abstract/2021/GetMethod.js | 36 + .../es-abstract/2021/GetOwnPropertyKeys.js | 31 + .../es-abstract/2021/GetPromiseResolve.js | 22 + .../2021/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2021/GetSubstitution.js | 124 + node_modules/es-abstract/2021/GetV.js | 25 + .../es-abstract/2021/GetValueFromBuffer.js | 110 + .../es-abstract/2021/HasOwnProperty.js | 22 + node_modules/es-abstract/2021/HasProperty.js | 20 + node_modules/es-abstract/2021/HourFromTime.js | 14 + node_modules/es-abstract/2021/InLeapYear.js | 21 + .../es-abstract/2021/InstanceofOperator.js | 30 + node_modules/es-abstract/2021/Invoke.js | 24 + .../es-abstract/2021/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2021/IsArray.js | 4 + .../es-abstract/2021/IsBigIntElementType.js | 7 + node_modules/es-abstract/2021/IsCallable.js | 5 + .../2021/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2021/IsConcatSpreadable.js | 25 + .../es-abstract/2021/IsConstructor.js | 40 + .../es-abstract/2021/IsDataDescriptor.js | 23 + .../es-abstract/2021/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2021/IsExtensible.js | 18 + .../es-abstract/2021/IsGenericDescriptor.js | 23 + .../es-abstract/2021/IsIntegralNumber.js | 9 + .../es-abstract/2021/IsNoTearConfiguration.js | 16 + node_modules/es-abstract/2021/IsPromise.js | 24 + .../es-abstract/2021/IsPropertyKey.js | 7 + node_modules/es-abstract/2021/IsRegExp.js | 24 + .../es-abstract/2021/IsSharedArrayBuffer.js | 19 + .../es-abstract/2021/IsStringPrefix.js | 47 + .../2021/IsUnclampedIntegerElementType.js | 12 + .../es-abstract/2021/IsUnsignedElementType.js | 11 + .../es-abstract/2021/IsValidIntegerIndex.js | 33 + node_modules/es-abstract/2021/IsWordChar.js | 48 + .../es-abstract/2021/IterableToList.js | 29 + .../es-abstract/2021/IteratorClose.js | 51 + .../es-abstract/2021/IteratorComplete.js | 18 + node_modules/es-abstract/2021/IteratorNext.js | 18 + node_modules/es-abstract/2021/IteratorStep.js | 13 + .../es-abstract/2021/IteratorValue.js | 18 + .../es-abstract/2021/LengthOfArrayLike.js | 20 + node_modules/es-abstract/2021/MakeDate.js | 13 + node_modules/es-abstract/2021/MakeDay.js | 36 + node_modules/es-abstract/2021/MakeTime.js | 23 + node_modules/es-abstract/2021/MinFromTime.js | 14 + .../es-abstract/2021/MonthFromTime.js | 47 + .../es-abstract/2021/NewPromiseCapability.js | 36 + .../es-abstract/2021/NormalCompletion.js | 9 + node_modules/es-abstract/2021/Number/add.js | 36 + .../es-abstract/2021/Number/bitwiseAND.js | 17 + .../es-abstract/2021/Number/bitwiseNOT.js | 19 + .../es-abstract/2021/Number/bitwiseOR.js | 17 + .../es-abstract/2021/Number/bitwiseXOR.js | 17 + .../es-abstract/2021/Number/divide.js | 22 + node_modules/es-abstract/2021/Number/equal.js | 21 + .../es-abstract/2021/Number/exponentiate.js | 77 + node_modules/es-abstract/2021/Number/index.js | 43 + .../es-abstract/2021/Number/leftShift.js | 25 + .../es-abstract/2021/Number/lessThan.js | 26 + .../es-abstract/2021/Number/multiply.js | 33 + .../es-abstract/2021/Number/remainder.js | 32 + .../es-abstract/2021/Number/sameValue.js | 21 + .../es-abstract/2021/Number/sameValueZero.js | 24 + .../2021/Number/signedRightShift.js | 25 + .../es-abstract/2021/Number/subtract.js | 19 + .../es-abstract/2021/Number/toString.js | 18 + .../es-abstract/2021/Number/unaryMinus.js | 21 + .../2021/Number/unsignedRightShift.js | 25 + .../es-abstract/2021/NumberBitwiseOp.js | 29 + .../es-abstract/2021/NumberToBigInt.js | 26 + .../es-abstract/2021/NumericToRawBytes.js | 80 + .../2021/ObjectDefineProperties.js | 38 + .../2021/OrdinaryCreateFromConstructor.js | 20 + .../2021/OrdinaryDefineOwnProperty.js | 61 + .../2021/OrdinaryGetOwnProperty.js | 44 + .../2021/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2021/OrdinaryHasInstance.js | 25 + .../es-abstract/2021/OrdinaryHasProperty.js | 20 + .../es-abstract/2021/OrdinaryObjectCreate.js | 56 + .../2021/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2021/OrdinaryToPrimitive.js | 38 + .../es-abstract/2021/PromiseResolve.js | 17 + .../es-abstract/2021/QuoteJSONString.js | 54 + .../es-abstract/2021/RawBytesToNumeric.js | 84 + node_modules/es-abstract/2021/RegExpCreate.js | 21 + node_modules/es-abstract/2021/RegExpExec.js | 32 + .../2021/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2021/SameValue.js | 13 + .../es-abstract/2021/SameValueNonNumeric.js | 21 + .../es-abstract/2021/SameValueZero.js | 9 + node_modules/es-abstract/2021/SecFromTime.js | 14 + node_modules/es-abstract/2021/Set.js | 47 + .../es-abstract/2021/SetFunctionLength.js | 32 + .../es-abstract/2021/SetFunctionName.js | 44 + .../es-abstract/2021/SetIntegrityLevel.js | 57 + .../2021/SetTypedArrayFromArrayLike.js | 127 + .../2021/SetTypedArrayFromTypedArray.js | 167 + .../es-abstract/2021/SetValueInBuffer.js | 105 + .../es-abstract/2021/SpeciesConstructor.js | 32 + node_modules/es-abstract/2021/SplitMatch.js | 39 + .../2021/StrictEqualityComparison.js | 17 + node_modules/es-abstract/2021/StringCreate.js | 40 + .../es-abstract/2021/StringGetOwnProperty.js | 48 + .../es-abstract/2021/StringIndexOf.js | 40 + node_modules/es-abstract/2021/StringPad.js | 43 + .../es-abstract/2021/StringToBigInt.js | 23 + .../es-abstract/2021/StringToCodePoints.js | 29 + .../2021/SymbolDescriptiveString.js | 20 + .../es-abstract/2021/TestIntegrityLevel.js | 42 + .../es-abstract/2021/ThrowCompletion.js | 9 + node_modules/es-abstract/2021/TimeClip.js | 21 + node_modules/es-abstract/2021/TimeFromYear.js | 11 + node_modules/es-abstract/2021/TimeString.js | 25 + .../es-abstract/2021/TimeWithinDay.js | 12 + node_modules/es-abstract/2021/ToBigInt.js | 53 + node_modules/es-abstract/2021/ToBigInt64.js | 25 + node_modules/es-abstract/2021/ToBigUint64.js | 22 + node_modules/es-abstract/2021/ToBoolean.js | 5 + node_modules/es-abstract/2021/ToDateString.js | 23 + node_modules/es-abstract/2021/ToIndex.js | 26 + node_modules/es-abstract/2021/ToInt16.js | 10 + node_modules/es-abstract/2021/ToInt32.js | 9 + node_modules/es-abstract/2021/ToInt8.js | 10 + .../es-abstract/2021/ToIntegerOrInfinity.js | 20 + node_modules/es-abstract/2021/ToLength.js | 12 + node_modules/es-abstract/2021/ToNumber.js | 51 + node_modules/es-abstract/2021/ToNumeric.js | 21 + node_modules/es-abstract/2021/ToObject.js | 14 + node_modules/es-abstract/2021/ToPrimitive.js | 12 + .../es-abstract/2021/ToPropertyDescriptor.js | 52 + .../es-abstract/2021/ToPropertyKey.js | 15 + node_modules/es-abstract/2021/ToString.js | 15 + node_modules/es-abstract/2021/ToUint16.js | 19 + node_modules/es-abstract/2021/ToUint32.js | 9 + node_modules/es-abstract/2021/ToUint8.js | 20 + node_modules/es-abstract/2021/ToUint8Clamp.js | 19 + node_modules/es-abstract/2021/TrimString.js | 29 + node_modules/es-abstract/2021/Type.js | 15 + .../es-abstract/2021/TypedArrayCreate.js | 50 + .../2021/TypedArraySpeciesCreate.js | 39 + .../es-abstract/2021/UTF16EncodeCodePoint.js | 25 + .../2021/UTF16SurrogatePairToCodePoint.js | 19 + .../es-abstract/2021/UnicodeEscape.js | 27 + .../ValidateAndApplyPropertyDescriptor.js | 170 + .../es-abstract/2021/ValidateAtomicAccess.js | 59 + .../2021/ValidateIntegerTypedArray.js | 53 + .../es-abstract/2021/ValidateTypedArray.js | 30 + node_modules/es-abstract/2021/WeakRefDeref.js | 24 + node_modules/es-abstract/2021/WeekDay.js | 10 + .../es-abstract/2021/WordCharacters.js | 49 + node_modules/es-abstract/2021/YearFromTime.js | 16 + node_modules/es-abstract/2021/abs.js | 11 + node_modules/es-abstract/2021/clamp.js | 18 + node_modules/es-abstract/2021/floor.js | 16 + node_modules/es-abstract/2021/max.js | 7 + node_modules/es-abstract/2021/min.js | 7 + node_modules/es-abstract/2021/modulo.js | 9 + node_modules/es-abstract/2021/msFromTime.js | 11 + node_modules/es-abstract/2021/substring.js | 21 + .../es-abstract/2021/thisBigIntValue.js | 22 + .../es-abstract/2021/thisBooleanValue.js | 15 + .../es-abstract/2021/thisNumberValue.js | 18 + .../es-abstract/2021/thisStringValue.js | 15 + .../es-abstract/2021/thisSymbolValue.js | 19 + .../es-abstract/2021/thisTimeValue.js | 9 + .../2022/AddEntriesFromIterable.js | 47 + .../es-abstract/2022/AddToKeptObjects.js | 21 + .../es-abstract/2022/AdvanceStringIndex.js | 34 + .../ApplyStringOrNumericBinaryOperator.js | 80 + node_modules/es-abstract/2022/ArrayCreate.js | 54 + .../es-abstract/2022/ArraySetLength.js | 85 + .../es-abstract/2022/ArraySpeciesCreate.js | 49 + .../2022/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2022/AsyncIteratorClose.js | 68 + node_modules/es-abstract/2022/BigInt/add.js | 18 + .../es-abstract/2022/BigInt/bitwiseAND.js | 17 + .../es-abstract/2022/BigInt/bitwiseNOT.js | 17 + .../es-abstract/2022/BigInt/bitwiseOR.js | 17 + .../es-abstract/2022/BigInt/bitwiseXOR.js | 17 + .../es-abstract/2022/BigInt/divide.js | 22 + node_modules/es-abstract/2022/BigInt/equal.js | 17 + .../es-abstract/2022/BigInt/exponentiate.js | 31 + node_modules/es-abstract/2022/BigInt/index.js | 43 + .../es-abstract/2022/BigInt/leftShift.js | 18 + .../es-abstract/2022/BigInt/lessThan.js | 18 + .../es-abstract/2022/BigInt/multiply.js | 18 + .../es-abstract/2022/BigInt/remainder.js | 30 + .../es-abstract/2022/BigInt/sameValue.js | 18 + .../es-abstract/2022/BigInt/sameValueZero.js | 18 + .../2022/BigInt/signedRightShift.js | 18 + .../es-abstract/2022/BigInt/subtract.js | 18 + .../es-abstract/2022/BigInt/toString.js | 18 + .../es-abstract/2022/BigInt/unaryMinus.js | 24 + .../2022/BigInt/unsignedRightShift.js | 17 + .../es-abstract/2022/BigIntBitwiseOp.js | 66 + node_modules/es-abstract/2022/BinaryAnd.js | 14 + node_modules/es-abstract/2022/BinaryOr.js | 14 + node_modules/es-abstract/2022/BinaryXor.js | 14 + .../es-abstract/2022/ByteListBitwiseOp.js | 44 + .../es-abstract/2022/ByteListEqual.js | 33 + node_modules/es-abstract/2022/Call.js | 20 + .../2022/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2022/Canonicalize.js | 55 + .../es-abstract/2022/CharacterRange.js | 31 + .../es-abstract/2022/ClearKeptObjects.js | 12 + .../es-abstract/2022/CloneArrayBuffer.js | 49 + node_modules/es-abstract/2022/CodePointAt.js | 58 + .../es-abstract/2022/CodePointsToString.js | 27 + .../2022/CompletePropertyDescriptor.js | 39 + .../es-abstract/2022/CompletionRecord.js | 53 + .../es-abstract/2022/CopyDataProperties.js | 70 + .../2022/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2022/CreateDataProperty.js | 27 + .../2022/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2022/CreateHTML.js | 30 + .../2022/CreateIterResultObject.js | 19 + .../2022/CreateListFromArrayLike.js | 46 + .../es-abstract/2022/CreateMethodProperty.js | 40 + .../CreateNonEnumerableDataPropertyOrThrow.js | 29 + .../2022/CreateRegExpStringIterator.js | 100 + node_modules/es-abstract/2022/DateFromTime.js | 54 + node_modules/es-abstract/2022/DateString.js | 30 + node_modules/es-abstract/2022/Day.js | 11 + node_modules/es-abstract/2022/DayFromYear.js | 10 + .../es-abstract/2022/DayWithinYear.js | 11 + node_modules/es-abstract/2022/DaysInYear.js | 18 + .../es-abstract/2022/DefinePropertyOrThrow.js | 50 + .../es-abstract/2022/DeletePropertyOrThrow.js | 27 + .../es-abstract/2022/DetachArrayBuffer.js | 43 + .../2022/EnumerableOwnPropertyNames.js | 43 + .../es-abstract/2022/FlattenIntoArray.js | 57 + .../2022/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2022/Get.js | 25 + .../es-abstract/2022/GetGlobalObject.js | 9 + node_modules/es-abstract/2022/GetIterator.js | 66 + .../es-abstract/2022/GetMatchIndexPair.js | 26 + .../es-abstract/2022/GetMatchString.js | 27 + node_modules/es-abstract/2022/GetMethod.js | 36 + .../es-abstract/2022/GetOwnPropertyKeys.js | 31 + .../es-abstract/2022/GetPromiseResolve.js | 22 + .../2022/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2022/GetStringIndex.js | 31 + .../es-abstract/2022/GetSubstitution.js | 124 + node_modules/es-abstract/2022/GetV.js | 25 + .../es-abstract/2022/GetValueFromBuffer.js | 110 + .../es-abstract/2022/HasOwnProperty.js | 22 + node_modules/es-abstract/2022/HasProperty.js | 20 + node_modules/es-abstract/2022/HourFromTime.js | 14 + node_modules/es-abstract/2022/InLeapYear.js | 21 + .../es-abstract/2022/InstallErrorCause.js | 23 + .../es-abstract/2022/InstanceofOperator.js | 30 + node_modules/es-abstract/2022/Invoke.js | 24 + .../es-abstract/2022/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2022/IsArray.js | 4 + .../es-abstract/2022/IsBigIntElementType.js | 7 + node_modules/es-abstract/2022/IsCallable.js | 5 + .../2022/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2022/IsConcatSpreadable.js | 25 + .../es-abstract/2022/IsConstructor.js | 40 + .../es-abstract/2022/IsDataDescriptor.js | 23 + .../es-abstract/2022/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2022/IsExtensible.js | 18 + .../es-abstract/2022/IsGenericDescriptor.js | 23 + .../es-abstract/2022/IsIntegralNumber.js | 9 + node_modules/es-abstract/2022/IsLessThan.js | 90 + .../es-abstract/2022/IsLooselyEqual.js | 58 + .../es-abstract/2022/IsNoTearConfiguration.js | 16 + node_modules/es-abstract/2022/IsPromise.js | 24 + .../es-abstract/2022/IsPropertyKey.js | 7 + node_modules/es-abstract/2022/IsRegExp.js | 24 + .../es-abstract/2022/IsSharedArrayBuffer.js | 19 + .../es-abstract/2022/IsStrictlyEqual.js | 20 + .../es-abstract/2022/IsStringPrefix.js | 22 + .../2022/IsStringWellFormedUnicode.js | 26 + .../2022/IsUnclampedIntegerElementType.js | 12 + .../es-abstract/2022/IsUnsignedElementType.js | 11 + .../es-abstract/2022/IsValidIntegerIndex.js | 33 + node_modules/es-abstract/2022/IsWordChar.js | 48 + .../es-abstract/2022/IterableToList.js | 29 + .../es-abstract/2022/IteratorClose.js | 51 + .../es-abstract/2022/IteratorComplete.js | 18 + node_modules/es-abstract/2022/IteratorNext.js | 18 + node_modules/es-abstract/2022/IteratorStep.js | 13 + .../es-abstract/2022/IteratorValue.js | 18 + .../es-abstract/2022/LengthOfArrayLike.js | 20 + node_modules/es-abstract/2022/MakeDate.js | 13 + node_modules/es-abstract/2022/MakeDay.js | 36 + .../2022/MakeMatchIndicesIndexPairArray.js | 69 + node_modules/es-abstract/2022/MakeTime.js | 23 + node_modules/es-abstract/2022/MinFromTime.js | 14 + .../es-abstract/2022/MonthFromTime.js | 47 + .../es-abstract/2022/NewPromiseCapability.js | 36 + .../es-abstract/2022/NormalCompletion.js | 9 + node_modules/es-abstract/2022/Number/add.js | 36 + .../es-abstract/2022/Number/bitwiseAND.js | 17 + .../es-abstract/2022/Number/bitwiseNOT.js | 19 + .../es-abstract/2022/Number/bitwiseOR.js | 17 + .../es-abstract/2022/Number/bitwiseXOR.js | 17 + .../es-abstract/2022/Number/divide.js | 22 + node_modules/es-abstract/2022/Number/equal.js | 21 + .../es-abstract/2022/Number/exponentiate.js | 77 + node_modules/es-abstract/2022/Number/index.js | 43 + .../es-abstract/2022/Number/leftShift.js | 25 + .../es-abstract/2022/Number/lessThan.js | 26 + .../es-abstract/2022/Number/multiply.js | 33 + .../es-abstract/2022/Number/remainder.js | 32 + .../es-abstract/2022/Number/sameValue.js | 21 + .../es-abstract/2022/Number/sameValueZero.js | 24 + .../2022/Number/signedRightShift.js | 25 + .../es-abstract/2022/Number/subtract.js | 19 + .../es-abstract/2022/Number/toString.js | 18 + .../es-abstract/2022/Number/unaryMinus.js | 21 + .../2022/Number/unsignedRightShift.js | 25 + .../es-abstract/2022/NumberBitwiseOp.js | 29 + .../es-abstract/2022/NumberToBigInt.js | 26 + .../es-abstract/2022/NumericToRawBytes.js | 80 + .../2022/ObjectDefineProperties.js | 38 + .../2022/OrdinaryCreateFromConstructor.js | 20 + .../2022/OrdinaryDefineOwnProperty.js | 61 + .../2022/OrdinaryGetOwnProperty.js | 44 + .../2022/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2022/OrdinaryHasInstance.js | 25 + .../es-abstract/2022/OrdinaryHasProperty.js | 20 + .../es-abstract/2022/OrdinaryObjectCreate.js | 56 + .../2022/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2022/OrdinaryToPrimitive.js | 38 + .../es-abstract/2022/PromiseResolve.js | 17 + .../es-abstract/2022/QuoteJSONString.js | 54 + .../es-abstract/2022/RawBytesToNumeric.js | 84 + node_modules/es-abstract/2022/RegExpCreate.js | 21 + node_modules/es-abstract/2022/RegExpExec.js | 32 + .../es-abstract/2022/RegExpHasFlag.js | 38 + .../2022/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2022/SameValue.js | 13 + .../es-abstract/2022/SameValueNonNumeric.js | 21 + .../es-abstract/2022/SameValueZero.js | 9 + node_modules/es-abstract/2022/SecFromTime.js | 14 + node_modules/es-abstract/2022/Set.js | 47 + .../es-abstract/2022/SetFunctionLength.js | 32 + .../es-abstract/2022/SetFunctionName.js | 44 + .../es-abstract/2022/SetIntegrityLevel.js | 57 + .../2022/SetTypedArrayFromArrayLike.js | 97 + .../2022/SetTypedArrayFromTypedArray.js | 135 + .../es-abstract/2022/SetValueInBuffer.js | 105 + .../es-abstract/2022/SortIndexedProperties.js | 64 + .../es-abstract/2022/SpeciesConstructor.js | 32 + node_modules/es-abstract/2022/StringCreate.js | 40 + .../es-abstract/2022/StringGetOwnProperty.js | 48 + .../es-abstract/2022/StringIndexOf.js | 40 + node_modules/es-abstract/2022/StringPad.js | 43 + .../es-abstract/2022/StringToBigInt.js | 23 + .../es-abstract/2022/StringToCodePoints.js | 29 + .../es-abstract/2022/StringToNumber.js | 45 + .../2022/SymbolDescriptiveString.js | 20 + .../es-abstract/2022/TestIntegrityLevel.js | 42 + .../es-abstract/2022/ThrowCompletion.js | 9 + node_modules/es-abstract/2022/TimeClip.js | 21 + node_modules/es-abstract/2022/TimeFromYear.js | 11 + node_modules/es-abstract/2022/TimeString.js | 25 + .../es-abstract/2022/TimeWithinDay.js | 12 + node_modules/es-abstract/2022/ToBigInt.js | 53 + node_modules/es-abstract/2022/ToBigInt64.js | 25 + node_modules/es-abstract/2022/ToBigUint64.js | 22 + node_modules/es-abstract/2022/ToBoolean.js | 5 + node_modules/es-abstract/2022/ToDateString.js | 23 + node_modules/es-abstract/2022/ToIndex.js | 26 + node_modules/es-abstract/2022/ToInt16.js | 10 + node_modules/es-abstract/2022/ToInt32.js | 9 + node_modules/es-abstract/2022/ToInt8.js | 10 + .../es-abstract/2022/ToIntegerOrInfinity.js | 20 + node_modules/es-abstract/2022/ToLength.js | 12 + node_modules/es-abstract/2022/ToNumber.js | 26 + node_modules/es-abstract/2022/ToNumeric.js | 21 + node_modules/es-abstract/2022/ToObject.js | 14 + node_modules/es-abstract/2022/ToPrimitive.js | 12 + .../es-abstract/2022/ToPropertyDescriptor.js | 52 + .../es-abstract/2022/ToPropertyKey.js | 15 + node_modules/es-abstract/2022/ToString.js | 15 + node_modules/es-abstract/2022/ToUint16.js | 19 + node_modules/es-abstract/2022/ToUint32.js | 9 + node_modules/es-abstract/2022/ToUint8.js | 20 + node_modules/es-abstract/2022/ToUint8Clamp.js | 19 + .../2022/ToZeroPaddedDecimalString.js | 20 + node_modules/es-abstract/2022/TrimString.js | 29 + node_modules/es-abstract/2022/Type.js | 15 + .../es-abstract/2022/TypedArrayCreate.js | 50 + .../es-abstract/2022/TypedArrayElementSize.js | 40 + .../es-abstract/2022/TypedArrayElementType.js | 38 + .../2022/TypedArraySpeciesCreate.js | 39 + .../es-abstract/2022/UTF16EncodeCodePoint.js | 25 + .../2022/UTF16SurrogatePairToCodePoint.js | 19 + .../es-abstract/2022/UnicodeEscape.js | 27 + .../ValidateAndApplyPropertyDescriptor.js | 177 + .../es-abstract/2022/ValidateAtomicAccess.js | 42 + .../2022/ValidateIntegerTypedArray.js | 39 + .../es-abstract/2022/ValidateTypedArray.js | 30 + node_modules/es-abstract/2022/WeakRefDeref.js | 24 + node_modules/es-abstract/2022/WeekDay.js | 10 + .../es-abstract/2022/WordCharacters.js | 49 + node_modules/es-abstract/2022/YearFromTime.js | 16 + node_modules/es-abstract/2022/abs.js | 11 + node_modules/es-abstract/2022/clamp.js | 18 + node_modules/es-abstract/2022/floor.js | 16 + node_modules/es-abstract/2022/max.js | 7 + node_modules/es-abstract/2022/min.js | 7 + node_modules/es-abstract/2022/modulo.js | 9 + node_modules/es-abstract/2022/msFromTime.js | 11 + node_modules/es-abstract/2022/substring.js | 21 + .../es-abstract/2022/thisBigIntValue.js | 22 + .../es-abstract/2022/thisBooleanValue.js | 15 + .../es-abstract/2022/thisNumberValue.js | 18 + .../es-abstract/2022/thisStringValue.js | 15 + .../es-abstract/2022/thisSymbolValue.js | 19 + .../es-abstract/2022/thisTimeValue.js | 9 + .../2023/AddEntriesFromIterable.js | 47 + .../es-abstract/2023/AddToKeptObjects.js | 21 + .../es-abstract/2023/AdvanceStringIndex.js | 34 + .../ApplyStringOrNumericBinaryOperator.js | 80 + node_modules/es-abstract/2023/ArrayCreate.js | 54 + .../es-abstract/2023/ArraySetLength.js | 85 + .../es-abstract/2023/ArraySpeciesCreate.js | 49 + .../2023/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2023/AsyncIteratorClose.js | 68 + node_modules/es-abstract/2023/BigInt/add.js | 18 + .../es-abstract/2023/BigInt/bitwiseAND.js | 17 + .../es-abstract/2023/BigInt/bitwiseNOT.js | 17 + .../es-abstract/2023/BigInt/bitwiseOR.js | 17 + .../es-abstract/2023/BigInt/bitwiseXOR.js | 17 + .../es-abstract/2023/BigInt/divide.js | 22 + node_modules/es-abstract/2023/BigInt/equal.js | 17 + .../es-abstract/2023/BigInt/exponentiate.js | 31 + node_modules/es-abstract/2023/BigInt/index.js | 39 + .../es-abstract/2023/BigInt/leftShift.js | 18 + .../es-abstract/2023/BigInt/lessThan.js | 18 + .../es-abstract/2023/BigInt/multiply.js | 18 + .../es-abstract/2023/BigInt/remainder.js | 30 + .../2023/BigInt/signedRightShift.js | 18 + .../es-abstract/2023/BigInt/subtract.js | 18 + .../es-abstract/2023/BigInt/toString.js | 32 + .../es-abstract/2023/BigInt/unaryMinus.js | 24 + .../2023/BigInt/unsignedRightShift.js | 17 + .../es-abstract/2023/BigIntBitwiseOp.js | 66 + node_modules/es-abstract/2023/BinaryAnd.js | 14 + node_modules/es-abstract/2023/BinaryOr.js | 14 + node_modules/es-abstract/2023/BinaryXor.js | 14 + .../es-abstract/2023/ByteListBitwiseOp.js | 44 + .../es-abstract/2023/ByteListEqual.js | 33 + node_modules/es-abstract/2023/Call.js | 20 + .../es-abstract/2023/CanBeHeldWeakly.js | 16 + .../2023/CanonicalNumericIndexString.js | 22 + node_modules/es-abstract/2023/Canonicalize.js | 53 + .../es-abstract/2023/CharacterRange.js | 31 + .../es-abstract/2023/ClearKeptObjects.js | 12 + .../es-abstract/2023/CloneArrayBuffer.js | 49 + node_modules/es-abstract/2023/CodePointAt.js | 58 + .../es-abstract/2023/CodePointsToString.js | 27 + .../es-abstract/2023/CompareArrayElements.js | 52 + .../2023/CompareTypedArrayElements.js | 65 + .../2023/CompletePropertyDescriptor.js | 39 + .../es-abstract/2023/CompletionRecord.js | 53 + .../es-abstract/2023/CopyDataProperties.js | 70 + .../2023/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2023/CreateDataProperty.js | 27 + .../2023/CreateDataPropertyOrThrow.js | 24 + node_modules/es-abstract/2023/CreateHTML.js | 30 + .../2023/CreateIterResultObject.js | 19 + .../2023/CreateListFromArrayLike.js | 46 + .../es-abstract/2023/CreateMethodProperty.js | 40 + .../CreateNonEnumerableDataPropertyOrThrow.js | 29 + .../2023/CreateRegExpStringIterator.js | 100 + node_modules/es-abstract/2023/DateFromTime.js | 54 + node_modules/es-abstract/2023/DateString.js | 30 + node_modules/es-abstract/2023/Day.js | 11 + node_modules/es-abstract/2023/DayFromYear.js | 10 + .../es-abstract/2023/DayWithinYear.js | 11 + node_modules/es-abstract/2023/DaysInYear.js | 18 + .../es-abstract/2023/DefinePropertyOrThrow.js | 50 + .../es-abstract/2023/DeletePropertyOrThrow.js | 27 + .../es-abstract/2023/DetachArrayBuffer.js | 43 + .../2023/EnumerableOwnProperties.js | 43 + .../es-abstract/2023/FindViaPredicate.js | 44 + .../es-abstract/2023/FlattenIntoArray.js | 57 + .../2023/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2023/Get.js | 25 + .../es-abstract/2023/GetGlobalObject.js | 9 + node_modules/es-abstract/2023/GetIterator.js | 56 + .../es-abstract/2023/GetIteratorFromMethod.js | 30 + .../es-abstract/2023/GetMatchIndexPair.js | 26 + .../es-abstract/2023/GetMatchString.js | 27 + node_modules/es-abstract/2023/GetMethod.js | 36 + .../es-abstract/2023/GetOwnPropertyKeys.js | 31 + .../es-abstract/2023/GetPromiseResolve.js | 22 + .../2023/GetPrototypeFromConstructor.js | 32 + .../es-abstract/2023/GetStringIndex.js | 31 + .../es-abstract/2023/GetSubstitution.js | 124 + node_modules/es-abstract/2023/GetV.js | 25 + .../es-abstract/2023/GetValueFromBuffer.js | 110 + .../es-abstract/2023/HasOwnProperty.js | 22 + node_modules/es-abstract/2023/HasProperty.js | 20 + node_modules/es-abstract/2023/HourFromTime.js | 14 + node_modules/es-abstract/2023/InLeapYear.js | 21 + .../es-abstract/2023/InstallErrorCause.js | 23 + .../es-abstract/2023/InstanceofOperator.js | 30 + node_modules/es-abstract/2023/Invoke.js | 24 + .../es-abstract/2023/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2023/IsArray.js | 4 + .../es-abstract/2023/IsBigIntElementType.js | 7 + node_modules/es-abstract/2023/IsCallable.js | 5 + .../2023/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2023/IsConcatSpreadable.js | 25 + .../es-abstract/2023/IsConstructor.js | 40 + .../es-abstract/2023/IsDataDescriptor.js | 23 + .../es-abstract/2023/IsDetachedBuffer.js | 27 + node_modules/es-abstract/2023/IsExtensible.js | 18 + .../es-abstract/2023/IsGenericDescriptor.js | 23 + .../es-abstract/2023/IsIntegralNumber.js | 15 + node_modules/es-abstract/2023/IsLessThan.js | 100 + .../es-abstract/2023/IsLooselyEqual.js | 58 + .../es-abstract/2023/IsNoTearConfiguration.js | 16 + node_modules/es-abstract/2023/IsPromise.js | 24 + .../es-abstract/2023/IsPropertyKey.js | 7 + node_modules/es-abstract/2023/IsRegExp.js | 24 + .../es-abstract/2023/IsSharedArrayBuffer.js | 19 + .../es-abstract/2023/IsStrictlyEqual.js | 16 + .../2023/IsStringWellFormedUnicode.js | 26 + .../2023/IsUnclampedIntegerElementType.js | 12 + .../es-abstract/2023/IsUnsignedElementType.js | 11 + .../es-abstract/2023/IsValidIntegerIndex.js | 33 + node_modules/es-abstract/2023/IsWordChar.js | 45 + .../es-abstract/2023/IteratorClose.js | 62 + .../es-abstract/2023/IteratorComplete.js | 18 + node_modules/es-abstract/2023/IteratorNext.js | 28 + node_modules/es-abstract/2023/IteratorStep.js | 18 + .../es-abstract/2023/IteratorToList.js | 28 + .../es-abstract/2023/IteratorValue.js | 18 + node_modules/es-abstract/2023/KeyForSymbol.js | 20 + .../es-abstract/2023/LengthOfArrayLike.js | 20 + node_modules/es-abstract/2023/MakeDate.js | 13 + node_modules/es-abstract/2023/MakeDay.js | 36 + .../2023/MakeMatchIndicesIndexPairArray.js | 69 + node_modules/es-abstract/2023/MakeTime.js | 23 + node_modules/es-abstract/2023/MinFromTime.js | 14 + .../es-abstract/2023/MonthFromTime.js | 47 + .../es-abstract/2023/NewPromiseCapability.js | 36 + .../es-abstract/2023/NormalCompletion.js | 9 + node_modules/es-abstract/2023/Number/add.js | 36 + .../es-abstract/2023/Number/bitwiseAND.js | 17 + .../es-abstract/2023/Number/bitwiseNOT.js | 19 + .../es-abstract/2023/Number/bitwiseOR.js | 17 + .../es-abstract/2023/Number/bitwiseXOR.js | 17 + .../es-abstract/2023/Number/divide.js | 22 + node_modules/es-abstract/2023/Number/equal.js | 21 + .../es-abstract/2023/Number/exponentiate.js | 77 + node_modules/es-abstract/2023/Number/index.js | 43 + .../es-abstract/2023/Number/leftShift.js | 25 + .../es-abstract/2023/Number/lessThan.js | 26 + .../es-abstract/2023/Number/multiply.js | 33 + .../es-abstract/2023/Number/remainder.js | 42 + .../es-abstract/2023/Number/sameValue.js | 21 + .../es-abstract/2023/Number/sameValueZero.js | 24 + .../2023/Number/signedRightShift.js | 25 + .../es-abstract/2023/Number/subtract.js | 19 + .../es-abstract/2023/Number/toString.js | 26 + .../es-abstract/2023/Number/unaryMinus.js | 21 + .../2023/Number/unsignedRightShift.js | 25 + .../es-abstract/2023/NumberBitwiseOp.js | 29 + .../es-abstract/2023/NumberToBigInt.js | 26 + .../es-abstract/2023/NumericToRawBytes.js | 80 + .../2023/ObjectDefineProperties.js | 38 + .../2023/OrdinaryCreateFromConstructor.js | 20 + .../2023/OrdinaryDefineOwnProperty.js | 61 + .../2023/OrdinaryGetOwnProperty.js | 44 + .../2023/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2023/OrdinaryHasInstance.js | 25 + .../es-abstract/2023/OrdinaryHasProperty.js | 20 + .../es-abstract/2023/OrdinaryObjectCreate.js | 56 + .../2023/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2023/OrdinaryToPrimitive.js | 38 + .../es-abstract/2023/ParseHexOctet.js | 44 + .../es-abstract/2023/PromiseResolve.js | 17 + .../es-abstract/2023/QuoteJSONString.js | 54 + .../es-abstract/2023/RawBytesToNumeric.js | 84 + node_modules/es-abstract/2023/RegExpCreate.js | 21 + node_modules/es-abstract/2023/RegExpExec.js | 32 + .../es-abstract/2023/RegExpHasFlag.js | 38 + .../2023/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2023/SameValue.js | 13 + .../es-abstract/2023/SameValueNonNumber.js | 21 + .../es-abstract/2023/SameValueZero.js | 9 + node_modules/es-abstract/2023/SecFromTime.js | 14 + node_modules/es-abstract/2023/Set.js | 47 + .../es-abstract/2023/SetFunctionLength.js | 32 + .../es-abstract/2023/SetFunctionName.js | 44 + .../es-abstract/2023/SetIntegrityLevel.js | 57 + .../2023/SetTypedArrayFromArrayLike.js | 97 + .../2023/SetTypedArrayFromTypedArray.js | 135 + .../es-abstract/2023/SetValueInBuffer.js | 105 + .../es-abstract/2023/SortIndexedProperties.js | 52 + .../es-abstract/2023/SpeciesConstructor.js | 32 + node_modules/es-abstract/2023/StringCreate.js | 40 + .../es-abstract/2023/StringGetOwnProperty.js | 48 + .../es-abstract/2023/StringIndexOf.js | 40 + node_modules/es-abstract/2023/StringPad.js | 43 + .../es-abstract/2023/StringToBigInt.js | 23 + .../es-abstract/2023/StringToCodePoints.js | 29 + .../es-abstract/2023/StringToNumber.js | 45 + .../2023/SymbolDescriptiveString.js | 20 + .../es-abstract/2023/TestIntegrityLevel.js | 42 + .../es-abstract/2023/ThrowCompletion.js | 9 + node_modules/es-abstract/2023/TimeClip.js | 21 + node_modules/es-abstract/2023/TimeFromYear.js | 11 + node_modules/es-abstract/2023/TimeString.js | 25 + .../es-abstract/2023/TimeWithinDay.js | 12 + node_modules/es-abstract/2023/ToBigInt.js | 53 + node_modules/es-abstract/2023/ToBigInt64.js | 25 + node_modules/es-abstract/2023/ToBigUint64.js | 22 + node_modules/es-abstract/2023/ToBoolean.js | 5 + node_modules/es-abstract/2023/ToDateString.js | 23 + node_modules/es-abstract/2023/ToIndex.js | 26 + node_modules/es-abstract/2023/ToInt16.js | 21 + node_modules/es-abstract/2023/ToInt32.js | 23 + node_modules/es-abstract/2023/ToInt8.js | 19 + .../es-abstract/2023/ToIntegerOrInfinity.js | 16 + node_modules/es-abstract/2023/ToLength.js | 12 + node_modules/es-abstract/2023/ToNumber.js | 26 + node_modules/es-abstract/2023/ToNumeric.js | 21 + node_modules/es-abstract/2023/ToObject.js | 14 + node_modules/es-abstract/2023/ToPrimitive.js | 12 + .../es-abstract/2023/ToPropertyDescriptor.js | 52 + .../es-abstract/2023/ToPropertyKey.js | 15 + node_modules/es-abstract/2023/ToString.js | 15 + node_modules/es-abstract/2023/ToUint16.js | 21 + node_modules/es-abstract/2023/ToUint32.js | 21 + node_modules/es-abstract/2023/ToUint8.js | 19 + node_modules/es-abstract/2023/ToUint8Clamp.js | 19 + .../2023/ToZeroPaddedDecimalString.js | 20 + node_modules/es-abstract/2023/TrimString.js | 29 + node_modules/es-abstract/2023/Type.js | 15 + .../es-abstract/2023/TypedArrayCreate.js | 50 + .../2023/TypedArrayCreateSameType.js | 37 + .../es-abstract/2023/TypedArrayElementSize.js | 40 + .../es-abstract/2023/TypedArrayElementType.js | 38 + .../2023/TypedArraySpeciesCreate.js | 39 + .../es-abstract/2023/UTF16EncodeCodePoint.js | 25 + .../2023/UTF16SurrogatePairToCodePoint.js | 19 + .../es-abstract/2023/UnicodeEscape.js | 27 + .../ValidateAndApplyPropertyDescriptor.js | 177 + .../es-abstract/2023/ValidateAtomicAccess.js | 42 + .../2023/ValidateIntegerTypedArray.js | 39 + .../es-abstract/2023/ValidateTypedArray.js | 30 + node_modules/es-abstract/2023/WeakRefDeref.js | 24 + node_modules/es-abstract/2023/WeekDay.js | 10 + .../es-abstract/2023/WordCharacters.js | 48 + node_modules/es-abstract/2023/YearFromTime.js | 16 + node_modules/es-abstract/2023/abs.js | 11 + node_modules/es-abstract/2023/clamp.js | 18 + node_modules/es-abstract/2023/floor.js | 16 + node_modules/es-abstract/2023/max.js | 7 + node_modules/es-abstract/2023/min.js | 7 + node_modules/es-abstract/2023/modulo.js | 9 + node_modules/es-abstract/2023/msFromTime.js | 11 + node_modules/es-abstract/2023/substring.js | 21 + .../es-abstract/2023/thisBigIntValue.js | 22 + .../es-abstract/2023/thisBooleanValue.js | 15 + .../es-abstract/2023/thisNumberValue.js | 18 + .../es-abstract/2023/thisStringValue.js | 15 + .../es-abstract/2023/thisSymbolValue.js | 19 + .../es-abstract/2023/thisTimeValue.js | 9 + node_modules/es-abstract/2023/truncate.js | 17 + .../5/AbstractEqualityComparison.js | 37 + .../5/AbstractRelationalComparison.js | 63 + node_modules/es-abstract/5/Canonicalize.js | 42 + .../es-abstract/5/CheckObjectCoercible.js | 14 + node_modules/es-abstract/5/DateFromTime.js | 54 + node_modules/es-abstract/5/Day.js | 11 + node_modules/es-abstract/5/DayFromYear.js | 10 + node_modules/es-abstract/5/DayWithinYear.js | 11 + node_modules/es-abstract/5/DaysInYear.js | 18 + .../es-abstract/5/FromPropertyDescriptor.js | 39 + node_modules/es-abstract/5/HourFromTime.js | 14 + node_modules/es-abstract/5/InLeapYear.js | 21 + .../es-abstract/5/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/5/IsCallable.js | 5 + .../es-abstract/5/IsDataDescriptor.js | 23 + .../es-abstract/5/IsGenericDescriptor.js | 23 + .../es-abstract/5/IsPropertyDescriptor.js | 19 + node_modules/es-abstract/5/MakeDate.js | 13 + node_modules/es-abstract/5/MakeDay.js | 33 + node_modules/es-abstract/5/MakeTime.js | 23 + node_modules/es-abstract/5/MinFromTime.js | 14 + node_modules/es-abstract/5/MonthFromTime.js | 47 + node_modules/es-abstract/5/SameValue.js | 13 + node_modules/es-abstract/5/SecFromTime.js | 14 + .../es-abstract/5/StrictEqualityComparison.js | 17 + node_modules/es-abstract/5/TimeClip.js | 21 + node_modules/es-abstract/5/TimeFromYear.js | 11 + node_modules/es-abstract/5/TimeWithinDay.js | 12 + node_modules/es-abstract/5/ToBoolean.js | 5 + node_modules/es-abstract/5/ToInt32.js | 9 + node_modules/es-abstract/5/ToInteger.js | 18 + node_modules/es-abstract/5/ToNumber.js | 32 + node_modules/es-abstract/5/ToObject.js | 14 + node_modules/es-abstract/5/ToPrimitive.js | 5 + .../es-abstract/5/ToPropertyDescriptor.js | 52 + node_modules/es-abstract/5/ToString.js | 12 + node_modules/es-abstract/5/ToUint16.js | 19 + node_modules/es-abstract/5/ToUint32.js | 9 + node_modules/es-abstract/5/Type.js | 24 + node_modules/es-abstract/5/WeekDay.js | 10 + node_modules/es-abstract/5/YearFromTime.js | 16 + node_modules/es-abstract/5/abs.js | 11 + node_modules/es-abstract/5/floor.js | 11 + node_modules/es-abstract/5/modulo.js | 9 + node_modules/es-abstract/5/msFromTime.js | 11 + node_modules/es-abstract/CHANGELOG.md | 768 ++ node_modules/es-abstract/GetIntrinsic.js | 5 + node_modules/es-abstract/LICENSE | 21 + node_modules/es-abstract/README.md | 43 + node_modules/es-abstract/es2015.js | 139 + node_modules/es-abstract/es2016.js | 146 + node_modules/es-abstract/es2017.js | 154 + node_modules/es-abstract/es2018.js | 165 + node_modules/es-abstract/es2019.js | 169 + node_modules/es-abstract/es2020.js | 193 + node_modules/es-abstract/es2021.js | 207 + node_modules/es-abstract/es2022.js | 219 + node_modules/es-abstract/es2023.js | 227 + node_modules/es-abstract/es5.js | 52 + node_modules/es-abstract/es6.js | 3 + node_modules/es-abstract/es7.js | 3 + .../es-abstract/helpers/DefineOwnProperty.js | 55 + node_modules/es-abstract/helpers/IsArray.js | 12 + .../es-abstract/helpers/OwnPropertyKeys.js | 22 + .../es-abstract/helpers/assertRecord.js | 87 + node_modules/es-abstract/helpers/assign.js | 22 + .../es-abstract/helpers/bytesAsFloat32.js | 38 + .../es-abstract/helpers/bytesAsFloat64.js | 44 + .../es-abstract/helpers/bytesAsInteger.js | 31 + node_modules/es-abstract/helpers/callBind.js | 5 + node_modules/es-abstract/helpers/callBound.js | 5 + .../es-abstract/helpers/caseFolding.json | 1430 +++ .../es-abstract/helpers/defaultEndianness.js | 21 + node_modules/es-abstract/helpers/every.js | 10 + node_modules/es-abstract/helpers/forEach.js | 7 + .../helpers/fractionToBinaryString.js | 33 + .../helpers/fromPropertyDescriptor.js | 27 + .../es-abstract/helpers/getInferredName.js | 4 + .../es-abstract/helpers/getIteratorMethod.js | 47 + .../helpers/getOwnPropertyDescriptor.js | 5 + node_modules/es-abstract/helpers/getProto.js | 15 + .../helpers/getSymbolDescription.js | 4 + .../es-abstract/helpers/intToBinaryString.js | 23 + .../es-abstract/helpers/integerToNBytes.js | 28 + .../es-abstract/helpers/isAbstractClosure.js | 9 + .../es-abstract/helpers/isByteValue.js | 5 + .../es-abstract/helpers/isCodePoint.js | 5 + node_modules/es-abstract/helpers/isFinite.js | 5 + .../isFullyPopulatedPropertyDescriptor.js | 9 + node_modules/es-abstract/helpers/isInteger.js | 18 + .../es-abstract/helpers/isLeadingSurrogate.js | 5 + .../es-abstract/helpers/isLineTerminator.js | 7 + .../es-abstract/helpers/isMatchRecord.js | 16 + node_modules/es-abstract/helpers/isNaN.js | 5 + .../es-abstract/helpers/isNegativeZero.js | 5 + .../es-abstract/helpers/isPrefixOf.js | 13 + .../es-abstract/helpers/isPrimitive.js | 5 + .../helpers/isPropertyDescriptor.js | 31 + .../helpers/isSamePropertyDescriptor.js | 20 + .../es-abstract/helpers/isStringOrHole.js | 9 + .../helpers/isStringOrUndefined.js | 5 + .../helpers/isTrailingSurrogate.js | 5 + .../es-abstract/helpers/maxSafeInteger.js | 3 + node_modules/es-abstract/helpers/maxValue.js | 3 + node_modules/es-abstract/helpers/mod.js | 8 + node_modules/es-abstract/helpers/modBigInt.js | 6 + .../es-abstract/helpers/padTimeComponent.js | 9 + node_modules/es-abstract/helpers/reduce.js | 9 + .../es-abstract/helpers/regexTester.js | 5 + node_modules/es-abstract/helpers/setProto.js | 17 + node_modules/es-abstract/helpers/sign.js | 5 + node_modules/es-abstract/helpers/some.js | 10 + .../es-abstract/helpers/timeConstants.js | 19 + .../helpers/typedArrayConstructors.js | 22 + .../helpers/valueToFloat32Bytes.js | 69 + .../helpers/valueToFloat64Bytes.js | 83 + node_modules/es-abstract/index.js | 34 + node_modules/es-abstract/operations/.eslintrc | 5 + node_modules/es-abstract/operations/2015.js | 744 ++ node_modules/es-abstract/operations/2016.js | 813 ++ node_modules/es-abstract/operations/2017.js | 954 ++ node_modules/es-abstract/operations/2018.js | 1033 ++ node_modules/es-abstract/operations/2019.js | 1048 ++ node_modules/es-abstract/operations/2020.js | 1228 +++ node_modules/es-abstract/operations/2021.js | 1282 +++ node_modules/es-abstract/operations/2022.js | 1372 +++ node_modules/es-abstract/operations/2023.js | 1441 +++ .../es-abstract/operations/build-unicode.mjs | 19 + node_modules/es-abstract/package.json | 166 + node_modules/es-set-tostringtag/.eslintrc | 13 + node_modules/es-set-tostringtag/CHANGELOG.md | 41 + node_modules/es-set-tostringtag/LICENSE | 21 + node_modules/es-set-tostringtag/README.md | 43 + node_modules/es-set-tostringtag/index.js | 26 + node_modules/es-set-tostringtag/package.json | 69 + node_modules/es-set-tostringtag/test/index.js | 53 + node_modules/es-to-primitive/.eslintrc | 22 + .../es-to-primitive/.github/FUNDING.yml | 12 + node_modules/es-to-primitive/.travis.yml | 15 + node_modules/es-to-primitive/CHANGELOG.md | 49 + node_modules/es-to-primitive/LICENSE | 22 + node_modules/es-to-primitive/Makefile | 61 + node_modules/es-to-primitive/README.md | 49 + node_modules/es-to-primitive/es2015.js | 75 + node_modules/es-to-primitive/es5.js | 45 + node_modules/es-to-primitive/es6.js | 3 + .../es-to-primitive/helpers/isPrimitive.js | 5 + node_modules/es-to-primitive/index.js | 17 + node_modules/es-to-primitive/package.json | 81 + node_modules/es-to-primitive/test/es2015.js | 151 + node_modules/es-to-primitive/test/es5.js | 118 + node_modules/es-to-primitive/test/es6.js | 151 + node_modules/es-to-primitive/test/index.js | 20 + node_modules/escape-string-regexp/index.js | 11 + node_modules/escape-string-regexp/license | 21 + .../escape-string-regexp/package.json | 41 + node_modules/escape-string-regexp/readme.md | 27 + 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/event-stream/package.json | 54 + 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/expand-brackets/LICENSE | 21 + node_modules/expand-brackets/README.md | 107 + node_modules/expand-brackets/index.js | 163 + node_modules/expand-brackets/package.json | 62 + node_modules/expand-range/LICENSE | 24 + node_modules/expand-range/README.md | 145 + node_modules/expand-range/index.js | 43 + node_modules/expand-range/package.json | 73 + 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 | 67 + node_modules/extend-shallow/package.json | 83 + node_modules/extglob/LICENSE | 21 + node_modules/extglob/README.md | 88 + node_modules/extglob/index.js | 178 + node_modules/extglob/package.json | 60 + node_modules/filename-regex/LICENSE | 21 + node_modules/filename-regex/README.md | 63 + node_modules/filename-regex/index.js | 10 + node_modules/filename-regex/package.json | 50 + node_modules/fill-range/LICENSE | 21 + node_modules/fill-range/README.md | 317 + node_modules/fill-range/index.js | 408 + node_modules/fill-range/package.json | 78 + node_modules/for-each/.editorconfig | 20 + node_modules/for-each/.eslintrc | 16 + node_modules/for-each/.travis.yml | 45 + node_modules/for-each/LICENSE | 22 + node_modules/for-each/README.md | 43 + node_modules/for-each/index.js | 62 + node_modules/for-each/package.json | 65 + node_modules/for-each/test/.eslintrc | 8 + node_modules/for-each/test/test.js | 182 + 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 | 68 + node_modules/for-own/LICENSE | 21 + node_modules/for-own/README.md | 85 + node_modules/for-own/index.js | 19 + node_modules/for-own/package.json | 70 + 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 | 60 + 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 | 26 + node_modules/from/readme.markdown | 40 + node_modules/from/test/index.js | 210 + node_modules/function-bind/.eslintrc | 21 + .../function-bind/.github/FUNDING.yml | 12 + .../function-bind/.github/SECURITY.md | 3 + node_modules/function-bind/.nycrc | 13 + node_modules/function-bind/CHANGELOG.md | 136 + node_modules/function-bind/LICENSE | 20 + node_modules/function-bind/README.md | 46 + node_modules/function-bind/implementation.js | 84 + node_modules/function-bind/index.js | 5 + node_modules/function-bind/package.json | 87 + node_modules/function-bind/test/.eslintrc | 9 + node_modules/function-bind/test/index.js | 252 + .../function.prototype.name/.editorconfig | 24 + .../function.prototype.name/.eslintrc | 15 + .../.github/FUNDING.yml | 12 + node_modules/function.prototype.name/.nycrc | 9 + .../function.prototype.name/CHANGELOG.md | 123 + node_modules/function.prototype.name/LICENSE | 21 + .../function.prototype.name/README.md | 55 + node_modules/function.prototype.name/auto.js | 3 + .../helpers/functionsHaveNames.js | 5 + .../function.prototype.name/implementation.js | 72 + node_modules/function.prototype.name/index.js | 18 + .../function.prototype.name/package.json | 99 + .../function.prototype.name/polyfill.js | 7 + node_modules/function.prototype.name/shim.js | 35 + .../test/implementation.js | 20 + .../function.prototype.name/test/index.js | 23 + .../function.prototype.name/test/shimmed.js | 21 + .../function.prototype.name/test/tests.js | 104 + .../function.prototype.name/test/uglified.js | 17 + .../functions-have-names/.editorconfig | 20 + node_modules/functions-have-names/.eslintrc | 19 + .../functions-have-names/.github/FUNDING.yml | 12 + node_modules/functions-have-names/.nycrc | 9 + .../functions-have-names/CHANGELOG.md | 89 + node_modules/functions-have-names/LICENSE | 21 + node_modules/functions-have-names/README.md | 40 + node_modules/functions-have-names/index.js | 31 + .../functions-have-names/package.json | 55 + .../functions-have-names/test/index.js | 65 + node_modules/get-intrinsic/.eslintrc | 38 + .../get-intrinsic/.github/FUNDING.yml | 12 + node_modules/get-intrinsic/.nycrc | 9 + node_modules/get-intrinsic/CHANGELOG.md | 125 + node_modules/get-intrinsic/LICENSE | 21 + node_modules/get-intrinsic/README.md | 71 + node_modules/get-intrinsic/index.js | 351 + node_modules/get-intrinsic/package.json | 93 + .../get-intrinsic/test/GetIntrinsic.js | 274 + .../get-symbol-description/.eslintignore | 1 + node_modules/get-symbol-description/.eslintrc | 14 + .../.github/FUNDING.yml | 12 + node_modules/get-symbol-description/.nycrc | 9 + .../get-symbol-description/CHANGELOG.md | 16 + node_modules/get-symbol-description/LICENSE | 21 + node_modules/get-symbol-description/README.md | 43 + .../get-symbol-description/getInferredName.js | 10 + node_modules/get-symbol-description/index.js | 43 + .../get-symbol-description/package.json | 71 + .../get-symbol-description/test/index.js | 67 + node_modules/get-value/LICENSE | 21 + node_modules/get-value/index.js | 50 + node_modules/get-value/package.json | 79 + node_modules/glob-base/LICENSE | 21 + node_modules/glob-base/README.md | 158 + node_modules/glob-base/index.js | 51 + node_modules/glob-base/package.json | 52 + node_modules/glob-parent/.npmignore | 4 + node_modules/glob-parent/.travis.yml | 8 + node_modules/glob-parent/LICENSE | 15 + node_modules/glob-parent/README.md | 43 + node_modules/glob-parent/index.js | 10 + node_modules/glob-parent/package.json | 35 + node_modules/glob-parent/test.js | 28 + node_modules/globalthis/.eslintrc | 18 + node_modules/globalthis/.nycrc | 10 + node_modules/globalthis/CHANGELOG.md | 96 + node_modules/globalthis/LICENSE | 21 + node_modules/globalthis/README.md | 70 + node_modules/globalthis/auto.js | 3 + .../globalthis/implementation.browser.js | 11 + node_modules/globalthis/implementation.js | 3 + node_modules/globalthis/index.js | 19 + node_modules/globalthis/package.json | 97 + node_modules/globalthis/polyfill.js | 10 + node_modules/globalthis/shim.js | 22 + .../globalthis/test/implementation.js | 11 + node_modules/globalthis/test/index.js | 11 + node_modules/globalthis/test/native.js | 26 + node_modules/globalthis/test/shimmed.js | 29 + node_modules/globalthis/test/tests.js | 36 + node_modules/gopd/.eslintrc | 16 + node_modules/gopd/.github/FUNDING.yml | 12 + node_modules/gopd/CHANGELOG.md | 25 + node_modules/gopd/LICENSE | 21 + node_modules/gopd/README.md | 40 + node_modules/gopd/index.js | 16 + node_modules/gopd/package.json | 71 + node_modules/gopd/test/index.js | 35 + node_modules/graceful-fs/LICENSE | 15 + node_modules/graceful-fs/README.md | 143 + node_modules/graceful-fs/clone.js | 23 + node_modules/graceful-fs/graceful-fs.js | 448 + node_modules/graceful-fs/legacy-streams.js | 118 + node_modules/graceful-fs/package.json | 53 + node_modules/graceful-fs/polyfills.js | 355 + node_modules/has-ansi/index.js | 4 + node_modules/has-ansi/license | 21 + node_modules/has-ansi/package.json | 55 + node_modules/has-ansi/readme.md | 36 + node_modules/has-bigints/.eslintrc | 5 + node_modules/has-bigints/.github/FUNDING.yml | 12 + node_modules/has-bigints/.nycrc | 9 + node_modules/has-bigints/CHANGELOG.md | 60 + node_modules/has-bigints/LICENSE | 21 + node_modules/has-bigints/README.md | 39 + node_modules/has-bigints/index.js | 10 + node_modules/has-bigints/package.json | 54 + node_modules/has-bigints/test/index.js | 44 + .../has-property-descriptors/.eslintrc | 13 + .../.github/FUNDING.yml | 12 + node_modules/has-property-descriptors/.nycrc | 9 + .../has-property-descriptors/CHANGELOG.md | 27 + node_modules/has-property-descriptors/LICENSE | 21 + .../has-property-descriptors/README.md | 43 + .../has-property-descriptors/index.js | 33 + .../has-property-descriptors/package.json | 77 + .../has-property-descriptors/test/index.js | 57 + node_modules/has-proto/.eslintrc | 5 + node_modules/has-proto/.github/FUNDING.yml | 12 + node_modules/has-proto/CHANGELOG.md | 23 + node_modules/has-proto/LICENSE | 21 + node_modules/has-proto/README.md | 38 + node_modules/has-proto/index.js | 11 + node_modules/has-proto/package.json | 74 + node_modules/has-proto/test/index.js | 19 + node_modules/has-symbols/.eslintrc | 11 + node_modules/has-symbols/.github/FUNDING.yml | 12 + node_modules/has-symbols/.nycrc | 9 + node_modules/has-symbols/CHANGELOG.md | 75 + node_modules/has-symbols/LICENSE | 21 + node_modules/has-symbols/README.md | 46 + node_modules/has-symbols/index.js | 13 + node_modules/has-symbols/package.json | 101 + node_modules/has-symbols/shams.js | 42 + node_modules/has-symbols/test/index.js | 22 + .../has-symbols/test/shams/core-js.js | 28 + .../test/shams/get-own-property-symbols.js | 28 + node_modules/has-symbols/test/tests.js | 56 + node_modules/has-tostringtag/.eslintrc | 11 + .../has-tostringtag/.github/FUNDING.yml | 12 + node_modules/has-tostringtag/CHANGELOG.md | 20 + node_modules/has-tostringtag/LICENSE | 21 + node_modules/has-tostringtag/README.md | 46 + node_modules/has-tostringtag/index.js | 7 + node_modules/has-tostringtag/package.json | 84 + node_modules/has-tostringtag/shams.js | 7 + node_modules/has-tostringtag/test/index.js | 21 + .../has-tostringtag/test/shams/core-js.js | 28 + .../test/shams/get-own-property-symbols.js | 28 + node_modules/has-tostringtag/test/tests.js | 14 + node_modules/has-value/LICENSE | 21 + node_modules/has-value/README.md | 149 + node_modules/has-value/index.js | 16 + .../has-value/node_modules/isobject/LICENSE | 21 + .../has-value/node_modules/isobject/README.md | 122 + .../node_modules/isobject/index.d.ts | 5 + .../has-value/node_modules/isobject/index.js | 12 + .../node_modules/isobject/package.json | 74 + node_modules/has-value/package.json | 83 + node_modules/has-values/LICENSE | 21 + node_modules/has-values/README.md | 129 + node_modules/has-values/index.js | 60 + .../has-values/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 | 90 + .../node_modules/is-number/package.json | 83 + .../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 | 90 + node_modules/has-values/package.json | 82 + node_modules/hasown/.eslintrc | 5 + node_modules/hasown/.github/FUNDING.yml | 12 + node_modules/hasown/.nycrc | 13 + node_modules/hasown/CHANGELOG.md | 20 + node_modules/hasown/LICENSE | 21 + node_modules/hasown/README.md | 40 + node_modules/hasown/index.d.ts | 3 + node_modules/hasown/index.d.ts.map | 1 + node_modules/hasown/index.js | 8 + node_modules/hasown/package.json | 91 + node_modules/hasown/tsconfig.json | 49 + node_modules/hosted-git-info/CHANGELOG.md | 151 + node_modules/hosted-git-info/LICENSE | 13 + node_modules/hosted-git-info/README.md | 133 + node_modules/hosted-git-info/git-host-info.js | 79 + node_modules/hosted-git-info/git-host.js | 156 + node_modules/hosted-git-info/index.js | 148 + node_modules/hosted-git-info/package.json | 40 + node_modules/inherits/LICENSE | 16 + node_modules/inherits/README.md | 42 + node_modules/inherits/inherits.js | 9 + node_modules/inherits/inherits_browser.js | 27 + node_modules/inherits/package.json | 29 + node_modules/internal-slot/.editorconfig | 20 + node_modules/internal-slot/.eslintrc | 11 + .../internal-slot/.github/FUNDING.yml | 12 + node_modules/internal-slot/.nycrc | 9 + node_modules/internal-slot/CHANGELOG.md | 96 + node_modules/internal-slot/LICENSE | 21 + node_modules/internal-slot/README.md | 58 + node_modules/internal-slot/index.js | 62 + node_modules/internal-slot/package.json | 71 + node_modules/internal-slot/test/index.js | 121 + .../is-accessor-descriptor/.editorconfig | 14 + node_modules/is-accessor-descriptor/.eslintrc | 23 + .../.github/FUNDING.yml | 12 + node_modules/is-accessor-descriptor/.nycrc | 9 + .../is-accessor-descriptor/CHANGELOG.md | 125 + node_modules/is-accessor-descriptor/LICENSE | 21 + node_modules/is-accessor-descriptor/README.md | 98 + node_modules/is-accessor-descriptor/index.js | 50 + .../is-accessor-descriptor/package.json | 79 + .../is-accessor-descriptor/test/index.js | 62 + node_modules/is-array-buffer/.eslintrc | 13 + .../is-array-buffer/.github/FUNDING.yml | 12 + node_modules/is-array-buffer/.nycrc | 9 + node_modules/is-array-buffer/CHANGELOG.md | 58 + node_modules/is-array-buffer/LICENSE | 21 + node_modules/is-array-buffer/README.md | 56 + node_modules/is-array-buffer/index.js | 43 + node_modules/is-array-buffer/package.json | 78 + node_modules/is-array-buffer/test/index.js | 43 + 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 | 34 + node_modules/is-bigint/.eslintignore | 1 + node_modules/is-bigint/.eslintrc | 10 + node_modules/is-bigint/.github/FUNDING.yml | 12 + node_modules/is-bigint/.nycrc | 9 + node_modules/is-bigint/CHANGELOG.md | 71 + node_modules/is-bigint/LICENSE | 21 + node_modules/is-bigint/README.md | 44 + node_modules/is-bigint/index.js | 38 + node_modules/is-bigint/package.json | 58 + node_modules/is-bigint/test/index.js | 81 + node_modules/is-binary-path/index.js | 12 + node_modules/is-binary-path/license | 21 + node_modules/is-binary-path/package.json | 39 + node_modules/is-binary-path/readme.md | 34 + node_modules/is-boolean-object/.editorconfig | 22 + node_modules/is-boolean-object/.eslintignore | 1 + node_modules/is-boolean-object/.eslintrc | 22 + .../is-boolean-object/.github/FUNDING.yml | 12 + node_modules/is-boolean-object/.nycrc | 10 + node_modules/is-boolean-object/CHANGELOG.md | 107 + node_modules/is-boolean-object/LICENSE | 22 + node_modules/is-boolean-object/README.md | 57 + node_modules/is-boolean-object/index.js | 26 + node_modules/is-boolean-object/package.json | 87 + node_modules/is-boolean-object/test/index.js | 48 + 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 | 51 + node_modules/is-buffer/test/basic.js | 24 + node_modules/is-callable/.editorconfig | 31 + node_modules/is-callable/.eslintrc | 10 + node_modules/is-callable/.github/FUNDING.yml | 12 + node_modules/is-callable/.nycrc | 9 + node_modules/is-callable/CHANGELOG.md | 158 + node_modules/is-callable/LICENSE | 22 + node_modules/is-callable/README.md | 83 + node_modules/is-callable/index.js | 101 + node_modules/is-callable/package.json | 106 + node_modules/is-callable/test/index.js | 244 + node_modules/is-core-module/.eslintrc | 18 + node_modules/is-core-module/.nycrc | 9 + node_modules/is-core-module/CHANGELOG.md | 180 + node_modules/is-core-module/LICENSE | 20 + node_modules/is-core-module/README.md | 40 + node_modules/is-core-module/core.json | 158 + node_modules/is-core-module/index.js | 69 + node_modules/is-core-module/package.json | 73 + node_modules/is-core-module/test/index.js | 133 + node_modules/is-data-descriptor/.editorconfig | 14 + node_modules/is-data-descriptor/.eslintrc | 15 + .../is-data-descriptor/.github/FUNDING.yml | 12 + node_modules/is-data-descriptor/.nycrc | 9 + node_modules/is-data-descriptor/CHANGELOG.md | 109 + node_modules/is-data-descriptor/LICENSE | 21 + node_modules/is-data-descriptor/README.md | 112 + node_modules/is-data-descriptor/index.js | 43 + node_modules/is-data-descriptor/package.json | 87 + node_modules/is-data-descriptor/test/index.js | 67 + node_modules/is-date-object/.editorconfig | 20 + node_modules/is-date-object/.eslintignore | 1 + node_modules/is-date-object/.eslintrc | 9 + .../is-date-object/.github/FUNDING.yml | 12 + node_modules/is-date-object/.nycrc | 10 + node_modules/is-date-object/CHANGELOG.md | 114 + node_modules/is-date-object/LICENSE | 22 + node_modules/is-date-object/README.md | 52 + node_modules/is-date-object/index.js | 22 + node_modules/is-date-object/package.json | 79 + node_modules/is-date-object/test/index.js | 36 + node_modules/is-descriptor/.editorconfig | 14 + node_modules/is-descriptor/.eslintrc | 16 + node_modules/is-descriptor/.gitattributes | 10 + .../is-descriptor/.github/FUNDING.yml | 12 + node_modules/is-descriptor/.nycrc | 9 + node_modules/is-descriptor/CHANGELOG.md | 121 + node_modules/is-descriptor/LICENSE | 21 + node_modules/is-descriptor/README.md | 134 + node_modules/is-descriptor/index.js | 16 + node_modules/is-descriptor/package.json | 88 + node_modules/is-descriptor/test/index.js | 116 + node_modules/is-dotfile/LICENSE | 21 + node_modules/is-dotfile/README.md | 95 + node_modules/is-dotfile/index.js | 14 + node_modules/is-dotfile/package.json | 69 + node_modules/is-equal-shallow/LICENSE | 21 + node_modules/is-equal-shallow/README.md | 90 + node_modules/is-equal-shallow/index.js | 27 + node_modules/is-equal-shallow/package.json | 54 + 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 | 51 + node_modules/is-extglob/LICENSE | 21 + node_modules/is-extglob/README.md | 75 + node_modules/is-extglob/index.js | 11 + node_modules/is-extglob/package.json | 48 + node_modules/is-glob/LICENSE | 21 + node_modules/is-glob/README.md | 105 + node_modules/is-glob/index.js | 14 + node_modules/is-glob/package.json | 60 + node_modules/is-negative-zero/.editorconfig | 8 + node_modules/is-negative-zero/.eslintignore | 1 + node_modules/is-negative-zero/.eslintrc | 9 + .../is-negative-zero/.github/FUNDING.yml | 12 + node_modules/is-negative-zero/.nycrc | 9 + node_modules/is-negative-zero/CHANGELOG.md | 136 + node_modules/is-negative-zero/LICENSE | 20 + node_modules/is-negative-zero/README.md | 54 + node_modules/is-negative-zero/index.js | 6 + node_modules/is-negative-zero/package.json | 79 + node_modules/is-negative-zero/test/index.js | 28 + node_modules/is-number-object/.editorconfig | 23 + node_modules/is-number-object/.eslintrc | 16 + .../is-number-object/.github/FUNDING.yml | 12 + node_modules/is-number-object/.nycrc | 10 + node_modules/is-number-object/CHANGELOG.md | 125 + node_modules/is-number-object/LICENSE | 22 + node_modules/is-number-object/README.md | 55 + node_modules/is-number-object/index.js | 24 + node_modules/is-number-object/package.json | 85 + node_modules/is-number-object/test/index.js | 38 + node_modules/is-number/LICENSE | 21 + node_modules/is-number/README.md | 103 + node_modules/is-number/index.js | 19 + node_modules/is-number/package.json | 59 + 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/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 | 74 + node_modules/is-plain-object/package.json | 79 + node_modules/is-posix-bracket/LICENSE | 21 + node_modules/is-posix-bracket/README.md | 88 + node_modules/is-posix-bracket/index.js | 10 + node_modules/is-posix-bracket/package.json | 64 + node_modules/is-primitive/LICENSE | 21 + node_modules/is-primitive/README.md | 57 + node_modules/is-primitive/index.js | 13 + node_modules/is-primitive/package.json | 46 + node_modules/is-regex/.editorconfig | 20 + node_modules/is-regex/.eslintignore | 1 + node_modules/is-regex/.eslintrc | 19 + node_modules/is-regex/.nycrc | 10 + node_modules/is-regex/CHANGELOG.md | 197 + node_modules/is-regex/LICENSE | 20 + node_modules/is-regex/README.md | 52 + node_modules/is-regex/index.js | 58 + node_modules/is-regex/package.json | 86 + node_modules/is-regex/test/index.js | 104 + .../is-shared-array-buffer/.eslintignore | 1 + node_modules/is-shared-array-buffer/.eslintrc | 5 + .../.github/FUNDING.yml | 12 + node_modules/is-shared-array-buffer/.nycrc | 9 + .../is-shared-array-buffer/CHANGELOG.md | 44 + node_modules/is-shared-array-buffer/LICENSE | 21 + node_modules/is-shared-array-buffer/README.md | 58 + node_modules/is-shared-array-buffer/index.js | 21 + .../is-shared-array-buffer/package.json | 70 + .../is-shared-array-buffer/test/index.js | 27 + node_modules/is-string/.eslintignore | 1 + node_modules/is-string/.eslintrc | 19 + node_modules/is-string/.github/FUNDING.yml | 12 + node_modules/is-string/.nycrc | 10 + node_modules/is-string/CHANGELOG.md | 114 + node_modules/is-string/LICENSE | 22 + node_modules/is-string/README.md | 56 + node_modules/is-string/index.js | 24 + node_modules/is-string/package.json | 81 + node_modules/is-string/test/index.js | 39 + node_modules/is-symbol/.editorconfig | 13 + node_modules/is-symbol/.eslintignore | 1 + node_modules/is-symbol/.eslintrc | 14 + node_modules/is-symbol/.github/FUNDING.yml | 12 + node_modules/is-symbol/.nycrc | 9 + node_modules/is-symbol/CHANGELOG.md | 113 + node_modules/is-symbol/LICENSE | 22 + node_modules/is-symbol/README.md | 45 + node_modules/is-symbol/index.js | 35 + node_modules/is-symbol/package.json | 77 + node_modules/is-symbol/test/index.js | 92 + node_modules/is-typed-array/.editorconfig | 20 + node_modules/is-typed-array/.eslintrc | 13 + .../is-typed-array/.github/FUNDING.yml | 12 + node_modules/is-typed-array/.nycrc | 9 + node_modules/is-typed-array/CHANGELOG.md | 134 + node_modules/is-typed-array/LICENSE | 22 + node_modules/is-typed-array/README.md | 70 + node_modules/is-typed-array/index.js | 7 + node_modules/is-typed-array/package.json | 116 + node_modules/is-typed-array/test/index.js | 103 + node_modules/is-utf8/LICENSE | 9 + node_modules/is-utf8/README.md | 16 + node_modules/is-utf8/is-utf8.js | 76 + node_modules/is-utf8/package.json | 19 + node_modules/is-weakref/.eslintignore | 1 + node_modules/is-weakref/.eslintrc | 5 + node_modules/is-weakref/.github/FUNDING.yml | 12 + node_modules/is-weakref/.nycrc | 9 + node_modules/is-weakref/CHANGELOG.md | 54 + node_modules/is-weakref/LICENSE | 21 + node_modules/is-weakref/README.md | 52 + node_modules/is-weakref/index.js | 21 + node_modules/is-weakref/package.json | 63 + node_modules/is-weakref/test/index.js | 26 + 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 | 71 + 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 | 45 + 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 | 31 + node_modules/isexe/test/basic.js | 221 + node_modules/isexe/windows.js | 42 + node_modules/isobject/LICENSE | 21 + node_modules/isobject/README.md | 112 + node_modules/isobject/index.js | 14 + node_modules/isobject/package.json | 67 + 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 | 90 + node_modules/lazy-cache/LICENSE | 21 + node_modules/lazy-cache/README.md | 147 + node_modules/lazy-cache/index.js | 67 + node_modules/lazy-cache/package.json | 58 + node_modules/load-json-file/index.js | 21 + node_modules/load-json-file/license | 21 + node_modules/load-json-file/package.json | 46 + node_modules/load-json-file/readme.md | 45 + node_modules/longest/LICENSE | 21 + node_modules/longest/README.md | 65 + node_modules/longest/index.js | 37 + node_modules/longest/package.json | 43 + node_modules/lru-cache/LICENSE | 15 + node_modules/lru-cache/README.md | 158 + node_modules/lru-cache/index.js | 468 + node_modules/lru-cache/package.json | 36 + 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 | 59 + 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 | 24 + 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 | 74 + node_modules/math-random/.travis.yml | 6 + node_modules/math-random/browser.js | 17 + node_modules/math-random/node.js | 13 + node_modules/math-random/package.json | 16 + node_modules/math-random/readme.md | 26 + node_modules/math-random/test.js | 21 + node_modules/micromatch/LICENSE | 21 + node_modules/micromatch/README.md | 689 ++ node_modules/micromatch/index.js | 431 + node_modules/micromatch/lib/chars.js | 67 + node_modules/micromatch/lib/expand.js | 304 + node_modules/micromatch/lib/glob.js | 193 + node_modules/micromatch/lib/utils.js | 149 + node_modules/micromatch/package.json | 114 + node_modules/minimatch/LICENSE | 15 + node_modules/minimatch/README.md | 230 + node_modules/minimatch/minimatch.js | 947 ++ node_modules/minimatch/package.json | 33 + node_modules/minimist/.eslintrc | 29 + node_modules/minimist/.github/FUNDING.yml | 12 + node_modules/minimist/.nycrc | 14 + node_modules/minimist/CHANGELOG.md | 298 + node_modules/minimist/LICENSE | 18 + node_modules/minimist/README.md | 121 + node_modules/minimist/example/parse.js | 4 + node_modules/minimist/index.js | 263 + node_modules/minimist/package.json | 75 + node_modules/minimist/test/all_bool.js | 34 + node_modules/minimist/test/bool.js | 177 + node_modules/minimist/test/dash.js | 43 + node_modules/minimist/test/default_bool.js | 37 + node_modules/minimist/test/dotted.js | 24 + node_modules/minimist/test/kv_short.js | 32 + node_modules/minimist/test/long.js | 33 + node_modules/minimist/test/num.js | 38 + node_modules/minimist/test/parse.js | 209 + node_modules/minimist/test/parse_modified.js | 11 + node_modules/minimist/test/proto.js | 64 + node_modules/minimist/test/short.js | 69 + node_modules/minimist/test/stop_early.js | 17 + node_modules/minimist/test/unknown.js | 104 + node_modules/minimist/test/whitespace.js | 10 + node_modules/mixin-deep/LICENSE | 21 + node_modules/mixin-deep/README.md | 80 + node_modules/mixin-deep/index.js | 64 + .../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 | 67 + node_modules/mixin-deep/package.json | 65 + node_modules/ms/index.js | 152 + node_modules/ms/license.md | 21 + node_modules/ms/package.json | 37 + 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/cache.js | 1 + node_modules/nanomatch/lib/compilers.js | 339 + node_modules/nanomatch/lib/parsers.js | 386 + node_modules/nanomatch/lib/utils.js | 379 + .../nanomatch/node_modules/arr-diff/LICENSE | 21 + .../nanomatch/node_modules/arr-diff/README.md | 130 + .../nanomatch/node_modules/arr-diff/index.js | 47 + .../node_modules/arr-diff/package.json | 69 + .../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 | 62 + .../node_modules/kind-of/CHANGELOG.md | 160 + .../nanomatch/node_modules/kind-of/LICENSE | 21 + .../nanomatch/node_modules/kind-of/README.md | 367 + .../nanomatch/node_modules/kind-of/index.js | 129 + .../node_modules/kind-of/package.json | 88 + node_modules/nanomatch/package.json | 134 + 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 | 418 + .../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 | 31 + 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 | 78 + node_modules/npm-run-all/LICENSE | 22 + node_modules/npm-run-all/README.md | 214 + node_modules/npm-run-all/bin/help.js | 32 + node_modules/npm-run-all/bin/main.js | 243 + node_modules/npm-run-all/bin/npm-run-all.js | 58 + node_modules/npm-run-all/bin/version.js | 48 + node_modules/npm-run-all/index.js | 8 + node_modules/npm-run-all/lib/create-header.js | 56 + .../lib/create-prefix-transform-stream.js | 129 + node_modules/npm-run-all/lib/match-tasks.js | 196 + node_modules/npm-run-all/lib/npm-run-all.js | 278 + .../npm-run-all/lib/read-package-json.js | 48 + node_modules/npm-run-all/lib/run-task.js | 180 + .../npm-run-all/lib/run-tasks-in-parallel.js | 66 + .../lib/run-tasks-in-sequencial.js | 63 + node_modules/npm-run-all/lib/spawn-posix.js | 88 + node_modules/npm-run-all/lib/spawn-win32.js | 45 + node_modules/npm-run-all/lib/spawn.js | 17 + node_modules/npm-run-all/package.json | 75 + 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 | 51 + .../node_modules/is-descriptor/.editorconfig | 14 + .../node_modules/is-descriptor/.eslintrc | 16 + .../node_modules/is-descriptor/.gitattributes | 10 + .../is-descriptor/.github/FUNDING.yml | 12 + .../node_modules/is-descriptor/.nycrc | 9 + .../node_modules/is-descriptor/CHANGELOG.md | 144 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 134 + .../node_modules/is-descriptor/index.js | 16 + .../node_modules/is-descriptor/package.json | 88 + .../node_modules/is-descriptor/test/index.js | 116 + node_modules/object-copy/package.json | 47 + node_modules/object-inspect/.eslintrc | 53 + .../object-inspect/.github/FUNDING.yml | 12 + node_modules/object-inspect/.nycrc | 13 + node_modules/object-inspect/CHANGELOG.md | 389 + node_modules/object-inspect/LICENSE | 21 + node_modules/object-inspect/example/all.js | 23 + .../object-inspect/example/circular.js | 6 + node_modules/object-inspect/example/fn.js | 5 + .../object-inspect/example/inspect.js | 10 + node_modules/object-inspect/index.js | 524 + .../object-inspect/package-support.json | 20 + node_modules/object-inspect/package.json | 99 + node_modules/object-inspect/readme.markdown | 86 + node_modules/object-inspect/test-core-js.js | 26 + node_modules/object-inspect/test/bigint.js | 58 + .../object-inspect/test/browser/dom.js | 15 + node_modules/object-inspect/test/circular.js | 16 + node_modules/object-inspect/test/deep.js | 12 + node_modules/object-inspect/test/element.js | 53 + node_modules/object-inspect/test/err.js | 48 + node_modules/object-inspect/test/fakes.js | 29 + node_modules/object-inspect/test/fn.js | 76 + node_modules/object-inspect/test/global.js | 17 + node_modules/object-inspect/test/has.js | 15 + node_modules/object-inspect/test/holes.js | 15 + .../object-inspect/test/indent-option.js | 271 + node_modules/object-inspect/test/inspect.js | 139 + node_modules/object-inspect/test/lowbyte.js | 12 + node_modules/object-inspect/test/number.js | 58 + .../object-inspect/test/quoteStyle.js | 17 + .../object-inspect/test/toStringTag.js | 40 + node_modules/object-inspect/test/undef.js | 12 + node_modules/object-inspect/test/values.js | 211 + node_modules/object-inspect/util.inspect.js | 1 + node_modules/object-keys/.editorconfig | 13 + node_modules/object-keys/.eslintrc | 17 + node_modules/object-keys/.travis.yml | 277 + node_modules/object-keys/CHANGELOG.md | 232 + node_modules/object-keys/LICENSE | 21 + node_modules/object-keys/README.md | 76 + node_modules/object-keys/implementation.js | 122 + node_modules/object-keys/index.js | 32 + node_modules/object-keys/isArguments.js | 17 + node_modules/object-keys/package.json | 88 + node_modules/object-keys/test/index.js | 5 + node_modules/object-visit/LICENSE | 21 + node_modules/object-visit/README.md | 83 + node_modules/object-visit/index.js | 33 + .../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 | 74 + node_modules/object-visit/package.json | 65 + node_modules/object.assign/.editorconfig | 20 + node_modules/object.assign/.eslintrc | 28 + .../object.assign/.github/FUNDING.yml | 12 + node_modules/object.assign/.nycrc | 9 + node_modules/object.assign/CHANGELOG.md | 233 + node_modules/object.assign/LICENSE | 21 + node_modules/object.assign/README.md | 136 + node_modules/object.assign/auto.js | 3 + node_modules/object.assign/dist/browser.js | 1141 +++ node_modules/object.assign/hasSymbols.js | 43 + node_modules/object.assign/implementation.js | 46 + node_modules/object.assign/index.js | 22 + node_modules/object.assign/package.json | 96 + node_modules/object.assign/polyfill.js | 55 + node_modules/object.assign/shim.js | 14 + .../object.assign/test/implementation.js | 19 + node_modules/object.assign/test/index.js | 17 + node_modules/object.assign/test/native.js | 49 + node_modules/object.assign/test/ses-compat.js | 12 + node_modules/object.assign/test/shimmed.js | 52 + node_modules/object.assign/test/tests.js | 232 + node_modules/object.omit/LICENSE | 21 + node_modules/object.omit/README.md | 118 + node_modules/object.omit/index.js | 40 + node_modules/object.omit/package.json | 67 + node_modules/object.pick/LICENSE | 21 + node_modules/object.pick/README.md | 76 + node_modules/object.pick/index.js | 35 + .../object.pick/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 | 74 + node_modules/object.pick/package.json | 60 + node_modules/onchange/.npmignore | 2 + node_modules/onchange/README.md | 63 + node_modules/onchange/cli.js | 55 + node_modules/onchange/index.d.ts | 15 + node_modules/onchange/index.js | 109 + node_modules/onchange/package.json | 34 + node_modules/onchange/test/__test__/file.txt | 1 + node_modules/onchange/test/__test__/out.txt | 2 + node_modules/onchange/test/index.js | 45 + node_modules/onchange/test/slow.js | 9 + node_modules/parse-glob/LICENSE | 21 + node_modules/parse-glob/README.md | 115 + node_modules/parse-glob/index.js | 156 + node_modules/parse-glob/package.json | 62 + node_modules/parse-json/index.js | 35 + node_modules/parse-json/license | 21 + node_modules/parse-json/package.json | 46 + 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/pascalcase/LICENSE | 21 + node_modules/pascalcase/README.md | 80 + node_modules/pascalcase/index.js | 21 + node_modules/pascalcase/package.json | 46 + node_modules/path-is-absolute/index.js | 20 + node_modules/path-is-absolute/license | 21 + node_modules/path-is-absolute/package.json | 43 + node_modules/path-is-absolute/readme.md | 59 + node_modules/path-parse/LICENSE | 21 + node_modules/path-parse/README.md | 42 + node_modules/path-parse/index.js | 75 + node_modules/path-parse/package.json | 33 + node_modules/path-type/index.js | 29 + node_modules/path-type/license | 21 + node_modules/path-type/package.json | 52 + 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 | 35 + 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/pify/index.js | 68 + node_modules/pify/license | 21 + node_modules/pify/package.json | 48 + node_modules/pify/readme.md | 119 + node_modules/pinkie-promise/index.js | 3 + node_modules/pinkie-promise/license | 21 + node_modules/pinkie-promise/package.json | 35 + node_modules/pinkie-promise/readme.md | 28 + node_modules/pinkie/index.js | 292 + node_modules/pinkie/license | 21 + node_modules/pinkie/package.json | 36 + node_modules/pinkie/readme.md | 83 + 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 | 54 + node_modules/preserve/.gitattributes | 14 + node_modules/preserve/.jshintrc | 24 + node_modules/preserve/.npmignore | 53 + node_modules/preserve/.travis.yml | 3 + node_modules/preserve/.verb.md | 59 + node_modules/preserve/LICENSE | 24 + node_modules/preserve/README.md | 90 + node_modules/preserve/index.js | 54 + node_modules/preserve/package.json | 48 + node_modules/preserve/test.js | 48 + node_modules/process-nextick-args/index.js | 45 + node_modules/process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 25 + node_modules/process-nextick-args/readme.md | 18 + node_modules/ps-tree/CHANGELOG.md | 11 + node_modules/ps-tree/LICENSE | 21 + node_modules/ps-tree/README.md | 81 + node_modules/ps-tree/bin/ps-tree.js | 16 + node_modules/ps-tree/index.js | 119 + node_modules/ps-tree/package.json | 49 + node_modules/pseudomap/LICENSE | 15 + node_modules/pseudomap/README.md | 60 + node_modules/pseudomap/map.js | 9 + node_modules/pseudomap/package.json | 25 + node_modules/pseudomap/pseudomap.js | 113 + node_modules/pseudomap/test/basic.js | 86 + node_modules/randomatic/LICENSE | 21 + node_modules/randomatic/README.md | 193 + node_modules/randomatic/index.js | 95 + .../randomatic/node_modules/is-number/LICENSE | 21 + .../node_modules/is-number/README.md | 135 + .../node_modules/is-number/index.js | 21 + .../node_modules/is-number/package.json | 76 + .../node_modules/kind-of/CHANGELOG.md | 160 + .../randomatic/node_modules/kind-of/LICENSE | 21 + .../randomatic/node_modules/kind-of/README.md | 367 + .../randomatic/node_modules/kind-of/index.js | 129 + .../node_modules/kind-of/package.json | 88 + node_modules/randomatic/package.json | 80 + node_modules/read-pkg/index.js | 48 + node_modules/read-pkg/license | 21 + node_modules/read-pkg/package.json | 42 + node_modules/read-pkg/readme.md | 79 + node_modules/readable-stream/.travis.yml | 34 + 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 | 131 + .../lib/_stream_passthrough.js | 47 + .../readable-stream/lib/_stream_readable.js | 1019 ++ .../readable-stream/lib/_stream_transform.js | 214 + .../readable-stream/lib/_stream_writable.js | 685 ++ .../lib/internal/streams/BufferList.js | 78 + .../lib/internal/streams/destroy.js | 84 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + node_modules/readable-stream/package.json | 52 + 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/LICENSE | 20 + node_modules/readdirp/README.md | 204 + .../readdirp/node_modules/arr-diff/LICENSE | 21 + .../readdirp/node_modules/arr-diff/README.md | 130 + .../readdirp/node_modules/arr-diff/index.js | 47 + .../node_modules/arr-diff/package.json | 69 + .../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 | 62 + .../readdirp/node_modules/braces/LICENSE | 21 + .../readdirp/node_modules/braces/README.md | 640 ++ .../readdirp/node_modules/braces/index.js | 318 + .../node_modules/braces/lib/braces.js | 104 + .../node_modules/braces/lib/compilers.js | 282 + .../node_modules/braces/lib/parsers.js | 360 + .../readdirp/node_modules/braces/lib/utils.js | 343 + .../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 | 56 + .../readdirp/node_modules/braces/package.json | 108 + .../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 + .../expand-brackets/lib/compilers.js | 87 + .../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 | 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 | 56 + .../node_modules/is-descriptor/.editorconfig | 14 + .../node_modules/is-descriptor/.eslintrc | 16 + .../node_modules/is-descriptor/.gitattributes | 10 + .../is-descriptor/.github/FUNDING.yml | 12 + .../node_modules/is-descriptor/.nycrc | 9 + .../node_modules/is-descriptor/CHANGELOG.md | 144 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 134 + .../node_modules/is-descriptor/index.js | 16 + .../node_modules/is-descriptor/package.json | 88 + .../node_modules/is-descriptor/test/index.js | 116 + .../node_modules/expand-brackets/package.json | 85 + .../readdirp/node_modules/extglob/LICENSE | 21 + .../readdirp/node_modules/extglob/README.md | 362 + .../node_modules/extglob/changelog.md | 25 + .../readdirp/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 | 62 + .../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 | 56 + .../node_modules/extglob/package.json | 108 + .../readdirp/node_modules/fill-range/LICENSE | 21 + .../node_modules/fill-range/README.md | 250 + .../readdirp/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 | 56 + .../node_modules/fill-range/package.json | 82 + .../readdirp/node_modules/is-number/LICENSE | 21 + .../readdirp/node_modules/is-number/README.md | 115 + .../readdirp/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 | 90 + .../node_modules/is-number/package.json | 83 + .../readdirp/node_modules/isobject/LICENSE | 21 + .../readdirp/node_modules/isobject/README.md | 122 + .../readdirp/node_modules/isobject/index.d.ts | 5 + .../readdirp/node_modules/isobject/index.js | 12 + .../node_modules/isobject/package.json | 74 + .../node_modules/kind-of/CHANGELOG.md | 160 + .../readdirp/node_modules/kind-of/LICENSE | 21 + .../readdirp/node_modules/kind-of/README.md | 367 + .../readdirp/node_modules/kind-of/index.js | 129 + .../node_modules/kind-of/package.json | 88 + .../node_modules/micromatch/CHANGELOG.md | 37 + .../readdirp/node_modules/micromatch/LICENSE | 21 + .../node_modules/micromatch/README.md | 1150 +++ .../readdirp/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 | 147 + node_modules/readdirp/package.json | 50 + node_modules/readdirp/readdirp.js | 294 + node_modules/readdirp/stream-api.js | 98 + node_modules/regenerator-runtime/README.md | 31 + node_modules/regenerator-runtime/package.json | 18 + node_modules/regenerator-runtime/path.js | 11 + .../regenerator-runtime/runtime-module.js | 35 + node_modules/regenerator-runtime/runtime.js | 727 ++ node_modules/regex-cache/LICENSE | 21 + node_modules/regex-cache/README.md | 166 + node_modules/regex-cache/index.js | 68 + node_modules/regex-cache/package.json | 64 + 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 | 63 + .../regexp.prototype.flags/.editorconfig | 13 + node_modules/regexp.prototype.flags/.eslintrc | 20 + node_modules/regexp.prototype.flags/.nycrc | 9 + .../regexp.prototype.flags/CHANGELOG.md | 211 + node_modules/regexp.prototype.flags/LICENSE | 22 + node_modules/regexp.prototype.flags/README.md | 54 + node_modules/regexp.prototype.flags/auto.js | 3 + .../regexp.prototype.flags/implementation.js | 39 + node_modules/regexp.prototype.flags/index.js | 18 + .../regexp.prototype.flags/package.json | 101 + .../regexp.prototype.flags/polyfill.js | 36 + node_modules/regexp.prototype.flags/shim.js | 26 + .../test/implementation.js | 20 + .../regexp.prototype.flags/test/index.js | 17 + .../regexp.prototype.flags/test/shimmed.js | 48 + .../regexp.prototype.flags/test/tests.js | 143 + .../remove-trailing-separator/history.md | 17 + .../remove-trailing-separator/index.js | 17 + .../remove-trailing-separator/license | 3 + .../remove-trailing-separator/package.json | 37 + .../remove-trailing-separator/readme.md | 51 + node_modules/repeat-element/LICENSE | 21 + node_modules/repeat-element/README.md | 99 + node_modules/repeat-element/index.js | 22 + node_modules/repeat-element/package.json | 49 + 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 | 77 + 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 | 34 + 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 | 37 + node_modules/resolve/.eslintrc | 65 + node_modules/resolve/.github/FUNDING.yml | 12 + node_modules/resolve/LICENSE | 21 + node_modules/resolve/SECURITY.md | 3 + node_modules/resolve/async.js | 3 + node_modules/resolve/bin/resolve | 50 + node_modules/resolve/example/async.js | 5 + node_modules/resolve/example/sync.js | 3 + node_modules/resolve/index.js | 6 + node_modules/resolve/lib/async.js | 329 + node_modules/resolve/lib/caller.js | 8 + node_modules/resolve/lib/core.js | 12 + node_modules/resolve/lib/core.json | 158 + node_modules/resolve/lib/homedir.js | 24 + node_modules/resolve/lib/is-core.js | 5 + .../resolve/lib/node-modules-paths.js | 42 + node_modules/resolve/lib/normalize-options.js | 10 + node_modules/resolve/lib/sync.js | 208 + node_modules/resolve/package.json | 72 + node_modules/resolve/readme.markdown | 301 + node_modules/resolve/sync.js | 3 + node_modules/resolve/test/core.js | 88 + 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 | 29 + node_modules/resolve/test/filter.js | 34 + node_modules/resolve/test/filter_sync.js | 33 + node_modules/resolve/test/home_paths.js | 127 + node_modules/resolve/test/home_paths_sync.js | 114 + node_modules/resolve/test/mock.js | 315 + node_modules/resolve/test/mock_sync.js | 214 + 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 | 143 + node_modules/resolve/test/node_path.js | 70 + .../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 | 75 + .../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 | 597 ++ .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 4 + .../resolve/test/resolver/baz/quux.js | 1 + .../resolve/test/resolver/browser_field/a.js | 0 .../resolve/test/resolver/browser_field/b.js | 0 .../test/resolver/browser_field/package.json | 5 + 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 + .../resolve/test/resolver/false_main/index.js | 0 .../test/resolver/false_main/package.json | 4 + node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + .../test/resolver/invalid_main/package.json | 7 + node_modules/resolve/test/resolver/mug.coffee | 0 node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/multirepo/lerna.json | 6 + .../test/resolver/multirepo/package.json | 20 + .../multirepo/packages/package-a/index.js | 35 + .../multirepo/packages/package-a/package.json | 14 + .../multirepo/packages/package-b/index.js | 0 .../multirepo/packages/package-b/package.json | 14 + .../resolver/nested_symlinks/mylib/async.js | 26 + .../nested_symlinks/mylib/package.json | 15 + .../resolver/nested_symlinks/mylib/sync.js | 12 + .../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 + .../resolver/symlinked/_/node_modules/foo.js | 0 .../symlinked/_/symlink_target/.gitkeep | 0 .../test/resolver/symlinked/package/bar.js | 1 + .../resolver/symlinked/package/package.json | 3 + .../test/resolver/without_basedir/main.js | 5 + node_modules/resolve/test/resolver_sync.js | 730 ++ node_modules/resolve/test/shadowed_core.js | 54 + .../shadowed_core/node_modules/util/index.js | 0 node_modules/resolve/test/subdirs.js | 13 + node_modules/resolve/test/symlinks.js | 176 + 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 | 35 + node_modules/right-align/LICENSE | 21 + node_modules/right-align/README.md | 77 + node_modules/right-align/index.js | 16 + node_modules/right-align/package.json | 45 + node_modules/safe-array-concat/.eslintrc | 15 + .../safe-array-concat/.github/FUNDING.yml | 12 + node_modules/safe-array-concat/.nycrc | 13 + node_modules/safe-array-concat/CHANGELOG.md | 26 + node_modules/safe-array-concat/LICENSE | 21 + node_modules/safe-array-concat/README.md | 53 + node_modules/safe-array-concat/index.js | 36 + .../node_modules/isarray/LICENSE | 21 + .../node_modules/isarray/README.md | 38 + .../node_modules/isarray/index.js | 5 + .../node_modules/isarray/package.json | 48 + node_modules/safe-array-concat/package.json | 78 + node_modules/safe-array-concat/test/index.js | 89 + node_modules/safe-buffer/LICENSE | 21 + node_modules/safe-buffer/README.md | 584 ++ node_modules/safe-buffer/index.d.ts | 187 + node_modules/safe-buffer/index.js | 62 + node_modules/safe-buffer/package.json | 37 + node_modules/safe-regex-test/.eslintrc | 9 + .../safe-regex-test/.github/FUNDING.yml | 12 + node_modules/safe-regex-test/CHANGELOG.md | 15 + node_modules/safe-regex-test/LICENSE | 21 + node_modules/safe-regex-test/README.md | 42 + node_modules/safe-regex-test/index.js | 17 + node_modules/safe-regex-test/package.json | 75 + node_modules/safe-regex-test/test/index.js | 37 + 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 | 43 + node_modules/safe-regex/readme.markdown | 65 + node_modules/safe-regex/test/regex.js | 50 + node_modules/semver/LICENSE | 15 + node_modules/semver/README.md | 412 + node_modules/semver/bin/semver | 160 + node_modules/semver/package.json | 38 + node_modules/semver/range.bnf | 16 + node_modules/semver/semver.js | 1525 +++ node_modules/set-function-length/.eslintrc | 27 + .../set-function-length/.github/FUNDING.yml | 12 + node_modules/set-function-length/.nycrc | 13 + node_modules/set-function-length/CHANGELOG.md | 41 + node_modules/set-function-length/LICENSE | 21 + node_modules/set-function-length/README.md | 56 + node_modules/set-function-length/env.js | 19 + node_modules/set-function-length/index.js | 41 + node_modules/set-function-length/package.json | 84 + node_modules/set-function-name/.eslintrc | 20 + .../set-function-name/.github/FUNDING.yml | 12 + node_modules/set-function-name/CHANGELOG.md | 39 + node_modules/set-function-name/LICENSE | 21 + node_modules/set-function-name/README.md | 61 + node_modules/set-function-name/index.js | 22 + node_modules/set-function-name/package.json | 80 + node_modules/set-value/LICENSE | 21 + node_modules/set-value/README.md | 150 + node_modules/set-value/index.js | 55 + .../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 | 56 + node_modules/set-value/package.json | 79 + node_modules/shell-quote/.eslintrc | 30 + node_modules/shell-quote/.github/FUNDING.yml | 12 + node_modules/shell-quote/.nycrc | 14 + node_modules/shell-quote/CHANGELOG.md | 279 + node_modules/shell-quote/LICENSE | 24 + node_modules/shell-quote/README.md | 161 + node_modules/shell-quote/example/env.js | 5 + node_modules/shell-quote/example/op.js | 5 + node_modules/shell-quote/example/parse.js | 5 + node_modules/shell-quote/example/quote.js | 5 + node_modules/shell-quote/index.js | 4 + node_modules/shell-quote/package.json | 66 + node_modules/shell-quote/parse.js | 226 + node_modules/shell-quote/quote.js | 16 + node_modules/shell-quote/security.md | 11 + node_modules/shell-quote/test/comment.js | 16 + node_modules/shell-quote/test/env.js | 52 + node_modules/shell-quote/test/env_fn.js | 21 + node_modules/shell-quote/test/op.js | 102 + node_modules/shell-quote/test/parse.js | 42 + node_modules/shell-quote/test/quote.js | 50 + node_modules/shell-quote/test/set.js | 31 + node_modules/side-channel/.eslintignore | 1 + node_modules/side-channel/.eslintrc | 11 + node_modules/side-channel/.github/FUNDING.yml | 12 + node_modules/side-channel/.nycrc | 13 + node_modules/side-channel/CHANGELOG.md | 65 + node_modules/side-channel/LICENSE | 21 + node_modules/side-channel/README.md | 2 + node_modules/side-channel/index.js | 124 + node_modules/side-channel/package.json | 67 + node_modules/side-channel/test/index.js | 78 + 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 | 62 + .../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 | 74 + node_modules/snapdragon-node/package.json | 76 + node_modules/snapdragon-util/LICENSE | 21 + node_modules/snapdragon-util/README.md | 807 ++ node_modules/snapdragon-util/index.js | 1019 ++ node_modules/snapdragon-util/package.json | 65 + 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 | 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 | 56 + .../node_modules/is-descriptor/.editorconfig | 14 + .../node_modules/is-descriptor/.eslintrc | 16 + .../node_modules/is-descriptor/.gitattributes | 10 + .../is-descriptor/.github/FUNDING.yml | 12 + .../node_modules/is-descriptor/.nycrc | 9 + .../node_modules/is-descriptor/CHANGELOG.md | 144 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 134 + .../node_modules/is-descriptor/index.js | 16 + .../node_modules/is-descriptor/package.json | 88 + .../node_modules/is-descriptor/test/index.js | 116 + node_modules/snapdragon/package.json | 79 + node_modules/source-map-resolve/LICENSE | 22 + node_modules/source-map-resolve/changelog.md | 108 + .../lib/decode-uri-component.js | 8 + .../source-map-resolve/lib/resolve-url.js | 9 + .../lib/source-map-resolve-node.js | 342 + node_modules/source-map-resolve/package.json | 47 + node_modules/source-map-resolve/readme.md | 231 + .../source-map-resolve/source-map-resolve.js | 348 + node_modules/source-map-url/LICENSE | 21 + node_modules/source-map-url/changelog.md | 57 + node_modules/source-map-url/package.json | 39 + node_modules/source-map-url/readme.md | 97 + node_modules/source-map-url/source-map-url.js | 57 + 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 | 72 + node_modules/source-map/source-map.js | 8 + node_modules/spdx-correct/LICENSE | 202 + node_modules/spdx-correct/README.md | 22 + node_modules/spdx-correct/index.js | 386 + node_modules/spdx-correct/package.json | 32 + node_modules/spdx-exceptions/README.md | 36 + node_modules/spdx-exceptions/index.json | 40 + node_modules/spdx-exceptions/package.json | 17 + 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 | 39 + 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 | 33 + node_modules/spdx-license-ids/index.json | 569 ++ node_modules/spdx-license-ids/package.json | 39 + 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 | 65 + node_modules/split/.npmignore | 3 + node_modules/split/.travis.yml | 4 + node_modules/split/LICENCE | 22 + node_modules/split/examples/pretty.js | 26 + node_modules/split/index.js | 63 + node_modules/split/package.json | 30 + 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 + 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 | 51 + .../node_modules/is-descriptor/.editorconfig | 14 + .../node_modules/is-descriptor/.eslintrc | 16 + .../node_modules/is-descriptor/.gitattributes | 10 + .../is-descriptor/.github/FUNDING.yml | 12 + .../node_modules/is-descriptor/.nycrc | 9 + .../node_modules/is-descriptor/CHANGELOG.md | 144 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 134 + .../node_modules/is-descriptor/index.js | 16 + .../node_modules/is-descriptor/package.json | 88 + .../node_modules/is-descriptor/test/index.js | 116 + node_modules/static-extend/package.json | 63 + 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 | 21 + node_modules/stream-combiner/test/index.js | 52 + .../string.prototype.padend/.editorconfig | 20 + .../string.prototype.padend/.eslintrc | 20 + node_modules/string.prototype.padend/.nycrc | 9 + .../string.prototype.padend/CHANGELOG.md | 88 + node_modules/string.prototype.padend/LICENSE | 22 + .../string.prototype.padend/README.md | 46 + node_modules/string.prototype.padend/auto.js | 3 + .../string.prototype.padend/implementation.js | 35 + node_modules/string.prototype.padend/index.js | 25 + .../string.prototype.padend/package.json | 98 + .../string.prototype.padend/polyfill.js | 7 + node_modules/string.prototype.padend/shim.js | 14 + .../string.prototype.padend/test/.eslintrc | 5 + .../test/implementation.js | 20 + .../string.prototype.padend/test/index.js | 17 + .../string.prototype.padend/test/shimmed.js | 36 + .../string.prototype.padend/test/tests.js | 26 + .../string.prototype.trim/.editorconfig | 20 + node_modules/string.prototype.trim/.eslintrc | 25 + node_modules/string.prototype.trim/.nycrc | 9 + .../string.prototype.trim/CHANGELOG.md | 182 + node_modules/string.prototype.trim/LICENSE | 21 + node_modules/string.prototype.trim/README.md | 48 + node_modules/string.prototype.trim/auto.js | 3 + .../string.prototype.trim/implementation.js | 21 + node_modules/string.prototype.trim/index.js | 23 + .../string.prototype.trim/package.json | 101 + .../string.prototype.trim/polyfill.js | 19 + node_modules/string.prototype.trim/shim.js | 14 + .../test/implementation.js | 21 + .../string.prototype.trim/test/index.js | 17 + .../string.prototype.trim/test/shimmed.js | 36 + .../string.prototype.trim/test/tests.js | 62 + .../string.prototype.trimend/.editorconfig | 20 + .../string.prototype.trimend/.eslintrc | 24 + node_modules/string.prototype.trimend/.nycrc | 9 + .../string.prototype.trimend/CHANGELOG.md | 108 + node_modules/string.prototype.trimend/LICENSE | 21 + .../string.prototype.trimend/README.md | 46 + node_modules/string.prototype.trimend/auto.js | 3 + .../implementation.js | 15 + .../string.prototype.trimend/index.js | 23 + .../string.prototype.trimend/package.json | 79 + .../string.prototype.trimend/polyfill.js | 15 + node_modules/string.prototype.trimend/shim.js | 14 + .../test/implementation.js | 20 + .../string.prototype.trimend/test/index.js | 17 + .../string.prototype.trimend/test/shimmed.js | 36 + .../string.prototype.trimend/test/tests.js | 31 + .../string.prototype.trimstart/.editorconfig | 20 + .../string.prototype.trimstart/.eslintrc | 24 + .../string.prototype.trimstart/.nycrc | 9 + .../string.prototype.trimstart/CHANGELOG.md | 108 + .../string.prototype.trimstart/LICENSE | 21 + .../string.prototype.trimstart/README.md | 46 + .../string.prototype.trimstart/auto.js | 3 + .../implementation.js | 15 + .../string.prototype.trimstart/index.js | 23 + .../string.prototype.trimstart/package.json | 79 + .../string.prototype.trimstart/polyfill.js | 15 + .../string.prototype.trimstart/shim.js | 14 + .../test/implementation.js | 20 + .../string.prototype.trimstart/test/index.js | 18 + .../test/shimmed.js | 36 + .../string.prototype.trimstart/test/tests.js | 31 + node_modules/string_decoder/.travis.yml | 50 + node_modules/string_decoder/LICENSE | 48 + node_modules/string_decoder/README.md | 47 + .../string_decoder/lib/string_decoder.js | 296 + node_modules/string_decoder/package.json | 31 + node_modules/strip-ansi/index.js | 6 + node_modules/strip-ansi/license | 21 + node_modules/strip-ansi/package.json | 57 + node_modules/strip-ansi/readme.md | 33 + node_modules/strip-bom/index.js | 17 + node_modules/strip-bom/license | 21 + node_modules/strip-bom/package.json | 42 + node_modules/strip-bom/readme.md | 39 + node_modules/supports-color/index.js | 50 + node_modules/supports-color/license | 21 + node_modules/supports-color/package.json | 49 + node_modules/supports-color/readme.md | 36 + .../supports-preserve-symlinks-flag/.eslintrc | 14 + .../.github/FUNDING.yml | 12 + .../supports-preserve-symlinks-flag/.nycrc | 9 + .../CHANGELOG.md | 22 + .../supports-preserve-symlinks-flag/LICENSE | 21 + .../supports-preserve-symlinks-flag/README.md | 42 + .../browser.js | 3 + .../supports-preserve-symlinks-flag/index.js | 9 + .../package.json | 70 + .../test/index.js | 29 + 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 | 36 + 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/to-object-path/LICENSE | 21 + node_modules/to-object-path/README.md | 71 + node_modules/to-object-path/index.js | 33 + node_modules/to-object-path/package.json | 48 + 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/is-number/LICENSE | 21 + .../node_modules/is-number/README.md | 115 + .../node_modules/is-number/index.js | 22 + .../node_modules/is-number/package.json | 83 + node_modules/to-regex-range/package.json | 86 + 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 | 62 + node_modules/typed-array-buffer/.eslintrc | 13 + .../typed-array-buffer/.github/FUNDING.yml | 12 + node_modules/typed-array-buffer/.nycrc | 13 + node_modules/typed-array-buffer/CHANGELOG.md | 15 + node_modules/typed-array-buffer/LICENSE | 21 + node_modules/typed-array-buffer/README.md | 42 + node_modules/typed-array-buffer/index.js | 19 + node_modules/typed-array-buffer/package.json | 73 + node_modules/typed-array-buffer/test/index.js | 22 + .../typed-array-byte-length/.eslintrc | 12 + .../.github/FUNDING.yml | 12 + node_modules/typed-array-byte-length/.nycrc | 13 + .../typed-array-byte-length/CHANGELOG.md | 14 + node_modules/typed-array-byte-length/LICENSE | 21 + .../typed-array-byte-length/README.md | 70 + node_modules/typed-array-byte-length/index.js | 66 + .../typed-array-byte-length/package.json | 98 + .../typed-array-byte-length/test/index.js | 81 + .../typed-array-byte-offset/.eslintrc | 8 + .../.github/FUNDING.yml | 12 + node_modules/typed-array-byte-offset/.nycrc | 13 + .../typed-array-byte-offset/CHANGELOG.md | 15 + node_modules/typed-array-byte-offset/LICENSE | 21 + .../typed-array-byte-offset/README.md | 70 + node_modules/typed-array-byte-offset/index.js | 66 + .../typed-array-byte-offset/package.json | 98 + .../typed-array-byte-offset/test/index.js | 88 + node_modules/typed-array-length/.eslintrc | 11 + .../typed-array-length/.github/FUNDING.yml | 12 + node_modules/typed-array-length/.nycrc | 13 + node_modules/typed-array-length/CHANGELOG.md | 69 + node_modules/typed-array-length/LICENSE | 21 + node_modules/typed-array-length/README.md | 64 + node_modules/typed-array-length/index.js | 77 + node_modules/typed-array-length/package.json | 89 + node_modules/typed-array-length/test/index.js | 85 + node_modules/uglify-js/LICENSE | 29 + node_modules/uglify-js/README.md | 995 ++ node_modules/uglify-js/bin/extract-props.js | 77 + node_modules/uglify-js/bin/uglifyjs | 635 ++ node_modules/uglify-js/lib/ast.js | 1052 ++ node_modules/uglify-js/lib/compress.js | 4101 ++++++++ node_modules/uglify-js/lib/mozilla-ast.js | 611 ++ node_modules/uglify-js/lib/output.js | 1423 +++ node_modules/uglify-js/lib/parse.js | 1599 +++ node_modules/uglify-js/lib/propmangle.js | 264 + node_modules/uglify-js/lib/scope.js | 656 ++ node_modules/uglify-js/lib/sourcemap.js | 97 + node_modules/uglify-js/lib/transform.js | 218 + node_modules/uglify-js/lib/utils.js | 362 + node_modules/uglify-js/package.json | 51 + node_modules/uglify-js/tools/domprops.json | 5603 ++++++++++ node_modules/uglify-js/tools/exports.js | 19 + node_modules/uglify-js/tools/node.js | 320 + node_modules/uglify-js/tools/props.html | 61 + node_modules/uglify-to-browserify/.npmignore | 14 + node_modules/uglify-to-browserify/.travis.yml | 3 + node_modules/uglify-to-browserify/LICENSE | 19 + node_modules/uglify-to-browserify/README.md | 15 + node_modules/uglify-to-browserify/index.js | 49 + .../uglify-to-browserify/package.json | 20 + .../uglify-to-browserify/test/index.js | 22 + node_modules/unbox-primitive/.editorconfig | 20 + node_modules/unbox-primitive/.eslintrc | 5 + .../unbox-primitive/.github/FUNDING.yml | 12 + node_modules/unbox-primitive/.nycrc | 13 + node_modules/unbox-primitive/CHANGELOG.md | 60 + node_modules/unbox-primitive/LICENSE | 21 + node_modules/unbox-primitive/README.md | 47 + node_modules/unbox-primitive/index.js | 39 + node_modules/unbox-primitive/package.json | 65 + node_modules/unbox-primitive/test/index.js | 59 + node_modules/union-value/LICENSE | 21 + node_modules/union-value/README.md | 73 + node_modules/union-value/index.js | 30 + node_modules/union-value/package.json | 70 + 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 | 67 + .../node_modules/has-value/package.json | 81 + .../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 | 75 + .../unset-value/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 | 74 + node_modules/unset-value/package.json | 71 + node_modules/urix/.jshintrc | 42 + node_modules/urix/LICENSE | 21 + node_modules/urix/index.js | 17 + node_modules/urix/package.json | 25 + node_modules/urix/readme.md | 46 + node_modules/urix/test/index.js | 43 + node_modules/use/LICENSE | 21 + node_modules/use/README.md | 90 + node_modules/use/index.js | 155 + node_modules/use/package.json | 66 + 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 | 27 + .../validate-npm-package-license/LICENSE | 202 + .../validate-npm-package-license/README.md | 113 + .../validate-npm-package-license/index.js | 86 + .../validate-npm-package-license/package.json | 28 + .../which-boxed-primitive/.editorconfig | 20 + .../which-boxed-primitive/.eslintignore | 1 + node_modules/which-boxed-primitive/.eslintrc | 9 + .../which-boxed-primitive/.github/FUNDING.yml | 12 + node_modules/which-boxed-primitive/.nycrc | 13 + .../which-boxed-primitive/CHANGELOG.md | 54 + node_modules/which-boxed-primitive/LICENSE | 21 + node_modules/which-boxed-primitive/README.md | 73 + node_modules/which-boxed-primitive/index.js | 30 + .../which-boxed-primitive/package.json | 65 + .../which-boxed-primitive/test/index.js | 66 + node_modules/which-typed-array/.editorconfig | 20 + node_modules/which-typed-array/.eslintrc | 9 + .../which-typed-array/.github/FUNDING.yml | 12 + node_modules/which-typed-array/.nycrc | 13 + node_modules/which-typed-array/CHANGELOG.md | 204 + node_modules/which-typed-array/LICENSE | 22 + node_modules/which-typed-array/README.md | 70 + node_modules/which-typed-array/index.js | 92 + node_modules/which-typed-array/package.json | 115 + node_modules/which-typed-array/test/index.js | 99 + node_modules/which/CHANGELOG.md | 152 + node_modules/which/LICENSE | 15 + node_modules/which/README.md | 51 + node_modules/which/bin/which | 52 + node_modules/which/package.json | 30 + node_modules/which/which.js | 135 + node_modules/window-size/LICENSE-MIT | 22 + node_modules/window-size/README.md | 26 + node_modules/window-size/index.js | 33 + node_modules/window-size/package.json | 33 + node_modules/wordwrap/.npmignore | 1 + node_modules/wordwrap/README.markdown | 70 + node_modules/wordwrap/example/center.js | 10 + node_modules/wordwrap/example/meat.js | 3 + node_modules/wordwrap/index.js | 76 + node_modules/wordwrap/package.json | 37 + node_modules/wordwrap/test/break.js | 30 + node_modules/wordwrap/test/idleness.txt | 63 + node_modules/wordwrap/test/wrap.js | 31 + node_modules/yallist/LICENSE | 15 + node_modules/yallist/README.md | 204 + node_modules/yallist/iterator.js | 7 + node_modules/yallist/package.json | 29 + node_modules/yallist/yallist.js | 370 + node_modules/yargs/CHANGELOG.md | 374 + node_modules/yargs/LICENSE | 21 + node_modules/yargs/README.md | 926 ++ node_modules/yargs/completion.sh.hbs | 22 + node_modules/yargs/index.js | 504 + node_modules/yargs/lib/completion.js | 71 + node_modules/yargs/lib/parser.js | 448 + node_modules/yargs/lib/usage.js | 314 + node_modules/yargs/lib/validation.js | 196 + node_modules/yargs/package.json | 85 + package-lock.json | 6086 +++++++++++ 5622 files changed, 289254 insertions(+), 18 deletions(-) create mode 100644 images/avatar.jpeg create mode 120000 node_modules/.bin/atob create mode 120000 node_modules/.bin/npm-run-all create mode 120000 node_modules/.bin/onchange create mode 120000 node_modules/.bin/ps-tree create mode 120000 node_modules/.bin/resolve create mode 120000 node_modules/.bin/semver create mode 120000 node_modules/.bin/uglifyjs create mode 120000 node_modules/.bin/which create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/align-text/LICENSE create mode 100644 node_modules/align-text/README.md create mode 100644 node_modules/align-text/index.js create mode 100644 node_modules/align-text/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-buffer-byte-length/.eslintrc create mode 100644 node_modules/array-buffer-byte-length/.github/FUNDING.yml create mode 100644 node_modules/array-buffer-byte-length/.nycrc create mode 100644 node_modules/array-buffer-byte-length/CHANGELOG.md create mode 100644 node_modules/array-buffer-byte-length/LICENSE create mode 100644 node_modules/array-buffer-byte-length/README.md create mode 100644 node_modules/array-buffer-byte-length/index.js create mode 100644 node_modules/array-buffer-byte-length/package.json create mode 100644 node_modules/array-buffer-byte-length/test/index.js create mode 100755 node_modules/array-unique/LICENSE create mode 100755 node_modules/array-unique/README.md create mode 100755 node_modules/array-unique/index.js create mode 100755 node_modules/array-unique/package.json create mode 100644 node_modules/arraybuffer.prototype.slice/.editorconfig create mode 100644 node_modules/arraybuffer.prototype.slice/.eslintrc create mode 100644 node_modules/arraybuffer.prototype.slice/.nycrc create mode 100644 node_modules/arraybuffer.prototype.slice/CHANGELOG.md create mode 100644 node_modules/arraybuffer.prototype.slice/LICENSE create mode 100644 node_modules/arraybuffer.prototype.slice/README.md create mode 100644 node_modules/arraybuffer.prototype.slice/auto.js create mode 100644 node_modules/arraybuffer.prototype.slice/implementation.js create mode 100644 node_modules/arraybuffer.prototype.slice/index.js create mode 100644 node_modules/arraybuffer.prototype.slice/package.json create mode 100644 node_modules/arraybuffer.prototype.slice/polyfill.js create mode 100644 node_modules/arraybuffer.prototype.slice/shim.js create mode 100644 node_modules/arraybuffer.prototype.slice/test/implementation.js create mode 100644 node_modules/arraybuffer.prototype.slice/test/index.js create mode 100644 node_modules/arraybuffer.prototype.slice/test/shimmed.js create mode 100644 node_modules/arraybuffer.prototype.slice/test/tests.js create mode 100644 node_modules/arrify/index.js create mode 100644 node_modules/arrify/license create mode 100644 node_modules/arrify/package.json create mode 100644 node_modules/arrify/readme.md 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/LICENSE 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/available-typed-arrays/.eslintignore create mode 100644 node_modules/available-typed-arrays/.eslintrc create mode 100644 node_modules/available-typed-arrays/.github/FUNDING.yml create mode 100644 node_modules/available-typed-arrays/.nycrc create mode 100644 node_modules/available-typed-arrays/CHANGELOG.md create mode 100644 node_modules/available-typed-arrays/LICENSE create mode 100644 node_modules/available-typed-arrays/README.md create mode 100644 node_modules/available-typed-arrays/index.js create mode 100644 node_modules/available-typed-arrays/package.json create mode 100644 node_modules/available-typed-arrays/test/index.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/.github/FUNDING.yml 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/node_modules/isobject/LICENSE create mode 100644 node_modules/base/node_modules/isobject/README.md create mode 100644 node_modules/base/node_modules/isobject/index.d.ts create mode 100644 node_modules/base/node_modules/isobject/index.js create mode 100644 node_modules/base/node_modules/isobject/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/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/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/node_modules/isobject/LICENSE create mode 100644 node_modules/cache-base/node_modules/isobject/README.md create mode 100644 node_modules/cache-base/node_modules/isobject/index.d.ts create mode 100644 node_modules/cache-base/node_modules/isobject/index.js create mode 100644 node_modules/cache-base/node_modules/isobject/package.json create mode 100644 node_modules/cache-base/package.json create mode 100644 node_modules/call-bind/.eslintignore create mode 100644 node_modules/call-bind/.eslintrc create mode 100644 node_modules/call-bind/.github/FUNDING.yml create mode 100644 node_modules/call-bind/.nycrc create mode 100644 node_modules/call-bind/CHANGELOG.md create mode 100644 node_modules/call-bind/LICENSE create mode 100644 node_modules/call-bind/README.md create mode 100644 node_modules/call-bind/callBound.js create mode 100644 node_modules/call-bind/index.js create mode 100644 node_modules/call-bind/package.json create mode 100644 node_modules/call-bind/test/callBound.js create mode 100644 node_modules/call-bind/test/index.js 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/center-align/LICENSE create mode 100644 node_modules/center-align/README.md create mode 100644 node_modules/center-align/index.js create mode 100644 node_modules/center-align/package.json create mode 100644 node_modules/center-align/utils.js 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/chokidar/CHANGELOG.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-descriptor/.editorconfig create mode 100644 node_modules/class-utils/node_modules/is-descriptor/.eslintrc create mode 100644 node_modules/class-utils/node_modules/is-descriptor/.gitattributes create mode 100644 node_modules/class-utils/node_modules/is-descriptor/.github/FUNDING.yml create mode 100644 node_modules/class-utils/node_modules/is-descriptor/.nycrc create mode 100644 node_modules/class-utils/node_modules/is-descriptor/CHANGELOG.md 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/is-descriptor/test/index.js create mode 100644 node_modules/class-utils/node_modules/isobject/LICENSE create mode 100644 node_modules/class-utils/node_modules/isobject/README.md create mode 100644 node_modules/class-utils/node_modules/isobject/index.d.ts create mode 100644 node_modules/class-utils/node_modules/isobject/index.js create mode 100644 node_modules/class-utils/node_modules/isobject/package.json create mode 100644 node_modules/class-utils/package.json create mode 100644 node_modules/cliui/.coveralls.yml create mode 100644 node_modules/cliui/.npmignore create mode 100644 node_modules/cliui/.travis.yml 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/package.json create mode 100644 node_modules/cliui/test/cliui.js 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/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/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/_advance-string-index.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/_function-to-string.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/_native-weak-map.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/_regexp-exec-abstract.js create mode 100644 node_modules/core-js/library/modules/_regexp-exec.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.exec.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/_advance-string-index.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/_function-to-string.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/_native-weak-map.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/_regexp-exec-abstract.js create mode 100644 node_modules/core-js/modules/_regexp-exec.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.exec.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/_regexp-exec-abstract.js create mode 100644 node_modules/core-js/modules/library/_regexp-exec.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.exec.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/postinstall.js 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/lib/util.js create mode 100644 node_modules/core-util-is/package.json create mode 100644 node_modules/cross-spawn-async/.editorconfig create mode 100644 node_modules/cross-spawn-async/.eslintrc create mode 100644 node_modules/cross-spawn-async/.npmignore create mode 100644 node_modules/cross-spawn-async/.travis.yml create mode 100644 node_modules/cross-spawn-async/LICENSE create mode 100644 node_modules/cross-spawn-async/README.md create mode 100644 node_modules/cross-spawn-async/appveyor.yml create mode 100644 node_modules/cross-spawn-async/index.js create mode 100644 node_modules/cross-spawn-async/lib/enoent.js create mode 100644 node_modules/cross-spawn-async/lib/parse.js create mode 100644 node_modules/cross-spawn-async/lib/resolveCommand.js create mode 100644 node_modules/cross-spawn-async/package.json 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/hasBrokenSpawn.js create mode 100644 node_modules/cross-spawn/lib/parse.js create mode 100644 node_modules/cross-spawn/lib/resolveCommand.js create mode 100644 node_modules/cross-spawn/package.json 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/define-data-property/.eslintrc create mode 100644 node_modules/define-data-property/.github/FUNDING.yml create mode 100644 node_modules/define-data-property/.nycrc create mode 100644 node_modules/define-data-property/CHANGELOG.md create mode 100644 node_modules/define-data-property/LICENSE create mode 100644 node_modules/define-data-property/README.md create mode 100644 node_modules/define-data-property/index.d.ts create mode 100644 node_modules/define-data-property/index.d.ts.map create mode 100644 node_modules/define-data-property/index.js create mode 100644 node_modules/define-data-property/package.json create mode 100644 node_modules/define-data-property/test/index.js create mode 100644 node_modules/define-data-property/tsconfig.json create mode 100644 node_modules/define-properties/.editorconfig create mode 100644 node_modules/define-properties/.eslintrc create mode 100644 node_modules/define-properties/.github/FUNDING.yml create mode 100644 node_modules/define-properties/.nycrc create mode 100644 node_modules/define-properties/CHANGELOG.md create mode 100644 node_modules/define-properties/LICENSE create mode 100644 node_modules/define-properties/README.md create mode 100644 node_modules/define-properties/index.js create mode 100644 node_modules/define-properties/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/node_modules/isobject/LICENSE create mode 100644 node_modules/define-property/node_modules/isobject/README.md create mode 100644 node_modules/define-property/node_modules/isobject/index.d.ts create mode 100644 node_modules/define-property/node_modules/isobject/index.js create mode 100644 node_modules/define-property/node_modules/isobject/package.json create mode 100644 node_modules/define-property/package.json 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/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/es-abstract/.editorconfig create mode 100644 node_modules/es-abstract/.eslintrc create mode 100644 node_modules/es-abstract/.nycrc create mode 100644 node_modules/es-abstract/2015/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/2015/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/2015/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2015/ArrayCreate.js create mode 100644 node_modules/es-abstract/2015/ArraySetLength.js create mode 100644 node_modules/es-abstract/2015/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2015/Call.js create mode 100644 node_modules/es-abstract/2015/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2015/Canonicalize.js create mode 100644 node_modules/es-abstract/2015/CharacterRange.js create mode 100644 node_modules/es-abstract/2015/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2015/CompletionRecord.js create mode 100644 node_modules/es-abstract/2015/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2015/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2015/CreateHTML.js create mode 100644 node_modules/es-abstract/2015/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2015/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2015/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2015/DateFromTime.js create mode 100644 node_modules/es-abstract/2015/Day.js create mode 100644 node_modules/es-abstract/2015/DayFromYear.js create mode 100644 node_modules/es-abstract/2015/DayWithinYear.js create mode 100644 node_modules/es-abstract/2015/DaysInYear.js create mode 100644 node_modules/es-abstract/2015/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2015/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2015/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2015/EnumerableOwnNames.js create mode 100644 node_modules/es-abstract/2015/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2015/Get.js create mode 100644 node_modules/es-abstract/2015/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2015/GetIterator.js create mode 100644 node_modules/es-abstract/2015/GetMethod.js create mode 100644 node_modules/es-abstract/2015/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2015/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2015/GetSubstitution.js create mode 100644 node_modules/es-abstract/2015/GetV.js create mode 100644 node_modules/es-abstract/2015/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2015/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2015/HasProperty.js create mode 100644 node_modules/es-abstract/2015/HourFromTime.js create mode 100644 node_modules/es-abstract/2015/InLeapYear.js create mode 100644 node_modules/es-abstract/2015/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2015/Invoke.js create mode 100644 node_modules/es-abstract/2015/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2015/IsArray.js create mode 100644 node_modules/es-abstract/2015/IsCallable.js create mode 100644 node_modules/es-abstract/2015/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2015/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2015/IsConstructor.js create mode 100644 node_modules/es-abstract/2015/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2015/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2015/IsExtensible.js create mode 100644 node_modules/es-abstract/2015/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2015/IsInteger.js create mode 100644 node_modules/es-abstract/2015/IsPromise.js create mode 100644 node_modules/es-abstract/2015/IsPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2015/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2015/IsRegExp.js create mode 100644 node_modules/es-abstract/2015/IsWordChar.js create mode 100644 node_modules/es-abstract/2015/IteratorClose.js create mode 100644 node_modules/es-abstract/2015/IteratorComplete.js create mode 100644 node_modules/es-abstract/2015/IteratorNext.js create mode 100644 node_modules/es-abstract/2015/IteratorStep.js create mode 100644 node_modules/es-abstract/2015/IteratorValue.js create mode 100644 node_modules/es-abstract/2015/MakeDate.js create mode 100644 node_modules/es-abstract/2015/MakeDay.js create mode 100644 node_modules/es-abstract/2015/MakeTime.js create mode 100644 node_modules/es-abstract/2015/MinFromTime.js create mode 100644 node_modules/es-abstract/2015/MonthFromTime.js create mode 100644 node_modules/es-abstract/2015/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2015/NormalCompletion.js create mode 100644 node_modules/es-abstract/2015/ObjectCreate.js create mode 100644 node_modules/es-abstract/2015/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2015/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2015/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2015/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2015/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2015/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2015/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2015/RegExpCreate.js create mode 100644 node_modules/es-abstract/2015/RegExpExec.js create mode 100644 node_modules/es-abstract/2015/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2015/SameValue.js create mode 100644 node_modules/es-abstract/2015/SameValueZero.js create mode 100644 node_modules/es-abstract/2015/SecFromTime.js create mode 100644 node_modules/es-abstract/2015/Set.js create mode 100644 node_modules/es-abstract/2015/SetFunctionName.js create mode 100644 node_modules/es-abstract/2015/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2015/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2015/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2015/SplitMatch.js create mode 100644 node_modules/es-abstract/2015/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/2015/StringCreate.js create mode 100644 node_modules/es-abstract/2015/StringGetIndexProperty.js create mode 100644 node_modules/es-abstract/2015/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2015/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2015/TimeClip.js create mode 100644 node_modules/es-abstract/2015/TimeFromYear.js create mode 100644 node_modules/es-abstract/2015/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2015/ToBoolean.js create mode 100644 node_modules/es-abstract/2015/ToDateString.js create mode 100644 node_modules/es-abstract/2015/ToInt16.js create mode 100644 node_modules/es-abstract/2015/ToInt32.js create mode 100644 node_modules/es-abstract/2015/ToInt8.js create mode 100644 node_modules/es-abstract/2015/ToInteger.js create mode 100644 node_modules/es-abstract/2015/ToLength.js create mode 100644 node_modules/es-abstract/2015/ToNumber.js create mode 100644 node_modules/es-abstract/2015/ToObject.js create mode 100644 node_modules/es-abstract/2015/ToPrimitive.js create mode 100644 node_modules/es-abstract/2015/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2015/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2015/ToString.js create mode 100644 node_modules/es-abstract/2015/ToUint16.js create mode 100644 node_modules/es-abstract/2015/ToUint32.js create mode 100644 node_modules/es-abstract/2015/ToUint8.js create mode 100644 node_modules/es-abstract/2015/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2015/Type.js create mode 100644 node_modules/es-abstract/2015/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2015/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2015/WeekDay.js create mode 100644 node_modules/es-abstract/2015/YearFromTime.js create mode 100644 node_modules/es-abstract/2015/abs.js create mode 100644 node_modules/es-abstract/2015/floor.js create mode 100644 node_modules/es-abstract/2015/max.js create mode 100644 node_modules/es-abstract/2015/min.js create mode 100644 node_modules/es-abstract/2015/modulo.js create mode 100644 node_modules/es-abstract/2015/msFromTime.js create mode 100644 node_modules/es-abstract/2015/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2015/thisNumberValue.js create mode 100644 node_modules/es-abstract/2015/thisStringValue.js create mode 100644 node_modules/es-abstract/2015/thisTimeValue.js create mode 100644 node_modules/es-abstract/2016/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/2016/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/2016/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2016/ArrayCreate.js create mode 100644 node_modules/es-abstract/2016/ArraySetLength.js create mode 100644 node_modules/es-abstract/2016/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2016/Call.js create mode 100644 node_modules/es-abstract/2016/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2016/Canonicalize.js create mode 100644 node_modules/es-abstract/2016/CharacterRange.js create mode 100644 node_modules/es-abstract/2016/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2016/CompletionRecord.js create mode 100644 node_modules/es-abstract/2016/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2016/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2016/CreateHTML.js create mode 100644 node_modules/es-abstract/2016/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2016/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2016/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2016/DateFromTime.js create mode 100644 node_modules/es-abstract/2016/Day.js create mode 100644 node_modules/es-abstract/2016/DayFromYear.js create mode 100644 node_modules/es-abstract/2016/DayWithinYear.js create mode 100644 node_modules/es-abstract/2016/DaysInYear.js create mode 100644 node_modules/es-abstract/2016/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2016/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2016/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2016/EnumerableOwnNames.js create mode 100644 node_modules/es-abstract/2016/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2016/Get.js create mode 100644 node_modules/es-abstract/2016/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2016/GetIterator.js create mode 100644 node_modules/es-abstract/2016/GetMethod.js create mode 100644 node_modules/es-abstract/2016/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2016/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2016/GetSubstitution.js create mode 100644 node_modules/es-abstract/2016/GetV.js create mode 100644 node_modules/es-abstract/2016/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2016/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2016/HasProperty.js create mode 100644 node_modules/es-abstract/2016/HourFromTime.js create mode 100644 node_modules/es-abstract/2016/InLeapYear.js create mode 100644 node_modules/es-abstract/2016/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2016/Invoke.js create mode 100644 node_modules/es-abstract/2016/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2016/IsArray.js create mode 100644 node_modules/es-abstract/2016/IsCallable.js create mode 100644 node_modules/es-abstract/2016/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2016/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2016/IsConstructor.js create mode 100644 node_modules/es-abstract/2016/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2016/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2016/IsExtensible.js create mode 100644 node_modules/es-abstract/2016/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2016/IsInteger.js create mode 100644 node_modules/es-abstract/2016/IsPromise.js create mode 100644 node_modules/es-abstract/2016/IsPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2016/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2016/IsRegExp.js create mode 100644 node_modules/es-abstract/2016/IsWordChar.js create mode 100644 node_modules/es-abstract/2016/IterableToArrayLike.js create mode 100644 node_modules/es-abstract/2016/IteratorClose.js create mode 100644 node_modules/es-abstract/2016/IteratorComplete.js create mode 100644 node_modules/es-abstract/2016/IteratorNext.js create mode 100644 node_modules/es-abstract/2016/IteratorStep.js create mode 100644 node_modules/es-abstract/2016/IteratorValue.js create mode 100644 node_modules/es-abstract/2016/MakeDate.js create mode 100644 node_modules/es-abstract/2016/MakeDay.js create mode 100644 node_modules/es-abstract/2016/MakeTime.js create mode 100644 node_modules/es-abstract/2016/MinFromTime.js create mode 100644 node_modules/es-abstract/2016/MonthFromTime.js create mode 100644 node_modules/es-abstract/2016/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2016/NormalCompletion.js create mode 100644 node_modules/es-abstract/2016/ObjectCreate.js create mode 100644 node_modules/es-abstract/2016/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2016/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2016/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2016/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2016/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2016/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2016/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2016/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2016/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2016/RegExpCreate.js create mode 100644 node_modules/es-abstract/2016/RegExpExec.js create mode 100644 node_modules/es-abstract/2016/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2016/SameValue.js create mode 100644 node_modules/es-abstract/2016/SameValueNonNumber.js create mode 100644 node_modules/es-abstract/2016/SameValueZero.js create mode 100644 node_modules/es-abstract/2016/SecFromTime.js create mode 100644 node_modules/es-abstract/2016/Set.js create mode 100644 node_modules/es-abstract/2016/SetFunctionName.js create mode 100644 node_modules/es-abstract/2016/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2016/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2016/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2016/SplitMatch.js create mode 100644 node_modules/es-abstract/2016/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/2016/StringCreate.js create mode 100644 node_modules/es-abstract/2016/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2016/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2016/TimeClip.js create mode 100644 node_modules/es-abstract/2016/TimeFromYear.js create mode 100644 node_modules/es-abstract/2016/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2016/ToBoolean.js create mode 100644 node_modules/es-abstract/2016/ToDateString.js create mode 100644 node_modules/es-abstract/2016/ToInt16.js create mode 100644 node_modules/es-abstract/2016/ToInt32.js create mode 100644 node_modules/es-abstract/2016/ToInt8.js create mode 100644 node_modules/es-abstract/2016/ToInteger.js create mode 100644 node_modules/es-abstract/2016/ToLength.js create mode 100644 node_modules/es-abstract/2016/ToNumber.js create mode 100644 node_modules/es-abstract/2016/ToObject.js create mode 100644 node_modules/es-abstract/2016/ToPrimitive.js create mode 100644 node_modules/es-abstract/2016/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2016/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2016/ToString.js create mode 100644 node_modules/es-abstract/2016/ToUint16.js create mode 100644 node_modules/es-abstract/2016/ToUint32.js create mode 100644 node_modules/es-abstract/2016/ToUint8.js create mode 100644 node_modules/es-abstract/2016/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2016/Type.js create mode 100644 node_modules/es-abstract/2016/TypedArrayCreate.js create mode 100644 node_modules/es-abstract/2016/TypedArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2016/UTF16Decode.js create mode 100644 node_modules/es-abstract/2016/UTF16Encoding.js create mode 100644 node_modules/es-abstract/2016/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2016/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2016/WeekDay.js create mode 100644 node_modules/es-abstract/2016/YearFromTime.js create mode 100644 node_modules/es-abstract/2016/abs.js create mode 100644 node_modules/es-abstract/2016/floor.js create mode 100644 node_modules/es-abstract/2016/max.js create mode 100644 node_modules/es-abstract/2016/min.js create mode 100644 node_modules/es-abstract/2016/modulo.js create mode 100644 node_modules/es-abstract/2016/msFromTime.js create mode 100644 node_modules/es-abstract/2016/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2016/thisNumberValue.js create mode 100644 node_modules/es-abstract/2016/thisStringValue.js create mode 100644 node_modules/es-abstract/2016/thisTimeValue.js create mode 100644 node_modules/es-abstract/2017/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/2017/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/2017/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2017/ArrayCreate.js create mode 100644 node_modules/es-abstract/2017/ArraySetLength.js create mode 100644 node_modules/es-abstract/2017/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2017/Call.js create mode 100644 node_modules/es-abstract/2017/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2017/Canonicalize.js create mode 100644 node_modules/es-abstract/2017/CharacterRange.js create mode 100644 node_modules/es-abstract/2017/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2017/CompletionRecord.js create mode 100644 node_modules/es-abstract/2017/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2017/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2017/CreateHTML.js create mode 100644 node_modules/es-abstract/2017/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2017/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2017/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2017/DateFromTime.js create mode 100644 node_modules/es-abstract/2017/Day.js create mode 100644 node_modules/es-abstract/2017/DayFromYear.js create mode 100644 node_modules/es-abstract/2017/DayWithinYear.js create mode 100644 node_modules/es-abstract/2017/DaysInYear.js create mode 100644 node_modules/es-abstract/2017/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2017/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2017/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2017/EnumerableOwnProperties.js create mode 100644 node_modules/es-abstract/2017/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2017/Get.js create mode 100644 node_modules/es-abstract/2017/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2017/GetIterator.js create mode 100644 node_modules/es-abstract/2017/GetMethod.js create mode 100644 node_modules/es-abstract/2017/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2017/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2017/GetSubstitution.js create mode 100644 node_modules/es-abstract/2017/GetV.js create mode 100644 node_modules/es-abstract/2017/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2017/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2017/HasProperty.js create mode 100644 node_modules/es-abstract/2017/HourFromTime.js create mode 100644 node_modules/es-abstract/2017/InLeapYear.js create mode 100644 node_modules/es-abstract/2017/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2017/Invoke.js create mode 100644 node_modules/es-abstract/2017/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2017/IsArray.js create mode 100644 node_modules/es-abstract/2017/IsCallable.js create mode 100644 node_modules/es-abstract/2017/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2017/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2017/IsConstructor.js create mode 100644 node_modules/es-abstract/2017/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2017/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2017/IsExtensible.js create mode 100644 node_modules/es-abstract/2017/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2017/IsInteger.js create mode 100644 node_modules/es-abstract/2017/IsPromise.js create mode 100644 node_modules/es-abstract/2017/IsPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2017/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2017/IsRegExp.js create mode 100644 node_modules/es-abstract/2017/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2017/IsWordChar.js create mode 100644 node_modules/es-abstract/2017/IterableToList.js create mode 100644 node_modules/es-abstract/2017/IteratorClose.js create mode 100644 node_modules/es-abstract/2017/IteratorComplete.js create mode 100644 node_modules/es-abstract/2017/IteratorNext.js create mode 100644 node_modules/es-abstract/2017/IteratorStep.js create mode 100644 node_modules/es-abstract/2017/IteratorValue.js create mode 100644 node_modules/es-abstract/2017/MakeDate.js create mode 100644 node_modules/es-abstract/2017/MakeDay.js create mode 100644 node_modules/es-abstract/2017/MakeTime.js create mode 100644 node_modules/es-abstract/2017/MinFromTime.js create mode 100644 node_modules/es-abstract/2017/MonthFromTime.js create mode 100644 node_modules/es-abstract/2017/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2017/NormalCompletion.js create mode 100644 node_modules/es-abstract/2017/NumberToRawBytes.js create mode 100644 node_modules/es-abstract/2017/ObjectCreate.js create mode 100644 node_modules/es-abstract/2017/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2017/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2017/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2017/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2017/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2017/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2017/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2017/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2017/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2017/RawBytesToNumber.js create mode 100644 node_modules/es-abstract/2017/RegExpCreate.js create mode 100644 node_modules/es-abstract/2017/RegExpExec.js create mode 100644 node_modules/es-abstract/2017/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2017/SameValue.js create mode 100644 node_modules/es-abstract/2017/SameValueNonNumber.js create mode 100644 node_modules/es-abstract/2017/SameValueZero.js create mode 100644 node_modules/es-abstract/2017/SecFromTime.js create mode 100644 node_modules/es-abstract/2017/Set.js create mode 100644 node_modules/es-abstract/2017/SetFunctionName.js create mode 100644 node_modules/es-abstract/2017/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2017/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2017/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2017/SplitMatch.js create mode 100644 node_modules/es-abstract/2017/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/2017/StringCreate.js create mode 100644 node_modules/es-abstract/2017/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2017/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2017/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2017/TimeClip.js create mode 100644 node_modules/es-abstract/2017/TimeFromYear.js create mode 100644 node_modules/es-abstract/2017/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2017/ToBoolean.js create mode 100644 node_modules/es-abstract/2017/ToDateString.js create mode 100644 node_modules/es-abstract/2017/ToIndex.js create mode 100644 node_modules/es-abstract/2017/ToInt16.js create mode 100644 node_modules/es-abstract/2017/ToInt32.js create mode 100644 node_modules/es-abstract/2017/ToInt8.js create mode 100644 node_modules/es-abstract/2017/ToInteger.js create mode 100644 node_modules/es-abstract/2017/ToLength.js create mode 100644 node_modules/es-abstract/2017/ToNumber.js create mode 100644 node_modules/es-abstract/2017/ToObject.js create mode 100644 node_modules/es-abstract/2017/ToPrimitive.js create mode 100644 node_modules/es-abstract/2017/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2017/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2017/ToString.js create mode 100644 node_modules/es-abstract/2017/ToUint16.js create mode 100644 node_modules/es-abstract/2017/ToUint32.js create mode 100644 node_modules/es-abstract/2017/ToUint8.js create mode 100644 node_modules/es-abstract/2017/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2017/Type.js create mode 100644 node_modules/es-abstract/2017/TypedArrayCreate.js create mode 100644 node_modules/es-abstract/2017/TypedArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2017/UTF16Decode.js create mode 100644 node_modules/es-abstract/2017/UTF16Encoding.js create mode 100644 node_modules/es-abstract/2017/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2017/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2017/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2017/WeekDay.js create mode 100644 node_modules/es-abstract/2017/WordCharacters.js create mode 100644 node_modules/es-abstract/2017/YearFromTime.js create mode 100644 node_modules/es-abstract/2017/abs.js create mode 100644 node_modules/es-abstract/2017/floor.js create mode 100644 node_modules/es-abstract/2017/max.js create mode 100644 node_modules/es-abstract/2017/min.js create mode 100644 node_modules/es-abstract/2017/modulo.js create mode 100644 node_modules/es-abstract/2017/msFromTime.js create mode 100644 node_modules/es-abstract/2017/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2017/thisNumberValue.js create mode 100644 node_modules/es-abstract/2017/thisStringValue.js create mode 100644 node_modules/es-abstract/2017/thisTimeValue.js create mode 100644 node_modules/es-abstract/2018/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/2018/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/2018/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2018/ArrayCreate.js create mode 100644 node_modules/es-abstract/2018/ArraySetLength.js create mode 100644 node_modules/es-abstract/2018/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2018/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2018/Call.js create mode 100644 node_modules/es-abstract/2018/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2018/Canonicalize.js create mode 100644 node_modules/es-abstract/2018/CharacterRange.js create mode 100644 node_modules/es-abstract/2018/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2018/CompletionRecord.js create mode 100644 node_modules/es-abstract/2018/CopyDataProperties.js create mode 100644 node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2018/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2018/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2018/CreateHTML.js create mode 100644 node_modules/es-abstract/2018/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2018/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2018/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2018/DateFromTime.js create mode 100644 node_modules/es-abstract/2018/DateString.js create mode 100644 node_modules/es-abstract/2018/Day.js create mode 100644 node_modules/es-abstract/2018/DayFromYear.js create mode 100644 node_modules/es-abstract/2018/DayWithinYear.js create mode 100644 node_modules/es-abstract/2018/DaysInYear.js create mode 100644 node_modules/es-abstract/2018/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2018/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2018/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js create mode 100644 node_modules/es-abstract/2018/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2018/Get.js create mode 100644 node_modules/es-abstract/2018/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2018/GetIterator.js create mode 100644 node_modules/es-abstract/2018/GetMethod.js create mode 100644 node_modules/es-abstract/2018/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2018/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2018/GetSubstitution.js create mode 100644 node_modules/es-abstract/2018/GetV.js create mode 100644 node_modules/es-abstract/2018/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2018/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2018/HasProperty.js create mode 100644 node_modules/es-abstract/2018/HourFromTime.js create mode 100644 node_modules/es-abstract/2018/InLeapYear.js create mode 100644 node_modules/es-abstract/2018/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2018/Invoke.js create mode 100644 node_modules/es-abstract/2018/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2018/IsArray.js create mode 100644 node_modules/es-abstract/2018/IsCallable.js create mode 100644 node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2018/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2018/IsConstructor.js create mode 100644 node_modules/es-abstract/2018/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2018/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2018/IsExtensible.js create mode 100644 node_modules/es-abstract/2018/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2018/IsInteger.js create mode 100644 node_modules/es-abstract/2018/IsPromise.js create mode 100644 node_modules/es-abstract/2018/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2018/IsRegExp.js create mode 100644 node_modules/es-abstract/2018/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2018/IsStringPrefix.js create mode 100644 node_modules/es-abstract/2018/IsWordChar.js create mode 100644 node_modules/es-abstract/2018/IterableToList.js create mode 100644 node_modules/es-abstract/2018/IteratorClose.js create mode 100644 node_modules/es-abstract/2018/IteratorComplete.js create mode 100644 node_modules/es-abstract/2018/IteratorNext.js create mode 100644 node_modules/es-abstract/2018/IteratorStep.js create mode 100644 node_modules/es-abstract/2018/IteratorValue.js create mode 100644 node_modules/es-abstract/2018/MakeDate.js create mode 100644 node_modules/es-abstract/2018/MakeDay.js create mode 100644 node_modules/es-abstract/2018/MakeTime.js create mode 100644 node_modules/es-abstract/2018/MinFromTime.js create mode 100644 node_modules/es-abstract/2018/MonthFromTime.js create mode 100644 node_modules/es-abstract/2018/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2018/NormalCompletion.js create mode 100644 node_modules/es-abstract/2018/NumberToRawBytes.js create mode 100644 node_modules/es-abstract/2018/NumberToString.js create mode 100644 node_modules/es-abstract/2018/ObjectCreate.js create mode 100644 node_modules/es-abstract/2018/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2018/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2018/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2018/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2018/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2018/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2018/PromiseResolve.js create mode 100644 node_modules/es-abstract/2018/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2018/RawBytesToNumber.js create mode 100644 node_modules/es-abstract/2018/RegExpCreate.js create mode 100644 node_modules/es-abstract/2018/RegExpExec.js create mode 100644 node_modules/es-abstract/2018/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2018/SameValue.js create mode 100644 node_modules/es-abstract/2018/SameValueNonNumber.js create mode 100644 node_modules/es-abstract/2018/SameValueZero.js create mode 100644 node_modules/es-abstract/2018/SecFromTime.js create mode 100644 node_modules/es-abstract/2018/Set.js create mode 100644 node_modules/es-abstract/2018/SetFunctionLength.js create mode 100644 node_modules/es-abstract/2018/SetFunctionName.js create mode 100644 node_modules/es-abstract/2018/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2018/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2018/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2018/SplitMatch.js create mode 100644 node_modules/es-abstract/2018/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/2018/StringCreate.js create mode 100644 node_modules/es-abstract/2018/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2018/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2018/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2018/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2018/TimeClip.js create mode 100644 node_modules/es-abstract/2018/TimeFromYear.js create mode 100644 node_modules/es-abstract/2018/TimeString.js create mode 100644 node_modules/es-abstract/2018/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2018/ToBoolean.js create mode 100644 node_modules/es-abstract/2018/ToDateString.js create mode 100644 node_modules/es-abstract/2018/ToIndex.js create mode 100644 node_modules/es-abstract/2018/ToInt16.js create mode 100644 node_modules/es-abstract/2018/ToInt32.js create mode 100644 node_modules/es-abstract/2018/ToInt8.js create mode 100644 node_modules/es-abstract/2018/ToInteger.js create mode 100644 node_modules/es-abstract/2018/ToLength.js create mode 100644 node_modules/es-abstract/2018/ToNumber.js create mode 100644 node_modules/es-abstract/2018/ToObject.js create mode 100644 node_modules/es-abstract/2018/ToPrimitive.js create mode 100644 node_modules/es-abstract/2018/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2018/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2018/ToString.js create mode 100644 node_modules/es-abstract/2018/ToUint16.js create mode 100644 node_modules/es-abstract/2018/ToUint32.js create mode 100644 node_modules/es-abstract/2018/ToUint8.js create mode 100644 node_modules/es-abstract/2018/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2018/Type.js create mode 100644 node_modules/es-abstract/2018/TypedArrayCreate.js create mode 100644 node_modules/es-abstract/2018/TypedArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2018/UTF16Decode.js create mode 100644 node_modules/es-abstract/2018/UTF16Encoding.js create mode 100644 node_modules/es-abstract/2018/UnicodeEscape.js create mode 100644 node_modules/es-abstract/2018/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2018/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2018/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2018/WeekDay.js create mode 100644 node_modules/es-abstract/2018/WordCharacters.js create mode 100644 node_modules/es-abstract/2018/YearFromTime.js create mode 100644 node_modules/es-abstract/2018/abs.js create mode 100644 node_modules/es-abstract/2018/floor.js create mode 100644 node_modules/es-abstract/2018/max.js create mode 100644 node_modules/es-abstract/2018/min.js create mode 100644 node_modules/es-abstract/2018/modulo.js create mode 100644 node_modules/es-abstract/2018/msFromTime.js create mode 100644 node_modules/es-abstract/2018/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2018/thisNumberValue.js create mode 100644 node_modules/es-abstract/2018/thisStringValue.js create mode 100644 node_modules/es-abstract/2018/thisSymbolValue.js create mode 100644 node_modules/es-abstract/2018/thisTimeValue.js create mode 100644 node_modules/es-abstract/2019/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/2019/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/2019/AddEntriesFromIterable.js create mode 100644 node_modules/es-abstract/2019/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2019/ArrayCreate.js create mode 100644 node_modules/es-abstract/2019/ArraySetLength.js create mode 100644 node_modules/es-abstract/2019/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2019/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2019/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2019/Call.js create mode 100644 node_modules/es-abstract/2019/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2019/Canonicalize.js create mode 100644 node_modules/es-abstract/2019/CharacterRange.js create mode 100644 node_modules/es-abstract/2019/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2019/CompletionRecord.js create mode 100644 node_modules/es-abstract/2019/CopyDataProperties.js create mode 100644 node_modules/es-abstract/2019/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2019/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2019/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2019/CreateHTML.js create mode 100644 node_modules/es-abstract/2019/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2019/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2019/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2019/DateFromTime.js create mode 100644 node_modules/es-abstract/2019/DateString.js create mode 100644 node_modules/es-abstract/2019/Day.js create mode 100644 node_modules/es-abstract/2019/DayFromYear.js create mode 100644 node_modules/es-abstract/2019/DayWithinYear.js create mode 100644 node_modules/es-abstract/2019/DaysInYear.js create mode 100644 node_modules/es-abstract/2019/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2019/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2019/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js create mode 100644 node_modules/es-abstract/2019/FlattenIntoArray.js create mode 100644 node_modules/es-abstract/2019/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2019/Get.js create mode 100644 node_modules/es-abstract/2019/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2019/GetIterator.js create mode 100644 node_modules/es-abstract/2019/GetMethod.js create mode 100644 node_modules/es-abstract/2019/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2019/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2019/GetSubstitution.js create mode 100644 node_modules/es-abstract/2019/GetV.js create mode 100644 node_modules/es-abstract/2019/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2019/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2019/HasProperty.js create mode 100644 node_modules/es-abstract/2019/HourFromTime.js create mode 100644 node_modules/es-abstract/2019/InLeapYear.js create mode 100644 node_modules/es-abstract/2019/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2019/Invoke.js create mode 100644 node_modules/es-abstract/2019/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2019/IsArray.js create mode 100644 node_modules/es-abstract/2019/IsCallable.js create mode 100644 node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2019/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2019/IsConstructor.js create mode 100644 node_modules/es-abstract/2019/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2019/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2019/IsExtensible.js create mode 100644 node_modules/es-abstract/2019/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2019/IsInteger.js create mode 100644 node_modules/es-abstract/2019/IsPromise.js create mode 100644 node_modules/es-abstract/2019/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2019/IsRegExp.js create mode 100644 node_modules/es-abstract/2019/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2019/IsStringPrefix.js create mode 100644 node_modules/es-abstract/2019/IsWordChar.js create mode 100644 node_modules/es-abstract/2019/IterableToList.js create mode 100644 node_modules/es-abstract/2019/IteratorClose.js create mode 100644 node_modules/es-abstract/2019/IteratorComplete.js create mode 100644 node_modules/es-abstract/2019/IteratorNext.js create mode 100644 node_modules/es-abstract/2019/IteratorStep.js create mode 100644 node_modules/es-abstract/2019/IteratorValue.js create mode 100644 node_modules/es-abstract/2019/MakeDate.js create mode 100644 node_modules/es-abstract/2019/MakeDay.js create mode 100644 node_modules/es-abstract/2019/MakeTime.js create mode 100644 node_modules/es-abstract/2019/MinFromTime.js create mode 100644 node_modules/es-abstract/2019/MonthFromTime.js create mode 100644 node_modules/es-abstract/2019/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2019/NormalCompletion.js create mode 100644 node_modules/es-abstract/2019/NumberToRawBytes.js create mode 100644 node_modules/es-abstract/2019/NumberToString.js create mode 100644 node_modules/es-abstract/2019/ObjectCreate.js create mode 100644 node_modules/es-abstract/2019/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2019/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2019/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2019/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2019/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2019/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2019/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2019/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2019/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2019/PromiseResolve.js create mode 100644 node_modules/es-abstract/2019/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2019/RawBytesToNumber.js create mode 100644 node_modules/es-abstract/2019/RegExpCreate.js create mode 100644 node_modules/es-abstract/2019/RegExpExec.js create mode 100644 node_modules/es-abstract/2019/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2019/SameValue.js create mode 100644 node_modules/es-abstract/2019/SameValueNonNumber.js create mode 100644 node_modules/es-abstract/2019/SameValueZero.js create mode 100644 node_modules/es-abstract/2019/SecFromTime.js create mode 100644 node_modules/es-abstract/2019/Set.js create mode 100644 node_modules/es-abstract/2019/SetFunctionLength.js create mode 100644 node_modules/es-abstract/2019/SetFunctionName.js create mode 100644 node_modules/es-abstract/2019/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2019/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2019/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2019/SplitMatch.js create mode 100644 node_modules/es-abstract/2019/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/2019/StringCreate.js create mode 100644 node_modules/es-abstract/2019/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2019/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2019/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2019/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2019/TimeClip.js create mode 100644 node_modules/es-abstract/2019/TimeFromYear.js create mode 100644 node_modules/es-abstract/2019/TimeString.js create mode 100644 node_modules/es-abstract/2019/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2019/ToBoolean.js create mode 100644 node_modules/es-abstract/2019/ToDateString.js create mode 100644 node_modules/es-abstract/2019/ToIndex.js create mode 100644 node_modules/es-abstract/2019/ToInt16.js create mode 100644 node_modules/es-abstract/2019/ToInt32.js create mode 100644 node_modules/es-abstract/2019/ToInt8.js create mode 100644 node_modules/es-abstract/2019/ToInteger.js create mode 100644 node_modules/es-abstract/2019/ToLength.js create mode 100644 node_modules/es-abstract/2019/ToNumber.js create mode 100644 node_modules/es-abstract/2019/ToObject.js create mode 100644 node_modules/es-abstract/2019/ToPrimitive.js create mode 100644 node_modules/es-abstract/2019/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2019/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2019/ToString.js create mode 100644 node_modules/es-abstract/2019/ToUint16.js create mode 100644 node_modules/es-abstract/2019/ToUint32.js create mode 100644 node_modules/es-abstract/2019/ToUint8.js create mode 100644 node_modules/es-abstract/2019/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2019/TrimString.js create mode 100644 node_modules/es-abstract/2019/Type.js create mode 100644 node_modules/es-abstract/2019/TypedArrayCreate.js create mode 100644 node_modules/es-abstract/2019/TypedArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2019/UTF16Decode.js create mode 100644 node_modules/es-abstract/2019/UTF16Encoding.js create mode 100644 node_modules/es-abstract/2019/UnicodeEscape.js create mode 100644 node_modules/es-abstract/2019/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2019/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2019/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2019/WeekDay.js create mode 100644 node_modules/es-abstract/2019/WordCharacters.js create mode 100644 node_modules/es-abstract/2019/YearFromTime.js create mode 100644 node_modules/es-abstract/2019/abs.js create mode 100644 node_modules/es-abstract/2019/floor.js create mode 100644 node_modules/es-abstract/2019/max.js create mode 100644 node_modules/es-abstract/2019/min.js create mode 100644 node_modules/es-abstract/2019/modulo.js create mode 100644 node_modules/es-abstract/2019/msFromTime.js create mode 100644 node_modules/es-abstract/2019/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2019/thisNumberValue.js create mode 100644 node_modules/es-abstract/2019/thisStringValue.js create mode 100644 node_modules/es-abstract/2019/thisSymbolValue.js create mode 100644 node_modules/es-abstract/2019/thisTimeValue.js create mode 100644 node_modules/es-abstract/2020/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/2020/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/2020/AddEntriesFromIterable.js create mode 100644 node_modules/es-abstract/2020/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2020/ArrayCreate.js create mode 100644 node_modules/es-abstract/2020/ArraySetLength.js create mode 100644 node_modules/es-abstract/2020/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2020/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2020/BigInt/add.js create mode 100644 node_modules/es-abstract/2020/BigInt/bitwiseAND.js create mode 100644 node_modules/es-abstract/2020/BigInt/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2020/BigInt/bitwiseOR.js create mode 100644 node_modules/es-abstract/2020/BigInt/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2020/BigInt/divide.js create mode 100644 node_modules/es-abstract/2020/BigInt/equal.js create mode 100644 node_modules/es-abstract/2020/BigInt/exponentiate.js create mode 100644 node_modules/es-abstract/2020/BigInt/index.js create mode 100644 node_modules/es-abstract/2020/BigInt/leftShift.js create mode 100644 node_modules/es-abstract/2020/BigInt/lessThan.js create mode 100644 node_modules/es-abstract/2020/BigInt/multiply.js create mode 100644 node_modules/es-abstract/2020/BigInt/remainder.js create mode 100644 node_modules/es-abstract/2020/BigInt/sameValue.js create mode 100644 node_modules/es-abstract/2020/BigInt/sameValueZero.js create mode 100644 node_modules/es-abstract/2020/BigInt/signedRightShift.js create mode 100644 node_modules/es-abstract/2020/BigInt/subtract.js create mode 100644 node_modules/es-abstract/2020/BigInt/toString.js create mode 100644 node_modules/es-abstract/2020/BigInt/unaryMinus.js create mode 100644 node_modules/es-abstract/2020/BigInt/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2020/BigIntBitwiseOp.js create mode 100644 node_modules/es-abstract/2020/BinaryAnd.js create mode 100644 node_modules/es-abstract/2020/BinaryOr.js create mode 100644 node_modules/es-abstract/2020/BinaryXor.js create mode 100644 node_modules/es-abstract/2020/Call.js create mode 100644 node_modules/es-abstract/2020/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2020/Canonicalize.js create mode 100644 node_modules/es-abstract/2020/CharacterRange.js create mode 100644 node_modules/es-abstract/2020/CodePointAt.js create mode 100644 node_modules/es-abstract/2020/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2020/CompletionRecord.js create mode 100644 node_modules/es-abstract/2020/CopyDataProperties.js create mode 100644 node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2020/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2020/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2020/CreateHTML.js create mode 100644 node_modules/es-abstract/2020/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2020/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2020/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2020/CreateRegExpStringIterator.js create mode 100644 node_modules/es-abstract/2020/DateFromTime.js create mode 100644 node_modules/es-abstract/2020/DateString.js create mode 100644 node_modules/es-abstract/2020/Day.js create mode 100644 node_modules/es-abstract/2020/DayFromYear.js create mode 100644 node_modules/es-abstract/2020/DayWithinYear.js create mode 100644 node_modules/es-abstract/2020/DaysInYear.js create mode 100644 node_modules/es-abstract/2020/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2020/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2020/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2020/EnumerableOwnPropertyNames.js create mode 100644 node_modules/es-abstract/2020/FlattenIntoArray.js create mode 100644 node_modules/es-abstract/2020/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2020/Get.js create mode 100644 node_modules/es-abstract/2020/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2020/GetIterator.js create mode 100644 node_modules/es-abstract/2020/GetMethod.js create mode 100644 node_modules/es-abstract/2020/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2020/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2020/GetSubstitution.js create mode 100644 node_modules/es-abstract/2020/GetV.js create mode 100644 node_modules/es-abstract/2020/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2020/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2020/HasProperty.js create mode 100644 node_modules/es-abstract/2020/HourFromTime.js create mode 100644 node_modules/es-abstract/2020/InLeapYear.js create mode 100644 node_modules/es-abstract/2020/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2020/Invoke.js create mode 100644 node_modules/es-abstract/2020/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2020/IsArray.js create mode 100644 node_modules/es-abstract/2020/IsBigIntElementType.js create mode 100644 node_modules/es-abstract/2020/IsCallable.js create mode 100644 node_modules/es-abstract/2020/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2020/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2020/IsConstructor.js create mode 100644 node_modules/es-abstract/2020/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2020/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2020/IsExtensible.js create mode 100644 node_modules/es-abstract/2020/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2020/IsInteger.js create mode 100644 node_modules/es-abstract/2020/IsNoTearConfiguration.js create mode 100644 node_modules/es-abstract/2020/IsNonNegativeInteger.js create mode 100644 node_modules/es-abstract/2020/IsPromise.js create mode 100644 node_modules/es-abstract/2020/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2020/IsRegExp.js create mode 100644 node_modules/es-abstract/2020/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2020/IsStringPrefix.js create mode 100644 node_modules/es-abstract/2020/IsUnclampedIntegerElementType.js create mode 100644 node_modules/es-abstract/2020/IsUnsignedElementType.js create mode 100644 node_modules/es-abstract/2020/IsValidIntegerIndex.js create mode 100644 node_modules/es-abstract/2020/IsWordChar.js create mode 100644 node_modules/es-abstract/2020/IterableToList.js create mode 100644 node_modules/es-abstract/2020/IteratorClose.js create mode 100644 node_modules/es-abstract/2020/IteratorComplete.js create mode 100644 node_modules/es-abstract/2020/IteratorNext.js create mode 100644 node_modules/es-abstract/2020/IteratorStep.js create mode 100644 node_modules/es-abstract/2020/IteratorValue.js create mode 100644 node_modules/es-abstract/2020/LengthOfArrayLike.js create mode 100644 node_modules/es-abstract/2020/MakeDate.js create mode 100644 node_modules/es-abstract/2020/MakeDay.js create mode 100644 node_modules/es-abstract/2020/MakeTime.js create mode 100644 node_modules/es-abstract/2020/MinFromTime.js create mode 100644 node_modules/es-abstract/2020/MonthFromTime.js create mode 100644 node_modules/es-abstract/2020/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2020/NormalCompletion.js create mode 100644 node_modules/es-abstract/2020/Number/add.js create mode 100644 node_modules/es-abstract/2020/Number/bitwiseAND.js create mode 100644 node_modules/es-abstract/2020/Number/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2020/Number/bitwiseOR.js create mode 100644 node_modules/es-abstract/2020/Number/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2020/Number/divide.js create mode 100644 node_modules/es-abstract/2020/Number/equal.js create mode 100644 node_modules/es-abstract/2020/Number/exponentiate.js create mode 100644 node_modules/es-abstract/2020/Number/index.js create mode 100644 node_modules/es-abstract/2020/Number/leftShift.js create mode 100644 node_modules/es-abstract/2020/Number/lessThan.js create mode 100644 node_modules/es-abstract/2020/Number/multiply.js create mode 100644 node_modules/es-abstract/2020/Number/remainder.js create mode 100644 node_modules/es-abstract/2020/Number/sameValue.js create mode 100644 node_modules/es-abstract/2020/Number/sameValueZero.js create mode 100644 node_modules/es-abstract/2020/Number/signedRightShift.js create mode 100644 node_modules/es-abstract/2020/Number/subtract.js create mode 100644 node_modules/es-abstract/2020/Number/toString.js create mode 100644 node_modules/es-abstract/2020/Number/unaryMinus.js create mode 100644 node_modules/es-abstract/2020/Number/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2020/NumberBitwiseOp.js create mode 100644 node_modules/es-abstract/2020/NumberToBigInt.js create mode 100644 node_modules/es-abstract/2020/NumericToRawBytes.js create mode 100644 node_modules/es-abstract/2020/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2020/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2020/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2020/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2020/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2020/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2020/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2020/OrdinaryObjectCreate.js create mode 100644 node_modules/es-abstract/2020/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2020/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2020/PromiseResolve.js create mode 100644 node_modules/es-abstract/2020/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2020/RawBytesToNumeric.js create mode 100644 node_modules/es-abstract/2020/RegExpCreate.js create mode 100644 node_modules/es-abstract/2020/RegExpExec.js create mode 100644 node_modules/es-abstract/2020/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2020/SameValue.js create mode 100644 node_modules/es-abstract/2020/SameValueNonNumeric.js create mode 100644 node_modules/es-abstract/2020/SameValueZero.js create mode 100644 node_modules/es-abstract/2020/SecFromTime.js create mode 100644 node_modules/es-abstract/2020/Set.js create mode 100644 node_modules/es-abstract/2020/SetFunctionLength.js create mode 100644 node_modules/es-abstract/2020/SetFunctionName.js create mode 100644 node_modules/es-abstract/2020/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2020/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2020/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2020/SplitMatch.js create mode 100644 node_modules/es-abstract/2020/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/2020/StringCreate.js create mode 100644 node_modules/es-abstract/2020/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2020/StringPad.js create mode 100644 node_modules/es-abstract/2020/StringToBigInt.js create mode 100644 node_modules/es-abstract/2020/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2020/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2020/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2020/TimeClip.js create mode 100644 node_modules/es-abstract/2020/TimeFromYear.js create mode 100644 node_modules/es-abstract/2020/TimeString.js create mode 100644 node_modules/es-abstract/2020/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2020/ToBigInt.js create mode 100644 node_modules/es-abstract/2020/ToBigInt64.js create mode 100644 node_modules/es-abstract/2020/ToBigUint64.js create mode 100644 node_modules/es-abstract/2020/ToBoolean.js create mode 100644 node_modules/es-abstract/2020/ToDateString.js create mode 100644 node_modules/es-abstract/2020/ToIndex.js create mode 100644 node_modules/es-abstract/2020/ToInt16.js create mode 100644 node_modules/es-abstract/2020/ToInt32.js create mode 100644 node_modules/es-abstract/2020/ToInt8.js create mode 100644 node_modules/es-abstract/2020/ToInteger.js create mode 100644 node_modules/es-abstract/2020/ToLength.js create mode 100644 node_modules/es-abstract/2020/ToNumber.js create mode 100644 node_modules/es-abstract/2020/ToNumeric.js create mode 100644 node_modules/es-abstract/2020/ToObject.js create mode 100644 node_modules/es-abstract/2020/ToPrimitive.js create mode 100644 node_modules/es-abstract/2020/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2020/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2020/ToString.js create mode 100644 node_modules/es-abstract/2020/ToUint16.js create mode 100644 node_modules/es-abstract/2020/ToUint32.js create mode 100644 node_modules/es-abstract/2020/ToUint8.js create mode 100644 node_modules/es-abstract/2020/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2020/TrimString.js create mode 100644 node_modules/es-abstract/2020/Type.js create mode 100644 node_modules/es-abstract/2020/TypedArrayCreate.js create mode 100644 node_modules/es-abstract/2020/TypedArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2020/UTF16DecodeString.js create mode 100644 node_modules/es-abstract/2020/UTF16DecodeSurrogatePair.js create mode 100644 node_modules/es-abstract/2020/UTF16Encoding.js create mode 100644 node_modules/es-abstract/2020/UnicodeEscape.js create mode 100644 node_modules/es-abstract/2020/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2020/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2020/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2020/WeekDay.js create mode 100644 node_modules/es-abstract/2020/WordCharacters.js create mode 100644 node_modules/es-abstract/2020/YearFromTime.js create mode 100644 node_modules/es-abstract/2020/abs.js create mode 100644 node_modules/es-abstract/2020/floor.js create mode 100644 node_modules/es-abstract/2020/max.js create mode 100644 node_modules/es-abstract/2020/min.js create mode 100644 node_modules/es-abstract/2020/modulo.js create mode 100644 node_modules/es-abstract/2020/msFromTime.js create mode 100644 node_modules/es-abstract/2020/thisBigIntValue.js create mode 100644 node_modules/es-abstract/2020/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2020/thisNumberValue.js create mode 100644 node_modules/es-abstract/2020/thisStringValue.js create mode 100644 node_modules/es-abstract/2020/thisSymbolValue.js create mode 100644 node_modules/es-abstract/2020/thisTimeValue.js create mode 100644 node_modules/es-abstract/2021/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/2021/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/2021/AddEntriesFromIterable.js create mode 100644 node_modules/es-abstract/2021/AddToKeptObjects.js create mode 100644 node_modules/es-abstract/2021/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2021/ApplyStringOrNumericBinaryOperator.js create mode 100644 node_modules/es-abstract/2021/ArrayCreate.js create mode 100644 node_modules/es-abstract/2021/ArraySetLength.js create mode 100644 node_modules/es-abstract/2021/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2021/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2021/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2021/BigInt/add.js create mode 100644 node_modules/es-abstract/2021/BigInt/bitwiseAND.js create mode 100644 node_modules/es-abstract/2021/BigInt/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2021/BigInt/bitwiseOR.js create mode 100644 node_modules/es-abstract/2021/BigInt/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2021/BigInt/divide.js create mode 100644 node_modules/es-abstract/2021/BigInt/equal.js create mode 100644 node_modules/es-abstract/2021/BigInt/exponentiate.js create mode 100644 node_modules/es-abstract/2021/BigInt/index.js create mode 100644 node_modules/es-abstract/2021/BigInt/leftShift.js create mode 100644 node_modules/es-abstract/2021/BigInt/lessThan.js create mode 100644 node_modules/es-abstract/2021/BigInt/multiply.js create mode 100644 node_modules/es-abstract/2021/BigInt/remainder.js create mode 100644 node_modules/es-abstract/2021/BigInt/sameValue.js create mode 100644 node_modules/es-abstract/2021/BigInt/sameValueZero.js create mode 100644 node_modules/es-abstract/2021/BigInt/signedRightShift.js create mode 100644 node_modules/es-abstract/2021/BigInt/subtract.js create mode 100644 node_modules/es-abstract/2021/BigInt/toString.js create mode 100644 node_modules/es-abstract/2021/BigInt/unaryMinus.js create mode 100644 node_modules/es-abstract/2021/BigInt/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2021/BigIntBitwiseOp.js create mode 100644 node_modules/es-abstract/2021/BinaryAnd.js create mode 100644 node_modules/es-abstract/2021/BinaryOr.js create mode 100644 node_modules/es-abstract/2021/BinaryXor.js create mode 100644 node_modules/es-abstract/2021/ByteListBitwiseOp.js create mode 100644 node_modules/es-abstract/2021/ByteListEqual.js create mode 100644 node_modules/es-abstract/2021/Call.js create mode 100644 node_modules/es-abstract/2021/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2021/Canonicalize.js create mode 100644 node_modules/es-abstract/2021/CharacterRange.js create mode 100644 node_modules/es-abstract/2021/ClearKeptObjects.js create mode 100644 node_modules/es-abstract/2021/CloneArrayBuffer.js create mode 100644 node_modules/es-abstract/2021/CodePointAt.js create mode 100644 node_modules/es-abstract/2021/CodePointsToString.js create mode 100644 node_modules/es-abstract/2021/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/CompletionRecord.js create mode 100644 node_modules/es-abstract/2021/CopyDataProperties.js create mode 100644 node_modules/es-abstract/2021/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2021/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2021/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2021/CreateHTML.js create mode 100644 node_modules/es-abstract/2021/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2021/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2021/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2021/CreateRegExpStringIterator.js create mode 100644 node_modules/es-abstract/2021/DateFromTime.js create mode 100644 node_modules/es-abstract/2021/DateString.js create mode 100644 node_modules/es-abstract/2021/Day.js create mode 100644 node_modules/es-abstract/2021/DayFromYear.js create mode 100644 node_modules/es-abstract/2021/DayWithinYear.js create mode 100644 node_modules/es-abstract/2021/DaysInYear.js create mode 100644 node_modules/es-abstract/2021/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2021/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2021/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2021/EnumerableOwnPropertyNames.js create mode 100644 node_modules/es-abstract/2021/FlattenIntoArray.js create mode 100644 node_modules/es-abstract/2021/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/Get.js create mode 100644 node_modules/es-abstract/2021/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2021/GetIterator.js create mode 100644 node_modules/es-abstract/2021/GetMethod.js create mode 100644 node_modules/es-abstract/2021/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2021/GetPromiseResolve.js create mode 100644 node_modules/es-abstract/2021/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2021/GetSubstitution.js create mode 100644 node_modules/es-abstract/2021/GetV.js create mode 100644 node_modules/es-abstract/2021/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2021/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2021/HasProperty.js create mode 100644 node_modules/es-abstract/2021/HourFromTime.js create mode 100644 node_modules/es-abstract/2021/InLeapYear.js create mode 100644 node_modules/es-abstract/2021/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2021/Invoke.js create mode 100644 node_modules/es-abstract/2021/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2021/IsArray.js create mode 100644 node_modules/es-abstract/2021/IsBigIntElementType.js create mode 100644 node_modules/es-abstract/2021/IsCallable.js create mode 100644 node_modules/es-abstract/2021/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2021/IsConstructor.js create mode 100644 node_modules/es-abstract/2021/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2021/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2021/IsExtensible.js create mode 100644 node_modules/es-abstract/2021/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2021/IsIntegralNumber.js create mode 100644 node_modules/es-abstract/2021/IsNoTearConfiguration.js create mode 100644 node_modules/es-abstract/2021/IsPromise.js create mode 100644 node_modules/es-abstract/2021/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2021/IsRegExp.js create mode 100644 node_modules/es-abstract/2021/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2021/IsStringPrefix.js create mode 100644 node_modules/es-abstract/2021/IsUnclampedIntegerElementType.js create mode 100644 node_modules/es-abstract/2021/IsUnsignedElementType.js create mode 100644 node_modules/es-abstract/2021/IsValidIntegerIndex.js create mode 100644 node_modules/es-abstract/2021/IsWordChar.js create mode 100644 node_modules/es-abstract/2021/IterableToList.js create mode 100644 node_modules/es-abstract/2021/IteratorClose.js create mode 100644 node_modules/es-abstract/2021/IteratorComplete.js create mode 100644 node_modules/es-abstract/2021/IteratorNext.js create mode 100644 node_modules/es-abstract/2021/IteratorStep.js create mode 100644 node_modules/es-abstract/2021/IteratorValue.js create mode 100644 node_modules/es-abstract/2021/LengthOfArrayLike.js create mode 100644 node_modules/es-abstract/2021/MakeDate.js create mode 100644 node_modules/es-abstract/2021/MakeDay.js create mode 100644 node_modules/es-abstract/2021/MakeTime.js create mode 100644 node_modules/es-abstract/2021/MinFromTime.js create mode 100644 node_modules/es-abstract/2021/MonthFromTime.js create mode 100644 node_modules/es-abstract/2021/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2021/NormalCompletion.js create mode 100644 node_modules/es-abstract/2021/Number/add.js create mode 100644 node_modules/es-abstract/2021/Number/bitwiseAND.js create mode 100644 node_modules/es-abstract/2021/Number/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2021/Number/bitwiseOR.js create mode 100644 node_modules/es-abstract/2021/Number/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2021/Number/divide.js create mode 100644 node_modules/es-abstract/2021/Number/equal.js create mode 100644 node_modules/es-abstract/2021/Number/exponentiate.js create mode 100644 node_modules/es-abstract/2021/Number/index.js create mode 100644 node_modules/es-abstract/2021/Number/leftShift.js create mode 100644 node_modules/es-abstract/2021/Number/lessThan.js create mode 100644 node_modules/es-abstract/2021/Number/multiply.js create mode 100644 node_modules/es-abstract/2021/Number/remainder.js create mode 100644 node_modules/es-abstract/2021/Number/sameValue.js create mode 100644 node_modules/es-abstract/2021/Number/sameValueZero.js create mode 100644 node_modules/es-abstract/2021/Number/signedRightShift.js create mode 100644 node_modules/es-abstract/2021/Number/subtract.js create mode 100644 node_modules/es-abstract/2021/Number/toString.js create mode 100644 node_modules/es-abstract/2021/Number/unaryMinus.js create mode 100644 node_modules/es-abstract/2021/Number/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2021/NumberBitwiseOp.js create mode 100644 node_modules/es-abstract/2021/NumberToBigInt.js create mode 100644 node_modules/es-abstract/2021/NumericToRawBytes.js create mode 100644 node_modules/es-abstract/2021/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2021/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2021/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2021/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2021/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2021/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2021/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2021/OrdinaryObjectCreate.js create mode 100644 node_modules/es-abstract/2021/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2021/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2021/PromiseResolve.js create mode 100644 node_modules/es-abstract/2021/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2021/RawBytesToNumeric.js create mode 100644 node_modules/es-abstract/2021/RegExpCreate.js create mode 100644 node_modules/es-abstract/2021/RegExpExec.js create mode 100644 node_modules/es-abstract/2021/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2021/SameValue.js create mode 100644 node_modules/es-abstract/2021/SameValueNonNumeric.js create mode 100644 node_modules/es-abstract/2021/SameValueZero.js create mode 100644 node_modules/es-abstract/2021/SecFromTime.js create mode 100644 node_modules/es-abstract/2021/Set.js create mode 100644 node_modules/es-abstract/2021/SetFunctionLength.js create mode 100644 node_modules/es-abstract/2021/SetFunctionName.js create mode 100644 node_modules/es-abstract/2021/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2021/SetTypedArrayFromArrayLike.js create mode 100644 node_modules/es-abstract/2021/SetTypedArrayFromTypedArray.js create mode 100644 node_modules/es-abstract/2021/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2021/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2021/SplitMatch.js create mode 100644 node_modules/es-abstract/2021/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/2021/StringCreate.js create mode 100644 node_modules/es-abstract/2021/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2021/StringIndexOf.js create mode 100644 node_modules/es-abstract/2021/StringPad.js create mode 100644 node_modules/es-abstract/2021/StringToBigInt.js create mode 100644 node_modules/es-abstract/2021/StringToCodePoints.js create mode 100644 node_modules/es-abstract/2021/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2021/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2021/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2021/TimeClip.js create mode 100644 node_modules/es-abstract/2021/TimeFromYear.js create mode 100644 node_modules/es-abstract/2021/TimeString.js create mode 100644 node_modules/es-abstract/2021/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2021/ToBigInt.js create mode 100644 node_modules/es-abstract/2021/ToBigInt64.js create mode 100644 node_modules/es-abstract/2021/ToBigUint64.js create mode 100644 node_modules/es-abstract/2021/ToBoolean.js create mode 100644 node_modules/es-abstract/2021/ToDateString.js create mode 100644 node_modules/es-abstract/2021/ToIndex.js create mode 100644 node_modules/es-abstract/2021/ToInt16.js create mode 100644 node_modules/es-abstract/2021/ToInt32.js create mode 100644 node_modules/es-abstract/2021/ToInt8.js create mode 100644 node_modules/es-abstract/2021/ToIntegerOrInfinity.js create mode 100644 node_modules/es-abstract/2021/ToLength.js create mode 100644 node_modules/es-abstract/2021/ToNumber.js create mode 100644 node_modules/es-abstract/2021/ToNumeric.js create mode 100644 node_modules/es-abstract/2021/ToObject.js create mode 100644 node_modules/es-abstract/2021/ToPrimitive.js create mode 100644 node_modules/es-abstract/2021/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2021/ToString.js create mode 100644 node_modules/es-abstract/2021/ToUint16.js create mode 100644 node_modules/es-abstract/2021/ToUint32.js create mode 100644 node_modules/es-abstract/2021/ToUint8.js create mode 100644 node_modules/es-abstract/2021/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2021/TrimString.js create mode 100644 node_modules/es-abstract/2021/Type.js create mode 100644 node_modules/es-abstract/2021/TypedArrayCreate.js create mode 100644 node_modules/es-abstract/2021/TypedArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2021/UTF16EncodeCodePoint.js create mode 100644 node_modules/es-abstract/2021/UTF16SurrogatePairToCodePoint.js create mode 100644 node_modules/es-abstract/2021/UnicodeEscape.js create mode 100644 node_modules/es-abstract/2021/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2021/ValidateIntegerTypedArray.js create mode 100644 node_modules/es-abstract/2021/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2021/WeakRefDeref.js create mode 100644 node_modules/es-abstract/2021/WeekDay.js create mode 100644 node_modules/es-abstract/2021/WordCharacters.js create mode 100644 node_modules/es-abstract/2021/YearFromTime.js create mode 100644 node_modules/es-abstract/2021/abs.js create mode 100644 node_modules/es-abstract/2021/clamp.js create mode 100644 node_modules/es-abstract/2021/floor.js create mode 100644 node_modules/es-abstract/2021/max.js create mode 100644 node_modules/es-abstract/2021/min.js create mode 100644 node_modules/es-abstract/2021/modulo.js create mode 100644 node_modules/es-abstract/2021/msFromTime.js create mode 100644 node_modules/es-abstract/2021/substring.js create mode 100644 node_modules/es-abstract/2021/thisBigIntValue.js create mode 100644 node_modules/es-abstract/2021/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2021/thisNumberValue.js create mode 100644 node_modules/es-abstract/2021/thisStringValue.js create mode 100644 node_modules/es-abstract/2021/thisSymbolValue.js create mode 100644 node_modules/es-abstract/2021/thisTimeValue.js create mode 100644 node_modules/es-abstract/2022/AddEntriesFromIterable.js create mode 100644 node_modules/es-abstract/2022/AddToKeptObjects.js create mode 100644 node_modules/es-abstract/2022/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js create mode 100644 node_modules/es-abstract/2022/ArrayCreate.js create mode 100644 node_modules/es-abstract/2022/ArraySetLength.js create mode 100644 node_modules/es-abstract/2022/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2022/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2022/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2022/BigInt/add.js create mode 100644 node_modules/es-abstract/2022/BigInt/bitwiseAND.js create mode 100644 node_modules/es-abstract/2022/BigInt/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2022/BigInt/bitwiseOR.js create mode 100644 node_modules/es-abstract/2022/BigInt/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2022/BigInt/divide.js create mode 100644 node_modules/es-abstract/2022/BigInt/equal.js create mode 100644 node_modules/es-abstract/2022/BigInt/exponentiate.js create mode 100644 node_modules/es-abstract/2022/BigInt/index.js create mode 100644 node_modules/es-abstract/2022/BigInt/leftShift.js create mode 100644 node_modules/es-abstract/2022/BigInt/lessThan.js create mode 100644 node_modules/es-abstract/2022/BigInt/multiply.js create mode 100644 node_modules/es-abstract/2022/BigInt/remainder.js create mode 100644 node_modules/es-abstract/2022/BigInt/sameValue.js create mode 100644 node_modules/es-abstract/2022/BigInt/sameValueZero.js create mode 100644 node_modules/es-abstract/2022/BigInt/signedRightShift.js create mode 100644 node_modules/es-abstract/2022/BigInt/subtract.js create mode 100644 node_modules/es-abstract/2022/BigInt/toString.js create mode 100644 node_modules/es-abstract/2022/BigInt/unaryMinus.js create mode 100644 node_modules/es-abstract/2022/BigInt/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2022/BigIntBitwiseOp.js create mode 100644 node_modules/es-abstract/2022/BinaryAnd.js create mode 100644 node_modules/es-abstract/2022/BinaryOr.js create mode 100644 node_modules/es-abstract/2022/BinaryXor.js create mode 100644 node_modules/es-abstract/2022/ByteListBitwiseOp.js create mode 100644 node_modules/es-abstract/2022/ByteListEqual.js create mode 100644 node_modules/es-abstract/2022/Call.js create mode 100644 node_modules/es-abstract/2022/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2022/Canonicalize.js create mode 100644 node_modules/es-abstract/2022/CharacterRange.js create mode 100644 node_modules/es-abstract/2022/ClearKeptObjects.js create mode 100644 node_modules/es-abstract/2022/CloneArrayBuffer.js create mode 100644 node_modules/es-abstract/2022/CodePointAt.js create mode 100644 node_modules/es-abstract/2022/CodePointsToString.js create mode 100644 node_modules/es-abstract/2022/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/CompletionRecord.js create mode 100644 node_modules/es-abstract/2022/CopyDataProperties.js create mode 100644 node_modules/es-abstract/2022/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2022/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2022/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2022/CreateHTML.js create mode 100644 node_modules/es-abstract/2022/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2022/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2022/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2022/CreateNonEnumerableDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2022/CreateRegExpStringIterator.js create mode 100644 node_modules/es-abstract/2022/DateFromTime.js create mode 100644 node_modules/es-abstract/2022/DateString.js create mode 100644 node_modules/es-abstract/2022/Day.js create mode 100644 node_modules/es-abstract/2022/DayFromYear.js create mode 100644 node_modules/es-abstract/2022/DayWithinYear.js create mode 100644 node_modules/es-abstract/2022/DaysInYear.js create mode 100644 node_modules/es-abstract/2022/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2022/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2022/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2022/EnumerableOwnPropertyNames.js create mode 100644 node_modules/es-abstract/2022/FlattenIntoArray.js create mode 100644 node_modules/es-abstract/2022/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/Get.js create mode 100644 node_modules/es-abstract/2022/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2022/GetIterator.js create mode 100644 node_modules/es-abstract/2022/GetMatchIndexPair.js create mode 100644 node_modules/es-abstract/2022/GetMatchString.js create mode 100644 node_modules/es-abstract/2022/GetMethod.js create mode 100644 node_modules/es-abstract/2022/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2022/GetPromiseResolve.js create mode 100644 node_modules/es-abstract/2022/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2022/GetStringIndex.js create mode 100644 node_modules/es-abstract/2022/GetSubstitution.js create mode 100644 node_modules/es-abstract/2022/GetV.js create mode 100644 node_modules/es-abstract/2022/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2022/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2022/HasProperty.js create mode 100644 node_modules/es-abstract/2022/HourFromTime.js create mode 100644 node_modules/es-abstract/2022/InLeapYear.js create mode 100644 node_modules/es-abstract/2022/InstallErrorCause.js create mode 100644 node_modules/es-abstract/2022/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2022/Invoke.js create mode 100644 node_modules/es-abstract/2022/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2022/IsArray.js create mode 100644 node_modules/es-abstract/2022/IsBigIntElementType.js create mode 100644 node_modules/es-abstract/2022/IsCallable.js create mode 100644 node_modules/es-abstract/2022/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2022/IsConstructor.js create mode 100644 node_modules/es-abstract/2022/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2022/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2022/IsExtensible.js create mode 100644 node_modules/es-abstract/2022/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2022/IsIntegralNumber.js create mode 100644 node_modules/es-abstract/2022/IsLessThan.js create mode 100644 node_modules/es-abstract/2022/IsLooselyEqual.js create mode 100644 node_modules/es-abstract/2022/IsNoTearConfiguration.js create mode 100644 node_modules/es-abstract/2022/IsPromise.js create mode 100644 node_modules/es-abstract/2022/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2022/IsRegExp.js create mode 100644 node_modules/es-abstract/2022/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2022/IsStrictlyEqual.js create mode 100644 node_modules/es-abstract/2022/IsStringPrefix.js create mode 100644 node_modules/es-abstract/2022/IsStringWellFormedUnicode.js create mode 100644 node_modules/es-abstract/2022/IsUnclampedIntegerElementType.js create mode 100644 node_modules/es-abstract/2022/IsUnsignedElementType.js create mode 100644 node_modules/es-abstract/2022/IsValidIntegerIndex.js create mode 100644 node_modules/es-abstract/2022/IsWordChar.js create mode 100644 node_modules/es-abstract/2022/IterableToList.js create mode 100644 node_modules/es-abstract/2022/IteratorClose.js create mode 100644 node_modules/es-abstract/2022/IteratorComplete.js create mode 100644 node_modules/es-abstract/2022/IteratorNext.js create mode 100644 node_modules/es-abstract/2022/IteratorStep.js create mode 100644 node_modules/es-abstract/2022/IteratorValue.js create mode 100644 node_modules/es-abstract/2022/LengthOfArrayLike.js create mode 100644 node_modules/es-abstract/2022/MakeDate.js create mode 100644 node_modules/es-abstract/2022/MakeDay.js create mode 100644 node_modules/es-abstract/2022/MakeMatchIndicesIndexPairArray.js create mode 100644 node_modules/es-abstract/2022/MakeTime.js create mode 100644 node_modules/es-abstract/2022/MinFromTime.js create mode 100644 node_modules/es-abstract/2022/MonthFromTime.js create mode 100644 node_modules/es-abstract/2022/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2022/NormalCompletion.js create mode 100644 node_modules/es-abstract/2022/Number/add.js create mode 100644 node_modules/es-abstract/2022/Number/bitwiseAND.js create mode 100644 node_modules/es-abstract/2022/Number/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2022/Number/bitwiseOR.js create mode 100644 node_modules/es-abstract/2022/Number/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2022/Number/divide.js create mode 100644 node_modules/es-abstract/2022/Number/equal.js create mode 100644 node_modules/es-abstract/2022/Number/exponentiate.js create mode 100644 node_modules/es-abstract/2022/Number/index.js create mode 100644 node_modules/es-abstract/2022/Number/leftShift.js create mode 100644 node_modules/es-abstract/2022/Number/lessThan.js create mode 100644 node_modules/es-abstract/2022/Number/multiply.js create mode 100644 node_modules/es-abstract/2022/Number/remainder.js create mode 100644 node_modules/es-abstract/2022/Number/sameValue.js create mode 100644 node_modules/es-abstract/2022/Number/sameValueZero.js create mode 100644 node_modules/es-abstract/2022/Number/signedRightShift.js create mode 100644 node_modules/es-abstract/2022/Number/subtract.js create mode 100644 node_modules/es-abstract/2022/Number/toString.js create mode 100644 node_modules/es-abstract/2022/Number/unaryMinus.js create mode 100644 node_modules/es-abstract/2022/Number/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2022/NumberBitwiseOp.js create mode 100644 node_modules/es-abstract/2022/NumberToBigInt.js create mode 100644 node_modules/es-abstract/2022/NumericToRawBytes.js create mode 100644 node_modules/es-abstract/2022/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2022/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2022/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2022/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2022/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2022/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2022/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2022/OrdinaryObjectCreate.js create mode 100644 node_modules/es-abstract/2022/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2022/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2022/PromiseResolve.js create mode 100644 node_modules/es-abstract/2022/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2022/RawBytesToNumeric.js create mode 100644 node_modules/es-abstract/2022/RegExpCreate.js create mode 100644 node_modules/es-abstract/2022/RegExpExec.js create mode 100644 node_modules/es-abstract/2022/RegExpHasFlag.js create mode 100644 node_modules/es-abstract/2022/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2022/SameValue.js create mode 100644 node_modules/es-abstract/2022/SameValueNonNumeric.js create mode 100644 node_modules/es-abstract/2022/SameValueZero.js create mode 100644 node_modules/es-abstract/2022/SecFromTime.js create mode 100644 node_modules/es-abstract/2022/Set.js create mode 100644 node_modules/es-abstract/2022/SetFunctionLength.js create mode 100644 node_modules/es-abstract/2022/SetFunctionName.js create mode 100644 node_modules/es-abstract/2022/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2022/SetTypedArrayFromArrayLike.js create mode 100644 node_modules/es-abstract/2022/SetTypedArrayFromTypedArray.js create mode 100644 node_modules/es-abstract/2022/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2022/SortIndexedProperties.js create mode 100644 node_modules/es-abstract/2022/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2022/StringCreate.js create mode 100644 node_modules/es-abstract/2022/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2022/StringIndexOf.js create mode 100644 node_modules/es-abstract/2022/StringPad.js create mode 100644 node_modules/es-abstract/2022/StringToBigInt.js create mode 100644 node_modules/es-abstract/2022/StringToCodePoints.js create mode 100644 node_modules/es-abstract/2022/StringToNumber.js create mode 100644 node_modules/es-abstract/2022/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2022/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2022/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2022/TimeClip.js create mode 100644 node_modules/es-abstract/2022/TimeFromYear.js create mode 100644 node_modules/es-abstract/2022/TimeString.js create mode 100644 node_modules/es-abstract/2022/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2022/ToBigInt.js create mode 100644 node_modules/es-abstract/2022/ToBigInt64.js create mode 100644 node_modules/es-abstract/2022/ToBigUint64.js create mode 100644 node_modules/es-abstract/2022/ToBoolean.js create mode 100644 node_modules/es-abstract/2022/ToDateString.js create mode 100644 node_modules/es-abstract/2022/ToIndex.js create mode 100644 node_modules/es-abstract/2022/ToInt16.js create mode 100644 node_modules/es-abstract/2022/ToInt32.js create mode 100644 node_modules/es-abstract/2022/ToInt8.js create mode 100644 node_modules/es-abstract/2022/ToIntegerOrInfinity.js create mode 100644 node_modules/es-abstract/2022/ToLength.js create mode 100644 node_modules/es-abstract/2022/ToNumber.js create mode 100644 node_modules/es-abstract/2022/ToNumeric.js create mode 100644 node_modules/es-abstract/2022/ToObject.js create mode 100644 node_modules/es-abstract/2022/ToPrimitive.js create mode 100644 node_modules/es-abstract/2022/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2022/ToString.js create mode 100644 node_modules/es-abstract/2022/ToUint16.js create mode 100644 node_modules/es-abstract/2022/ToUint32.js create mode 100644 node_modules/es-abstract/2022/ToUint8.js create mode 100644 node_modules/es-abstract/2022/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2022/ToZeroPaddedDecimalString.js create mode 100644 node_modules/es-abstract/2022/TrimString.js create mode 100644 node_modules/es-abstract/2022/Type.js create mode 100644 node_modules/es-abstract/2022/TypedArrayCreate.js create mode 100644 node_modules/es-abstract/2022/TypedArrayElementSize.js create mode 100644 node_modules/es-abstract/2022/TypedArrayElementType.js create mode 100644 node_modules/es-abstract/2022/TypedArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2022/UTF16EncodeCodePoint.js create mode 100644 node_modules/es-abstract/2022/UTF16SurrogatePairToCodePoint.js create mode 100644 node_modules/es-abstract/2022/UnicodeEscape.js create mode 100644 node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2022/ValidateIntegerTypedArray.js create mode 100644 node_modules/es-abstract/2022/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2022/WeakRefDeref.js create mode 100644 node_modules/es-abstract/2022/WeekDay.js create mode 100644 node_modules/es-abstract/2022/WordCharacters.js create mode 100644 node_modules/es-abstract/2022/YearFromTime.js create mode 100644 node_modules/es-abstract/2022/abs.js create mode 100644 node_modules/es-abstract/2022/clamp.js create mode 100644 node_modules/es-abstract/2022/floor.js create mode 100644 node_modules/es-abstract/2022/max.js create mode 100644 node_modules/es-abstract/2022/min.js create mode 100644 node_modules/es-abstract/2022/modulo.js create mode 100644 node_modules/es-abstract/2022/msFromTime.js create mode 100644 node_modules/es-abstract/2022/substring.js create mode 100644 node_modules/es-abstract/2022/thisBigIntValue.js create mode 100644 node_modules/es-abstract/2022/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2022/thisNumberValue.js create mode 100644 node_modules/es-abstract/2022/thisStringValue.js create mode 100644 node_modules/es-abstract/2022/thisSymbolValue.js create mode 100644 node_modules/es-abstract/2022/thisTimeValue.js create mode 100644 node_modules/es-abstract/2023/AddEntriesFromIterable.js create mode 100644 node_modules/es-abstract/2023/AddToKeptObjects.js create mode 100644 node_modules/es-abstract/2023/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2023/ApplyStringOrNumericBinaryOperator.js create mode 100644 node_modules/es-abstract/2023/ArrayCreate.js create mode 100644 node_modules/es-abstract/2023/ArraySetLength.js create mode 100644 node_modules/es-abstract/2023/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2023/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2023/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2023/BigInt/add.js create mode 100644 node_modules/es-abstract/2023/BigInt/bitwiseAND.js create mode 100644 node_modules/es-abstract/2023/BigInt/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2023/BigInt/bitwiseOR.js create mode 100644 node_modules/es-abstract/2023/BigInt/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2023/BigInt/divide.js create mode 100644 node_modules/es-abstract/2023/BigInt/equal.js create mode 100644 node_modules/es-abstract/2023/BigInt/exponentiate.js create mode 100644 node_modules/es-abstract/2023/BigInt/index.js create mode 100644 node_modules/es-abstract/2023/BigInt/leftShift.js create mode 100644 node_modules/es-abstract/2023/BigInt/lessThan.js create mode 100644 node_modules/es-abstract/2023/BigInt/multiply.js create mode 100644 node_modules/es-abstract/2023/BigInt/remainder.js create mode 100644 node_modules/es-abstract/2023/BigInt/signedRightShift.js create mode 100644 node_modules/es-abstract/2023/BigInt/subtract.js create mode 100644 node_modules/es-abstract/2023/BigInt/toString.js create mode 100644 node_modules/es-abstract/2023/BigInt/unaryMinus.js create mode 100644 node_modules/es-abstract/2023/BigInt/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2023/BigIntBitwiseOp.js create mode 100644 node_modules/es-abstract/2023/BinaryAnd.js create mode 100644 node_modules/es-abstract/2023/BinaryOr.js create mode 100644 node_modules/es-abstract/2023/BinaryXor.js create mode 100644 node_modules/es-abstract/2023/ByteListBitwiseOp.js create mode 100644 node_modules/es-abstract/2023/ByteListEqual.js create mode 100644 node_modules/es-abstract/2023/Call.js create mode 100644 node_modules/es-abstract/2023/CanBeHeldWeakly.js create mode 100644 node_modules/es-abstract/2023/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2023/Canonicalize.js create mode 100644 node_modules/es-abstract/2023/CharacterRange.js create mode 100644 node_modules/es-abstract/2023/ClearKeptObjects.js create mode 100644 node_modules/es-abstract/2023/CloneArrayBuffer.js create mode 100644 node_modules/es-abstract/2023/CodePointAt.js create mode 100644 node_modules/es-abstract/2023/CodePointsToString.js create mode 100644 node_modules/es-abstract/2023/CompareArrayElements.js create mode 100644 node_modules/es-abstract/2023/CompareTypedArrayElements.js create mode 100644 node_modules/es-abstract/2023/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2023/CompletionRecord.js create mode 100644 node_modules/es-abstract/2023/CopyDataProperties.js create mode 100644 node_modules/es-abstract/2023/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2023/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2023/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2023/CreateHTML.js create mode 100644 node_modules/es-abstract/2023/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2023/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2023/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2023/CreateNonEnumerableDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2023/CreateRegExpStringIterator.js create mode 100644 node_modules/es-abstract/2023/DateFromTime.js create mode 100644 node_modules/es-abstract/2023/DateString.js create mode 100644 node_modules/es-abstract/2023/Day.js create mode 100644 node_modules/es-abstract/2023/DayFromYear.js create mode 100644 node_modules/es-abstract/2023/DayWithinYear.js create mode 100644 node_modules/es-abstract/2023/DaysInYear.js create mode 100644 node_modules/es-abstract/2023/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2023/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2023/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2023/EnumerableOwnProperties.js create mode 100644 node_modules/es-abstract/2023/FindViaPredicate.js create mode 100644 node_modules/es-abstract/2023/FlattenIntoArray.js create mode 100644 node_modules/es-abstract/2023/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2023/Get.js create mode 100644 node_modules/es-abstract/2023/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2023/GetIterator.js create mode 100644 node_modules/es-abstract/2023/GetIteratorFromMethod.js create mode 100644 node_modules/es-abstract/2023/GetMatchIndexPair.js create mode 100644 node_modules/es-abstract/2023/GetMatchString.js create mode 100644 node_modules/es-abstract/2023/GetMethod.js create mode 100644 node_modules/es-abstract/2023/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2023/GetPromiseResolve.js create mode 100644 node_modules/es-abstract/2023/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2023/GetStringIndex.js create mode 100644 node_modules/es-abstract/2023/GetSubstitution.js create mode 100644 node_modules/es-abstract/2023/GetV.js create mode 100644 node_modules/es-abstract/2023/GetValueFromBuffer.js create mode 100644 node_modules/es-abstract/2023/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2023/HasProperty.js create mode 100644 node_modules/es-abstract/2023/HourFromTime.js create mode 100644 node_modules/es-abstract/2023/InLeapYear.js create mode 100644 node_modules/es-abstract/2023/InstallErrorCause.js create mode 100644 node_modules/es-abstract/2023/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2023/Invoke.js create mode 100644 node_modules/es-abstract/2023/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2023/IsArray.js create mode 100644 node_modules/es-abstract/2023/IsBigIntElementType.js create mode 100644 node_modules/es-abstract/2023/IsCallable.js create mode 100644 node_modules/es-abstract/2023/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2023/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2023/IsConstructor.js create mode 100644 node_modules/es-abstract/2023/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2023/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2023/IsExtensible.js create mode 100644 node_modules/es-abstract/2023/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2023/IsIntegralNumber.js create mode 100644 node_modules/es-abstract/2023/IsLessThan.js create mode 100644 node_modules/es-abstract/2023/IsLooselyEqual.js create mode 100644 node_modules/es-abstract/2023/IsNoTearConfiguration.js create mode 100644 node_modules/es-abstract/2023/IsPromise.js create mode 100644 node_modules/es-abstract/2023/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2023/IsRegExp.js create mode 100644 node_modules/es-abstract/2023/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2023/IsStrictlyEqual.js create mode 100644 node_modules/es-abstract/2023/IsStringWellFormedUnicode.js create mode 100644 node_modules/es-abstract/2023/IsUnclampedIntegerElementType.js create mode 100644 node_modules/es-abstract/2023/IsUnsignedElementType.js create mode 100644 node_modules/es-abstract/2023/IsValidIntegerIndex.js create mode 100644 node_modules/es-abstract/2023/IsWordChar.js create mode 100644 node_modules/es-abstract/2023/IteratorClose.js create mode 100644 node_modules/es-abstract/2023/IteratorComplete.js create mode 100644 node_modules/es-abstract/2023/IteratorNext.js create mode 100644 node_modules/es-abstract/2023/IteratorStep.js create mode 100644 node_modules/es-abstract/2023/IteratorToList.js create mode 100644 node_modules/es-abstract/2023/IteratorValue.js create mode 100644 node_modules/es-abstract/2023/KeyForSymbol.js create mode 100644 node_modules/es-abstract/2023/LengthOfArrayLike.js create mode 100644 node_modules/es-abstract/2023/MakeDate.js create mode 100644 node_modules/es-abstract/2023/MakeDay.js create mode 100644 node_modules/es-abstract/2023/MakeMatchIndicesIndexPairArray.js create mode 100644 node_modules/es-abstract/2023/MakeTime.js create mode 100644 node_modules/es-abstract/2023/MinFromTime.js create mode 100644 node_modules/es-abstract/2023/MonthFromTime.js create mode 100644 node_modules/es-abstract/2023/NewPromiseCapability.js create mode 100644 node_modules/es-abstract/2023/NormalCompletion.js create mode 100644 node_modules/es-abstract/2023/Number/add.js create mode 100644 node_modules/es-abstract/2023/Number/bitwiseAND.js create mode 100644 node_modules/es-abstract/2023/Number/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2023/Number/bitwiseOR.js create mode 100644 node_modules/es-abstract/2023/Number/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2023/Number/divide.js create mode 100644 node_modules/es-abstract/2023/Number/equal.js create mode 100644 node_modules/es-abstract/2023/Number/exponentiate.js create mode 100644 node_modules/es-abstract/2023/Number/index.js create mode 100644 node_modules/es-abstract/2023/Number/leftShift.js create mode 100644 node_modules/es-abstract/2023/Number/lessThan.js create mode 100644 node_modules/es-abstract/2023/Number/multiply.js create mode 100644 node_modules/es-abstract/2023/Number/remainder.js create mode 100644 node_modules/es-abstract/2023/Number/sameValue.js create mode 100644 node_modules/es-abstract/2023/Number/sameValueZero.js create mode 100644 node_modules/es-abstract/2023/Number/signedRightShift.js create mode 100644 node_modules/es-abstract/2023/Number/subtract.js create mode 100644 node_modules/es-abstract/2023/Number/toString.js create mode 100644 node_modules/es-abstract/2023/Number/unaryMinus.js create mode 100644 node_modules/es-abstract/2023/Number/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2023/NumberBitwiseOp.js create mode 100644 node_modules/es-abstract/2023/NumberToBigInt.js create mode 100644 node_modules/es-abstract/2023/NumericToRawBytes.js create mode 100644 node_modules/es-abstract/2023/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2023/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2023/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2023/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2023/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2023/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2023/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2023/OrdinaryObjectCreate.js create mode 100644 node_modules/es-abstract/2023/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2023/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2023/ParseHexOctet.js create mode 100644 node_modules/es-abstract/2023/PromiseResolve.js create mode 100644 node_modules/es-abstract/2023/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2023/RawBytesToNumeric.js create mode 100644 node_modules/es-abstract/2023/RegExpCreate.js create mode 100644 node_modules/es-abstract/2023/RegExpExec.js create mode 100644 node_modules/es-abstract/2023/RegExpHasFlag.js create mode 100644 node_modules/es-abstract/2023/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2023/SameValue.js create mode 100644 node_modules/es-abstract/2023/SameValueNonNumber.js create mode 100644 node_modules/es-abstract/2023/SameValueZero.js create mode 100644 node_modules/es-abstract/2023/SecFromTime.js create mode 100644 node_modules/es-abstract/2023/Set.js create mode 100644 node_modules/es-abstract/2023/SetFunctionLength.js create mode 100644 node_modules/es-abstract/2023/SetFunctionName.js create mode 100644 node_modules/es-abstract/2023/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2023/SetTypedArrayFromArrayLike.js create mode 100644 node_modules/es-abstract/2023/SetTypedArrayFromTypedArray.js create mode 100644 node_modules/es-abstract/2023/SetValueInBuffer.js create mode 100644 node_modules/es-abstract/2023/SortIndexedProperties.js create mode 100644 node_modules/es-abstract/2023/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2023/StringCreate.js create mode 100644 node_modules/es-abstract/2023/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2023/StringIndexOf.js create mode 100644 node_modules/es-abstract/2023/StringPad.js create mode 100644 node_modules/es-abstract/2023/StringToBigInt.js create mode 100644 node_modules/es-abstract/2023/StringToCodePoints.js create mode 100644 node_modules/es-abstract/2023/StringToNumber.js create mode 100644 node_modules/es-abstract/2023/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2023/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2023/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2023/TimeClip.js create mode 100644 node_modules/es-abstract/2023/TimeFromYear.js create mode 100644 node_modules/es-abstract/2023/TimeString.js create mode 100644 node_modules/es-abstract/2023/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2023/ToBigInt.js create mode 100644 node_modules/es-abstract/2023/ToBigInt64.js create mode 100644 node_modules/es-abstract/2023/ToBigUint64.js create mode 100644 node_modules/es-abstract/2023/ToBoolean.js create mode 100644 node_modules/es-abstract/2023/ToDateString.js create mode 100644 node_modules/es-abstract/2023/ToIndex.js create mode 100644 node_modules/es-abstract/2023/ToInt16.js create mode 100644 node_modules/es-abstract/2023/ToInt32.js create mode 100644 node_modules/es-abstract/2023/ToInt8.js create mode 100644 node_modules/es-abstract/2023/ToIntegerOrInfinity.js create mode 100644 node_modules/es-abstract/2023/ToLength.js create mode 100644 node_modules/es-abstract/2023/ToNumber.js create mode 100644 node_modules/es-abstract/2023/ToNumeric.js create mode 100644 node_modules/es-abstract/2023/ToObject.js create mode 100644 node_modules/es-abstract/2023/ToPrimitive.js create mode 100644 node_modules/es-abstract/2023/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2023/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2023/ToString.js create mode 100644 node_modules/es-abstract/2023/ToUint16.js create mode 100644 node_modules/es-abstract/2023/ToUint32.js create mode 100644 node_modules/es-abstract/2023/ToUint8.js create mode 100644 node_modules/es-abstract/2023/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2023/ToZeroPaddedDecimalString.js create mode 100644 node_modules/es-abstract/2023/TrimString.js create mode 100644 node_modules/es-abstract/2023/Type.js create mode 100644 node_modules/es-abstract/2023/TypedArrayCreate.js create mode 100644 node_modules/es-abstract/2023/TypedArrayCreateSameType.js create mode 100644 node_modules/es-abstract/2023/TypedArrayElementSize.js create mode 100644 node_modules/es-abstract/2023/TypedArrayElementType.js create mode 100644 node_modules/es-abstract/2023/TypedArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2023/UTF16EncodeCodePoint.js create mode 100644 node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js create mode 100644 node_modules/es-abstract/2023/UnicodeEscape.js create mode 100644 node_modules/es-abstract/2023/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2023/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2023/ValidateIntegerTypedArray.js create mode 100644 node_modules/es-abstract/2023/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2023/WeakRefDeref.js create mode 100644 node_modules/es-abstract/2023/WeekDay.js create mode 100644 node_modules/es-abstract/2023/WordCharacters.js create mode 100644 node_modules/es-abstract/2023/YearFromTime.js create mode 100644 node_modules/es-abstract/2023/abs.js create mode 100644 node_modules/es-abstract/2023/clamp.js create mode 100644 node_modules/es-abstract/2023/floor.js create mode 100644 node_modules/es-abstract/2023/max.js create mode 100644 node_modules/es-abstract/2023/min.js create mode 100644 node_modules/es-abstract/2023/modulo.js create mode 100644 node_modules/es-abstract/2023/msFromTime.js create mode 100644 node_modules/es-abstract/2023/substring.js create mode 100644 node_modules/es-abstract/2023/thisBigIntValue.js create mode 100644 node_modules/es-abstract/2023/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2023/thisNumberValue.js create mode 100644 node_modules/es-abstract/2023/thisStringValue.js create mode 100644 node_modules/es-abstract/2023/thisSymbolValue.js create mode 100644 node_modules/es-abstract/2023/thisTimeValue.js create mode 100644 node_modules/es-abstract/2023/truncate.js create mode 100644 node_modules/es-abstract/5/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/5/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/5/Canonicalize.js create mode 100644 node_modules/es-abstract/5/CheckObjectCoercible.js create mode 100644 node_modules/es-abstract/5/DateFromTime.js create mode 100644 node_modules/es-abstract/5/Day.js create mode 100644 node_modules/es-abstract/5/DayFromYear.js create mode 100644 node_modules/es-abstract/5/DayWithinYear.js create mode 100644 node_modules/es-abstract/5/DaysInYear.js create mode 100644 node_modules/es-abstract/5/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/5/HourFromTime.js create mode 100644 node_modules/es-abstract/5/InLeapYear.js create mode 100644 node_modules/es-abstract/5/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/5/IsCallable.js create mode 100644 node_modules/es-abstract/5/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/5/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/5/IsPropertyDescriptor.js create mode 100644 node_modules/es-abstract/5/MakeDate.js create mode 100644 node_modules/es-abstract/5/MakeDay.js create mode 100644 node_modules/es-abstract/5/MakeTime.js create mode 100644 node_modules/es-abstract/5/MinFromTime.js create mode 100644 node_modules/es-abstract/5/MonthFromTime.js create mode 100644 node_modules/es-abstract/5/SameValue.js create mode 100644 node_modules/es-abstract/5/SecFromTime.js create mode 100644 node_modules/es-abstract/5/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/5/TimeClip.js create mode 100644 node_modules/es-abstract/5/TimeFromYear.js create mode 100644 node_modules/es-abstract/5/TimeWithinDay.js create mode 100644 node_modules/es-abstract/5/ToBoolean.js create mode 100644 node_modules/es-abstract/5/ToInt32.js create mode 100644 node_modules/es-abstract/5/ToInteger.js create mode 100644 node_modules/es-abstract/5/ToNumber.js create mode 100644 node_modules/es-abstract/5/ToObject.js create mode 100644 node_modules/es-abstract/5/ToPrimitive.js create mode 100644 node_modules/es-abstract/5/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/5/ToString.js create mode 100644 node_modules/es-abstract/5/ToUint16.js create mode 100644 node_modules/es-abstract/5/ToUint32.js create mode 100644 node_modules/es-abstract/5/Type.js create mode 100644 node_modules/es-abstract/5/WeekDay.js create mode 100644 node_modules/es-abstract/5/YearFromTime.js create mode 100644 node_modules/es-abstract/5/abs.js create mode 100644 node_modules/es-abstract/5/floor.js create mode 100644 node_modules/es-abstract/5/modulo.js create mode 100644 node_modules/es-abstract/5/msFromTime.js create mode 100644 node_modules/es-abstract/CHANGELOG.md create mode 100644 node_modules/es-abstract/GetIntrinsic.js create mode 100644 node_modules/es-abstract/LICENSE create mode 100644 node_modules/es-abstract/README.md create mode 100644 node_modules/es-abstract/es2015.js create mode 100644 node_modules/es-abstract/es2016.js create mode 100644 node_modules/es-abstract/es2017.js create mode 100644 node_modules/es-abstract/es2018.js create mode 100644 node_modules/es-abstract/es2019.js create mode 100644 node_modules/es-abstract/es2020.js create mode 100644 node_modules/es-abstract/es2021.js create mode 100644 node_modules/es-abstract/es2022.js create mode 100644 node_modules/es-abstract/es2023.js create mode 100644 node_modules/es-abstract/es5.js create mode 100644 node_modules/es-abstract/es6.js create mode 100644 node_modules/es-abstract/es7.js create mode 100644 node_modules/es-abstract/helpers/DefineOwnProperty.js create mode 100644 node_modules/es-abstract/helpers/IsArray.js create mode 100644 node_modules/es-abstract/helpers/OwnPropertyKeys.js create mode 100644 node_modules/es-abstract/helpers/assertRecord.js create mode 100644 node_modules/es-abstract/helpers/assign.js create mode 100644 node_modules/es-abstract/helpers/bytesAsFloat32.js create mode 100644 node_modules/es-abstract/helpers/bytesAsFloat64.js create mode 100644 node_modules/es-abstract/helpers/bytesAsInteger.js create mode 100644 node_modules/es-abstract/helpers/callBind.js create mode 100644 node_modules/es-abstract/helpers/callBound.js create mode 100644 node_modules/es-abstract/helpers/caseFolding.json create mode 100644 node_modules/es-abstract/helpers/defaultEndianness.js create mode 100644 node_modules/es-abstract/helpers/every.js create mode 100644 node_modules/es-abstract/helpers/forEach.js create mode 100644 node_modules/es-abstract/helpers/fractionToBinaryString.js create mode 100644 node_modules/es-abstract/helpers/fromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/helpers/getInferredName.js create mode 100644 node_modules/es-abstract/helpers/getIteratorMethod.js create mode 100644 node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js create mode 100644 node_modules/es-abstract/helpers/getProto.js create mode 100644 node_modules/es-abstract/helpers/getSymbolDescription.js create mode 100644 node_modules/es-abstract/helpers/intToBinaryString.js create mode 100644 node_modules/es-abstract/helpers/integerToNBytes.js create mode 100644 node_modules/es-abstract/helpers/isAbstractClosure.js create mode 100644 node_modules/es-abstract/helpers/isByteValue.js create mode 100644 node_modules/es-abstract/helpers/isCodePoint.js create mode 100644 node_modules/es-abstract/helpers/isFinite.js create mode 100644 node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js create mode 100644 node_modules/es-abstract/helpers/isInteger.js create mode 100644 node_modules/es-abstract/helpers/isLeadingSurrogate.js create mode 100644 node_modules/es-abstract/helpers/isLineTerminator.js create mode 100644 node_modules/es-abstract/helpers/isMatchRecord.js create mode 100644 node_modules/es-abstract/helpers/isNaN.js create mode 100644 node_modules/es-abstract/helpers/isNegativeZero.js create mode 100644 node_modules/es-abstract/helpers/isPrefixOf.js create mode 100644 node_modules/es-abstract/helpers/isPrimitive.js create mode 100644 node_modules/es-abstract/helpers/isPropertyDescriptor.js create mode 100644 node_modules/es-abstract/helpers/isSamePropertyDescriptor.js create mode 100644 node_modules/es-abstract/helpers/isStringOrHole.js create mode 100644 node_modules/es-abstract/helpers/isStringOrUndefined.js create mode 100644 node_modules/es-abstract/helpers/isTrailingSurrogate.js create mode 100644 node_modules/es-abstract/helpers/maxSafeInteger.js create mode 100644 node_modules/es-abstract/helpers/maxValue.js create mode 100644 node_modules/es-abstract/helpers/mod.js create mode 100644 node_modules/es-abstract/helpers/modBigInt.js create mode 100644 node_modules/es-abstract/helpers/padTimeComponent.js create mode 100644 node_modules/es-abstract/helpers/reduce.js create mode 100644 node_modules/es-abstract/helpers/regexTester.js create mode 100644 node_modules/es-abstract/helpers/setProto.js create mode 100644 node_modules/es-abstract/helpers/sign.js create mode 100644 node_modules/es-abstract/helpers/some.js create mode 100644 node_modules/es-abstract/helpers/timeConstants.js create mode 100644 node_modules/es-abstract/helpers/typedArrayConstructors.js create mode 100644 node_modules/es-abstract/helpers/valueToFloat32Bytes.js create mode 100644 node_modules/es-abstract/helpers/valueToFloat64Bytes.js create mode 100644 node_modules/es-abstract/index.js create mode 100644 node_modules/es-abstract/operations/.eslintrc create mode 100644 node_modules/es-abstract/operations/2015.js create mode 100644 node_modules/es-abstract/operations/2016.js create mode 100644 node_modules/es-abstract/operations/2017.js create mode 100644 node_modules/es-abstract/operations/2018.js create mode 100644 node_modules/es-abstract/operations/2019.js create mode 100644 node_modules/es-abstract/operations/2020.js create mode 100644 node_modules/es-abstract/operations/2021.js create mode 100644 node_modules/es-abstract/operations/2022.js create mode 100644 node_modules/es-abstract/operations/2023.js create mode 100644 node_modules/es-abstract/operations/build-unicode.mjs create mode 100644 node_modules/es-abstract/package.json create mode 100644 node_modules/es-set-tostringtag/.eslintrc create mode 100644 node_modules/es-set-tostringtag/CHANGELOG.md create mode 100644 node_modules/es-set-tostringtag/LICENSE create mode 100644 node_modules/es-set-tostringtag/README.md create mode 100644 node_modules/es-set-tostringtag/index.js create mode 100644 node_modules/es-set-tostringtag/package.json create mode 100644 node_modules/es-set-tostringtag/test/index.js create mode 100644 node_modules/es-to-primitive/.eslintrc create mode 100644 node_modules/es-to-primitive/.github/FUNDING.yml create mode 100644 node_modules/es-to-primitive/.travis.yml create mode 100644 node_modules/es-to-primitive/CHANGELOG.md create mode 100644 node_modules/es-to-primitive/LICENSE create mode 100644 node_modules/es-to-primitive/Makefile create mode 100644 node_modules/es-to-primitive/README.md create mode 100644 node_modules/es-to-primitive/es2015.js create mode 100644 node_modules/es-to-primitive/es5.js create mode 100644 node_modules/es-to-primitive/es6.js create mode 100644 node_modules/es-to-primitive/helpers/isPrimitive.js create mode 100644 node_modules/es-to-primitive/index.js create mode 100644 node_modules/es-to-primitive/package.json create mode 100644 node_modules/es-to-primitive/test/es2015.js create mode 100644 node_modules/es-to-primitive/test/es5.js create mode 100644 node_modules/es-to-primitive/test/es6.js create mode 100644 node_modules/es-to-primitive/test/index.js 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/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/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/expand-brackets/LICENSE create mode 100644 node_modules/expand-brackets/README.md create mode 100644 node_modules/expand-brackets/index.js create mode 100644 node_modules/expand-brackets/package.json create mode 100644 node_modules/expand-range/LICENSE create mode 100644 node_modules/expand-range/README.md create mode 100644 node_modules/expand-range/index.js create mode 100644 node_modules/expand-range/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/index.js create mode 100644 node_modules/extglob/package.json create mode 100644 node_modules/filename-regex/LICENSE create mode 100644 node_modules/filename-regex/README.md create mode 100644 node_modules/filename-regex/index.js create mode 100644 node_modules/filename-regex/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/package.json create mode 100644 node_modules/for-each/.editorconfig create mode 100644 node_modules/for-each/.eslintrc create mode 100644 node_modules/for-each/.travis.yml create mode 100644 node_modules/for-each/LICENSE create mode 100644 node_modules/for-each/README.md create mode 100644 node_modules/for-each/index.js create mode 100644 node_modules/for-each/package.json create mode 100644 node_modules/for-each/test/.eslintrc create mode 100644 node_modules/for-each/test/test.js 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/for-own/LICENSE create mode 100644 node_modules/for-own/README.md create mode 100644 node_modules/for-own/index.js create mode 100644 node_modules/for-own/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/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/function-bind/.eslintrc create mode 100644 node_modules/function-bind/.github/FUNDING.yml create mode 100644 node_modules/function-bind/.github/SECURITY.md create mode 100644 node_modules/function-bind/.nycrc create mode 100644 node_modules/function-bind/CHANGELOG.md create mode 100644 node_modules/function-bind/LICENSE create mode 100644 node_modules/function-bind/README.md create mode 100644 node_modules/function-bind/implementation.js create mode 100644 node_modules/function-bind/index.js create mode 100644 node_modules/function-bind/package.json create mode 100644 node_modules/function-bind/test/.eslintrc create mode 100644 node_modules/function-bind/test/index.js create mode 100644 node_modules/function.prototype.name/.editorconfig create mode 100644 node_modules/function.prototype.name/.eslintrc create mode 100644 node_modules/function.prototype.name/.github/FUNDING.yml create mode 100644 node_modules/function.prototype.name/.nycrc create mode 100644 node_modules/function.prototype.name/CHANGELOG.md create mode 100644 node_modules/function.prototype.name/LICENSE create mode 100644 node_modules/function.prototype.name/README.md create mode 100644 node_modules/function.prototype.name/auto.js create mode 100644 node_modules/function.prototype.name/helpers/functionsHaveNames.js create mode 100644 node_modules/function.prototype.name/implementation.js create mode 100644 node_modules/function.prototype.name/index.js create mode 100644 node_modules/function.prototype.name/package.json create mode 100644 node_modules/function.prototype.name/polyfill.js create mode 100644 node_modules/function.prototype.name/shim.js create mode 100644 node_modules/function.prototype.name/test/implementation.js create mode 100644 node_modules/function.prototype.name/test/index.js create mode 100644 node_modules/function.prototype.name/test/shimmed.js create mode 100644 node_modules/function.prototype.name/test/tests.js create mode 100644 node_modules/function.prototype.name/test/uglified.js create mode 100644 node_modules/functions-have-names/.editorconfig create mode 100644 node_modules/functions-have-names/.eslintrc create mode 100644 node_modules/functions-have-names/.github/FUNDING.yml create mode 100644 node_modules/functions-have-names/.nycrc create mode 100644 node_modules/functions-have-names/CHANGELOG.md create mode 100644 node_modules/functions-have-names/LICENSE create mode 100644 node_modules/functions-have-names/README.md create mode 100644 node_modules/functions-have-names/index.js create mode 100644 node_modules/functions-have-names/package.json create mode 100644 node_modules/functions-have-names/test/index.js create mode 100644 node_modules/get-intrinsic/.eslintrc create mode 100644 node_modules/get-intrinsic/.github/FUNDING.yml create mode 100644 node_modules/get-intrinsic/.nycrc create mode 100644 node_modules/get-intrinsic/CHANGELOG.md create mode 100644 node_modules/get-intrinsic/LICENSE create mode 100644 node_modules/get-intrinsic/README.md create mode 100644 node_modules/get-intrinsic/index.js create mode 100644 node_modules/get-intrinsic/package.json create mode 100644 node_modules/get-intrinsic/test/GetIntrinsic.js create mode 100644 node_modules/get-symbol-description/.eslintignore create mode 100644 node_modules/get-symbol-description/.eslintrc create mode 100644 node_modules/get-symbol-description/.github/FUNDING.yml create mode 100644 node_modules/get-symbol-description/.nycrc create mode 100644 node_modules/get-symbol-description/CHANGELOG.md create mode 100644 node_modules/get-symbol-description/LICENSE create mode 100644 node_modules/get-symbol-description/README.md create mode 100644 node_modules/get-symbol-description/getInferredName.js create mode 100644 node_modules/get-symbol-description/index.js create mode 100644 node_modules/get-symbol-description/package.json create mode 100644 node_modules/get-symbol-description/test/index.js 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-base/LICENSE create mode 100644 node_modules/glob-base/README.md create mode 100644 node_modules/glob-base/index.js create mode 100644 node_modules/glob-base/package.json create mode 100644 node_modules/glob-parent/.npmignore create mode 100644 node_modules/glob-parent/.travis.yml 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/package.json create mode 100644 node_modules/glob-parent/test.js create mode 100644 node_modules/globalthis/.eslintrc create mode 100644 node_modules/globalthis/.nycrc create mode 100644 node_modules/globalthis/CHANGELOG.md create mode 100644 node_modules/globalthis/LICENSE create mode 100644 node_modules/globalthis/README.md create mode 100644 node_modules/globalthis/auto.js create mode 100644 node_modules/globalthis/implementation.browser.js create mode 100644 node_modules/globalthis/implementation.js create mode 100644 node_modules/globalthis/index.js create mode 100644 node_modules/globalthis/package.json create mode 100644 node_modules/globalthis/polyfill.js create mode 100644 node_modules/globalthis/shim.js create mode 100644 node_modules/globalthis/test/implementation.js create mode 100644 node_modules/globalthis/test/index.js create mode 100644 node_modules/globalthis/test/native.js create mode 100644 node_modules/globalthis/test/shimmed.js create mode 100644 node_modules/globalthis/test/tests.js create mode 100644 node_modules/gopd/.eslintrc create mode 100644 node_modules/gopd/.github/FUNDING.yml create mode 100644 node_modules/gopd/CHANGELOG.md create mode 100644 node_modules/gopd/LICENSE create mode 100644 node_modules/gopd/README.md create mode 100644 node_modules/gopd/index.js create mode 100644 node_modules/gopd/package.json create mode 100644 node_modules/gopd/test/index.js create mode 100644 node_modules/graceful-fs/LICENSE create mode 100644 node_modules/graceful-fs/README.md create mode 100644 node_modules/graceful-fs/clone.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-ansi/index.js create mode 100644 node_modules/has-ansi/license create mode 100644 node_modules/has-ansi/package.json create mode 100644 node_modules/has-ansi/readme.md create mode 100644 node_modules/has-bigints/.eslintrc create mode 100644 node_modules/has-bigints/.github/FUNDING.yml create mode 100644 node_modules/has-bigints/.nycrc create mode 100644 node_modules/has-bigints/CHANGELOG.md create mode 100644 node_modules/has-bigints/LICENSE create mode 100644 node_modules/has-bigints/README.md create mode 100644 node_modules/has-bigints/index.js create mode 100644 node_modules/has-bigints/package.json create mode 100644 node_modules/has-bigints/test/index.js create mode 100644 node_modules/has-property-descriptors/.eslintrc create mode 100644 node_modules/has-property-descriptors/.github/FUNDING.yml create mode 100644 node_modules/has-property-descriptors/.nycrc create mode 100644 node_modules/has-property-descriptors/CHANGELOG.md create mode 100644 node_modules/has-property-descriptors/LICENSE create mode 100644 node_modules/has-property-descriptors/README.md create mode 100644 node_modules/has-property-descriptors/index.js create mode 100644 node_modules/has-property-descriptors/package.json create mode 100644 node_modules/has-property-descriptors/test/index.js create mode 100644 node_modules/has-proto/.eslintrc create mode 100644 node_modules/has-proto/.github/FUNDING.yml create mode 100644 node_modules/has-proto/CHANGELOG.md create mode 100644 node_modules/has-proto/LICENSE create mode 100644 node_modules/has-proto/README.md create mode 100644 node_modules/has-proto/index.js create mode 100644 node_modules/has-proto/package.json create mode 100644 node_modules/has-proto/test/index.js create mode 100644 node_modules/has-symbols/.eslintrc create mode 100644 node_modules/has-symbols/.github/FUNDING.yml create mode 100644 node_modules/has-symbols/.nycrc create mode 100644 node_modules/has-symbols/CHANGELOG.md create mode 100644 node_modules/has-symbols/LICENSE create mode 100644 node_modules/has-symbols/README.md create mode 100644 node_modules/has-symbols/index.js create mode 100644 node_modules/has-symbols/package.json create mode 100644 node_modules/has-symbols/shams.js create mode 100644 node_modules/has-symbols/test/index.js create mode 100644 node_modules/has-symbols/test/shams/core-js.js create mode 100644 node_modules/has-symbols/test/shams/get-own-property-symbols.js create mode 100644 node_modules/has-symbols/test/tests.js create mode 100644 node_modules/has-tostringtag/.eslintrc create mode 100644 node_modules/has-tostringtag/.github/FUNDING.yml create mode 100644 node_modules/has-tostringtag/CHANGELOG.md create mode 100644 node_modules/has-tostringtag/LICENSE create mode 100644 node_modules/has-tostringtag/README.md create mode 100644 node_modules/has-tostringtag/index.js create mode 100644 node_modules/has-tostringtag/package.json create mode 100644 node_modules/has-tostringtag/shams.js create mode 100644 node_modules/has-tostringtag/test/index.js create mode 100644 node_modules/has-tostringtag/test/shams/core-js.js create mode 100644 node_modules/has-tostringtag/test/shams/get-own-property-symbols.js create mode 100644 node_modules/has-tostringtag/test/tests.js 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/node_modules/isobject/LICENSE create mode 100644 node_modules/has-value/node_modules/isobject/README.md create mode 100644 node_modules/has-value/node_modules/isobject/index.d.ts create mode 100644 node_modules/has-value/node_modules/isobject/index.js create mode 100644 node_modules/has-value/node_modules/isobject/package.json 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/is-number/LICENSE create mode 100644 node_modules/has-values/node_modules/is-number/README.md create mode 100644 node_modules/has-values/node_modules/is-number/index.js create mode 100644 node_modules/has-values/node_modules/is-number/node_modules/kind-of/LICENSE create mode 100644 node_modules/has-values/node_modules/is-number/node_modules/kind-of/README.md create mode 100644 node_modules/has-values/node_modules/is-number/node_modules/kind-of/index.js create mode 100644 node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json create mode 100644 node_modules/has-values/node_modules/is-number/package.json 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/hasown/.eslintrc create mode 100644 node_modules/hasown/.github/FUNDING.yml create mode 100644 node_modules/hasown/.nycrc create mode 100644 node_modules/hasown/CHANGELOG.md create mode 100644 node_modules/hasown/LICENSE create mode 100644 node_modules/hasown/README.md create mode 100644 node_modules/hasown/index.d.ts create mode 100644 node_modules/hasown/index.d.ts.map create mode 100644 node_modules/hasown/index.js create mode 100644 node_modules/hasown/package.json create mode 100644 node_modules/hasown/tsconfig.json create mode 100644 node_modules/hosted-git-info/CHANGELOG.md 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/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/internal-slot/.editorconfig create mode 100644 node_modules/internal-slot/.eslintrc create mode 100644 node_modules/internal-slot/.github/FUNDING.yml create mode 100644 node_modules/internal-slot/.nycrc create mode 100644 node_modules/internal-slot/CHANGELOG.md create mode 100644 node_modules/internal-slot/LICENSE create mode 100644 node_modules/internal-slot/README.md create mode 100644 node_modules/internal-slot/index.js create mode 100644 node_modules/internal-slot/package.json create mode 100644 node_modules/internal-slot/test/index.js create mode 100644 node_modules/is-accessor-descriptor/.editorconfig create mode 100644 node_modules/is-accessor-descriptor/.eslintrc create mode 100644 node_modules/is-accessor-descriptor/.github/FUNDING.yml create mode 100644 node_modules/is-accessor-descriptor/.nycrc create mode 100644 node_modules/is-accessor-descriptor/CHANGELOG.md 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-accessor-descriptor/test/index.js create mode 100644 node_modules/is-array-buffer/.eslintrc create mode 100644 node_modules/is-array-buffer/.github/FUNDING.yml create mode 100644 node_modules/is-array-buffer/.nycrc create mode 100644 node_modules/is-array-buffer/CHANGELOG.md create mode 100644 node_modules/is-array-buffer/LICENSE create mode 100644 node_modules/is-array-buffer/README.md create mode 100644 node_modules/is-array-buffer/index.js create mode 100644 node_modules/is-array-buffer/package.json create mode 100644 node_modules/is-array-buffer/test/index.js 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-bigint/.eslintignore create mode 100644 node_modules/is-bigint/.eslintrc create mode 100644 node_modules/is-bigint/.github/FUNDING.yml create mode 100644 node_modules/is-bigint/.nycrc create mode 100644 node_modules/is-bigint/CHANGELOG.md create mode 100644 node_modules/is-bigint/LICENSE create mode 100644 node_modules/is-bigint/README.md create mode 100644 node_modules/is-bigint/index.js create mode 100644 node_modules/is-bigint/package.json create mode 100644 node_modules/is-bigint/test/index.js 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-boolean-object/.editorconfig create mode 100644 node_modules/is-boolean-object/.eslintignore create mode 100644 node_modules/is-boolean-object/.eslintrc create mode 100644 node_modules/is-boolean-object/.github/FUNDING.yml create mode 100644 node_modules/is-boolean-object/.nycrc create mode 100644 node_modules/is-boolean-object/CHANGELOG.md create mode 100644 node_modules/is-boolean-object/LICENSE create mode 100644 node_modules/is-boolean-object/README.md create mode 100644 node_modules/is-boolean-object/index.js create mode 100644 node_modules/is-boolean-object/package.json create mode 100644 node_modules/is-boolean-object/test/index.js 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-callable/.editorconfig create mode 100644 node_modules/is-callable/.eslintrc create mode 100644 node_modules/is-callable/.github/FUNDING.yml create mode 100644 node_modules/is-callable/.nycrc create mode 100644 node_modules/is-callable/CHANGELOG.md create mode 100644 node_modules/is-callable/LICENSE create mode 100644 node_modules/is-callable/README.md create mode 100644 node_modules/is-callable/index.js create mode 100644 node_modules/is-callable/package.json create mode 100644 node_modules/is-callable/test/index.js create mode 100644 node_modules/is-core-module/.eslintrc create mode 100644 node_modules/is-core-module/.nycrc create mode 100644 node_modules/is-core-module/CHANGELOG.md create mode 100644 node_modules/is-core-module/LICENSE create mode 100644 node_modules/is-core-module/README.md create mode 100644 node_modules/is-core-module/core.json create mode 100644 node_modules/is-core-module/index.js create mode 100644 node_modules/is-core-module/package.json create mode 100644 node_modules/is-core-module/test/index.js create mode 100644 node_modules/is-data-descriptor/.editorconfig create mode 100644 node_modules/is-data-descriptor/.eslintrc create mode 100644 node_modules/is-data-descriptor/.github/FUNDING.yml create mode 100644 node_modules/is-data-descriptor/.nycrc create mode 100644 node_modules/is-data-descriptor/CHANGELOG.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-data-descriptor/test/index.js create mode 100644 node_modules/is-date-object/.editorconfig create mode 100644 node_modules/is-date-object/.eslintignore create mode 100644 node_modules/is-date-object/.eslintrc create mode 100644 node_modules/is-date-object/.github/FUNDING.yml create mode 100644 node_modules/is-date-object/.nycrc create mode 100644 node_modules/is-date-object/CHANGELOG.md create mode 100644 node_modules/is-date-object/LICENSE create mode 100644 node_modules/is-date-object/README.md create mode 100644 node_modules/is-date-object/index.js create mode 100644 node_modules/is-date-object/package.json create mode 100644 node_modules/is-date-object/test/index.js create mode 100644 node_modules/is-descriptor/.editorconfig create mode 100644 node_modules/is-descriptor/.eslintrc create mode 100644 node_modules/is-descriptor/.gitattributes create mode 100644 node_modules/is-descriptor/.github/FUNDING.yml create mode 100644 node_modules/is-descriptor/.nycrc create mode 100644 node_modules/is-descriptor/CHANGELOG.md 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-descriptor/test/index.js create mode 100644 node_modules/is-dotfile/LICENSE create mode 100644 node_modules/is-dotfile/README.md create mode 100644 node_modules/is-dotfile/index.js create mode 100644 node_modules/is-dotfile/package.json create mode 100644 node_modules/is-equal-shallow/LICENSE create mode 100644 node_modules/is-equal-shallow/README.md create mode 100644 node_modules/is-equal-shallow/index.js create mode 100644 node_modules/is-equal-shallow/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-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-negative-zero/.editorconfig create mode 100644 node_modules/is-negative-zero/.eslintignore create mode 100644 node_modules/is-negative-zero/.eslintrc create mode 100644 node_modules/is-negative-zero/.github/FUNDING.yml create mode 100644 node_modules/is-negative-zero/.nycrc create mode 100644 node_modules/is-negative-zero/CHANGELOG.md create mode 100644 node_modules/is-negative-zero/LICENSE create mode 100644 node_modules/is-negative-zero/README.md create mode 100644 node_modules/is-negative-zero/index.js create mode 100644 node_modules/is-negative-zero/package.json create mode 100644 node_modules/is-negative-zero/test/index.js create mode 100644 node_modules/is-number-object/.editorconfig create mode 100644 node_modules/is-number-object/.eslintrc create mode 100644 node_modules/is-number-object/.github/FUNDING.yml create mode 100644 node_modules/is-number-object/.nycrc create mode 100644 node_modules/is-number-object/CHANGELOG.md create mode 100644 node_modules/is-number-object/LICENSE create mode 100644 node_modules/is-number-object/README.md create mode 100644 node_modules/is-number-object/index.js create mode 100644 node_modules/is-number-object/package.json create mode 100644 node_modules/is-number-object/test/index.js 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/package.json 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/node_modules/isobject/LICENSE create mode 100644 node_modules/is-plain-object/node_modules/isobject/README.md create mode 100644 node_modules/is-plain-object/node_modules/isobject/index.d.ts create mode 100644 node_modules/is-plain-object/node_modules/isobject/index.js create mode 100644 node_modules/is-plain-object/node_modules/isobject/package.json create mode 100644 node_modules/is-plain-object/package.json create mode 100644 node_modules/is-posix-bracket/LICENSE create mode 100644 node_modules/is-posix-bracket/README.md create mode 100644 node_modules/is-posix-bracket/index.js create mode 100644 node_modules/is-posix-bracket/package.json create mode 100644 node_modules/is-primitive/LICENSE create mode 100644 node_modules/is-primitive/README.md create mode 100644 node_modules/is-primitive/index.js create mode 100644 node_modules/is-primitive/package.json create mode 100644 node_modules/is-regex/.editorconfig create mode 100644 node_modules/is-regex/.eslintignore create mode 100644 node_modules/is-regex/.eslintrc create mode 100644 node_modules/is-regex/.nycrc create mode 100644 node_modules/is-regex/CHANGELOG.md create mode 100644 node_modules/is-regex/LICENSE create mode 100644 node_modules/is-regex/README.md create mode 100644 node_modules/is-regex/index.js create mode 100644 node_modules/is-regex/package.json create mode 100644 node_modules/is-regex/test/index.js create mode 100644 node_modules/is-shared-array-buffer/.eslintignore create mode 100644 node_modules/is-shared-array-buffer/.eslintrc create mode 100644 node_modules/is-shared-array-buffer/.github/FUNDING.yml create mode 100644 node_modules/is-shared-array-buffer/.nycrc create mode 100644 node_modules/is-shared-array-buffer/CHANGELOG.md create mode 100644 node_modules/is-shared-array-buffer/LICENSE create mode 100644 node_modules/is-shared-array-buffer/README.md create mode 100644 node_modules/is-shared-array-buffer/index.js create mode 100644 node_modules/is-shared-array-buffer/package.json create mode 100644 node_modules/is-shared-array-buffer/test/index.js create mode 100644 node_modules/is-string/.eslintignore create mode 100644 node_modules/is-string/.eslintrc create mode 100644 node_modules/is-string/.github/FUNDING.yml create mode 100644 node_modules/is-string/.nycrc create mode 100644 node_modules/is-string/CHANGELOG.md create mode 100644 node_modules/is-string/LICENSE create mode 100644 node_modules/is-string/README.md create mode 100644 node_modules/is-string/index.js create mode 100644 node_modules/is-string/package.json create mode 100644 node_modules/is-string/test/index.js create mode 100644 node_modules/is-symbol/.editorconfig create mode 100644 node_modules/is-symbol/.eslintignore create mode 100644 node_modules/is-symbol/.eslintrc create mode 100644 node_modules/is-symbol/.github/FUNDING.yml create mode 100644 node_modules/is-symbol/.nycrc create mode 100644 node_modules/is-symbol/CHANGELOG.md create mode 100644 node_modules/is-symbol/LICENSE create mode 100644 node_modules/is-symbol/README.md create mode 100644 node_modules/is-symbol/index.js create mode 100644 node_modules/is-symbol/package.json create mode 100644 node_modules/is-symbol/test/index.js create mode 100644 node_modules/is-typed-array/.editorconfig create mode 100644 node_modules/is-typed-array/.eslintrc create mode 100644 node_modules/is-typed-array/.github/FUNDING.yml create mode 100644 node_modules/is-typed-array/.nycrc create mode 100644 node_modules/is-typed-array/CHANGELOG.md create mode 100644 node_modules/is-typed-array/LICENSE create mode 100644 node_modules/is-typed-array/README.md create mode 100644 node_modules/is-typed-array/index.js create mode 100644 node_modules/is-typed-array/package.json create mode 100644 node_modules/is-typed-array/test/index.js create mode 100644 node_modules/is-utf8/LICENSE create mode 100644 node_modules/is-utf8/README.md create mode 100644 node_modules/is-utf8/is-utf8.js create mode 100644 node_modules/is-utf8/package.json create mode 100644 node_modules/is-weakref/.eslintignore create mode 100644 node_modules/is-weakref/.eslintrc create mode 100644 node_modules/is-weakref/.github/FUNDING.yml create mode 100644 node_modules/is-weakref/.nycrc create mode 100644 node_modules/is-weakref/CHANGELOG.md create mode 100644 node_modules/is-weakref/LICENSE create mode 100644 node_modules/is-weakref/README.md create mode 100644 node_modules/is-weakref/index.js create mode 100644 node_modules/is-weakref/package.json create mode 100644 node_modules/is-weakref/test/index.js 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.js create mode 100644 node_modules/isobject/package.json 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/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/load-json-file/index.js create mode 100644 node_modules/load-json-file/license 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/longest/LICENSE create mode 100644 node_modules/longest/README.md create mode 100644 node_modules/longest/index.js create mode 100644 node_modules/longest/package.json 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/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/math-random/.travis.yml create mode 100644 node_modules/math-random/browser.js create mode 100644 node_modules/math-random/node.js create mode 100644 node_modules/math-random/package.json create mode 100644 node_modules/math-random/readme.md create mode 100644 node_modules/math-random/test.js create mode 100755 node_modules/micromatch/LICENSE create mode 100644 node_modules/micromatch/README.md create mode 100755 node_modules/micromatch/index.js create mode 100644 node_modules/micromatch/lib/chars.js create mode 100644 node_modules/micromatch/lib/expand.js create mode 100644 node_modules/micromatch/lib/glob.js create mode 100644 node_modules/micromatch/lib/utils.js create mode 100644 node_modules/micromatch/package.json 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/.eslintrc create mode 100644 node_modules/minimist/.github/FUNDING.yml create mode 100644 node_modules/minimist/.nycrc create mode 100644 node_modules/minimist/CHANGELOG.md create mode 100644 node_modules/minimist/LICENSE create mode 100644 node_modules/minimist/README.md 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/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/proto.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/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/cache.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 100755 node_modules/nanomatch/node_modules/arr-diff/LICENSE create mode 100644 node_modules/nanomatch/node_modules/arr-diff/README.md create mode 100644 node_modules/nanomatch/node_modules/arr-diff/index.js create mode 100644 node_modules/nanomatch/node_modules/arr-diff/package.json create mode 100755 node_modules/nanomatch/node_modules/array-unique/LICENSE create mode 100755 node_modules/nanomatch/node_modules/array-unique/README.md create mode 100644 node_modules/nanomatch/node_modules/array-unique/index.js create mode 100644 node_modules/nanomatch/node_modules/array-unique/package.json create mode 100644 node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md create mode 100644 node_modules/nanomatch/node_modules/kind-of/LICENSE create mode 100644 node_modules/nanomatch/node_modules/kind-of/README.md create mode 100644 node_modules/nanomatch/node_modules/kind-of/index.js create mode 100644 node_modules/nanomatch/node_modules/kind-of/package.json create mode 100644 node_modules/nanomatch/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-all/LICENSE create mode 100644 node_modules/npm-run-all/README.md create mode 100644 node_modules/npm-run-all/bin/help.js create mode 100644 node_modules/npm-run-all/bin/main.js create mode 100755 node_modules/npm-run-all/bin/npm-run-all.js create mode 100644 node_modules/npm-run-all/bin/version.js create mode 100644 node_modules/npm-run-all/index.js create mode 100644 node_modules/npm-run-all/lib/create-header.js create mode 100644 node_modules/npm-run-all/lib/create-prefix-transform-stream.js create mode 100644 node_modules/npm-run-all/lib/match-tasks.js create mode 100644 node_modules/npm-run-all/lib/npm-run-all.js create mode 100644 node_modules/npm-run-all/lib/read-package-json.js create mode 100644 node_modules/npm-run-all/lib/run-task.js create mode 100644 node_modules/npm-run-all/lib/run-tasks-in-parallel.js create mode 100644 node_modules/npm-run-all/lib/run-tasks-in-sequencial.js create mode 100644 node_modules/npm-run-all/lib/spawn-posix.js create mode 100644 node_modules/npm-run-all/lib/spawn-win32.js create mode 100644 node_modules/npm-run-all/lib/spawn.js create mode 100644 node_modules/npm-run-all/package.json 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-descriptor/.editorconfig create mode 100644 node_modules/object-copy/node_modules/is-descriptor/.eslintrc create mode 100644 node_modules/object-copy/node_modules/is-descriptor/.gitattributes create mode 100644 node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml create mode 100644 node_modules/object-copy/node_modules/is-descriptor/.nycrc create mode 100644 node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md 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/package.json create mode 100644 node_modules/object-copy/node_modules/is-descriptor/test/index.js create mode 100644 node_modules/object-copy/package.json create mode 100644 node_modules/object-inspect/.eslintrc create mode 100644 node_modules/object-inspect/.github/FUNDING.yml create mode 100644 node_modules/object-inspect/.nycrc create mode 100644 node_modules/object-inspect/CHANGELOG.md create mode 100644 node_modules/object-inspect/LICENSE create mode 100644 node_modules/object-inspect/example/all.js create mode 100644 node_modules/object-inspect/example/circular.js create mode 100644 node_modules/object-inspect/example/fn.js create mode 100644 node_modules/object-inspect/example/inspect.js create mode 100644 node_modules/object-inspect/index.js create mode 100644 node_modules/object-inspect/package-support.json create mode 100644 node_modules/object-inspect/package.json create mode 100644 node_modules/object-inspect/readme.markdown create mode 100644 node_modules/object-inspect/test-core-js.js create mode 100644 node_modules/object-inspect/test/bigint.js create mode 100644 node_modules/object-inspect/test/browser/dom.js create mode 100644 node_modules/object-inspect/test/circular.js create mode 100644 node_modules/object-inspect/test/deep.js create mode 100644 node_modules/object-inspect/test/element.js create mode 100644 node_modules/object-inspect/test/err.js create mode 100644 node_modules/object-inspect/test/fakes.js create mode 100644 node_modules/object-inspect/test/fn.js create mode 100644 node_modules/object-inspect/test/global.js create mode 100644 node_modules/object-inspect/test/has.js create mode 100644 node_modules/object-inspect/test/holes.js create mode 100644 node_modules/object-inspect/test/indent-option.js create mode 100644 node_modules/object-inspect/test/inspect.js create mode 100644 node_modules/object-inspect/test/lowbyte.js create mode 100644 node_modules/object-inspect/test/number.js create mode 100644 node_modules/object-inspect/test/quoteStyle.js create mode 100644 node_modules/object-inspect/test/toStringTag.js create mode 100644 node_modules/object-inspect/test/undef.js create mode 100644 node_modules/object-inspect/test/values.js create mode 100644 node_modules/object-inspect/util.inspect.js create mode 100644 node_modules/object-keys/.editorconfig create mode 100644 node_modules/object-keys/.eslintrc create mode 100644 node_modules/object-keys/.travis.yml create mode 100644 node_modules/object-keys/CHANGELOG.md create mode 100644 node_modules/object-keys/LICENSE create mode 100644 node_modules/object-keys/README.md create mode 100644 node_modules/object-keys/implementation.js create mode 100644 node_modules/object-keys/index.js create mode 100644 node_modules/object-keys/isArguments.js create mode 100644 node_modules/object-keys/package.json create mode 100644 node_modules/object-keys/test/index.js 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/node_modules/isobject/LICENSE create mode 100644 node_modules/object-visit/node_modules/isobject/README.md create mode 100644 node_modules/object-visit/node_modules/isobject/index.d.ts create mode 100644 node_modules/object-visit/node_modules/isobject/index.js create mode 100644 node_modules/object-visit/node_modules/isobject/package.json create mode 100644 node_modules/object-visit/package.json create mode 100644 node_modules/object.assign/.editorconfig create mode 100644 node_modules/object.assign/.eslintrc create mode 100644 node_modules/object.assign/.github/FUNDING.yml create mode 100644 node_modules/object.assign/.nycrc create mode 100644 node_modules/object.assign/CHANGELOG.md create mode 100644 node_modules/object.assign/LICENSE create mode 100644 node_modules/object.assign/README.md create mode 100644 node_modules/object.assign/auto.js create mode 100644 node_modules/object.assign/dist/browser.js create mode 100644 node_modules/object.assign/hasSymbols.js create mode 100644 node_modules/object.assign/implementation.js create mode 100644 node_modules/object.assign/index.js create mode 100644 node_modules/object.assign/package.json create mode 100644 node_modules/object.assign/polyfill.js create mode 100644 node_modules/object.assign/shim.js create mode 100644 node_modules/object.assign/test/implementation.js create mode 100644 node_modules/object.assign/test/index.js create mode 100644 node_modules/object.assign/test/native.js create mode 100644 node_modules/object.assign/test/ses-compat.js create mode 100644 node_modules/object.assign/test/shimmed.js create mode 100644 node_modules/object.assign/test/tests.js create mode 100644 node_modules/object.omit/LICENSE create mode 100644 node_modules/object.omit/README.md create mode 100644 node_modules/object.omit/index.js create mode 100644 node_modules/object.omit/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/node_modules/isobject/LICENSE create mode 100644 node_modules/object.pick/node_modules/isobject/README.md create mode 100644 node_modules/object.pick/node_modules/isobject/index.d.ts create mode 100644 node_modules/object.pick/node_modules/isobject/index.js create mode 100644 node_modules/object.pick/node_modules/isobject/package.json create mode 100644 node_modules/object.pick/package.json create mode 100644 node_modules/onchange/.npmignore create mode 100644 node_modules/onchange/README.md create mode 100755 node_modules/onchange/cli.js create mode 100644 node_modules/onchange/index.d.ts create mode 100644 node_modules/onchange/index.js create mode 100644 node_modules/onchange/package.json create mode 100644 node_modules/onchange/test/__test__/file.txt create mode 100644 node_modules/onchange/test/__test__/out.txt create mode 100644 node_modules/onchange/test/index.js create mode 100644 node_modules/onchange/test/slow.js create mode 100644 node_modules/parse-glob/LICENSE create mode 100644 node_modules/parse-glob/README.md create mode 100644 node_modules/parse-glob/index.js create mode 100644 node_modules/parse-glob/package.json 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/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-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-parse/LICENSE 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/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/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/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/pinkie-promise/index.js create mode 100644 node_modules/pinkie-promise/license create mode 100644 node_modules/pinkie-promise/package.json create mode 100644 node_modules/pinkie-promise/readme.md create mode 100644 node_modules/pinkie/index.js create mode 100644 node_modules/pinkie/license create mode 100644 node_modules/pinkie/package.json create mode 100644 node_modules/pinkie/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/preserve/.gitattributes create mode 100644 node_modules/preserve/.jshintrc create mode 100644 node_modules/preserve/.npmignore create mode 100644 node_modules/preserve/.travis.yml create mode 100644 node_modules/preserve/.verb.md create mode 100644 node_modules/preserve/LICENSE create mode 100644 node_modules/preserve/README.md create mode 100644 node_modules/preserve/index.js create mode 100644 node_modules/preserve/package.json create mode 100644 node_modules/preserve/test.js 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/ps-tree/CHANGELOG.md create mode 100644 node_modules/ps-tree/LICENSE create mode 100644 node_modules/ps-tree/README.md create mode 100755 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/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/randomatic/LICENSE create mode 100644 node_modules/randomatic/README.md create mode 100644 node_modules/randomatic/index.js create mode 100644 node_modules/randomatic/node_modules/is-number/LICENSE create mode 100644 node_modules/randomatic/node_modules/is-number/README.md create mode 100644 node_modules/randomatic/node_modules/is-number/index.js create mode 100644 node_modules/randomatic/node_modules/is-number/package.json create mode 100644 node_modules/randomatic/node_modules/kind-of/CHANGELOG.md create mode 100644 node_modules/randomatic/node_modules/kind-of/LICENSE create mode 100644 node_modules/randomatic/node_modules/kind-of/README.md create mode 100644 node_modules/randomatic/node_modules/kind-of/index.js create mode 100644 node_modules/randomatic/node_modules/kind-of/package.json create mode 100644 node_modules/randomatic/package.json 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/LICENSE create mode 100644 node_modules/readdirp/README.md create mode 100755 node_modules/readdirp/node_modules/arr-diff/LICENSE create mode 100644 node_modules/readdirp/node_modules/arr-diff/README.md create mode 100644 node_modules/readdirp/node_modules/arr-diff/index.js create mode 100644 node_modules/readdirp/node_modules/arr-diff/package.json create mode 100755 node_modules/readdirp/node_modules/array-unique/LICENSE create mode 100755 node_modules/readdirp/node_modules/array-unique/README.md create mode 100644 node_modules/readdirp/node_modules/array-unique/index.js create mode 100644 node_modules/readdirp/node_modules/array-unique/package.json create mode 100644 node_modules/readdirp/node_modules/braces/LICENSE create mode 100644 node_modules/readdirp/node_modules/braces/README.md create mode 100644 node_modules/readdirp/node_modules/braces/index.js create mode 100644 node_modules/readdirp/node_modules/braces/lib/braces.js create mode 100644 node_modules/readdirp/node_modules/braces/lib/compilers.js create mode 100644 node_modules/readdirp/node_modules/braces/lib/parsers.js create mode 100644 node_modules/readdirp/node_modules/braces/lib/utils.js create mode 100644 node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/README.md create mode 100644 node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/index.js create mode 100644 node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json create mode 100644 node_modules/readdirp/node_modules/braces/package.json create mode 100644 node_modules/readdirp/node_modules/expand-brackets/LICENSE create mode 100644 node_modules/readdirp/node_modules/expand-brackets/README.md create mode 100644 node_modules/readdirp/node_modules/expand-brackets/changelog.md create mode 100644 node_modules/readdirp/node_modules/expand-brackets/index.js create mode 100644 node_modules/readdirp/node_modules/expand-brackets/lib/compilers.js create mode 100644 node_modules/readdirp/node_modules/expand-brackets/lib/parsers.js create mode 100644 node_modules/readdirp/node_modules/expand-brackets/lib/utils.js create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/LICENSE create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/README.md create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/index.js create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/package.json create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/README.md create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/index.js create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/package.json create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.editorconfig create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.eslintrc create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.gitattributes create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.github/FUNDING.yml create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.nycrc create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/CHANGELOG.md create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/README.md create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/index.js create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/package.json create mode 100644 node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/test/index.js create mode 100644 node_modules/readdirp/node_modules/expand-brackets/package.json create mode 100644 node_modules/readdirp/node_modules/extglob/LICENSE create mode 100644 node_modules/readdirp/node_modules/extglob/README.md create mode 100644 node_modules/readdirp/node_modules/extglob/changelog.md create mode 100644 node_modules/readdirp/node_modules/extglob/index.js create mode 100644 node_modules/readdirp/node_modules/extglob/lib/.DS_Store create mode 100644 node_modules/readdirp/node_modules/extglob/lib/compilers.js create mode 100644 node_modules/readdirp/node_modules/extglob/lib/extglob.js create mode 100644 node_modules/readdirp/node_modules/extglob/lib/parsers.js create mode 100644 node_modules/readdirp/node_modules/extglob/lib/utils.js create mode 100644 node_modules/readdirp/node_modules/extglob/node_modules/define-property/LICENSE create mode 100644 node_modules/readdirp/node_modules/extglob/node_modules/define-property/README.md create mode 100644 node_modules/readdirp/node_modules/extglob/node_modules/define-property/index.js create mode 100644 node_modules/readdirp/node_modules/extglob/node_modules/define-property/package.json create mode 100644 node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/README.md create mode 100644 node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/index.js create mode 100644 node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/package.json create mode 100644 node_modules/readdirp/node_modules/extglob/package.json create mode 100644 node_modules/readdirp/node_modules/fill-range/LICENSE create mode 100644 node_modules/readdirp/node_modules/fill-range/README.md create mode 100644 node_modules/readdirp/node_modules/fill-range/index.js create mode 100644 node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/README.md create mode 100644 node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/index.js create mode 100644 node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json create mode 100644 node_modules/readdirp/node_modules/fill-range/package.json create mode 100644 node_modules/readdirp/node_modules/is-number/LICENSE create mode 100644 node_modules/readdirp/node_modules/is-number/README.md create mode 100644 node_modules/readdirp/node_modules/is-number/index.js create mode 100644 node_modules/readdirp/node_modules/is-number/node_modules/kind-of/LICENSE create mode 100644 node_modules/readdirp/node_modules/is-number/node_modules/kind-of/README.md create mode 100644 node_modules/readdirp/node_modules/is-number/node_modules/kind-of/index.js create mode 100644 node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json create mode 100644 node_modules/readdirp/node_modules/is-number/package.json create mode 100644 node_modules/readdirp/node_modules/isobject/LICENSE create mode 100644 node_modules/readdirp/node_modules/isobject/README.md create mode 100644 node_modules/readdirp/node_modules/isobject/index.d.ts create mode 100644 node_modules/readdirp/node_modules/isobject/index.js create mode 100644 node_modules/readdirp/node_modules/isobject/package.json create mode 100644 node_modules/readdirp/node_modules/kind-of/CHANGELOG.md create mode 100644 node_modules/readdirp/node_modules/kind-of/LICENSE create mode 100644 node_modules/readdirp/node_modules/kind-of/README.md create mode 100644 node_modules/readdirp/node_modules/kind-of/index.js create mode 100644 node_modules/readdirp/node_modules/kind-of/package.json create mode 100644 node_modules/readdirp/node_modules/micromatch/CHANGELOG.md create mode 100755 node_modules/readdirp/node_modules/micromatch/LICENSE create mode 100644 node_modules/readdirp/node_modules/micromatch/README.md create mode 100644 node_modules/readdirp/node_modules/micromatch/index.js create mode 100644 node_modules/readdirp/node_modules/micromatch/lib/.DS_Store create mode 100644 node_modules/readdirp/node_modules/micromatch/lib/cache.js create mode 100644 node_modules/readdirp/node_modules/micromatch/lib/compilers.js create mode 100644 node_modules/readdirp/node_modules/micromatch/lib/parsers.js create mode 100644 node_modules/readdirp/node_modules/micromatch/lib/utils.js create mode 100644 node_modules/readdirp/node_modules/micromatch/package.json 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/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-cache/LICENSE create mode 100644 node_modules/regex-cache/README.md create mode 100644 node_modules/regex-cache/index.js create mode 100644 node_modules/regex-cache/package.json 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/regexp.prototype.flags/.editorconfig create mode 100644 node_modules/regexp.prototype.flags/.eslintrc create mode 100644 node_modules/regexp.prototype.flags/.nycrc create mode 100644 node_modules/regexp.prototype.flags/CHANGELOG.md create mode 100644 node_modules/regexp.prototype.flags/LICENSE create mode 100644 node_modules/regexp.prototype.flags/README.md create mode 100644 node_modules/regexp.prototype.flags/auto.js create mode 100644 node_modules/regexp.prototype.flags/implementation.js create mode 100644 node_modules/regexp.prototype.flags/index.js create mode 100644 node_modules/regexp.prototype.flags/package.json create mode 100644 node_modules/regexp.prototype.flags/polyfill.js create mode 100644 node_modules/regexp.prototype.flags/shim.js create mode 100644 node_modules/regexp.prototype.flags/test/implementation.js create mode 100644 node_modules/regexp.prototype.flags/test/index.js create mode 100644 node_modules/regexp.prototype.flags/test/shimmed.js create mode 100644 node_modules/regexp.prototype.flags/test/tests.js 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/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/.eslintrc create mode 100644 node_modules/resolve/.github/FUNDING.yml create mode 100644 node_modules/resolve/LICENSE create mode 100644 node_modules/resolve/SECURITY.md create mode 100644 node_modules/resolve/async.js create mode 100755 node_modules/resolve/bin/resolve 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/homedir.js create mode 100644 node_modules/resolve/lib/is-core.js create mode 100644 node_modules/resolve/lib/node-modules-paths.js create mode 100644 node_modules/resolve/lib/normalize-options.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/sync.js 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/home_paths.js create mode 100644 node_modules/resolve/test/home_paths_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/browser_field/a.js create mode 100644 node_modules/resolve/test/resolver/browser_field/b.js create mode 100644 node_modules/resolve/test/resolver/browser_field/package.json 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/false_main/index.js create mode 100644 node_modules/resolve/test/resolver/false_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/invalid_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/multirepo/lerna.json create mode 100644 node_modules/resolve/test/resolver/multirepo/package.json create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.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/_/node_modules/foo.js create mode 100644 node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep create mode 100644 node_modules/resolve/test/resolver/symlinked/package/bar.js create mode 100644 node_modules/resolve/test/resolver/symlinked/package/package.json 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/shadowed_core.js create mode 100644 node_modules/resolve/test/shadowed_core/node_modules/util/index.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/right-align/LICENSE create mode 100644 node_modules/right-align/README.md create mode 100644 node_modules/right-align/index.js create mode 100644 node_modules/right-align/package.json create mode 100644 node_modules/safe-array-concat/.eslintrc create mode 100644 node_modules/safe-array-concat/.github/FUNDING.yml create mode 100644 node_modules/safe-array-concat/.nycrc create mode 100644 node_modules/safe-array-concat/CHANGELOG.md create mode 100644 node_modules/safe-array-concat/LICENSE create mode 100644 node_modules/safe-array-concat/README.md create mode 100644 node_modules/safe-array-concat/index.js create mode 100644 node_modules/safe-array-concat/node_modules/isarray/LICENSE create mode 100644 node_modules/safe-array-concat/node_modules/isarray/README.md create mode 100644 node_modules/safe-array-concat/node_modules/isarray/index.js create mode 100644 node_modules/safe-array-concat/node_modules/isarray/package.json create mode 100644 node_modules/safe-array-concat/package.json create mode 100644 node_modules/safe-array-concat/test/index.js 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.d.ts create mode 100644 node_modules/safe-buffer/index.js create mode 100644 node_modules/safe-buffer/package.json create mode 100644 node_modules/safe-regex-test/.eslintrc create mode 100644 node_modules/safe-regex-test/.github/FUNDING.yml create mode 100644 node_modules/safe-regex-test/CHANGELOG.md create mode 100644 node_modules/safe-regex-test/LICENSE create mode 100644 node_modules/safe-regex-test/README.md create mode 100644 node_modules/safe-regex-test/index.js create mode 100644 node_modules/safe-regex-test/package.json create mode 100644 node_modules/safe-regex-test/test/index.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/LICENSE create mode 100644 node_modules/semver/README.md create mode 100755 node_modules/semver/bin/semver create mode 100644 node_modules/semver/package.json create mode 100644 node_modules/semver/range.bnf create mode 100644 node_modules/semver/semver.js create mode 100644 node_modules/set-function-length/.eslintrc create mode 100644 node_modules/set-function-length/.github/FUNDING.yml create mode 100644 node_modules/set-function-length/.nycrc create mode 100644 node_modules/set-function-length/CHANGELOG.md create mode 100644 node_modules/set-function-length/LICENSE create mode 100644 node_modules/set-function-length/README.md create mode 100644 node_modules/set-function-length/env.js create mode 100644 node_modules/set-function-length/index.js create mode 100644 node_modules/set-function-length/package.json create mode 100644 node_modules/set-function-name/.eslintrc create mode 100644 node_modules/set-function-name/.github/FUNDING.yml create mode 100644 node_modules/set-function-name/CHANGELOG.md create mode 100644 node_modules/set-function-name/LICENSE create mode 100644 node_modules/set-function-name/README.md create mode 100644 node_modules/set-function-name/index.js create mode 100644 node_modules/set-function-name/package.json 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/shell-quote/.eslintrc create mode 100644 node_modules/shell-quote/.github/FUNDING.yml create mode 100644 node_modules/shell-quote/.nycrc create mode 100644 node_modules/shell-quote/CHANGELOG.md create mode 100644 node_modules/shell-quote/LICENSE create mode 100644 node_modules/shell-quote/README.md create mode 100644 node_modules/shell-quote/example/env.js create mode 100644 node_modules/shell-quote/example/op.js create mode 100644 node_modules/shell-quote/example/parse.js create mode 100644 node_modules/shell-quote/example/quote.js create mode 100644 node_modules/shell-quote/index.js create mode 100644 node_modules/shell-quote/package.json create mode 100644 node_modules/shell-quote/parse.js create mode 100644 node_modules/shell-quote/quote.js create mode 100644 node_modules/shell-quote/security.md create mode 100644 node_modules/shell-quote/test/comment.js create mode 100644 node_modules/shell-quote/test/env.js create mode 100644 node_modules/shell-quote/test/env_fn.js create mode 100644 node_modules/shell-quote/test/op.js create mode 100644 node_modules/shell-quote/test/parse.js create mode 100644 node_modules/shell-quote/test/quote.js create mode 100644 node_modules/shell-quote/test/set.js create mode 100644 node_modules/side-channel/.eslintignore create mode 100644 node_modules/side-channel/.eslintrc create mode 100644 node_modules/side-channel/.github/FUNDING.yml create mode 100644 node_modules/side-channel/.nycrc create mode 100644 node_modules/side-channel/CHANGELOG.md create mode 100644 node_modules/side-channel/LICENSE create mode 100644 node_modules/side-channel/README.md create mode 100644 node_modules/side-channel/index.js create mode 100644 node_modules/side-channel/package.json create mode 100644 node_modules/side-channel/test/index.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/node_modules/isobject/LICENSE create mode 100644 node_modules/snapdragon-node/node_modules/isobject/README.md create mode 100644 node_modules/snapdragon-node/node_modules/isobject/index.d.ts create mode 100644 node_modules/snapdragon-node/node_modules/isobject/index.js create mode 100644 node_modules/snapdragon-node/node_modules/isobject/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/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-descriptor/.editorconfig create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/.eslintrc create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/.gitattributes create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/.nycrc create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md 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/is-descriptor/test/index.js create mode 100644 node_modules/snapdragon/package.json create mode 100644 node_modules/source-map-resolve/LICENSE create mode 100644 node_modules/source-map-resolve/changelog.md 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-url/LICENSE create mode 100644 node_modules/source-map-url/changelog.md 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/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-descriptor/.editorconfig create mode 100644 node_modules/static-extend/node_modules/is-descriptor/.eslintrc create mode 100644 node_modules/static-extend/node_modules/is-descriptor/.gitattributes create mode 100644 node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml create mode 100644 node_modules/static-extend/node_modules/is-descriptor/.nycrc create mode 100644 node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md 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/is-descriptor/test/index.js create mode 100644 node_modules/static-extend/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.prototype.padend/.editorconfig create mode 100644 node_modules/string.prototype.padend/.eslintrc create mode 100644 node_modules/string.prototype.padend/.nycrc create mode 100644 node_modules/string.prototype.padend/CHANGELOG.md create mode 100644 node_modules/string.prototype.padend/LICENSE create mode 100644 node_modules/string.prototype.padend/README.md create mode 100644 node_modules/string.prototype.padend/auto.js create mode 100644 node_modules/string.prototype.padend/implementation.js create mode 100644 node_modules/string.prototype.padend/index.js create mode 100644 node_modules/string.prototype.padend/package.json create mode 100644 node_modules/string.prototype.padend/polyfill.js create mode 100644 node_modules/string.prototype.padend/shim.js create mode 100644 node_modules/string.prototype.padend/test/.eslintrc create mode 100644 node_modules/string.prototype.padend/test/implementation.js create mode 100644 node_modules/string.prototype.padend/test/index.js create mode 100644 node_modules/string.prototype.padend/test/shimmed.js create mode 100644 node_modules/string.prototype.padend/test/tests.js create mode 100644 node_modules/string.prototype.trim/.editorconfig create mode 100644 node_modules/string.prototype.trim/.eslintrc create mode 100644 node_modules/string.prototype.trim/.nycrc create mode 100644 node_modules/string.prototype.trim/CHANGELOG.md create mode 100644 node_modules/string.prototype.trim/LICENSE create mode 100644 node_modules/string.prototype.trim/README.md create mode 100644 node_modules/string.prototype.trim/auto.js create mode 100644 node_modules/string.prototype.trim/implementation.js create mode 100644 node_modules/string.prototype.trim/index.js create mode 100644 node_modules/string.prototype.trim/package.json create mode 100644 node_modules/string.prototype.trim/polyfill.js create mode 100644 node_modules/string.prototype.trim/shim.js create mode 100644 node_modules/string.prototype.trim/test/implementation.js create mode 100644 node_modules/string.prototype.trim/test/index.js create mode 100644 node_modules/string.prototype.trim/test/shimmed.js create mode 100644 node_modules/string.prototype.trim/test/tests.js create mode 100644 node_modules/string.prototype.trimend/.editorconfig create mode 100644 node_modules/string.prototype.trimend/.eslintrc create mode 100644 node_modules/string.prototype.trimend/.nycrc create mode 100644 node_modules/string.prototype.trimend/CHANGELOG.md create mode 100644 node_modules/string.prototype.trimend/LICENSE create mode 100644 node_modules/string.prototype.trimend/README.md create mode 100644 node_modules/string.prototype.trimend/auto.js create mode 100644 node_modules/string.prototype.trimend/implementation.js create mode 100644 node_modules/string.prototype.trimend/index.js create mode 100644 node_modules/string.prototype.trimend/package.json create mode 100644 node_modules/string.prototype.trimend/polyfill.js create mode 100644 node_modules/string.prototype.trimend/shim.js create mode 100644 node_modules/string.prototype.trimend/test/implementation.js create mode 100644 node_modules/string.prototype.trimend/test/index.js create mode 100644 node_modules/string.prototype.trimend/test/shimmed.js create mode 100644 node_modules/string.prototype.trimend/test/tests.js create mode 100644 node_modules/string.prototype.trimstart/.editorconfig create mode 100644 node_modules/string.prototype.trimstart/.eslintrc create mode 100644 node_modules/string.prototype.trimstart/.nycrc create mode 100644 node_modules/string.prototype.trimstart/CHANGELOG.md create mode 100644 node_modules/string.prototype.trimstart/LICENSE create mode 100644 node_modules/string.prototype.trimstart/README.md create mode 100644 node_modules/string.prototype.trimstart/auto.js create mode 100644 node_modules/string.prototype.trimstart/implementation.js create mode 100644 node_modules/string.prototype.trimstart/index.js create mode 100644 node_modules/string.prototype.trimstart/package.json create mode 100644 node_modules/string.prototype.trimstart/polyfill.js create mode 100644 node_modules/string.prototype.trimstart/shim.js create mode 100644 node_modules/string.prototype.trimstart/test/implementation.js create mode 100644 node_modules/string.prototype.trimstart/test/index.js create mode 100644 node_modules/string.prototype.trimstart/test/shimmed.js create mode 100644 node_modules/string.prototype.trimstart/test/tests.js create mode 100644 node_modules/string_decoder/.travis.yml 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/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/supports-preserve-symlinks-flag/.eslintrc create mode 100644 node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml create mode 100644 node_modules/supports-preserve-symlinks-flag/.nycrc create mode 100644 node_modules/supports-preserve-symlinks-flag/CHANGELOG.md create mode 100644 node_modules/supports-preserve-symlinks-flag/LICENSE create mode 100644 node_modules/supports-preserve-symlinks-flag/README.md create mode 100644 node_modules/supports-preserve-symlinks-flag/browser.js create mode 100644 node_modules/supports-preserve-symlinks-flag/index.js create mode 100644 node_modules/supports-preserve-symlinks-flag/package.json create mode 100644 node_modules/supports-preserve-symlinks-flag/test/index.js 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/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/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/node_modules/is-number/LICENSE create mode 100644 node_modules/to-regex-range/node_modules/is-number/README.md create mode 100644 node_modules/to-regex-range/node_modules/is-number/index.js create mode 100644 node_modules/to-regex-range/node_modules/is-number/package.json 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/typed-array-buffer/.eslintrc create mode 100644 node_modules/typed-array-buffer/.github/FUNDING.yml create mode 100644 node_modules/typed-array-buffer/.nycrc create mode 100644 node_modules/typed-array-buffer/CHANGELOG.md create mode 100644 node_modules/typed-array-buffer/LICENSE create mode 100644 node_modules/typed-array-buffer/README.md create mode 100644 node_modules/typed-array-buffer/index.js create mode 100644 node_modules/typed-array-buffer/package.json create mode 100644 node_modules/typed-array-buffer/test/index.js create mode 100644 node_modules/typed-array-byte-length/.eslintrc create mode 100644 node_modules/typed-array-byte-length/.github/FUNDING.yml create mode 100644 node_modules/typed-array-byte-length/.nycrc create mode 100644 node_modules/typed-array-byte-length/CHANGELOG.md create mode 100644 node_modules/typed-array-byte-length/LICENSE create mode 100644 node_modules/typed-array-byte-length/README.md create mode 100644 node_modules/typed-array-byte-length/index.js create mode 100644 node_modules/typed-array-byte-length/package.json create mode 100644 node_modules/typed-array-byte-length/test/index.js create mode 100644 node_modules/typed-array-byte-offset/.eslintrc create mode 100644 node_modules/typed-array-byte-offset/.github/FUNDING.yml create mode 100644 node_modules/typed-array-byte-offset/.nycrc create mode 100644 node_modules/typed-array-byte-offset/CHANGELOG.md create mode 100644 node_modules/typed-array-byte-offset/LICENSE create mode 100644 node_modules/typed-array-byte-offset/README.md create mode 100644 node_modules/typed-array-byte-offset/index.js create mode 100644 node_modules/typed-array-byte-offset/package.json create mode 100644 node_modules/typed-array-byte-offset/test/index.js create mode 100644 node_modules/typed-array-length/.eslintrc create mode 100644 node_modules/typed-array-length/.github/FUNDING.yml create mode 100644 node_modules/typed-array-length/.nycrc create mode 100644 node_modules/typed-array-length/CHANGELOG.md create mode 100644 node_modules/typed-array-length/LICENSE create mode 100644 node_modules/typed-array-length/README.md create mode 100644 node_modules/typed-array-length/index.js create mode 100644 node_modules/typed-array-length/package.json create mode 100644 node_modules/typed-array-length/test/index.js create mode 100644 node_modules/uglify-js/LICENSE create mode 100644 node_modules/uglify-js/README.md create mode 100644 node_modules/uglify-js/bin/extract-props.js create mode 100755 node_modules/uglify-js/bin/uglifyjs create mode 100644 node_modules/uglify-js/lib/ast.js create mode 100644 node_modules/uglify-js/lib/compress.js create mode 100644 node_modules/uglify-js/lib/mozilla-ast.js create mode 100644 node_modules/uglify-js/lib/output.js create mode 100644 node_modules/uglify-js/lib/parse.js create mode 100644 node_modules/uglify-js/lib/propmangle.js create mode 100644 node_modules/uglify-js/lib/scope.js create mode 100644 node_modules/uglify-js/lib/sourcemap.js create mode 100644 node_modules/uglify-js/lib/transform.js create mode 100644 node_modules/uglify-js/lib/utils.js create mode 100644 node_modules/uglify-js/package.json create mode 100644 node_modules/uglify-js/tools/domprops.json create mode 100644 node_modules/uglify-js/tools/exports.js create mode 100644 node_modules/uglify-js/tools/node.js create mode 100644 node_modules/uglify-js/tools/props.html create mode 100644 node_modules/uglify-to-browserify/.npmignore create mode 100644 node_modules/uglify-to-browserify/.travis.yml create mode 100644 node_modules/uglify-to-browserify/LICENSE create mode 100644 node_modules/uglify-to-browserify/README.md create mode 100644 node_modules/uglify-to-browserify/index.js create mode 100644 node_modules/uglify-to-browserify/package.json create mode 100644 node_modules/uglify-to-browserify/test/index.js create mode 100644 node_modules/unbox-primitive/.editorconfig create mode 100644 node_modules/unbox-primitive/.eslintrc create mode 100644 node_modules/unbox-primitive/.github/FUNDING.yml create mode 100644 node_modules/unbox-primitive/.nycrc create mode 100644 node_modules/unbox-primitive/CHANGELOG.md create mode 100644 node_modules/unbox-primitive/LICENSE create mode 100644 node_modules/unbox-primitive/README.md create mode 100644 node_modules/unbox-primitive/index.js create mode 100644 node_modules/unbox-primitive/package.json create mode 100644 node_modules/unbox-primitive/test/index.js 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/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/node_modules/isobject/LICENSE create mode 100644 node_modules/unset-value/node_modules/isobject/README.md create mode 100644 node_modules/unset-value/node_modules/isobject/index.d.ts create mode 100644 node_modules/unset-value/node_modules/isobject/index.js create mode 100644 node_modules/unset-value/node_modules/isobject/package.json create mode 100644 node_modules/unset-value/package.json 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/use/LICENSE create mode 100644 node_modules/use/README.md create mode 100644 node_modules/use/index.js create mode 100644 node_modules/use/package.json 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/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/which-boxed-primitive/.editorconfig create mode 100644 node_modules/which-boxed-primitive/.eslintignore create mode 100644 node_modules/which-boxed-primitive/.eslintrc create mode 100644 node_modules/which-boxed-primitive/.github/FUNDING.yml create mode 100644 node_modules/which-boxed-primitive/.nycrc create mode 100644 node_modules/which-boxed-primitive/CHANGELOG.md create mode 100644 node_modules/which-boxed-primitive/LICENSE create mode 100644 node_modules/which-boxed-primitive/README.md create mode 100644 node_modules/which-boxed-primitive/index.js create mode 100644 node_modules/which-boxed-primitive/package.json create mode 100644 node_modules/which-boxed-primitive/test/index.js create mode 100644 node_modules/which-typed-array/.editorconfig create mode 100644 node_modules/which-typed-array/.eslintrc create mode 100644 node_modules/which-typed-array/.github/FUNDING.yml create mode 100644 node_modules/which-typed-array/.nycrc create mode 100644 node_modules/which-typed-array/CHANGELOG.md create mode 100644 node_modules/which-typed-array/LICENSE create mode 100644 node_modules/which-typed-array/README.md create mode 100644 node_modules/which-typed-array/index.js create mode 100644 node_modules/which-typed-array/package.json create mode 100644 node_modules/which-typed-array/test/index.js 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/window-size/LICENSE-MIT create mode 100644 node_modules/window-size/README.md create mode 100644 node_modules/window-size/index.js create mode 100644 node_modules/window-size/package.json create mode 100644 node_modules/wordwrap/.npmignore create mode 100644 node_modules/wordwrap/README.markdown create mode 100644 node_modules/wordwrap/example/center.js create mode 100644 node_modules/wordwrap/example/meat.js create mode 100644 node_modules/wordwrap/index.js create mode 100644 node_modules/wordwrap/package.json create mode 100644 node_modules/wordwrap/test/break.js create mode 100644 node_modules/wordwrap/test/idleness.txt create mode 100644 node_modules/wordwrap/test/wrap.js 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/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/completion.js create mode 100644 node_modules/yargs/lib/parser.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/package.json create mode 100644 package-lock.json diff --git a/_config.yml b/_config.yml index 1dc605cc6e928..5a88d72f489d5 100644 --- a/_config.yml +++ b/_config.yml @@ -7,13 +7,13 @@ # Site Settings locale : "en-US" -title : "Your Name / Site Title" +title : "Zian(Andy) Zheng's Homepage" title_separator : "-" -name : &name "Your Name" +name : &name "Zian(Andy) Zheng" description : &description "personal description" -url : https://academicpages.github.io # the base hostname & protocol for your site e.g. "https://mmistakes.github.io" +url : https://orion-zheng.github.io/ # the base hostname & protocol for your site e.g. "https://mmistakes.github.io" baseurl : "" # the subpath of your site, e.g. "/blog" -repository : "academicpages/academicpages.github.io" +repository : "Orion-Zheng/Orion-Zheng.github.io" teaser : # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png" breadcrumbs : false # true, false (default) words_per_minute : 160 @@ -80,15 +80,15 @@ analytics: # Site Author author: - name : "Your Sidebar Name" - avatar : "profile.png" - bio : "Your biography for the left-hand sidebar" - location : "Location" + name : "Zian(Andy) Zheng" + avatar : "avatar.png" + bio : "Master Student at HPC-AI Lab, NUS" + location : "Singapore" employer : - pubmed : "https://www.ncbi.nlm.nih.gov/pubmed/?term=john+snow" - googlescholar : "http://yourfullgooglescholarurl.com" - email : - researchgate : # example: "https://www.researchgate.net/profile/yourprofile" + pubmed : + googlescholar : + email : "zheng_zian@u.nus.edu" + researchgate : uri : bitbucket : codepen : @@ -96,20 +96,20 @@ author: flickr : facebook : foursquare : - github : "academicpages" + github : "Orion-Zheng" google_plus : keybase : instagram : - impactstory : #"https://profiles.impactstory.org/u/xxxx-xxxx-xxxx-xxxx" + impactstory : lastfm : - linkedin : - orcid : "http://orcid.org/yourorcidurl" + linkedin : "zian-andy-zheng" + orcid : pinterest : soundcloud : - stackoverflow : # http://stackoverflow.com/users/123456/username + stackoverflow : steam : tumblr : - twitter : "replacethistwitterhandle" + twitter : "zian_andy_zheng" vine : weibo : xing : diff --git a/images/avatar.jpeg b/images/avatar.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..716988a1ad7f61fa4b29f3be0844b462fba58850 GIT binary patch literal 119810 zcmeFZbyQqUx<1-?AOwO-kPsk9ixXESJhK*J$paRJgop;ON&d11K{8Q0LkYK@U#l} zDduKj3INE-0q6k$zzYB(95DdtIrm%yAO!d3zw_d7v;c%ZkHZ51!4?3-zn77JPXDma z&+k9#{4GU^0sv5+_Yhgw*jS_C{+5S>M*w90*Kt-BmQ1+6xAU8x#=KwN2@AayaN~2cwzD>I zGJNZ1{nf^i&rR^%pN;c9=l?j&{O;|aMVzbz-)YJzz7?@`FnPh5&VPj@vV|*^b=;&_aWa!3d<4E~mEr^;p z8ar6nIa%1+y#1p^LnB*fC&72`n4f=v`R_mRNA|zZRp{-1>^~m(j|cwaf&X~mKOXpx z2mb%(f&XDUCN|F$$Mu=Z0G@sUuwEdzJa2GV0C+4o1T46xP5}8cJwt-~)BeV!p7-Gq z5Rs5kUZA4Ad@fM^8UPQ6fB=t(fP{qj%lx`w8fw(%De zQ!{f5OGhVX7gslTkM9A2LBSzELStg%!0`!*Ny*tcxsW_)enDYHWmR=eZC!msdq-zi zcTaC$|MuPh|hkfcgI=Wd9B9e{jtML;&!A8Uppd%*Ab=<^bpjaL*SL0v13R0K8}Ut$+rg zeJ1UG|DR0|o<{#oaE$$%;28fm!7=e~f@AXE1jp3B36AN16CAMr1srhf!?bYb|Kb5k z_j%e^Qi+y5wWH7_e#2tkc^cp!ehMUDCGLM0;EJk zyWHC-PjR!<wj*D?fX$yUY%iGbkBVYy@^Hb%=ts|8>Mf_~~CYMj?*yK)k;q(m$ll5OT(u z71ihFOks<+!5l7%pw!e(ve|0~J;W8#1oo&alsvSq@O-DbnuV5-_YFBkuejy2y$2iL z1O*XvFa!j}IUYG+LfqYmkFYHGF9p%{@OWuzMFgE`{D1Rjf2?c)z$>7w*RE^z;OkVB*0q1loM zewjA5?D(Zpwut>m1CN7_HTQ9af&m?jm3eW6kfW`tikLO_>b164%S0PKY8|QSY4q~; zi=;_d7Cee(wgR zr?X*r)pDg1TMA4wB@yu8jc-K{XU}SH=6;G5>qXfjn;Hs<%dw2+qZMasqWWOMUXR*- zxm_Rx?&JGCE+@JZK_=#oJtzC>r|~4lhszRt;Qs31jIE*y6Q{pGqA7JgQX7D zW=0WKmfhfq zb-YZ{wvsT`ScN?Hga}Yt6fN=#jF7bpz98g5Zm6@&J>_{Zoqsg^^$x3Jos_odot)UE zAceLZA01N;Hr*MlaJ!&KJ6xi+qj5|_gR|qF`1he6DJWv(YO~nBw*+T{-IkD7-#+w` zYKbW(yvi(X;8GhTqk{Z!CK7q=2-ClvUr_VzT4@!sb3_Gz-mnF3^gZ zU7gjGYu`ea^~i7)GeRTy}05Zwc1q?a`R^S*Gyxc{#g_X zj*T63VUVfG4RA@XDlIddK|PcU2_EW9ArF6C_UKcss@L*Lc6?{!sh<0y_?2{w=c~M+ z0TKraEj&%~V}NfOeN;F&H#A_Az^!r+GWx*l=xlF+6*KH){Qf4F|J#Tnn_F2#yur6L zDV2z|=?3jj^ zX?S)wG{F&~^|~$VKdYxcHz7}dnvTg|tk6eA7`-mD2{K0O8_#HX7$L4PpjViaSkf1< zF$t9A%a&E=VH?js;xi`K-Yim2PPNC14|B{;BdY5Uh%Ym|Gv~Ul?AEN%CFevvOrLVM zmX{S>xr)yZ@6He;l(Hoy@-CyP65f@%kA4C$5~O;Id6aj_$5x9ST?_OCN61+;d*aKE zE_OA%*Lr=2rKemZUu;X@n5LY@>)GEE`k)%KEH?grS~O@*v+eA?K@)kVfmia4KCM!g z6ij|G=}MQMS3N&}?s}1ob455TfonXCyzA5JTH}Gm7rfZ4ZR!AHsJ#JsN0Xs@6BmuC zw~%}L@3k@sC)YW-17FMsTie{(-b096NJ5Pkw-Mcl8tKo)qCJ+W9Pk!aj@&)i<;-k& zjZUBgi9S~UQSf1GpNun1B}_K?2_S|Ji}pEV;UjGhIRfsSH#n=&COZ_&FW>!iqpqBS+PhfWZ2~3b z#AR7(`x?DClvDm%_73gBkXD-%FImWM)VX@H>LM-VoRXg$B|P%9tYx5*T0bUb(Z)+$ z7_c*CuOkRbWnCYIRS(Uap-cf3;XWV%aQ~?Z+|xgc&LfbkG+J?MsiCgd`dXf|&Ln)2 zmLk0o;431)A5a{@Td<-x7S88v<{K+P;z?A6&?|373myJq7STD^)9jyi1+uVH=A@Mk zPyenSTo%yP-`ZcWC<(puUWmXLh*B1%`h1Phx~}!PoXzRh(tNBGh!J;Na4-N`smF?L z=8II)V=HhyIx>7=as0J+>HK9{xTHWSpRaUqnEDJP$aN~+c3ltKD(A5*chI_wLh*Dx zx6yrOW&{P|mG15Dm@sX394}*FK)G8XYZTy9rlrq(!mINHz&4OsZL}q^P!D&0#q-VE z9OGrrSdYFmNX%}H)tM$R$XHzH!H0U$nLpn!i$wM(r^(U4s*g8Dc2B1d@u`1LZW{~8 zJ$C4I?ER<&WqQteY2vz_d*IJgmsr?fyPJSI65pAI%#pwmyYEUQQ4?{=LIOTPdHH)I z>8#(c?SG9(-@3Ku8AO8l#+ytQuIGdJkqeb0avMpHgPI(nmhs|yE;<%MqhmD>D@cUO zsOxwaL@u`SB|`4z$G2omhF~?QkXm8+?&uKdr1VKYsG{^E$@kEEG&VJ(RJ{oy^TG0Dq8#S9x&l4Vu3Ak9)R=r{^PgXSjCyPGB?o(A=W!<=q=qR$`0{`v#KhmLuvLbO^4 zv~b>#S|j}+Rv?i-`)LHKD|UagxrR_FN5pO5%af~mXk zVnX&|nWe1($07|=(Q10f{kyUCuSoe)b0+`P&xw9N%)o8Min2p|P3{Ky5p*2O#+z~5aYA0}9ljrVR zBzi`kl&ERZ z53|OwT}h28$C$hc$&L5Yl~*C0`Gu*}wtWi|)T~#1+$eTZi8FrL&Q0yEkIb!{b6sQk+PjUnK-JV8$ApT^F|*Zqt$C zG?VqQwLl5qDMKmOCgPs`_l2$UZgq%u@)i50k7=DWo`q_&<~cKEWbM!TiAy-)dBX-P z$XRX(t)#qX?7qGz1wAKcGWhrUbZU+=IYLCs*E18s#!HEI>z7gJ9-_t!;wWIC*&qR zRAR%>()4p;Gp@7@5(z){V4X`9YtE*XWW-GsXV@RbyFVX#(?n)1&7|orzPCMT^b?QT zatxdn=~{VeBm&iz$;M=xee<<|*xy*`I&#y%HE0Oe;^S(K&V1JCO?YE+Zgb1AEj#qP z!O2oNPDh?47JEN$csNV%LtB}au^o7Aia7M(Ed3>(xYSfo4`rd{Z`w*xJu;qSlTZUj z+*ItkZF@nho=&4vJ1HgIA@=F4zz!Mh(!LC4x3guLM9xWdVdGY5SZ0NQ_#! zN9e|4wiK(%3a;Jdq{qCPt|O`h+S$=^O4saI+XNdm230nzBR!y;x1iRJiTBa2X8FZQ zWab1|_b!}=pRJ|s3w%`uyTm2~vNp3WdVVCYD^8S@Srfj%i!1nbKeGbcsZZdPR!S3$ z4Ei;fruE4)wKQo>P=CwaNzXd!-KQRYi9rcq@;R+3p6PQJ_Qk{5j${04QbPqOeyUf9 zJHZ4Mtw~DRb|wt>|M>oA`n*<^}{S%^3$g$CFZMhGA z#R(LtoeO+dchgvkdIaL1@JYV)oew$j_rMb#{2m7x5 z#9E}x6lKIu4B1qFe!QZ#bqf{g2-S=No?=Gnh^f5g-e0FJttP8C*{8@!M(JK(ip9QA zNSEIREqsRI+y8(B*U-mt>R39P#96AhkQG;X?$}YT1yvSm_jvNs|4hpxtk-Yu!CNn- zC{d@+ZEzB#iBX2qyePR#H8~sx=kMG4Fd^l}e%pGLiGDtU+!Q)xp;k7WR_cLUpc;tx zQokFNv=(-ZV!%DKMGzm8u1JRA0n^7}EBIF6VVlHGA`eekr=49Xo)z;Zk@}P=jIzT= zH$D(^U__o>kIB+vEuUYeeCPmzoUf`8=@>udrL=ZG6*f?pJT(^DYiym1)h*{<7d}8l zRq{S*Sp+U9%r#HNhijqrTYA)zj~rs9$FcgBR%bZOR~Z32rp|E zJA&6o!~wcSyfFRMVp2|&^wIblQ#W+~Y8qNUa-fplQ~n@$DmV2zLnzpjqci9gS}Wt( zIuGyeu7OgF=~;o?>YnstWXjN4Z+CVH(w@oQT(mFVh%;dfM^peM&-xp0Z>y2cb>@h; z_ym5I84VKp@DNT<8Gg@P{P7<;X2W&8D7+6lUHRfN-~~6c_Ze(I&G}MknG6#T*_Z)m znAHM|ZfAWm`Q^B26XN{4wLg4vno8N$mnrzwQ*fwnZQx*;?U^T$S}#%D=Gh z@|4DlY3a*=Y&PkQ1aFo|HQJ0Bh@O~rG9%su3A#yM*E-Tk;BR|08Ixcw*wLRP2^q() zsZ$792rY(mn!1sAqkNJc7`%wYb{ihOu{>IH!+vFwGtXJ+b6CI5jMdl8zttQ*z!~r} zCUxC1(z$jik{K?(pC`W?yP30c`N)hj%MB_wc9CzxP))lb5dzeVCt=yc^Qm8JI>5J3 z!2BqU$DG&W!pxjzS;`KzWxHS6@u8aV8S|wi0(mt$*tP04xAHBn+07IRT(V*f z#E5Is|0H)6lqzkK=VH%}ix1``0Y*slkFZQzzpHRfk?Rdrx>k_B9kec3QoRx^W^=4E zbswzdezT;}`*y8~o9oi7gb-*hfl=brO5wtT2(kpbm*)0|d*oD&G0#cLMh$IL0(8{NL23CnqJ-RBx-!5h|U2#!%^%JCn8#U)v+2u=XKC5fvcbq|( zt8RxmS<>ZX;E1UP(=``bh8|Kd5gsqr84J~oOovY0Zfzvt?mBc2w&r4AjTe_(xg@Yr zwkiuEIU5#2k#i3QfgP&jK*6O9q|9%Wri~H<(jItkvBJmGJS=0v)tlQnXbzbf!;&?A z*f4Mcy~W2goFr^8Kk-NQ=b%KUq4gJg5d3KWR81q7o>97|P9_jYC1a1AV;wJHgBNU{ z0d4kn;l`2S$W1l2D1{EK+Fi2UHa2!$@G}RrVmSlN-;ZAgVSj{&tB<6|B;3v??{EH% zw?@v3V%QBVq%Asc`JydiZHT(eGelS?fAvpJ<#}4!k8L8ggbmrR zO~eN9R~BJRszPUpt7jYn{}xqwAxUcfkFIk4)ny;_wLf~o&n#cU$*TO6{jNDQU1>R+ zN2wq^q~FnDz#Ns_p($-|Bjd%$*E*(}HWYTe9a-Iiw`JV8r<2V)QtYE045SJ!_U1j! zr^w}y56so10=goT111SQ_H6a%hq#mMR+>HQ{WL3$#6?8+;r!r3bmIpJ=owv>u& zHF!{(Xk7HIpSPHC&>E4EN+7NEBC!!0;p!Y%%0@Rr)%G;v^0b4^(g;E_i3F6`Tm_PFHcEO|(T*6njp$ogED1+FaYz60iJ*j* z<5JVtR-D+@8%Uv>vIS#x+IuO+97?CCnhU_?VV8q%v0D?4UFSrThP8agrR%Hks*_8G zWyex$WmxCj$AoqmmTWB=`pH1ly+>3NtVFq5z~s$JZrZh;0uu+lA^kiNX^q(rOST&o zrBg%?=f|cPnXi&umAvXMJS(h%z|F#`w#m*yHKU82*$dSIqpXjUP{z9)iO!|h(;WHu z=fAkeXO?uaD7B$|W$<2`%u=Bu>p5lLdIdFY45 zV=0(2HQ9u%-I_&Ea>r9qcNOTPeaBe z8i{McrH#}l$6Jc%fXQmqz;6;(Gfi_$?xpc-8@FK9Qaj>s_9(J+U{3)H>CoC|zd%Lo z)M*q4X#y9~cyI@0eW{|&bjY)Uv-7k1&P4>K<`k3K1HZd~#_NV-koepCZ^?Hg@84Cy zrt&6aPfu~_#O~elB86M0m@=n^GxDut4S}0*ZDiR^mQ$N(EyGZeafm!NbVPR3`DMu5 zxaPPbl=p>4q~&=zCr)7Ya6hXT%zSN<{XNN6Q=SL1Y$E6r^c?DNEtY7r{zFLFLNB`C zsv|!k1m%V5LuTx-qfWPnrf$I45a~Gw!H+cAdsYAClcIajCT5=&TYaE_2tE( zqSj0D3uo*sTV{~p4m@?bWR~hVO0Q#MwJGvp+G9zlk%XB{z)BRHLASs5=vnO+zj?W-~#7y$^CoRo+`B^o!u;y7t{l;@#=1bz*~Ui>7XJvQFIN z#qeb2$7lCEF;=vi1HIc_zus)6MZZg(>RRwm0o?hM_!fn)JX(Qg*9cj`TFZix3Zt_72&rz03Ckrf)?DLf5NT$dVcZn0J}2S|1A_T_Hy5AP zzL9^_1^=9%Q`eh*UZ|}BQ9DO0o0Yd)C7kZOv98_`uI1Qojpt8=duJBTwU|R5=vFs3 z+U}Vc_&lmMD;S_kYl26DeTMCK$5Lyuau#k}b_L8<3gWj$-x9b0QnQ~Gf%0n|Ex?ho z@A3Fn3^?>Id}h>Z{ud2vUy(r^ITL zfi#PzY&ci4)1evW`phr^W}BacpBuhyx>Nl~3`X~ijgq>9eGeQ48dCHhOkD|vi|feX z0G9?KYs^?$ZlMw_?lp4sw>B{=C;aFh8py_BK}`Bn&GJq7WSVY;7Uu3#8x*VQc%Nkd+a7^X2 zd^2{e1wbCS3=hwmT zeuPBd)Ya$qNADDo=Peo8+qaa71x$jWzT<&31WtpSh*L>Bb2bHJWsp8whuivqpdXRC z7>Q*LAV&4v$))@=%hg5tA3esoqg9W#he}p+EaVn`>sBNvBpbw+6%A^))9-@zPX!j* zA=D_+HG>z7G~LPcR=#uGcUqM(EAARNnZo-Th|WSuWqCO%ikgvD%4ubd=K_35&Ke@K z6KRJPXM)$Fr>03oI*`S*k>nU2aTNc$_2m0hd{^;8m4I3yexf)vC=IHF@mO@w0!YI0 zp0Ikr$*V~I%G5ar)uz<62d)O;qLhJstB5ayvgmcaMLRjWloap##_S`9XV%p_%`6tD zSkCV?8$)qvtgmkodc_hZ53?Y>LFX%?qZ#9}WVa5l%^dPz1Lrt~(w~(_=OmHQ)Fpfe zVhi(~SJcvdoJ>$@WRYf9T_3IY@*RaPP8ge=l@5wLPL|DVWIaeG{U(}!3^uDgN(=&~ z(97&a)f(rpwoaS*Y+ZWLyjFyZPF1q|s}oG&zanaYd$GV`!D+`kFkfOTA2;|`W`KpQ zUEqht$&OWDr+T+y245tHK&=GyQ#^i^yL-LK4T005qx{tC6bqI;yRlw09-+No#JlZV z9QH34Jgz+0GjP6@e7xV6-&eJ$rJ;8(?E~&5^{3UoJs&0UeZ2=H(4sUjTFN!rn=|3% zd3%P5T&bDNu7A$Bx+k{y4z;!Nq1J-PCHmZJ=67|Pmf@{V?1LO#cY_7>4asD(P#P}* z7l8wf07Z07MhEBm)UVNkVeU)2+3 z6XCoU(8nJ*x zr^nEA#%p8)P}a$To7>VY3;EBSR#CF>Uf!3S5*K}w0JR%H~t zp2#8I$IfC$hB0q@ zam7@JGbE|PrThq59XPbv*{vDbBB&P9=&^_2CO`K8VK+4+a2c2SndyvqDH zvtar0X3Tv}W_EXp^0{3CKA|F#cu@CZ+pX3e+&t&0hx zHw%7s)D}?>Jj8-Pzf`ZyBd`c7vPe5QP(BEkMG+$8mZ~i~z3~ez5tc>CTZ&U0 z>KTw2G(!Nuj5CIM01CD^tie1(0LkHSUUHUW^%{7N=r24r*=fIOk=j5XP;6)swC@OQ zR&g>rXh~@il7tyjPir9n;Xzjc`wwVu(EMDCwPs$uaR;r&uqFeh5bTx`sh;OVB*m|7 zO~{22ze^pU6u3!rxXx{*IXPM7qsIqu&qDZVd^YmrF(;Zm-A(m0aKz=qH1zl$BHxfl zKtE+)70h1l=zs6j4vh1EcZeJP_`C2U=|@tyJM}s*Z)uecn;|S6RJ7}!vA4HSy4mf^Si|_h&WN?N=PVF6ut-dl7I{~McTNUaFaL2Hm83E&>9V6qu z!357${JIQ(Iu*7Tm(WxkS%h_Hbjha{6hT^}FI$5z5$i`ws2A{-7Imz!qI*0Z&4Arv zD_O23k%Q+9l$!NtB}`UxnL$%(9`${~#~P5J&_HS%Xo|kPv)&ysz>ih0R&wi2qu`!< zS^nYZN|Tk{)_KQOG!L0geoAm*Aus2dmy8}?qNV*l=goU>G7+gWjr{3R-(yzOj7YGxg%H1^I;kn&byCiu^pJ zc6p=HXUg+R;jVtW13d?Q4{)u-W<3}0(q;s7AXF*Wo+Mp0(6v`gA{a#oa%fmJ<|huq zbEH-sknkQuv%Zjs@jXvYmO6n?TbT#g3*60>Y6ZFELa-h@Ama`F@ctAZe69y#l z1s4-_cKIc9$#3NCnn&cp(&u}0s$RRyttvHW95BkSZJ_Bjvv~6W(e3NdZ5n_xY0)4w zuz;HmNEWc)PA4vvG`fSe7#3E-cV)puhzp3K{3KyQ`UF5zJ?m1EcCzGVZX?hjTUkf@ zDdod(a$SD&Eq8DHm4@RFj6U6nt_gw9kHB>^3DzvF?pBq3I@m9@+%&S3H`inY<)^Yi zxfqy$+v?euMFU*Uq~(YrEj6&i4c*Qk^kD5@0?q>F0yy>>RaKjeJwDE!6LPdw<*C< zy6t|{a$di(lRwALK2!As2)PsM29c{(gszUEYD&U^c*^pjorJERE;CakMny ze?M;ReQQ)%Lbu_`A&ofXQNi|=e)U|@OEN=WlK5wShS#PN$a;pk)*~EMhP9h5_@%V! z&BmJ`kd&HXU-#CV50~pL!qRaxS@Kr(7q^}IPL2Q>%D2KJ5CS@?0d8j7e46A9st~?( z_GDx*NGmU%?k7N9Uxef$du42)Z@t7(aZEhg(}Af3(4HGmE{nmn@v1e=WrVeiPpI9Y zNnY}Efp}R>XeICG-M4eW{65#P{iQlkJ1fn}I%WCchnHJNw?aq!$pAS>gG=U%^QM)n z;}2N)ZEbJw6%kMIc;6aN`!R6AX&`Kpdeb5(538BXy=c44MAHUW94$0qX~V@3m2Z6> zMG9ZBA?(XUH8w*>0MM~;zKb^QmfXsGIof0*WW&4VNA16NG<;}d{lz@ZcdDV1LjAy@ z=?S2qJq^~HNZ=q%N|Uxv-i)cwcIGW3+OBh??(p97ZBlT&nRd49S4e99gd3+pKXZZk z!Y%z;LA;6$ERG1i+)ln?JD7HYFi{G zrNVp|=`Y_EG^T1=jep-(7vx`c4f$N%9NR8LQx`wHM->0Xo!s6?74G%hpYz?%%Va0R z)GGNWZnHd9$G#Jzr##1528xZ%4kT`Ps`ATiV~&6cY!m(N-bRFiBqn;%HDpLrC)v6XC>nKQ&xVq zOzVyqw>O!U=}N4TBO;~Zd+y47U#6?_LEyZ-vJX!!CuH{2H@hXbPB1hi<|*OWG)P*0 zP?*AzI$`{sLnrh(>@&UnfF0&|OU{p?LM`3B0Z(%ND5a~UfX_9&kpaJ{8(|l`bC=(& z+|;>whb0M7PVqMEKql%f#Fk~E9;tHQpyE}eLd8b{O8GK5H*8xj^c4&r9TcwXepg>; z#lKf&tGSywvBNdiAZyg!<>)i4nqZhVds(x{e~)%~5*xwyTG<(pnQaJ z8r@QveX)+pQ$y5J8rohQu8Ye(m7u1EjN~LnRUDquQtZt7SCt{;e^nGlX`+jhYBmnZ z<*y_@;*ZzBlB^){UJ3^ec8Oba5;%@_NYg>7jYrB-)PE*$IZD{FXC%?kyn8F}IFB>8v>i$Spy|Lz~U1d=in>(?0 zM+QM}0ZW~UXIs^(3_6pC+#f@ms+!Y>a0?U195Zy!fZM=r>nX>81*N0W{_(sl9y)9{ z*R`R|)MI-zG5a@i;oO*gzj%&EJhWVK)FIroT1DXSUh^sc@S~)?WZOG$sw}{F@4S*4CjS+owdNNOCeS89h=7IyISMWXzgdPoQ)>qD8AI1y~1_Xe-&LVr#-~XnB>x~u6rP~;CQjtL`b)? zc~~Tofaz;iqSD$F!#9aMgT`%@s#cDMW$i(^NIdqZu!MeK0Ndq}7(p$@s?Y~n+?D__ix)se40I9Xwz4<+t=H-4l1f4h7;2E5_1fq)oVmt@li5~8{}6v9__%X{ zGymx_ym#El@Mn}`Iue5DF9LN%iGH^(fCQy`L@nWZ?D2Xp8=Uht*=pjG3f3y{zTl;?Ym@|Q92 ztNVRH31>%MA&UdBaXr>$BL8?}*SnoZ$HI*I`jG0P;3qMb?%QaWm4c0oEn#{Fq}i)V z1kAg77Kv5K7ovG6L?khE94JyqPZu7zvIvKx4}GJ-r8+rk@Ot{$#Nx; zNX9@R+ponXlh!!}@=0Dv z;SE&eyXL8J8x%4vkQlYn3(fj^F=A*SmoQlpnOU@+o1H#Tf1Y@w+&1lGr{rMeI&)eU z_5?Tuo<;_~D)!$Hac+DW8Hb$%9dA(xH6#&Y$H+W3^~V25r_l~`RBzyZR){srX>@3t zW^7?6RM?us3e<>Db}(MKo?g+<(Az0^%agt8@U0$p&>?aCrGTTE)o^k#XxubO%Jj~Z z2ZdCFw0ze<_*W8`dL$tBI@dGR*f0Oqo>d!|K6Dy$rE$_UePub0?4~Rc{!mo^tFNqX zZSE`{Cnl!hS(@g4`oR5>K|xS~ecUOHO<0h+PRMG0zK8gT2mvHnmfyCj!54Q~A$fbC zPH|S(BU9rHK1etJ2Q<0le?@5rhhg8=mWjqT%dx$kuJ!~dwXUf*3v%@6dx%)o5-~4J z0#s-!3^~)0A6A?GEaV@0+yXVmkBK|?Vl{GjYK;KW<*kBhKsyJJ!pfP|OF>uBNR>$W zDWay|sMs|)1!ZYn#&*9Km5VRW1rLPqTPvLDtT)tPu_E=AvJ1K*h(kZ!Wm?!g!W~s2 zAc1LuRO8+?=v1e#3ku~*@1K=i`|ZgQ--in3x@GAd#=l4O`Zm?ApO+0grk0ifr~Jp9 zg|-=cCJM}@_Uv4^=1dDnq_62LSA!E3K7uY+MpX;7cr~x~_@bs+>lgJbKJ8LG0Rmig z(|;c=3VnWfOJawiK(wzvCCitVj$ag)u;4yf*iWDtYDxFF*+@vx$rZb-xqy4h=^uyh z>p_QW59VF@jaSWQMS!A={dnNvWQs?1GNBmrxX^GZL1|GE0{Pu}8m^-4-{AqK$|1L5 zztMfb|uJBtdXEMbzm(QFm10xiT;@R0kW|jG0sBI`(XYdrg_-;Xw8ftqYu|%jI@3c zmWQ(Yp*OEls$@{Pk;Bi>6=V5W5m_L-@JBphw}Xc_E&Mz7hze^e6MwIsiy?sexfCUn z{Dj|&x94K*n;UjeL))}QMa0nJlBi!E-}gV@nW4XN-*a0lfz$i)-NM-!@J+B1(8?%oER^n9d6 zP?tfq-jHJ0kO?72eg{WGb0Y`P!@qvN?em(y0FgWa1(vF!pohNY%%>1idZ4wUhA{~L z*>R$kB=qV;bGA*3Odj}>NKk8Uj-f2`Q4sAN}bYeNNyH;yu-NB{7L!sj;P2z-%o* zJ3gYoLfdN;rKUE@U1P&!R-xc99OLpVRR*n!egaDER#x>K1K@Km7|!-+39=30IOR?l?oLnu*@y67tjo-lGAdsPK z@*+W)s1<+(2SYBus+!)hPnD?5uPzwR+|#UCFW@|I5xB@zAjcpRuGA2c)*Z?DEM}~I zJ~L6r7!W!8nt(~2d{0-@te}3fcxLJ044!cfiA$g}GK0as52%;Y?)D4lA|V56(<&6Wd` zYfLQ+3wthSntIuY&cI+&l&muPR(#bGxrt;!VgYVq6_v2bb7NO)M@pLBVtG{3XEhsI zMe60~bs7yJ0ad*ohG@+Ak$^SPj67!k+b=NLeF278=sOBb>o;;}bBo2bsQEoFKuQma zMNBKgA*t68hJj?SU9DS0I~!Jen{6?IP|DUA9_N>uWwLI-ZG;%;jboRK2!|Tup%KJp zoBfvq^kA{n(IY6_#wItu_vIItUw-6Km_2VblJqeg9r8*xT$B?SRKFZK6ElB*@b%87 z-U7o9SYYvdm``!>uII%d%;eT~UeN+(t_+}p>Q)r#EgT5Nu9L802{ z)y-Re&azFnE9upcu0LqK?RF&I9T|~RO%ZVLC4_^DOM$Y57Ctg@ub5O4bC_r4-W1&B zvoYGMf{AL&;=F<(jD~}FB;*=#``N)atc;^u{lmcfgQK4J@wIr>9LVEIm;B970D5DR zF6xN-+k`x~BG4~WlFwK-6Yx_--NU^K{Swci)$arJo8J72NEhDyl*fKP)%fsQn&Lal z%e$93;BP+Dk_t;I>PV;>Uk}!gJkn|5Io>E9Wg?;@&>qOs!fWQDb$Oe^x3er)IpZec zDS%leHq5Ab(8yZRatKZm&n1U~78k_r*x?N{8O&f!iI@tz@@N!%ur;*jU>L+B7j|#_ z-k5p(O)m~O>3FR*qJfDaF$mh$JIO0BLF7hj{c7RIbowwawSggM1?yU|?4~P`M;D?` ziPa&4uK1$wxzxm$*#okVbgFSNL8;*sbhxCgjN3*{*B}6meYRf*@CC zlD<{Is$VG0je`HYPE`7vqNf8Z=!#o|=S&xO2X<96x>jYrda}+qGpT_LsYH+XSFahtQvan{0}gwHQvN z`mv=K`@2k)GAB*&2T46Yw2aw2i^-y;GavWeRS@=&9M*oaX91`SDUZ=Z+E_X=6OYP$`X5 zyh|%6M$mRg$wfxTe@{QJGBW6d>A{)Yc#O$GsD|i#sNG6z886LkiSlaO1LHaDyrl>^ z$Lmsv4)M%@)r*u#8$23v6G~%Yc{i=fH#uuEZ-k$PO=CLS4)Yb-eY@vG0Nq%G5e!EG!IxiBT5rSA@$)}Ft zj9-N)XVrJB(=KkwS~Pw@^dqYwwU9{8nB$K!A!KtFjJo7Y(g8I*d${WvUtwU!(FR(} za*<+L7)yZ~PgXGh{CwG4aH40c>BF!`whnfM9ScecK&$Ta_!s;1D!|R`M|}wratJ^_H3)>w+F}0zqxM#_{&3Fk z4I9@&bmMzJ3NRikEIkfR^Cf=ytszE&K-k;J0&sg=a}X^cE9g`a&om!3AUZ z-Y@qGevrOh*B^OV+mGvQla*(k&k*qtkc(0SsbX2W&IWm@nh9E9K%EX@iI;?Jg}%kZ zas7%B3<5jE+A2}SjBckK5_8Ti2v~|bFegNh=sO-pc8AD-3n-)o`g^>c*NDmvG!*@J zbC%B%jbD|2c#b|jFCZKiC90-0xSa7C`ui`d=yWX6HrrVfuPz)>UzIZ;^X@rVm0>2S z%781ATMS;FQ}L@!jjt<$79OTYOK-^qzR!c8!Vu%oE`8m+IxkM}U>_5%4r9Lpano?S zBJ~(e6+`?9G9f9i=*aDK)Q}W5Ut>2 z)zWXX#$B%31Trl3;O%<9s;jn!jkD~Qd6eMPv(EKXMx`^JhLa#evy*0`i3k2uhnq@K ztyH9@T4TIHZ!XDPe-`&L$m-Y4^`9+IfF4rvf)#r*l}iSR`jY`w*I(&R0Ejo6_edIP zI-MW7BK+uIy1&-`|CTVH2eB5_4N`q ziDth)HKB{^iMuwX{Whx?A=k#QP!}lb(I8r9+am- zZhlH&zO``zKJ2QYNaDt)5$1Zn;#`_MX1^9PJEwyMzJ5NWGAavbGBMYlUc#$;zD-IU z*tSg)S$*|~&I^PNiUdHJgm8#xD9n-Q(HTL?!) z!8+}oYo z*)(cBZ#DIsJ~lYgfrcL?@2IXHJ@3# z3wbg6+zdIyj^@XIx#wS{dJI%8TCE2rxQfRCv~Zvg#0S~_$;ooHrL@4dI$hTt_!0QL zWSgpXJ?8490a+^NaU?<1o4f0s_b9IuKaRh3jCy1rpAi$i7CvQ8{k#KyvX8jt6n#Fo?qu=#U$@) zpvikVs!>G+%Qu3|>uUv$ph1&;^90d*ob5*MRF-9VVoVNHJUH*#1L8a4pl@b(C@qd= z=ugz>kGZJQN!Uz2x1}v`RMf2GiH`v>)JXM_)nvoyr`Kp)T-14LAzekMye9M0boRV1 z^GVvj#(??iFmsE~s2Eq3Dv~IHQRHB;!TmIxT)$J8-Q7#!dKh>05l&K`%um)ZCVWx? zVh_0}6)<(0-NTtVe;WWCYa@w}m=jUFZ*5BNy=ru#<2PPq?@4%t?k9q-TzGx+9f%`sCZD2PJM>;N~G&6y^gC!}l!1N^A5x<|zb`Cis-nRkpd zXC!i|SSzbCmBsl_3iJC%jUyByUbA!p*xA9qQ>wrI;+V`)4>GgP4O;k|Yxx|X16{8J z&F@dy_ID8Oudas0tJ#oqWq2B?g3?dB#~JL>dT|u5e2WW)s%a8T>eH>yPvf5Ak>01@ zfqoIt4nL&@97b`abh=B65H}~ja@ib-SJs7J3tD5cB!x29S8+VKe?PtVQhAq+?4}m^ zM@?oos^riICm=4+w3jWGaapeE z-d_vx^LfwZ+qydKgGlKfW42Bh)m#wjsh6gy1s-z51&}Z6gvon)&{Zk}SPmLecReHI zQ`9T>JuNl{&Sdx0e+SQV0WQ=&5s=hCTB-y4L4_KuYyE!E6_aM&Sk^zZ0cxQOois6u zW1F~|?lYMFp1+hgBD%(W?>WPT>Y4GWU*pfVYGbV!TN*o*L}L4w=UVsIcg)}(q(HIy zR+XML0}GI8Az9-iS)F{D#}nN|+Oq^lQQ)`;!^Vpq&g;I>(qh2gm-Z{ojjT8bRF~)q0iLUdbPJOAA-mkkq z(RX_Z_@poP4DL+diOX_)?_SHj)5;n!)e_BnF%-#=1)`kzmM2PVI?0<-wk6*#t>fxo zR$RiMTiQgVUfV=Ieya0GyVnF;Tg&XflW+MhLqfIBlmx8Z@k-kZ{oA4KM9 zhMh2*WLt4eOb>*Y#wlZR*hbnJ4wMCw)_0XVjrew? zEXvUPG&k%|HOC!*xz<~>F3iky-9^{K1WLSNGs}Wj|0y)koi25>s>!66;ZG72N(>z#w}(UmJl_JLsch_3=qWsuf5#=Cb9y=(ZSX)u=nt` z^gxPgv$XpSQjr~XsR%Dr(S6(e_PN+#BP=BYNrnR=dGli;ZsdxK+`zUDX!;_^*-K5MV>pH{N*s&w4;5O|`kxE|{D!d7r zt-QM==P~MnbC(6Y7|PHuaR-2q<>spO19kcW4f`hQRH66QjSvl?-oC0WZ1rVMciX-= zWpza*&8kTbC^`E1XZI5?Yi;b`4&s6+j@8iB!U&;^O5$7v}iX z7r08J01`SZZl=2>Y9kgmjR~#0S31$Oldu~wMF6{!vL78mh>HUeTl{Br^e6~o2W(9$ zpG*rnuQyC&N`$pv$8=i`Yp{?c*RWDvYZW&iDrX5t?i2fR_EyUnd%{OT0>oeDU$j-eI#nh9- z_W}o&oHq+zu5RuuVu_N@ZLy*qH9n-^)yP>z6kXGzO?pLz!p-dGM$}C3s_9V1cF@mQN(Xn8c{`0~qAD#SSczcY-bh-nK`}@C~vt|K+4#y@#ieC=fg%Q3nU9y51r zzVsHAHr{KEEtO(iYRBM?WpRvkxEA1R`9$|jwLBKFr1?x@2jo@#P@{J^lqQFvVIn`H z|D#ul-XSg~bN?Z%e8-QyASH$Mf^2r905zUu-QPVb9x2z?!W0(qg&$3A%cYBd9^&pe z4JzuR)>N10R-WGpTQ*jmm~I{!&`|zgtHu8&Btziw4=xNEwe!AD&X*!mZrQ7At5t73oMFymj{EpWAqk*Lp+=YVG*RjayxAB@FX*<7fG{$lOmf`107KTjCh6 z6RjC~bDn}%+u#&!Oz}9c7oUuD+UE?~J51k$2u=xI<&F%!MgGZ85S~IEpXP`gvOMD* zIpI5`#qB$ke*hM#MFg@7Gd@#+cq2w`%W2_AmLmepL1MT;;RA9%AqM-fp9(*JpuR(J zV$8h*zqs*9Ttsn5x2+gF5}O(s=KDCv>PMsdcIj_LrqjYhAEUQ+ZV=0@(zUSMX;U?9 zV40Bcj0XhN2n;UNYi?i;62smfV9IDKU|=@wYF7d}06!Pml%B@|30mY;Xc}C;FG~EnWd-ms49jbaTfzd0b9NJ>s(yAHc))^ZZpzm7D2qDh z8Y3~Bv$#Ir-pnqZ&x}`j?13n11QIpY za+Lrqarw3D$u}4de4K;jKpN^ctBd$Wqz-4I5 ziR>vt&=Zcbw_6FU%m~5<i~DaqJnAbF{oY+v9EajwDIL$_D^GlySLh>)CUl34X$9? zl=kazRwgm8NxxF5mf#P?@DTx~5>W=umuSeOnX+$!5w#QX83uKhnOnh5da6Yr~F_f*u z{V{Sd`>WJN?D&o!BiwtIUn8cm0sEcDKfS?!D1D-`I6H3#GfqyhPZlbevW^Wud+>oX ziH{Ygo0#ur5C5X-R*;gkUZvFX+7cE_%TkXDTPpXFi+aJ~@62~pp$CVd>p&=cZhZa$ z;&-mTtzNNrtN5P=R4TdG#f^MQD^=a$GYK)uH7OiJcdvBWwkwxUc4gI)4gbGE9s&Oo zMhDY!hYgchY9Nbgj~b2-9tXuoAZZTaB%AU->*1O|Ban2-5vwkcR1^zPI_H5=) z{$jD~H=vX96^+$O!Qd(T+mP*PB^lt(vG}Sw#*yPu^T#Z>`S{`86(ln?^4jkbA2h?g zucetNgsj>sNnjFUO{Yg&Q^CWfY9FmVxC2xcvYl>zicDC-o*2h}R@)OB)kv6jC1V0U zAf#o`4Vn0nqcg8!=vxL6JlIi-O4Ctg-k%(O#ga0U!y{_GEp^IczNNh3_4>I37b#9g z(lvlW3Q}M%;@&e)44SAUUK4*_1#@;v!~7_gWA&35`K-?s(BdzKpC`OWyXul45qtLo zaPsEHbJ9V-rn9hEP1aCZz4sC}jRLE-#_UeEpC-dmWB*Lvh-=L%EOub5uR$_3wB;0V zi7hxhhl=d*+`!n1N)3RxO_yY{h;lvDoZvshX-IkEw+Hiq#1Z>%GlQ>mupEekHKnQ3A06avsJE`LKv$l3jJb4=Cf1w4E3}jsbLNy_rPKpC>;Eh-cy; zug}7;OtqC#dr!jFIro8Ox^mHf^o}48lC1Nr7D}D3l8O)lo@ci3LQ}OS8?s1mCDBGG zZD9>I;Uy9Gs0aq&X;*)e#yDL0|2^n+Dz;^#DMfAM=*KA#l%PrkQ&+*j?<#Xnj6{Rv z`f_mPsnv{Z3C(LkaqOV|D)DttG{S*Y6nrCHQYvVm*Dqri!)sv~z9@0VulxE{2GvI=c{S+>* z_w`Wd@@MCge+4#91*-p{0v&>k^pZ4P^IyippH9bvOA9_$oPSS^D%4(eN;zAqDxi&T zPRR8}b*;2EB}%O;W;Qst(n4?XE0~WmE1LA>Ewa@$CncEQbdyez!i0cVI`v<+JK9@g z7-}Gxt!o`hv>fHC87T}=OUxJ^jZ-@7l;1J2pmWn? z&L!~}2q}$$v`f`Ols&*}cenfO_zm~*ojltyQvG7C+1Eek2MHmV6h$!(2>h~nTugW9*r-RhgJ>da9W z?hkwTE~NKxtOvfeIrP^7eHanzbaP*PP{h!(BKjODl|2%irMA(LNc#OvvOwq@O?fWg3l?bN8)uwOg~l+`Kr$;NNkdJm6*#Xn}=bZML4^VNYVq zz#5f3v#0&IPY4us%Yj^R!5(hHw=i_!38I3ev!`6GXzT*Uu)M~QdTk~>h}mz64G-tt z=(qsn0#$}#jUegW*lj2`Q*gRO2*bx+tS41C#}#JWE(GU~mAL(t;VhJ0gJ-H!oVqwT zz@dWZh#qtFr{a-3XYtxCXGvVePfll3ZYPKE%$V6$e4;>0uly*UWZ+!W(biRmP09p}-xQ z^f=T#8AtCq7>5AgPBV;5VqL>Sng8ja=ipwtDTAUYA_y??KWKA0BoFlx(M#9Sa z_#ZD6joR2)^^Qc)e<5B>sAkLaoo%XZMckHn*Xscnb|(KIikIt*&2& z%oViria%82gCq5&09c88A*7gIUBB#}y>FcTNBgM{B-Uwv$)F*6!xple_DJSdb7R(t zS6t|aPMDF*vw7jtU#&u4<;P^@i6yOFeTPpA4&7c&jK=DaU4|K807rj0R>V*o)yZZ| z`JAqGEkMHXpiwhl!E|oHR*}e?_J!;O?t$3-%&^FSzrMyfRN8#Qh;w|DLaqu|t*E;A z>tP%H$Uyk_Pe39)AnBXk-71NXq&V$fbD8i>W>oODrW-zhT`=+-!T?Uttm$X?6ltHL zO>NPYRt1{DX+In~+%+LAf0Dn7rZW;VnAFq+>do&QfB)a5t}y?NeS)cMBV*ybklo1r z1m8Syp#%CmW|?$RPTzb>vX^I{nW!<`8hNS%SGG@%;xk44caYIYjX^VEjnM80Vd|Am z1e(5=;jBNWGlL>~-Azndl&aeoVH-wd#|s>qNRuvZ^gB7IVb7-2j~o_>IGY6hYPkcy zq9gVhq1^&m;TWch0i1&+K9VDaoja=|H<7C`@_KK({7q55cw2Wb z9BZpzmW-ZE0~vDkKe2IYZ`V~cp^!?_j_ua-_FCY-emwx`cUnam72`;2*gNp9nnBoS_P#Z8FBX*=FImd?2;$2De zlZq{K*BK%p^GX93YEu2ukB3N|SRd)sf}sJ1Cy2XbL+4bb++|UziR}oqonc_g3h-&c z5cMqkYWosnCxs7niS!NE5BEqK-V)vNnVd|w+alXb8Q}$}{;p=n#PO}61w3$}Nxi!U zZzHACP`7+AY{dp+a2pMA#h|7_HVNlh@#c%N*H44P7~jwV?=QAV2kiCT5i=~%XS0jg zgCjLBSE4A1E1R)qDmI4vlJ|)bD}{D~ym4h<#?4XW*oc8_9czGjBL3Ubswm&!#pBdy z$U0*NWd)3Ju3Oibyjo|dwZ>;N5d6<~rR0=NSf~pT)-~Cvx$476Ee&L2f7!jp5qUE( zpeJfnfzg^uhpsmb_O~EM&32}Kb!h<=Zk39UhkjQ3^8t68e%ZbQ;}WX5BAjKZ-0qOJ zJ2Gm%v6{JLQ}f~u$0nvM38&iVus|$Y6r+59b2d)8L-XgFo~zmT4Qv-In)&`G*Qbki znYu4cnUxWk>#NQyO6$UrEybhK0s<>qk=QM>7c6~jdVf!lR|nM!K-o_dw3qp5B`+gt zA%AAiof^J$h!#>LF@Yek=fGWmE*Fj#m5}WWNu8=+>3laV>>-ocE~mD?W>$eJ=ouzV zDiRN(Y{>&=XH7(6V?yx5kO}45x@m=SqF5fu2$G$X1~^rE(!4FBaHrfOE$5?WYk5CO zgOB(&NQWP3o35*sV1CZ_45&m-OQW;GA)j+3E*|;gGO0bryN-Y;ff0pq0V9GyTDZ9m zyZJ5iW7FBsdso=Wf{Ypb%yeR`;Z??U;Y_BFdX%O1usNQY55Q`9q(rD3o009{R$t?9 zTNghThewFK&0nejtBo`5=^4M@h~?EPr~b)DmRCm0>*Ga3)?QEM=_494j_bump47|C zW&NfHp8o&_%_;U;GncEWtY2uW)%Kf%IrjI<>JL43EXo+Zb?rLndps{JOAaKdTTUcq z9rMz`4>A)5f`ZW{Z44UYvji9uR?4YkQv~!rShkkZWV8Xx>Ze)h2dk1srPcoDBP0JA zdHO(^C`x=^gkUiCcj21qA3)ptAQxvuwIhdNbsf8^dsF3HX;%LO zAl*YOF$Y-X;)w;YFYNt;+ea6$?rib?bWCaAUXO~*GwM`(l($^DS9?@#v>m5DdL&0- zM#U7|Z@S_35z@Ol+A?PL9T?8~#4527dnwSE8%bh#3SRtLsfme z=k!@5dW{#6_>QHyvcpr0!pjVFMJry^-S0{_K;AK~F@L^03LU|~T&G5FdMi_w2j!&Z z9f=~n^7X?V^6uwKu6XgZ<{P7`_@Jhnq6CX=de3qU&F+1*!k*uRN_Sm1S@{@)9_LF! z7ZV2^dboBFfd!LK3VJ@Y@w4c#5Wg`M$-)^Kvu2m<`pn8wXDy3v`}kD(#DcSAh(Ed4k1aWT9W0qDf?5fAvyesEPor@1sll z>PR8oU%L?I@YiVJj+Rpe7?b7*^*{AAVL7Br@kw;!Ltom}?t||=EG_0{r}OlF`>Ta& z2O(bF7mmA%XNRufTege7YzCt9B;Jrclo?Xcns&r5(F8f+u_CFZZ)B zIoAX);)nA?a%_!sBt|~wB@6#B9jQesMihZIkwNGn%!d0(zpDng=R-b?qxZ(j9X?NR z>~WNafjofpw_)KV6?!yPnah?O5wfRW2FZCQ!ArMQ4UC!RJS@w)zXOT-O4MRdhR1hDRcjjuwlS;4oa;q(4M6$EV5(2BZ zKcOhgC-@iV(BkR)rJGQt(72!@GJc5`O1a}L_AvWTnW88cYOz8Do%Z^K5x!4_?#c! z{R7lXxpU?Ej%3D9zC3Fk&h&NbEi+GikNIdfD9t@QNVqP@6^O7?#KB+@5&dfmZAzuL zxdCXezmcqkcn-0f(ol=E-gLI9AK`f&VEh&J@Xgj&;;!_6-oYdOcTVZkZ7!yZcV z?}s^u_tSL3e^`W00hEiI<~#A&O3F18 z{*1nS`yiCX_g6anWS#MM{fuEhXtIQ02!9jP?_|e?X&{TAC0)22Ca9FZ{q(8ld~4s` zbQROHI>_<-V5y|QlB?KVh@UWiF<5HV*&AK9pl7hkAY0O6N6<8RZOHmJ>`G|jh0M-} zXXNrlO~&DukCJ4ZuKgOL2R@K6#A7H`^M$y$oEWtaaUCrC;2vbHHh>D?RsiqC zrgy%H34EZ3(2G=&=0cP`k^{P9V5xg`={%k@{6?eQJ<{ zRHRktxR5$R*)qu;b9hUDm-Y}?k!%$}ab4$#A{h-UhB5`3eX~*gV>-t(_TtAQAI!t@ zvBHpQbU8~{%iSQSS1W-dnVt~6<=l_Kul3xn*z~RX`k(>vnW1>slDpW-}-Z30Kj;f*`T2upm#_d_4z$5#+@?b@d`nM@*Y)Cu`>0GytP>v;2zOOsAo1f)%BlBq zf4oQh-VX8zeb1=<(lGj3#3$(xvqFYE9N?`s2G@ofe~O_ypdH~s*uyeVGI>VQUYffz zl_N62O}zKQRsXy8(R<0cR=j|o7@n*c+ehq$OE04*-M6N;BX9>%;734D`3l7g{NhmS zC0Z2AjiUy8Hqy@ZdjWE0Yo3+fPAOaP-;m`1nA#aniLdLL$P>>`PW%5;C=hVA#+hV!(X5fdb`< zZjNAgVYu5!7SA^BKY;X&hJ+%zqIVz%8^8IS4z_faXYd((L!F@Az4doGwJJoT(v|Ka z1Xse2<#9d5pPO_r9M#1Oq)9M`*`M2{nVI)eu9tlVDTo>`0GZbY5kt#LLN21D^~;(3 zq1mC#Jx%vQeYJ{zbxa7NoR=eEMrgDgl>|CUViMc1lcx}(h>Yx-?&IVv9HcBeJBT=b zFVl`7)9)OZ3IDqI+-(Nb%msh!$PwT|;rLD#a2|e2 z&(n)5hCvSc_d$88@+$)6Bq^~w1n|kb&!umBx$7sy0qk%w9bVjbo`TP}dxG-w!qTJL z*XqUilS@yT>kU_g%ja`e^&EO1wJ8Un=<1jH&&W6Iud>L$_wzkBo?A9T1`X)Jb94DK zT)!gnb|#pU;0-c_I_yqskLZjWQortA9gW}=C`NYw15BARf&0OB8$DzEAgh@0C^gGK z^4qF{QTYFrfr9z(!aV!~l)HCcIJr-ux1@qW>^#P1Bp>LfqPzMJV5jSdim;@P8Vv81 zRTizG?9Ktq5DL z6Z|n0FPy(;+P~17syl+&PhqNLHGS%eVm^#tFLWzXeEszFLmzps)FA60Kuv*!q$zY# zRHbs@YJ7i(^zU6lAG@C{@;Y88a&2KvatqAJrEqYmDZZa9dhFJIzW)hLS=m*<2;WNX zgkhGChM&3cFGtqE$}@LrkW{F^K(4?4om@xnG2P&w%dA-~psYN7uLCGvX@%`MlDD#+ zz~Z}K*_@+>$e-(=+maND%9x`qbyx1Q`Y3txp5=P8DlsPDE%%t9VzEBk{#%8&uc$?| z7yjTN^-H8}!&EV~SzaAB4=d?zItL6bj?q^?6;~= z*g&Dqb*-t>+b06w69aBMg?iZ}KFc^uSy)$wGS7#Cz%$n@;putmS+3;h#c#f~r;ACy z@e!2$4@t_)lC^Lv-oHwMLl$m?^{@LEr6!1J3ok|2m)9PF+wIO3rat}z*Q28UZ@}E+ zL`MFkRx<753*nS$pEdjoD(`0al`lqYsD+N;#hl$z$>tgPetXPfO&2Q6hz1XTYLs;j z=Jy-V6kg^=Q4Z~nq;=X_mR&})-RWH@NSc#*CgDrRAqok(6IxMfYEA8#2N&qXoA3=i zdG3-XKf7Zl%kKS7&|Q4J_^kQ~I?j9qT1U8oUoXw8Pem>|Ut1&mauTTEW)6&zOEdEF z8OfW-+%!RzZmZ)z<5h2Lm&Tp=sqy=&<|*mGhV7k-nGo6YO7NSpe^E2V+WXlo--HnJF3`i%1Ub3A6&0a+7h~WnBmp_Zq?gX2p zZ*@j#R{9DGyz=Ph>le2oQp0@y4h+e22}@*xw&`R2Jx_9HGZ+h~vJ*y*cUNvTSS20% ze)i6n#T6>UG9=xY%|@bl+#|=@kH26AjWPL&HMBocn+L)D-hKGBX(cZpr{S>!+JWOn z3nB=}8Q$F~9iT&@GWynFS01eNTtLQtrXHB1+WPS&&D(XbXoX}6C%Gg7wKf0`n1^M~ zvCo54%QC_AF#eHC05aIuF-(%{yC!psjo(n3CH5uxL)K!YLCUs#UXzV|bPK?0zUDyY z@H-bTvwb%Zj^gF{^O25vNh{$1>e=lZvitQsS0Z!B^&K~qe~4%xDOPs6K8a5iUEOzB z_QPL&Ev^#*{qua;CbQP5c24H;2c8$0mjc4AEGN$CFcNnmEcwf(gkkYa(uNWKgKuYEL5BZMxjYYL3@!F&Q#NQawV&2QFTC`S4T8i6(9`IF@0{MmH(7- zde9`q%iL(YRK4S37-6ngrcvLI$!$sr*s zcm_uvt9B&Wf7%}7<3Pup>xx_`>gWY+v?YEJmzycY3Oy;tNJDWCFh}OwV(+CcdmzvxPZq)!brcU@W|B-q8%JY|S7FX}&j=c6Pt$}W_@aAtkGW5$ z18w^=aVyO@%b&a$qX|!=D?p08j2kwMH%HE?u|6y?6OQ}~-)N#qILF-1m>sHc`J#wp zMvIF@#+y`uw$rCxPT}*%t8Mr>hg5@ ztpZ4&iW>Mc(+FgGScjX%n*nM__P$%&Yld3H|{zKHf)N~Lg}E;>Ug zCe{LX1e$tF3!|;A>OR3>6nOZSH+p(DezQ&5hQG53i%*@hh@J-&SHU8MwvB+<3JDjR zYjJGx_%oAehrcvr5U(P{uO{GUzgk_zw4ekrBHTfPzSqYy$ge;F_bUc#ex6h>&b;7r zs{ImWP1APRAHNy}AU5PYT$Oezr0kQdXDn2HM9R%FdGc;>G^#4!H~L$&LFsoKs}^$H z+cVP#2m)xx_2%jGP`oRu{^g19ofL+8-LbWmJyirqNa%=YnP9tOthBkp=v2mI&}6q- zX;>`Bq3)H=&pQ>}(8Czn86#RF-q) z<{A$QZo*&66%=s0S(RUme@5!;yL02&x#%hWX+cJP_>7GPI zTnHdgaj~Lb+8}Cr=%YmPbsO8vf7;V5E4ia){(@z7{-d`D3wl zlx$b}pIAC?|Hf5pB)mVHBjI4#X2S_m5JKauM01nwEh0(q;Ea2zFLW45Fl+9nes0h9Z z@&E>=54CY+60aDW54q^>$6KcHO=UnqnCu@%C#s7C_Fv+|g}ifaj?|6UE5N;fQkX=L z;a%heJ}RLkFj&z*!qucTifr%*2uMy+z>UQcrrwUpTXXR<2$+* zkkY?MX>oAbpXLW;YZ?@Ng`nHKNHNl5$=f+(Jq_?ro#A(+GrXnXf%dATCv*1Xb1{Q4EXgHpeLfRfDZyLbO4Wu{N+mmb?nlpR)beNlEDV{s=P!=s(4?DI(j z5XCpY^Dpz9lZIoT`f!ZnbuA4t0UaXzRmS($C70L`x^02=UD)1f5q&>KUWykkYX=*U zlL-M`h#By}scH5;KTRl|S96)s6PM5II`F0Mq2lSsuu%lHfF271-v>*G@g8G1?6Ah; z2J}E{lsG))MCol)l;a~H5*U_Oa)O}VjO3n6YdwhVl1fL>Nl|Z?e69DU3^Wayw0fG^ zx8x{_#hK$8T$lccy9ZoWde0^)@0OyF+IX4mwb88dcw^z=vys;i@PFbEzjf>^=SJ&1LE3neHyQ zKfLZ9{}c_@W%(^YX7^;D7JP+w9c}|bV2u+FEfL>LK`dw&AaHFa^!w$_j*nkuR>2(?E)vtpG07(Cj_j@m*f^FNhp?3=G%m;QJP1Z;{2`WuAhGJCf>BcOvHa0$v zfBip|N* zGckXDqADHGocmiCgZp+%pEc```D8g5#N?PsSo?@xP$o!>^lJwuO8WQF785ptZqUY} z*+}{w_^(P0X6;w(^FHkds}k}XXr;HO{ywppP8rNDCUu2-aHs*!?;u9`jp7$4L zg!tju&R&r)x|m+pdJ5lOQoCe;Ro#;&G}pS5a@G>}!mn7jYfrLAZVzSx&JOEYtAF#- z(^o;uaywP8jm#jTZ$3}KMOWdrR=DsI68gUNTBeItPk&zjT3`3N!FyXh4fe&GJ>5|m zW_l!^!MiKJQB$$L9qfif^{|@ntfIdYwm6mnkTCT9_m2F3vJ!@AEq|XKTS8|zhi2QM z2)({P-QqrzdcqaYE=-sK%jA}P?MqZ{+;$2*fhk59 zV~Ku)qN!znH-8~s-yGB# z$IE@5yr+voF8hdYe`zb~f?3}34=_;(Fd4M4Au#e7^zdyU3?h)(*!xoJ)m?z_HyN2) zRe`(pt+NOR2U8wFN z82URLq!8EKbCc_9M<`>3s>R=O*QK_`r!p@U;?%vJ-Aw>V*u#EU6j=|k^ao^gSm_pp zC6)5L3*7!j1)@X~Ufa$J>8d+=yJaUt4@wyHgJ$~}Z9Qi4&FX{4Nbl+TbQloq!ZglL zJ$h(Mk8s%~T0WaRc2`)i9H>)zf64kD9hzjmQ|O{@C81JdVa0?9&!%APgp_{KNLdD^ z7U`=0*&5-%q$#CC{ULks4Y5OEc#p@w*QuRrxD0fCmdB<-Z(zeV{uo=XVStg;aQ~qp zM%fL@%@GHNh}lz_k&mE(3;|j}Os1g_2 z{Xx}FChMp)y`_MvGLCU++aOZ|-R`n$ee!njn`l??)xV|wENtR?u zeh;t;FUX;|y(@GTR?}QD|8qkBgTC-3PF6-vDuOBjtrO)Th@>yho4cOjMZii$~PpQb2;m%EFepyRpd# zjJ5p4*AYX!K{SP_YDsWs8XlQ})Dc|zzml9?DWT!lPX>;@~Q9LUGL zBWkf&D1DceA^}UE8{;&MaoL>BE&qNJ$g#c8uN4&5EAnywQ)+F5AxLDkWd$RsP$_#q z69312fSk+H?JvgKYo4E!&%!q%s|-FLD5hKKX^vcjj@}st*pfl`-oQEV#S9^{(9!{a z3G*?Og|;r(qh;*8((}OuN~VlQZgpMSO2){y5tjZP*O0xQ@ViPgM27?$Yh+M{s9d`P z(E%gZpK54F{tuxIFYn|^H^=g?6-kVb*Tj1(N09|{(KOylk#0_(ZM_K}AqpZgolTz8 z!}olni64@s1ed=0mOLIx6Xc9h&jO1q~CwA~Z%ld{H{sbF~bMl@wTP#_kQJiau55<3gzQ1VXw@jmN$ zlBqUbwx6(Ayy!azj7U1O*Q0{jH`3o2zw}AJa1=5zHFTWKA9U@{k}YfriXYkC0u}HE zmLW;1=hu`9Gx1DdvpthI&$}u?bSKr2gOVnG5YT|XW-ny%ZjET5le9fZOGP@I(ksy1 zw~sUsE?R40v#x?$rcnJU(@-P4n02i#`wH=Us$Qg!OZS448OiPsS2G08bJ1~NmA$*p z*>(*+5M1hd=(^>CVfq%v!24d}4@oJmtbP=-c_u6}C-nJ_RA4Z%U0mNxOt)PUgz+M+ zf<8a^-133am}uw?zjvIkDd}JSiQ@Y6Ns6+r4YJkaG@K2(IA=WNh(3legQc{rMl63S z=riso*+T}2BOhXkb^r4XK9T>*?8h14Ow^-#|?7g=AGNt4gVK zA^u*u^$;?8V&sET1--8|YBGQ9Y+P(SUc$RwCjSARPeOaf_oVo<)-o(UbV`)6O0ndI z+(IdTDV&ctL)DsU+O(p{!=w@$VQ@xQe6rXhI#7A5AAVh5^Vx_@7|A7icC}cTSBw!e z42XhH-8HHL2QuQa$049At93KdY~L6OS5F z)TQ6ryzf7zMPhtD-xV@K1`kzx-V+|tjvpWx)P4*s{dr|f1#Vs6$;ZFNjt5}q7VgW- z#Q*wi{DT&|-`ps8R!07OP-WcnAwRv3>)i%6Y-A{pkY$@kX$%cee2oN#4nu+k%zvw( zl`N{8U6;0TsZ7Q#{}lEj8M^q6kh}=~)&DL!&^GqYW^}G8OW|4fK9ASCEY8&-QWOZUh4IDD2e(KcSNFVw7v%uJJ86moP1n1y`X1w1w z^D4EOv#cmi%FK`fFPtSggV8VO(41HCgn8(2=64V_C=pgjn@K z32%}rws+Z;lzbLhp+uG*S9z3!3a;Q9(zenBGCZTr+vch`_i9XaUfzf>pKVxL_e|f~ z&02vUjERbFavo(9DsLoYR^n07hvpiT{{!@h;pV^NR)3tE6o@6ZP|OF4MfzY4P9!SU z#_~xJ)?#bF-F))k3J~_*oxP4t+M&WcTBx;cb&frAmLh<212PZ29x4=@(dVzbDcI=* zz#VzCem7N+8^*~#3?2!M51VB?B0sq;Z)+LhT>6V3#v57xrY9ftEuAONf;yEQE--PR zMJ=q?7dojKSZUT}+|e3S%~h#M*9{Rzj=u>k2rT3O)a6l5aHI<#6IT7Db8~WiV0#UW zMBw;Ch#kU6gJ2ZS%w0+L_lwpic{h*yMCwG{MzJO6u+myld*F49lhh9lUS-ko*pk;& zG>RRRnd@A1;qkAysi6GhJcN9^7G^7z-c2ws=}$vCxTZ&?Qf-^R?DcqRd~tt|rUrZJ zTs029ztz>{H$S)#jP{k)*qN|>MFV%jEn#OPvm~4 z5%?IKv?tZ>;L&o~EGWgm79+>swU%m_%8j1LHxD=<;#GB9rq|Ih*8+zh1|(`XQ-6ceK#8pBlH!+?e44XSt)0X8d`h8s9NfYcRmfhwvXjZ^Vc?<;rT7X=X*`xlzbP@{FosR+x3s znlPpzC;axLQc$tkh5#INji~acXxLPLw7ewC?yOzG(&gC07Fan5JQJ_cZ1?{=A3nYfbaLc_J`SP zU31@8W;||he~QY4$5^qsOFsG{gQmzFO3qi|y~l|_FSB*W_%*JM5)e)rtX+7|z$aGV zamfElO}=0Nu`4gImGBl>Sy0|{w@rYG9jjqrK`G0@%t2D#%rUf!g45MBQ%9cq^Q_aS?fo!e8Hvl?uB_p-%5PnpU%hFj9t+27f{Pd6?Hl>9?Y zq)^C|LpsnY=3|g)^L0bYm)R=U9O9onU)5z#ruPmXu<|_8f8|C8meIoYd7M-srTKPz zIDU(O7>^@=gx!I^b9gcQyG1w^^rvS20;ab}q|EFb9vZXQch||17NNtQ8*(FK>SX=_ zE0#3DLVV!KG=1XeMmApN$mGevH`R)P&#C5M<5-*6d5>JA?kPCN!Byx$;X^pa=q1S{ ze}!t_t{}jdn#%Iqrxs(dyCVZM(lC%M+Yq6k7}K(T#!7^P6FkIe(4+7XDOwt@a( zNhAHe1>3XzbKv2xnKU|T=GH_%aTm<-4(Hne`(_@a_bbbsK)S#@4>&cLGdU=Sd>@1P zc^TVT4ZrvLbV)qt#GXVA7;ldqwHhW27316v4;Oy}L{C($x+K~TQzO(MX1il?z-5jV z9WV~?znp0?3I|0-_@;i`x6y~g6BCFjkEP8&W}6muen$I-VguFwEKrJ;V+q>q*W}Y_ z!@m9F;Co^-s^9dRJMe%<)qLy19+eW)bd`9fOsKHin0ww znKKVP^-K^1{T04?d6}d313T_(-Vpr)_H`Yrr3h|0Q*l6L{-(Cv=gkQ+-EQby?I|!w zRH*psbS>()76>SVmedZ~qoX676DTF8aEtHoSMJ?YL5@wnplxSanbv;3axa$Hc}d}M zcy3&wVCz+OV6#5rR%Sd*gUdNg4%Ad7Uc}yN`L2YUa(^C4g*nA~lOr`~`Vq?`h^@UQ zvQV0^1iWcH;w9kt+G%sp-Ffavb8<%W#znNI^9!*{-V<5K-%Nc!Tkw)XmMwZ}W$fk7{QewK9z8 zmj(8gYlzJR6Nxz_qA?(L8>)u?dLvmiBfR`&Da>SL)A3yE?-Z~{i)>T ziZeUY1&_KGb5Z?nt9Z7Y%amkw6sL&TB?lb13##VvVlDQ+XY~mUHzHJ*62ow?xvimi zX``zMUqA5Pw)@TBUh7kS=pXa&OQ*X9;T4C&Z`l<8<%-UvfzMZ1uRXpLRLwtEsW{;+ z7Z;X_6U%_9!=CFMgu9Vr=&2vGKo z#1)3dpjhS&`krx$6Bu&{rByScPf0t|zk}%gxmLy*9i0f4&)Rz}kcYWWH;Ka|ddSCj!D@O#HrX#LWn(ND&S zp0hJRs@Ho#bNtr2*?YcMIsrDFZj(NGLU!V}lyou@R2#l1_{KW)aNU@=c-?899sOp) z-<^Q4qNSDBl+WP&Xjcs0Apzd{rPlz;@3G?FU4k7TI^=w@8udGmi5tw@ohrA;ciRuV z)<|&un04YQL#Yy?DG%QeoEKbOQKDpP`yN$qmhMUUw+VA6L5{bt>K(H#+jWbh_Q>K4 zmWgV_u4N3`i!X#E^j>0$5UbU8+5(nGS|0MK{a=hfz9%vzBc&Gb?F1liS2icEU4e1x z7oUJ(2FETR)#yucn7SJO1iLwUYM2;1Tdr`fE3zrsUa?Ppq%|I%HQb!ADZf7I3wP5Q zj~q3ILD*O(&gQ;)kx_iA3NPJKz_=*M4u}~DdNJ2@%C*isVz=*;>hX8>I{CKL_j_DU zIBNQPiETEvc*@qh0+yB;v+s=jT8E`77P^{1M+N^-J1> zxO^T+Z!vtB(eZ`{7o4d~AE#Hw)M<dGM zpP&ote57AoTviLd*@6n})M(nWZHjeHlAnDe9l5!y-jHK!p^w#H0vH>YLsYttLQy`R z!mB-hW=zgcU35niCzIS7t*Oe-=r*npNMFC_T*ji-%AM(?phaAA{_xl}duIZLg!?(U zH2gYAWM~i|#fC3nt^QtU3|JnD130*sezRzugN_Nc?y&N#xW7mqJPUFBOKtpne$q!y z7+8Kbv$8VcEv#YXf+po2HhOA3MzVK=8Tx!Sw?C@7Zx}cKJ^dC&M#RNMYs&y7DYtsdj-`ab~Qk#t3tz1jgR-i!O_ z3}F#J#zL=Bajf-$Zy=x;oN;y$mACP=*!jWw4MDL-uK-bqccfvv3)!=&{V)-USh`LnDa49{y`r$|4owu%Gb1gl< zbJRk9(~Kj1wluqEJ8_mrA7@CuZ3fErin~CWy)gOxb54BfR49B{A3s!c8I7**30mF_ zF)=cNCe2)Xbq*T@j-Vct9o7XgA7EtY`*Mx$_ctz`QJc4?O8aS_n&}VUU?R6!RNu!# z%km~2Rh;Do=o%ODF7678CN@srOA%x$eZ-&ayU&Yl=HIdIio~N3F{IWl?(lCMEM-9) zRowEWNsTqN2XwCFnL*xDT4{y1QkbjNQUWG>JeX{&HI`y_18zkVFTR4#SgT_*TOk`S z$`b1z!~GLM8RuqsyBR0tvJc;uE@2TGWHkswQ=6$&!Gw-P^&;1Hlu@bhq#(cz1v|4& zQe2Wv-`2%swo$u{oO2ur%S3DD6DFRUuHywu)7rEP8VT<-@WUcnF~>h(>;HQM_umcR zBx`mY0=8DM_OtzFdo=GvDkr`zG}|?HX#|h(#F#RszN|~6cXUQaalr0%yK~}p#I`(Q zj30%Q5dU58#urRTZjGnPiodDdGhTQ;t1W-VNd0tY?=rljhwX}r^x0m)#narhSBCq( zT-c&E2%f${KyFY?3QbjyP!?wMjUT@ONd{0{9=zGpIe!$=$oEcoVY!G2Lr^M^6%~q$Aot7A1I zNHv*FkzI4X4o7?R5Mg*_{x8*xqh+1aCl2&4EgHsJWuPNZxa_RcqV#L6%*~WG$TzyF z)1-BkyoOUoSSjGhbMV!3whaEB2q1eIPY^)=o&iJI!fD0O@g>|DK}Pv1%c_y9zG#3A z6eZaxmtsLIqBmbu=J|;y(U5&nipbG2x7bD`ZcKOFU~XSv)%&kk0@3>GBx^}-P;XcP z4;_u&i)7L-9e0zqAG;dm-Yk~EnIyG63E#hXk_M*uN$*CS@X}DbF@LDei_5e_A@6QO zPKeoRH-{J+4Z+eFqK|^qcu+$#1t^d6X~==}4V&=K#$0%3odvaBp_1Go02X zU5+sBKHMrht;LHw%zu{w_Lf0~zJ3p;?ha!@ut%9SIqPWsWZ}oSJk}6QnBqn3+mH)tymaLZ&(F=>J|d8!UzXh|kwziGx?i8{VlM&~RK{VXJN`Q@ zoJ@;M(She2fATrfO*gLFk8B+UNHyX8U34?&x__~T)INpfgQh{UvI0-K^psV9nWwyD zp`G>7)wg>8p_tKCMC~{~pj@bR^0rcSZ>|`*ykC`ocKsA?ezYAy3&7#(+R^JyG6zOg z9K!T38y%(k`f>o#)xMhNDow2j9$V#wc^LPgTf2=&{c>l;63?LoqOdCUZ)Bnp&v%6@ zooS>#a#4h0jFqm$+baNk_p&+6-Ipq&V;ss4&lG}`@UBzT0@ngXsA? zO5T_OkIl?N?;av2C=HPYXSV4)m{q}95LSs?J>C07dQrnzmN0p0!)LmeINGrC<)QtD zC6CWzLOI$}-V1j(wFO1B*1kGCQ;jCCB*g!29i^A>G4z`Tjt;p?G?}cv2|qWFedRI@U0SXssvN&s zA#S+qIp&e7Ua(wYn&n(qL-`<|+|OXT)`+7kg(NQFL3S?pSKCNpb-w$}fCZgyRfSxo zm{s4D=iwl3{zSz~D^Cl~L*q0#ne@j7S{qiQoFN`#R+}N3ln6M=ES_h17AA46KMDdw zTVG~c;jjKuMD<{4=(}*YA5b2d}=xLfF#EujCBV|9P6@&C6=8 zn$R~4^rV_gwj(5*sGmOcX0S3@Q*qZR1C46`(n8#187zF^$Haj8>13Q}L`0U`&eLj< zZa@G@?hQiu1pduACD9BZ&Yl6+Q9U1_!``6+eWO;=zj($-S-XZ)P>ja$r!WW{{=+{< zJ=*_uNW6sygyk*Y>LJf>pKmX=Nglf~-xgXo339Zzc}?1xyv%5{^0uHMV2Z_8fPQgv zTxkFoeFX=b78GU>l86?UcL)05{FsnlkEl-Dw*5x)0?WJVr@hhQIOOXkRZ|w*2QK}` zpeXqEGRTr!c3yuwavU5plGFWZ9q!Uw+#XWDS`IGChIx{U!_DDLC4NQdceq`Ax%;y8 z8#`3U$%Q!(Dh#CHtiXfXySS`W^^kP0&la^U9kynaP*J*1cZ7^ZL=u>bkHCMg*}f2` zqfbRU7SCi$jZVgtoWIPJ6Dk?8FiG4#=Ovch1uC`WcHz$dC{XGGp01K(1^}yxWe-d1 z2|(khZt=>~o_tMjZ1ktT#Lo39?kTd_d)z1QGeoaUx*77lTirUN^#fY@=j<#>1K-xM;%QLFOSrtnG(p`g%WYm z&ShoY)ztcUwuLaYXBV&4C=K06y+%6w2~OMH<#8fsN!!S;0;oTvpA?tbKG z0+i;KC{*h{#!?pAgVcfxI{h)wPuw#n+8H~&cA0~|In!*aZR)kx3rA2je{z0L2MDXD z^L}iG`~a06Yv=WExhvqYsG)NXv&%hBaHkF&I%<+6d4jWt<vAhw>j( zCRTj}f57Qw`^%$4N3>>9a6*2^oc4|-8Q()e%F=#mbb7F32<2tsXHAn1fSZ#$x`*uk zeK>{lF(l}1khdPhT?GahIA49t4%UE^%Pdv5Q!>>2*kn_^QtEy?>{uK2Zb}t%UwFUe zx;C#kyl0C=FkNnpef+Y*!Y$=X`Bu=uy$l>p1z2dWxgvj2QnK?WS)txlO@=;1;ndKw zhQ$7q5B6u#dKy9-V<&1xA8;Et-q=Gqlmrt`VUd4!xDlpeK*X)bJ}8@#YNcjT zQnr3TVM3A^61;>SeHF8*-(wEA|MlGYBIJLVQm0LDK0ef<=YgYM-oy$Y5tY(TWReJv9IjY4#!R0Oh}NWan%H zbes9TVRm2Vv0HEMYayVa*8BJLBZD5{6KE{!ViUXJp*nc-F(izvcx#HE_|aaKzjKmm zp$YBT3SmDRG|NLGW$hmRo z`b}{X=r7cyZfjVQ`TBa!nv5_~O$KmVie0sHZbkHwh}p?9^5Z34DaFED1rta$rax6y zp&?R5!o3 z(R~HP%tQMn3VxZ%t>WO~K(G={L`rw8D4CeV3$Tk)(xc`M?8`5&*Z7?D+f|0C7R7(7 zK(@+L@4bpU&=_x~D7i$!!RGZZ=ngQO`oI=VWSreH3@Ihn2<=#la2`IYzskuSqte?) zM;2b1NFK6QG2~1~Yx9%rB)N&dovBWppQqO!wetBq2Rc6%CljyS$B35_C$dOgQjgU6 zbMV5G@AUdz>6CQ{(~Ea*L(ljBq0Cof_v?cr47qFtM&{;%Wz28$=Fz#{=*Pi_^77^! zEsX~<6p3iUb>1`7OL_`nh9}3&%Q|ccl%sd)rMiEn(2Ukv98{9#COIQ6-^iSo<6b@W z%%azQS4gEN+V4;G_m7VBsO3|Kza!BC*LY~o>A3yX=kXBg4$j%f1!*6S=GX^}EeAit z^+Kc@ysSmN;yRnvejr+GO@LydR@OUu%YxZdmN>M7nX)3z`VNnIf&TOB`0UW^%XlqC zud1k0@jDT^J}UQhqF8!2zvP5$P*FaHAO1O>E<@caUc=$oZl7EI0AsExP0;A0fY4h!5JdfJ@ zZWNzjRAHH`q$kS^wcl=^srL9uPkE(ihhwubmPWQa{hOFK_anh;CGjjx$GuICwL}(+ z3ckzzcWx|w9&}&oDERo{l>B?J3q{ScLY$ICh>lvOT!Y=L@v>8vL9@|)%MUzg9n0f} zdHhVb_)kPO>+w+Lm=ZO4OzE3LS>0~;y~4r=wLzQHHddUrfv%|wmHSsX!H(BMWi?f* z#26scnQu-So<rZX{LYJ5|p^b5y@JMZ`{;FJwZp^c?(@$6;`%HKdxy^48!}&!g~J z_h;^}(T9ooGHAk>zuR2x=(hF&?Md@R|9Y-O6{r4pk1?(H&le?9_4}rL?5Q2)A64~n zN;v5T{4`Z<_RR)_02#b3?TI)`uTbegoZm^#Fsi?bUaFE6_6O)Ti8*a{$neT7 znQ4urk`9t1Hwdn3Qx#5v$W4^g8K9u*H-sMQykgGm~n-E!YMKX zhXo9RUl_gSU%6J#>7R>srZ-FEj@?N-RhGp*;;TO!qK$ar%w%6nt|cHA_Zl4!iV%nG zh%p@+jIvc`$|}walJgV3xJ-o1?a$emQcay;O z{Iz^Vr};-34I+%aE2BX_dg$V--4s?2V}vRJ(C_HB;obrwl`$GNmaJZ6jy~iay>AT1 z37~?m()J|&Q=Wse15M+*9y zo1n^?-cLxw0J;|g|#QKzY`q*wr^jEy01ITH?v;B(vQw-6g z89^K95sMZKD}RLK&=&P56?1UXHKq=BW=m$P>7z+LFI#C3pU?~M!N9Yy4s+o6IZv?~ z@!E=$3(M2ARO;z2>~Ovf$m^tBamJosoaL1?AnHf^5)r?N?)H#5O>#|_c}WB&tcfe~ zvnSKvH!yxm>JQF2(yz%l`TMr%vte;;vTVg&7qU$091!x#k8q6d?k$!mU}m=k@u`MY zab>AL=4a#2?FTuv-Zt0!>2#f#`m6icrmV_mE)m%y1A4htAgicTVF~V+w*d$yD`0=W zrqk+UfVKotm5Ia(sY=hycC|mxkqN{zZ+iI1THp-%58T)IPK3+1=0K*&eR$6qH{Hm? zRY-S8K$X#U5;%OvM0Zuv^2)(Lfd`YlDtFYud*`b!RkvazV~u}zBu^Q1tZ1$pOO6Z3 zs^+$EU8}{~J6eP&xD!5c{vavba1@|Yns8lVhs8Y{LLPF0L06`coe&IudPNOxDl_RS z9n{;4d#BpxEb>@702tQ@W>S(%n#!Se83Qja2TxyAk)dOyzIFA^0Pt>DDebUSc6J5@mqK! zwF;OD3=5?@l5Z#h=`$RN*=X?IqW+gDPg%wrE-CB)k5p%F37DI3Lw5lE6py2kc>)ls z{Ns}g+dF}ua52RM))G>6O9%|(raZCgO#*#<%h*rqfy`dnTA=QWb%SV}9zpB8r1cY| ztOF-N^uk#+(u(6h^{U8d>Y@qN3mClsUPTt6 z4o9P#tGoNrtG^T|lE2)|KBLf$uwp*$2*1!S!x_XrZ5=$V3 zx}kqY-LfFT8lB=m9hw)R25tG8?PYq6>_cN{ljVD^VDRi)xM+T9kON_Mloh6OE(d0H zZYeF4OF%_Mcg_aEHtU&4$Ax;evyJL^uDNT?OAY~;Z&E6X2?Da&=7zZ^*0cm@EZrTd z=k8Ull-32yozB;{RqZ}}q>Trn&C&qr7H?}ltDk6}#2NkgcveFj$xna&N4)3R&Li@} zh`qlhzWt0;{5qCyA5I4Zfr#B#J=rXob*^^tVdx{-qjQJAC>u>UawhFGnSH|+ta?|3 zStRB5!oI?5d7Td3{cu&MZ%KH5r{{CPk^;U+yD>A_qOn2JdB-?*X)i^;m-$BcT6{Nz ztHptH-UwwoZFKSPPw6(<8%d}_BGI-*Fh2&;Oe9<`?uk_9ri~wn{Ozn<$k(gi)h#Z+ z=#Jsp#2VEiwQv>qOLl8FrZreiPNnvhAmPGy!vDt7Pshpzm=2c9O8euWMa#+_tfk_N zJymbD3Uq_Y)9lYzjo;?Jd~R0@AB*2nz`1emxqH=FRpa%cMQdcJOyS61HF9f$as7@T z`pi4?Y`xkN^P2jTs(5YP=rs#xCWw*h_FmMCYwT!}Z7R3jDc<=S`s_WjGj(>FvD4?c z7NYlD@mrunl_ks9k1-I+Kh>wL*kKyc5_!`c;gxx{3~;FP21^W?y1JS8iIOQ+c+sYS zjDNi=epNow3Q6h&oXrmnaw2;Ehp^ZDzk(EP0*b`37W=jw^_GwtR1$B{KOD4F%fwL( zr&LpVsg<}!{qm3Y6t9VxVbYNVoqh_|LYVeGJ(bW_H||yy4kMv)!7t|D7}(pc*CmAv z=Tx5p-g713pt-|tYT^4hdgb?=_la=69WxfLH*kJlJaGS}1@Ri@<%lpDOgd$(rXA1t zc{La+T)4-&Jkh{NSN_agZ2sAun?pO<`Lp0QV|uKz-%MaXO84howbZAiT?@o8J%F}G zRnWRVM~N%71e)Zi&E87aQf;moxST@(`VU1suFKA_V|3;yfPluIDBjxiK(UkC_+Kw8Mw~f}@;60nbp4SP zvM6r>u)dAz0qqpVf|ko2iHlV-W6cIRsy{)&765@+=Xt(wRd&V?PEJ%hm^D}Y zt`@p1oJ-NCx`$1%L8TpE>{B%g-u9fqg9YwtRP{W{75BwlN>98Kybj)+%0zlFs_==O z>LOaupn-{JYW{X;dWbFFc7oKMF7Mn9&Qn9?#X&jVa{aG%BWyFAy%Iy43%503Eh#4a z>I>F}pzc!#DoZ0E7STxW6K1bRt2-pWc7@<#C$>8B3X2mifDxlHy^3sH*T4Mw&TgUc zAy`NNoGOICA6+~k@T8hp?^G6o?QhWmx75faXtJftV7kt7`G=-+#8VgbZq21p4rOQ- zyyqZ?`9jU%3wznK{oJ*|(ceF7iiO(WN!P3!@KXfnMth-2qPl$0@mV@rgx?Y%5`{~h zO6)UhGJ$>0_137_VVI#1BzrFR(y)rnDPD+B5nuIpuB@-&)2yz9Q|SQVl_Nt+f?2Mk z-T_Ro!VI~AGDBMA{6ky5#sn>xRuB>hRnrbuD$ZNmE{Ub542xOSkblWvmgyXhQx zlG<`n*ME1Q8bYY5=zzOBq0n)+lr08uE_HZv9t`79wKE3l5L)n2Rl_h@GQa$x3mLbuP)E@6$pMrUrPmjVj0<#HUoA737KLr*y9u7IYkU z=2;!>MDl3Kk!RI>rL5}ej$x0|6BYJ(Cw9NALQQ-Z)>vAlsRSML@#G!Q$dYB85kF>1 ztx)5g5I6*uWb=whNj0%#dGFKcWtr-VWb^Qdd{Tj4d4D&>HN3Xh7WsGpT3#kdOuMp^zoZq-OhznRiTdNEw*lko?M|THRBfy&r_{Ew?XGt@{0&oJQ-H z-`23_Lef&(_K594fs)c7Owb;*J-ZPSR<$^%-1b2t*D$RvvyJDJjY!TW!&j~CP1VXl z*^6gT*6-WEoIIOM^y%qu!@VDSakDP- zjEhqei(i-b79`0EO)*ARx2Xybt+kg?az3cr5sCd4JhNKep;z=hPyRI%Rx)kzmLMwy z9Bq7mI`HZ}Z&3_a5ioI;4855~X6LJ?oA_8FEuDbyPSVF0H%tL94@7KVEE_4dV48uE zi+6rH7EyTz0qU<9uFB9uAJj28lG3vCW4Gr+82L7u<$HKgO7NOOT!U=I*|HTIzChIc z4~y~1+Nq%Vt8(bHZ-`wj>FbUJz0XbRb%mcNZ48#ameHux$z~(Vv|*=1hJ`Gdbg&uL zrrRi^KIo1c?1#`xjn!0&%R@cY1;qYc4U@S|slmkf`)E{Sl+YC#&kr2#xJZ5{o;iiZ z1fsP4mXWvB0{BJyhK}S9E^SAwlmeuaV0mhTpuc?^%>}U_#)a^2L0$;Homm?o?ce0 ze9_lnDi$@*o#0M411)24V%#H1q))Wq*BbOYOx8N}dVrzolvuGYBeE4;UCZZ zCXRwHV%=uiHeti+z4;hL>?qzKRmsHX zU$w-kz@DVlEfwnw5n6nZpl>H8`vAy7~4u`Iuc7qP*tPL)K0s;DYJ)%4vt<=&DLB;{ri#U<3D$!z6ilYaVWF;S=6(`>%>m_L$t?W zQhy=&NAIAXw+IE_hr#7s!9dlEY=9NRKm$uytkN*-Pvx~L!?KG=_Bjbu?m z#0Se(FwO#t?}+ezdF>#Anp^IeVj;%T-_nO+U%t13HMr9cqr2EeDdSp(!Yf-#kK;_i z#)|26w~!4&k6REgpWI@kSYRX&xES+FpUV;Ys6gI;V~a+C3{C#PPja=NnJVjwI0NJP z#QNyLHwRqjr*pL7(z8w)XYTGsWrTYONT~_`k-u!3%LgndXV}*qKWMRM00B|t*W#WN zj-kw*Y@(BM4Z+{G(i*WK`HclJ<_-%-!`OQG{Z~V>se{mN+fwJxm`KkNz7bkoIZt>a zPjwzU-^PYd(H(E_UDZl+lXA_;g+qc>F2HjII80iSlQWo;GZA3qp3BbN)})2p#W<*T zQY=H!bq7yq@=P>x=wQTNYm6Iuvl|(Z{Gy4?^;b!o2*OF~Q)yE21S1px0sMiO4mS3c$>}b%=#S?C$2FQ?^Ql+@DV(*fDYR-M07Yf9LQnaZ%IO{j~ zOyw*RY1cTu2iy`b?Ox%`9jKs4i=!skfIP(CujFUFgrh-GYzwQzd~&N%oDEjxxXu&s zAh=KzCD!5E`_Q{QOkzMcyWn=QVW{w+t^f_lD5gbmbf^5d9J3G~3KBuBN`kq2zoGs6 zLQWLiVdq7+tgpZM<+$m2-R-6(N_L1>u{?*Q3jmF9mm4S8zNo2o{8H>RI`87dbL4Ce zuBYjxQrM66KGq>I-mjVwfh$5ArQg!~;7-SNCy28xjm7RiuY(H;kYA{Q4&kL8o!*k; zvX&G65kB<}<&Izn(pOAXb(N#}B-Fm0@$DzPBb zaR${X>oA8)TZ*Ezb*YE#~w7u_{P6#egA{U z4Ef3zZ-Cew4g!M*Zr;NCLz&7gZOVy8Wvg=jkK?~z9ZlIYbti4j363;wd?oQ^_HUl+m|?CF3Jj4!56kJf&BN4mimw%(LP;9fC!o3M z$-~n4W}L7nnu2Qkku%k~3xQ%ZJe^BF*7UhnLxN&paR%9UM*1{GF;Jq$S)cu>+6n&+ zT;+8~@dzH+0$?)zqY}unubOF>DicU3&^r^W0QNzEM~BE7CEfX1)f5lE@p9z2^CqH- z${t4E7aE72IFt~8{PdVj#$4-Kmgf4B|2Tx+9Gg%L5Ber^&6>p(E6D@X;8JO?w_SGp zj?WDT6XC2flQm+54&E!N-2&&g+2*VKI?g>TOc=gg3_yPHoX08OI)TZ9oKjIp&?+16d*SX$bFlZ@oKBoEEws?O|r)U*_MW=av|^&1v+<=ez| zt=Y+mrWL}EB<$@J@rF}-N8BDvQsK*C{W&oqOCoKW0dJlCsl#oO{+_8|-czZJqGC~D zI~|om17N&1pKtvf@2-Rc=X06P3#We5ZJu@&<3KWHt4TlE2Nq?~q-ji@!Tq1jA__H% zB^y@CAG^K^+O;7d&$xDRk~PTOuEQ;h+iqO^B>mZ$g0B3(<;DIVrTjm5t&k9b`g%AI zTg8;96`Cr%4T#wonB5PTGbIXaRDKB9rf6vv`tq@yN}OZ_I0?9feDo-KG>v+;i8Qtc zRKpW*4c2O@6iCi@K9LNmO?Gqjk7X7n-XkowU*cyaP6k{5F02h)V6Lw&9BCtx75i>1 z4t14Fq}Sh$)k1Y5g;0i{+dOHHIn=eQNp)PDhdBfQUgM5G@1sXHQuQ?LC|P*-6+( zjOB6wfV@{u23_ORIVRAB5oSXKD&wx0EqE^jrqH!oJ-E4%>Ldu9m?_TxEgL7@0w#VL z3{5VHs4#}23n$42gN55NOY`Rz2O7z@MffXISoxI?*iJQRIb6x>_v#(;XGzJt)d$&0 z`9Q&k=USFp*3&=GPY2y3|bv(S-u02TsvKe)dtn=_6Kvy+v96459k zlAC}?mqBi1g^(?ho6Op6#jbd~FMS5ey8Wu0V-LtK=7G0zKXRxn5cRgLA%ZP-J6t=7 znya3gZ1n0XV9a5NtG5R-eCrP1F*j8GGAITk&{q=CU* zK4pW7{Fv>qF}G`BNswGMn)01kWEWMqjuZnt1E2d0q@ynTw+|z)wtBc>alX{2G~-&J zOJF87GuP10&}WHt0~u*eZ$&lSd!zrUMjjnC=2?lgC*Y%ODlPl-teDWywn$O2<`3PI z=_4YJG4vPA4BRg_^+EEdxmsp z{T+YRK6y3fk4D&K+9~R0j$P!+>6p^{Y%oRc72wL0Z_J_Pl&(TdbrU;?JV3w}9`or- zl7gX~f`x#<$=dN1CL))6>RFN7xKb;=wMB!@1-ZmS*gKKT%Svitd_#e|uS&z36m9$+ zzCL8=^WwI4gq=FC%6@d2kYo)~zbPNMF+}+vN?t8v#}lNB45M(dukMt#b;ZfvA8{un zA}UPTSqZAySH=l@X&jPwsqg+v^YO${j#c-!>#N&9;qCUmhb1=XBRVk|Zi!ODqt3k0GwMM{l4pmNoOQ+->NB6J&+oD5^ zrq5@e@;OsO@5Q9xqrnlyGZgmZNC2+S{fxTk#Y9r|3@Mc?&!1Ttje8$5s*l2j~FMzdW0yI{@kI4NC*pPdSu>mFB^$4H}6kvWT_U)*bk$=B6* z#LeHFAA7LLDRDT(Jsu+-!52rbD`J&*H5Q4s1vtB=Iz3GALg6f_0?%?f9gQvAwDQ|x z{xlTvJ7R*z#S#=AHNFcm!F10V-QEihAW};W68JVE2ryF|uGh{F(3^(vRtMTNhk3^+ zn7$~@z-+v{p=R@`;FQZ^RT5U}|4MiY#flJDJ`hE=GNSokCO{j)mPi!aZFh_Yn#nrM zZ0hQ*vt6qxyQ%(^3sl@;!{~IyFRJXt_f}uRM za{9)@uT-Qek1|$uLF|HlmHe7I-q8x*meG4bPI>8LPO8^sWPk)U-8>tFD>e)5LFJ#6V+aGV_VT|LJx@VDVT8kS*Kk8#!hiZ zbHFKqz&trNF*6vhrK(`M$GhBEt{lbZxk1*Z6++rj{>0;!}V~6_PWu17s4BU=SaAPD$AbypgR5#-Lc8Z zZm5>EB!mmVLG+nngcVg7sdr*PAMgzjJo?qOTUM?5J4?KU?j%$j-dkN`bc5P`vb^RM zMumIa#%zLT+Pj5kLC^vo!MUhZU*UqDFU;H2rQ2q$R`w)q!n1K14|kUP5tUr5m@fdmqP>N3(E8)tEBDVcny)FOIY`db zT#C&F0r^#cW^cZrT6rA;{sdyY!;vbS|)FS>|3hZa^EQZN)-WRE3c_{ACFD-f222| zaiG4EI>c32Idc=Q+3T{C&7&Gr11WJsZJ1@*_ETO=nA(^nkRBP%L}M0 zU~aZytg;*{H)NMcqxlMFV7ld9z*IQ%P%Q@OUJqu9w9EeuOpkT`h#^)>*kt<)$gCR& z!q<6-XPZd5_xIGI=b&DnpzAG%^zfaz2LWnG1o&JL{dD`khyvB;K7<*)<=gC<7CcMc zv-6-(_5*yw$aX`{P?&bwnrjOGa`D)U0}lPA>4G^J*)h)9;9#6feU~~=%Jx_cHF1k; z;VPRAueX@(HRYbuB+q@PJe|g<*3hpu-1?WRl{{e9$&(+b(m4TedA({RZQc~4G^2WY zG(G~qS0F(Jn-HyWHh3^Hh|@4U+geN>WzFXZa4!^#^mngZORbAL@oD?~vzy$3 zp*HnNN&d}CvaQX(jy^gx^SJn{%Os?12Hi|Q;UsLMBUH@`RO)arUP4lE2kLF%@jF2x zoM)VC)dz=d7>)j|(wG~5U`0cJ^03%DSmCjT5!n!W>cN>OJgiwpdxBxL_NSLZU<$pz z?CYxHAG%Y}?{Z&D0*R;D^6~u^yvJcq-F88X=dovEiG(q=9=3( z`{bNSLIwSnM8njE5O1Xzo1{PmC@~RR9T??FPn8moeM>ki*SG#zHk6venM7=7Va8mu z{+i@&?j+D>O9oBb8pSeJZ`!<#`csq*R+%Wt7i=8zn6m&<30rH{e9+(qRpd-wBHLo+ zqe>VuOv^vCEzW%ykNRLCRXDWu!#ZZ8r>C=`mA!|;M9^BobC(rwyc|PCw`JBvuGMQvw*WP=r-vV;!=oF}Y zLS?7qRPe#?{Znp`%5eC|rI8rIymYs!Qi~(p`?@X)ytvYaNet9C@eaaB)k?O(g?qVe?Q(*4I@D%9k?lBs@C>|NZkr9(d8;?B<^Fo^K4CB+rywN zFTSi%oPT%hqZr(A$}`h>ni4ntgBQN*8&h;`RvG(!GfBnu+*tG*1Irz3=Rm4jx}Fsy zN6YR?UDl6%sKHlIBn2+;{*Y~J=x*{ZI!+77f0Z|ym`KbqhAlfY9kNhyNF2G84v^p{ zY(&g?ZL95sAC(e~qOxZdMRFx-2D=}vM%m^y6WAnhI^rBlddvdZg4yxr9oc`IEvFd1 zPR1#pn)+n$w{cTIlv7_v=DeWmY3VyROD@0*}{mP7rrjVA>1#+i?hW3YElQgKgY4Xc}Q#p zKrf`y7|jb6@ucgq=h9&odNEb-jEv-)+(!m4jGc!g!yjvIQyeiSHq=SuF( zd!0B@);}JzR{cqgD`3Ftig6V4YjBP^t7rCNr%jV3?X%lU%ki5Qj_9YYeE4s5 z8rIc#`@g1P3FZCicA{D|mve*T+u;Iw%IHUIWF%=c@nL5Uct0{?k0z722}?|ao(3ov zsVn3p!d-w553c&7FL)wN>baqfS0N$PDp(4BIOG1e7^h5p!=AT7&VmQwK{fu+cvMP0 zwXOk5p44sO^8-CTPVRHwEhWDKkAEmZ>cL(;*C!>QfI}DK!}kujD?|de?n^ya3?gV& z0v zlQy^0B$U4Yc;*#WOl7m9sKo|Oj!56VK$78f9&L^As(S6zibDC@NU`R|fl`DzJwbP~ z?l5wzzjf%ZzUsaf?6?*^*hKW*I8&9h41z8E)u~)Ku7_(rz*e+dWUnw+qbk<2<@E;t z%fs)^N`54p=6k?J3#z{FnB{Nw5B&zvHPAlviFM^H+(nL6YKw?z)qm7VvG+0Ud{%Aj z>?~D0`3B0%6d-nDYdMEm-p{hCH&GJO!yU$*-_DQ8G@6L9q&$@1{w-q)|2i2MuP*ZI zovE{J40WKXUS)(6!@UL}Vrd1<6uK%WmzymB9BwPOXd_7E*^L6(sVV5{To5A3LSFtC06=7BU`!vI~n1HHV`?(;as*P=F*c(fvDw)q$AC%AV`rD}J ziA3F4Icw>rtGgFmq@N-w!o<&a5e-wXC_jYm+c0@K_D~_Hu)r$u{O$paUAFO!BR;+% z3X|#pm_8Fpdm~~Xe=2NtRI8KTa{MI-DBYotP8oV#Vx`8DfbArLsyJ?39r3a_ee+c4 zs*H5Xb?G1r*jTzronG||8rJ6)P{&R6+1hBTlc<;*IV`9p&ENhTI zhKAyye4U@lI$r$Jo(N|SW_X~;!}Cs7TeE(=p24ck!IN4Q=RA}nPS7kq#UV0ulR$tn|yT3D&XaQKflt??hCxRX3G zsS<)#qEnpOM4_sgj&r?2v7d@#yWcjX@_Df*z=k>mw&UX#`fxCAr1C7{I!V!c=mnVg z;WHI~W{owavZjQsM&)f{x`jXq6V0tdYGh;m&5>a>R-(33tzpM@WEtZl`!40afAP7k zDG0>0Wv%Whu9$f1#6*2Kv|@>dVsGTi*9399S`RTCMeWF4Rzh~R+h2t{^L({I{%y}N~RQzj6V7#yncR+lF1d&`53I=WT<>ysXW)$ zY=r|`_QkF#_7){&)duoX9`IDB0}}lB5o5DQOYA|BLY>W}<9F-?MyA}k2@sW4g3s+v zKdHLf6$1%f#035cKU$DhCEQT;5^ysAA3fpq>48 zudB}&mLxvRQ*7?FSg`F;)EBb{+TZD;3Kj2@7kJaa?p`5=nthyZckOK0YO%tw%0-KF z-Nh0mdDfv}nH zM!vERJwkyMMZLFeREs+FbJGaJc~z%JW{X)fg0A8e*G$Z+m_wU`+f)Nh;%TJ-@LGR% zXiHr`Rn5$Yf_1gwP%nPcw|EgwOSqRr(0XwdoG9&w&at7-LV8*r3Bu!Kvo8GRA#K6$ z-1tnQDqdzi(91qa3-9b{jN*0Gj;&7G9AD0ak;gXDID`n-iIK_hjt0pksZ4XjRHxp( z;#OuK^vIY_kS6Omgi@(3G<{Z26l2&|WKQTAZ>F@iIzZZPaaU+foRs`HE=w5RY04iO zMUJ(&p>6k<2mrt09H)%W5wA{RMVMUW4Mqj1FV&|i+4tBhP!wQ0g;Yy0| zLRy5{xc(^X)Qa}y0swCX9KB=-54dFeZu69C{*?Ozay@tJjgD)%E=H&uab=Mm;fsLx z@+7Vn_*!xa9$asnPWr;y{jSb??6G?*;Ij;2V%0oLeeUsGTTgW#;#e5EM>H(f!wt0K z@2Qw(v~#8g1=0>BAa!LaIJEKW*QJ#n_(;XaRVTN%IPp{NxW)70!jHRuDC-7Ri_)V$ ziqJJ~#TWNK$K?I*leZrAgD!>s z=$gj(L-O1ki`uB9PlmMBHs|cx*|oDowPx$Xqz~-_V$1=1?6HvbA%jM+9G;XjQ9KzS23x#4_w8g6kiV zD=*!5cW1R%9xc(IaDHI!EC#q;7qVixmu9CLlXtf%_xMm2s6H*G%7&*S)sUy{A$k(r zITivPkD$~%MZM98_c*!>nTxq@jx+o{)n(_N8rU*m*`4vObmP3JZA^=7HBCg9f7o{X z)P9(hVV<@)ElQ2$z{yM_+p$G~fl7WYZzY74X2cHVzIorK2f2U|`E;FM6l;-7&`0_( zd7X8rq`CLLtj9k=r0BWAlnH&b^>m~rOg4X7pOpZ(?rJT(=s+k$XAgEIV9*#i z#Bw+1O<54g*6@>+gR7u^^6c<7r+je>#Xl5c?fvUn7lAz4g+E75x0idv2N!Pzl&Xa@ zL2lyx+X-$xm0Ru{t;>f-{FB?R@#txyRYof z<KIbb{+nlY+|2W22_iR1$@_X}u47Lrq}? zqo68&50Hza@C5X09P+Hod604IO?$@o##jXg1Fw|l=HwhIs35Hk76`;FQB~e|Qg4rv zRYq$sx~Ke>pJ6L3XL?7aEf9{#@{Rf*B3Ld(TWFP5p{h{q?6CV*8E2C^#vbT1` zQK*spg!EhWKNQ4-ynp)%(&H}5p}+eNrJ8{an!DRx3G+Xacq&(p;ol5*TL(TRzz=k* zhFeC%wB)0|)jlQpP)OCvCxKD8E|vy~pYI|H;Om;g-j`C=oMk(D<`1G?jCB}QmU15{ zF`L_;1ACtTcstw(8YX<%wSLC(;;bBw*`0v`R=-F+i(<=HPUsK`m+_9Z1G?>kcW=qw zqz{X=zEb#yQZ?mkG4*jxdDm8a?H|gkFK9{YPqajP&*3<@vzw(KqyDtfFs>6Di#wI$ zNaRYbFJqGIT4#wp&{-lL+1tlu- z8Ey(XPNAWU=X43hA%30@i!NdvuW~&0vAzYXO+lx$F+*2WHH_3&A%7CG zXe0IRGokN8O^cb{E5yYK9HJHGGjow$bb6Gw+I1w^9Uk_oW;9YL&U13ZC|K>l?858Q;YXHilg?+fxb7;9qA6p zX`GyoNmdnrd+b;(P|B>Tn2j|yE)`F0A!4^%8rPqZkHw^S+kt^ZU{Z?6>kP(!!3&f_FyPUb&wt zJcDZnzGrqaO5(YO)83D@sn;)iyNdh;XiciE_u?Ttdp#?H;ycz z=$~`+wOPL$J*iB+OjMTc%KKJpPP(FTg|zpQs@;B_5x;i2nkS3xBeQ&2Mm}cNYOz%} zoikjVyebFb8F-L<)VcL9tP45q{uV`?9=m0kc;acFBW%}Tiq{SE()eca$=1D=c~FO( z@qzu(H!tfxe%yPqn^74FVI@3SbBJ=fWSBXC9Sk1^MN#2mUpjXi6 z1tLo^%I!uv0auYv>x^wd;ZN?t#!(umV~t{&9y2&KGx5wIA|4#flDeEYxPO$BnL^^+n+_qM|^s0Ll0r3$mdy@0c)*n9jQ*!h#-;*UMtn8|k zZI?vS+34%jm^`Yo3Vr?saZKogmTE<_S;UUHYB$Iwfz8#rUCeRuJ8WM$mj8j3S{~)h z>8~d5woT(l2=X3YC@~gVf7{yRUy?t7iT7FJkJtu%OSI#O7wC8sPZq~)aPY3DvTv@# z_VBwU;Xu4pwVRmAg^}L5q3q?TZ-#TR;}Rl)cM~2UX1&ZoeU_L}RAQ1h{2J2+jbWx$ zx2Z`H=ASx|s)6KtV6fRbX&E<7VpS}6bOwf=#|ROiVbz`pTJC#oQm#Ntyv!#{THMzS z5&Z-lWtLtmGU$st49jMQ`+}*(Iub=Hhh9z%GQ#6GKZ4#3`d*?#t6bFBVI6pku9X-UMkqR;A*kZw6fuWQ-%Y(!av|+ zpQA5_)&)IiaAv2{vSLLtHZbx}8Al+cPp#!a7J)2m%q7v~{vS&BK_uImF;^$2piFd% zjBPtm`@SRxKg3N-sn}#v0l<|!UQ&r)tazlgbT8MvfD}Vr>orM{FOkH&ahr;9J1}V5 zax3As=+4Y;jqbg`Vxv|wSyx!tj_>A18%iN1amM1%e_|R-ZJ~s}&tvRdu&w8LTNz6iUl!e_^O~vEnfZ=S2v)V1bPZD=e_JPMpGN$>QG1&G zes1+HZ4+c{u4pXkJMHS%Lw1r|9_MC!F#Q%&`fE!5@&zvIw8e=XbA*5k=+NpMlBq8^ zmOWXklbmI@yvTO~SiU#8JTmaxo->sq`b6(DpD^oeKc2=<7pluagJw@Ent8QmWQ&A< zWaOt@n+F_j#&;*;{aqnNK>_Rg(DBxaW+r}g)V#zrt(b^On_sW};eMfGvC&{T<`}A4 z$;8q%?ep1-Z>*j?Lz|RN#X_rF8H2ndCj3`5#FJGzv09B!OUmb*O^Izsd5G05z6 zDsemfoz}i(IQv4i-j7+2*=yO#J?rt_8V^Ga8i4kAlM;Ecwsfgj$7)#WqE zTlxD-OfC09yrfyBqVg&35$mCT2&0bwe9Bj$eXz%iTH^U=A>%mCby3mI@QAMSq5yC_neF;6OtC~5U z;T$?^^o5vrsc641>uHX2D+cgs_Q~pk1*8Yv$VrphP;S@PPbVz>k8?tb_huD7z{(SW zKza4&34*2dQbqgP2u~n#2T0H&;&9EXwwxOg(d&+{a#yciu(mfv&^MD?=E~b%lVAIW zx^;Z*5B|krY!3fD^5#oqM<4ywL*N0lg5GZ3`hGl<(TmTkO>RB)?T?FpC^m!|+~@k+ zs|To3Hl`0|w>G6cr?<9;g90ygeoy&?x!CSSU3O)wvXXXPY@qeO|KuR!1rzwS|3l# zAPn<}U|x;^Pe)N3|EAyZSqoxh+dW2iL{aHH#Plim0(svJ*CUxkFgu&{>iiAgPzi~M zNYDUIC~RDfmzwc_JnL$`7hDIQlW|OxLCyJS!~7z%e@jfcn&TEo$V%^}Ko!1tcV|m8 zIO2ou7ejawi~aP$$7+X$%ZlN&DULk|)S2qd22Z(N6NQ4WnEnpbJ*_wRkp7w2Tyy1Y z|A2x=@d>BNRuX{-^CV0NlARL(9@{8P&dY-Pc1!Hl9U48@_UadfH6GPU+>L&5rMo+mprW<#tsQn4jh`X@V6!#XcZ!W36eY<7r z7x{4lYL$cL?K6#ZetcTLVyiMgPx3T=6{nv^-<2K#!%>Zk5?Nh^JSo+3)Lt)sz%pvI zGECQ+sg%i(Cksu+Y9xve3OQ2Yu6gjk9_Cx`{}cPQTgD3kWS*YL%NUJqF>xKG$7-9 zk@ej{mk&vs9+OZ*-si3&((sJGX9FzupM@~)lUQ-X^Or}F;YnoqX=RoxjHlCOS(K;I zim}TTxIY{@#gTOI?P<~cC+@NCc7R8;gG|II%}RKdOc@X_e-+@{G1n$G!M1# zCJOQ8Ht ztxID;arG~LSEYGCHnI(b2a7Tsr1EC32-Ves$alY~&#Xwxgj4YmQ}_waMn=HqSFrAN z=~bUH3!WTqZPq>QFmDAX6;eqeCqBsN2D#X@3h<1m2$qYO^FdRV0|zX{wLcp;40wGx zRSzlq%E*DvWIwp%GyvdnyVH7Z%Nm>K=4LSOQ3_noLJyJ?SDR z65K`wjzvKCaMoc)WBaonC0F@p&Ed~P_Rd=&B_-o&dN92IsvQFSoBXd2K-g?@eu5Ai zR|SG+Akrm!G@ZIt)yrTFj-?MnB%f^R7V8Oge!#yh@8K*d${u;DUO0RT;2QpWUTy;U zdL)GWMq&BVw)4iJ#zHBhD2S=qqq!tSZa|HTx)|Uulxg6r2Kc;t!>2S`p?LKxsNmZW zOQRwF^3B^mpyHBIdlI;)B9k*Gd}8O)7AX0nOI!wI+y|XWCKw|iw=m-GxS?(l4C8ba z5#lM0wmGFwco6rJtkMyCrKR^2%yXW3M5wb^6n&yAQ!7sT{9a5pbSyA2aT;G0hI$3!A2de!G{7%-It8m*qb2?r&W-CysJ=jb$g_ut02RqV-YqV;`S6QfvEs zKF&Xc`|`FK*3`1oO{SwK5oZJP>!e0Q70PJnIM7mseJvI$G)8?Php`Q0)>4EiM;>~VLJzGXUe$~8W$2XAAO*5E%z&B3 zymXP+sRrNvG03&}G#P`d1wa&y@V@QVQm>3G*gFg2 zEXE@*RV{PYybv+)u=`@qF*Pfk24LbBkpL4lZJwt?{+3dMr7s`^Zc(e^B(V|oob*=_ z6bY1}R0(78<`nreu-71);@dFqSO=AWMs`;{e!j@>kwvSi*!0;wa3*I{W4|KGD zJ{rvl9E^C_=f^c}P1}^>l7(%+rCVHDmZ|HF1dZ?2$1Ej_ zvP$LgH38sTA=&x_w!%DEhlxqSKvChse<wMK>p)INgR#C1O(OGkk_DQ!LzK-1b z0W?_SD|ID#5|TR(*faQj7R=VB5fR=!I07jnklJ^74+!jg*al8e}Lwa}ImK2t)B3DP|?ho120=xHQQ`OI<00erv(lo)Gqdl)Q zVd}Im{KS6mpdRQ8=X#uK14<35Lk^wSBj3Xn&lq~sG*7NT1-)CfK@&-}b?T%)`Z=yc z{ZQ7UI(I=lg}I3#bE#8xMX`G`>f^oU)_yQu(`)lxDpP@{$U>eO{Id zy3(1~aEe)si-08xM~jb&6q_ra2@>~254#(iqyU)k;4!!&+AZ?moRLIf*t~k&@6x{% zSX}{tQ+$1jXL?WWYe5oQk^=D#m^Q-Pn@f4Z8NeOEDPpO)zg@+&uifJCIf_6NA}gSU zQ^iGK4dHZ`jRs3imyZ=rM>z9IML1<}zKbavbl=I^|8!p-+o{5#`+Fyo zA1@*uX)M%SQyNj>6tHZ!U}f6^gJ|Qo>H?5dAg0~>usRq-gR83HL2Q8-sBUq5R2Fa8 z$^N$EzTU1BglyeD?bw;QkO5&wWEx7A&H&-${%+r^;?%O2quXc0g!2dYfF4%dUYdbm zi-~nfEYmh4P*gr;PFaT2h};B5wJg6P#w=$vvmoKI`}EUaf|}nDW=9S^j)ZYZYRY)< z+&Qz{K0~E20s58O(qmS?0h~|{@fmVDe+utqrbTXCf{NxBDN9+`A{}mAr6qPwi7q+Q zBI%5`f0l=e)|}QQKz9Xg%3{sQVAwTG!QV;PkfUPFE85h%`zrv)HGUMV(9(70^PnGR zVIMisfPh|RF8xM{i|@jMlQb3(qSg=JXTrQLaUv^iNumutKSg_mxKkh0-~R|@1!6oE za%0-~cJeMf(s++1KIn~k^({Z&@3f0BFAgzlL3q;E7n`L(544~vD+t=w=bQe zpZh|$gIE$zlwiX4X2fUFed&8qp&E`iYRjZYQ)l{4G-jS*+IV^jZ)@+wt!SN?py>xL z!=2U3ZZ~D_?=!}?sXk2|BFXQ(g#~y@ocM~4y&Uye=-RTO-eW&BG1NUlku4 z_cRqN$H{PnsFK#@JQs<{ybryBID*D`?zK>GRmS)}*{9UL(to^G`8QJnspcWp zpdPoMU#>%PfckK3x~gKSOlS!$;OOH zG9fkULlD}RN1ebP?h0Qg9re&?@6V4;`r~eD;?90(xvl`xyG<*&?N)pcwDfp&LDv)4 zzZl+3S@au?_F*<9d33yT&t$6g0a6r;SC#0a;I#p1@wTz>tP}g#ZmkD+Am1RmtUP-2 z%*D^YzbFmJ^JX&;!HpU&Tsl4ZMJBtlQoB55nDgtWD-oQ9lm8goWh3vn%JEiP22!{{ zIVH%G(7F;4Ngyn4ONf(e{Nbe=&jk;>DUackR@9kq*m2oWP;E_~44T8fL$u=6=Co)z z1N3+~lObD{2M-#U zE(GY-7g$?n>ErSSvX(EwJAeHb-cjTn@IR)e{_k#H~YMZE60Ox z;UWJ}td=Q;i1G{HqA(p9NtNGfAlm5GDRMBzcYTW2k3TZX{%L}|svFDFNV?L`ZdhzFfeh4DUUg!jafTa|K-$()_<7=-g*-)9xWqu(_EaGpM zwizIZcT~TSt>QuedK$K$(9BrmxEd4PJNQ*QiPl~ereICT-w})5+R|uVw}i3tp?@gk zR>bG;-Vy3vj(Fhbky|;yiF}}z>j#(z*HJpX>@S$U=swO73M%nKnX5-zJo5#njwxrY z&4YBE;9klBa^Te5l$7iP-c+iL&ELWU^`?5pTflPCvLL!KM8bXM&>B44hhoC0t!Y-6 zKec$o_JcTWmPFf{E779}b2dSk6zxpgUiTal2in(8%rL{s@=k#)q0hJasABwE^Orsj z*zzcdDU_=jchuu1oW*RCM*ug3#;HlAQ42-axYT`mFJ~@`(OCq(PTb?x;$ZreP*f12 zTJ_pQeSg1IM?_5fta#EJSN+e#(g}}{=9u)^`QPYnSDI3D#q{y1luklc;o+87!ZT+V zL?@L=pob^*x%gjZs8p?1N$p}zeV`?Cm=C|ji4Ws4#a4T50?JkAo3=O^Cb{IhVUbMw zoiQ}!OszTz-)S!M3)o)RDRZANY`$xODtvue^#08FTPOdq0IbwudOWk{XKCRczMFxv z(+`&z0UE#*SPRT?{;k*{A86IP`TNZyP?jQ1w_pNKdUR$@!L^$>mDZ0Pf>}W8kU&bb z7!V&=E9})5Xa3sLR1eyM2kh_%>dS&;3cIbs%+S zIN?)VKFG`?m2whvj`yIX%JMkx-}>=cA5C`K-p+U$S^^Y0lMEmZJz_n|?~rrn+Nj~v){$niBojR^h2b2on*BN%C4LlQBr@9 zk1C|cML~t+DHk%QsCF;!f>Yc5yjTnMNS(1M(|OTNkh=(s-AGHC%zTUo>M$>^Q+dup zLGBh;`@W|4AFs@rhw{cLZQ6rsiX8*wCLbf5Oq6kvP@>Ribr2R|($~E3PFL3ePZ%f7 z>2M3AuMznIxQs;EYwiS zvnJ%)0PeD_!Zf7D;;B|;js5+8kT2pu+j)7vxWAm3D>Gzbi+jRVbk}XLKcxOlV^l)_ z>{4yE8GONajX0;Ct|@fE<=l9g*NSt9iv&l!0B>=jLo0VyUtMZmMpx4a$`S2_`y3ZZ zFG4y}k9!mx=QPP&EFM7LhVho>`_+Nf>AkVtXnojjJhj>YJq0>!tYz7eZ-KJm&94fH zwp9a`?jy3AHP2Ph!}X*nUW4y7$bcCDkfhvvbLP-Sh>S3YnfU9L;n^!>a>P=CtuN8j zhdZBYSy-~hrTF6%AU#(i;R^C&+($&|yahAnH3qs)6m@yESnOst*d zq@lkrasDFq^lgQhv%*5EiwVb<1BO9{P`IoD*M>ppYSrv-HfO%pQ)Qi}gvn&hjE=L( zg?3uFmq3r;XxW>k*67J9ec|pRS(3#IS0VT<181~8-?5nlNZPc(w z2xq5i*NhW0Gq+ECK<{MFxLTo5zBl=Uj?V~$P}t$@q)(Lg)QPuB8}5|Lm@dUg{TY3s z$3b__B0pnv)ObVgWWF8Y6KeN)ss-B}jAyinWSQce=pLh;mmb;RHAV@Z10$&LCd-{% z1A0;=llY&GYAOa#rJ)5sJAXaD31#FDowl62&@mv|@4KFv@HBVkd_Ba5BNpPn_YdWu z9Dx726fX6aQTKuG`vv_kzL=kXlzkeAE^2d5ngLR>`umM8`|C&G0OVqna8^YT9600r z&_f^@@-|@9Q$vr0d2YK$VeTBWQWWZB7V8g3mwtAhRsI9yWK!65a?!>f*1#V=%rr2J z0#2z@jm_@E#`Vcts(9aDgS-02elj!eij`80Q4xPlyM^SuF*wrW@tSh(&gXPkjjFZE z=7)yFZnj}hzf){Vl}q5T6(S^&tGGcWk}a`y9Kxm7^2NF>@712VuvpN2)`_pZex(jm z_GV(*AebimF|-tIb?dr@E!E`;(`kvMdYT>5%n`~7k1(IAyeVTZ6SV=_ChEosK1p@( zHD&B9+LfiyI31CiHICDB{0x|gPjH5 zaoE(7o1bBcs=#O+{6Co*Mxe-)weXS_>TYYMb>?ice+B`F=u2$R)Lj0Q{%^|*-#VUbD|(TLRbEx7(FNtXUA>Bo0P@g3S@fO&7#!D2vVPLHwzfEVw)^O# z0vj66_)v=-$wIR(GM7)obvjOizpdd~q_z3J~4od`4Z3 z9xP5T`&v}T`UzuARIG*ZLRSC>8OVdeNBF}hA)-5GIZ|y*Qo^t0<~boS`0sZItBFq< z_|Z4wPv9SFk*v%L1cSyuNsPDdz;dabgC46PEey6VhXk)Se;QvxhZR!xcpaW%Ue}Z8 zu5BuL{tDp5P1JZ@nd$MvNhRBKDfiPn1!AGPxN>~J)L2vllbX-eI`$UXyn@G@r2KXC@q{tpYfJqagrHQH^8#_>GA+l$TlIM*F zGq=`0CO&iE`rkauOoLPIZQo2^=({r%mgjX0_TQzevC6H!c6y!2Y|@}x5Su+f(y7}2 z1oBe7G+o4lSqkhcC~QiBp4(346)DlcRX(HP#^~&~Q?;WO|Kqq1Zgg{n z9aqAtEpo?3r=b~#@3n1O^woNTzm9H2*o?Z9&=9eeWbUYu;RkQ(TWY=NRW1g6G~_a^67JX}*C)@~z_rK?ve8vDBMJmZ%z`%Hp#`~%K%Sn9$|DdQoA{W$dpCAsCfaK};fFokgcFHPw-95fHhWcK-$7#e7>)+-(#> z3Bo&L$1=W#@}`T>A?oTt2~@cyQO-Ka?1eL)b%y)fSx@4s!_7LZ4~@1uKDC>2oW{CY zHp#rgjYc-1mQ-1iR*HuG>D=Lod52jg&V1#E?jE3QcuJvw}cH5yblT6Uv9xb8Ed+R=;h<8>2;j`=Q0cX!*Q3I^~NIXs0qx;Q_kvGp%wTtPNuc*jmF0 zZrRP5s*EqN(08hiQ6iwJ{Vzr#dDZ5 z=yD(zn`+^VxA^yq8=;qAWii?H=^LfGY!!JI$(V3k=_h9Tv^kU5uiR0DFTu*wewWB= zyTxGri|wC(e`dC?YjLmiG}3x(f_1*31U93H1tRX1w@mf#e^1aZ6<9}~@F-78>au!r zV)p=Ae1)gMG+8{30u+c>+u3#!o3j!n(Fr>RC5*N|k8FUcqD<(<&$Ao}@358`?B#!Y80zNubWCIf7zmq&Bh%-p9wx_EP(iisol zfhueDfldsA$j~#e;EUyFBhiNP6xiUo`J^E$Oqam-~*}JUp!0MMP{p?pqsayh?ST6qz2iz0Akt^GW}K_~clSqDaOnbf-JyIX&W}??5q=)H2#@%H(p_s+r3rjyAW?9VAC#9w)3!c)1PRI&_7Y5%&__+~1d9RJ2QM4(W zp8+D>AeO1L(Zb~m(Y^mUne>0&`TyXu`2YMHqNq=~PEx0{QJ2x7O`cUiV|P1dM82W@ zzVCOL5Ch7;&I?~t4Pl+ zbsmQ+uCMJY*KKq~=cQ<9%nPIt;4^c#dA3>Z+Xjks4`tN9Rn?)tnKLEbZwmg@G?q|1 zy{}6@hQDmojoSVC^>3wLz=c`W^>42b83JlZv+};K0A^60X&1_igIKMQD(2RfK(8%n zVZ1l|`N^J~Dg<5OK_qsv0?CfJPn#)sj<|b@)b>ojwW@N;KyumcQu5*G1pO{S2Voj) z_|;qtF>-C-wV{ho2H#G0@%_%&{*)ngOTZXPp0xgZ>0z(W8Q2QulFp=GI z`5p(-3dZaqGb{ajn>dQCCEQ%_4rCIHM)_Ga)?c5<(#ks@C#lIpG)b5brFEe1lt{{J zhE?-YKr!HfrGkXP@~Wh z`(5dvRCJT)Si=kUUz@*UN=qB^wHOKg%zwzCYDpQ0YeP;fF-#84`&Q2;6pL3T=ag$( z&osOn_{$Qw&Qdmt&LB)gUzyh!aV@HL)~rx+5NGLfuq^}rpY)M9aX`!{Xt$#LyKxUp zMcw-RAIhS>`Wau8D3KTXI4sqcEvF%axT=`?EXtmcs&=05|8VwJL2<3o);1D?LxA8K z+})iJ+}$C#YvUGzd*i_!8h3YZ+}(n^Tk!mS^t<}2&fZsj)4i&?YOT5EJI9#gDVidP zd1?@T>GClkSul+v(MXc}Z2V(cA;915Ry(4U+s}d^C8B=cF}&@pt#NtoyJpOmvgJk<>is>T5oF=}Av66fUo)KX$ z{rsTAV6sDqf#N6&SNrzNeize$tt^xY!nGSe522WUWh>JKyAWr>$nK$6x@c-eY{=#? zs0u0#u9|T}HggA#0@_!`3{P*lw*yJt$PIFO^%g>(3Lh2K~mero! zL3fUzeg~WD@A0?Yz5!5h`fcqq1d!#~rWEy~mNc|#|3`!2qp(*)`P3z}O^;NLd>&r) z*!Kqc7x`~Y>_%8nvZLK6zwsU*Ye^yAt_IQSN;ubr$bfAFDJV8uYu;BhhM6`e`h>TA z;CS^1+8;Q=>OViZy}H=$)k|0c&T5=B<^OnPeG`Q>M4gI$l1pw_nkM?=+^U!{C?WRcDdy?Y(qj4u2XX>U3c5XUx-3H(e|{DzYHa zFG}{_o35-?H2MrfXT+mlfkJUnJ6TCxHS!Q>^+Zq=&Eij~7NPD`$nlHW1JMJ z4o?%Ph-Ce(r3@Ym@A)N0yD7P*ChI~Ywi>qCf>gd3ZQPM@oiSKlDOKvb*5Z^M=}}p9 zzW*p>L6+eVuh&S!uNTQh;+dOqbhSH9&bihx?D35$U>A?CVB582C@|91Xv0?bL*ULA zJpJLQVO8hM(o4fdn4$*DkhHBQV3jb`tNpJXk>2YaWObRwa~ule^3_tt{T+xw;4Sjk zk#yDBS8Gy{AkgJd zKGsLIRKuNHAoU9i9^ubbz@YP_76EypqRCd1u<6{qG9;O`Rr6Ag0SYOTMR%4dPv*#M z(2_jU{`6cIfUn(<;t-R-cbaa!?n8j{fXYiz#0sc&CuSU^HJub8P;|%T+dS?O$Lxqi zTcAmwnB1Op<*sKMteYSV{g5q0uU5#rTgt*&2N zK0oSKU=Z+4RJ46AH||djc+)fEYqQZ3ESE?)mQXt|hpRYVY5jbbCiOI@io@FCx7w(J zY@S;>I}QP6w0Q%El?{7*&zfTLWI4Ey?)*xf6=G!ctf0 zgeG0J>FPOYqf1LUrfji}TQXpt2w3X!e(R<`r+p8(O5@ua4oWpZN zj0Fb`YvNz8m^nKr%ATh?EIk>2T$`@3>rc}C+H;b|a4}7PTcG;$$ZXQSDG^G}2~S>! z1V04sDz+E^9dtjTJ7m6NAI~h`QW27Jd4dNFNoE>W7~RIEs4h7iF}E@kcqfGvyhXl; z3n(5Qf&+7rcbPOX{z5SiNzp9Vf_0zlrk^X|49!g!(mHw@ke(K5k2@!X_!qPTrDP8* z4LI87@+9Q>Z|6;C4ln*@Yxw zg}NVI1p}dnq#8vD#y)>FPr4F4KGjnr_rd*mn>d|*6cHxQqBZya8xl)HePcbik$DxJ z*e>kYR?jb4aiv7?1h>r2b4_~)4-wN>0eke7*qpu-=G7biBY&ZYbFcR>@Lv&k!lb#v z)g2_zUwu)`g@c3_&WCIo_%siPH2d4ITr5wby&Zmfr#vS|6|VZ{VJcX2S~5_&pcGir zK*e^2Mcz2$S^8uz8bvF(BvrjK*bElV8EEHhJ9e3YscX=c{(7Ax5fQiGZe;6g$=f)bSyJ>f*b@C|1)` zGZ8A!qwU0DI^4<*u!<*6@d{8wDenrGTk#j9?5Ly3o!EkMyv0T*4 z#WEMt5%FjYX}Lmocip|XL;6DCIdwSHL?9u_tq6$U*_DcTWE%5iD>U~R80Hh^rCKmO z$@W}#Td-ZP5)*5a_3e2nyw`dS8Lqtv{m55lmrF1W<$X&q^d6I%kdwg@r>BOMDD}TI zf$&(F5}o*mkmIFC_&KC)LJw?a+B%h5aI2K{Jg>YcjQ%NfKD=DjlTEJd6p`R_& z?q!p=wJlU(ZVD#d!}3+ZF58M5f|UqdB%BJ~w0rSRFU7z@V}@)P`koGA+)fatq|zLA z5sw8w(%B6i!G?W;=x25sA}y2hyi?Vpynd#$Up&<8PM_oNt8^3ei0?{QNF{yw8{=J@ zlTgl$IwQ9-?>UnEc80P%m=^237+OuV#^8?)W92S)>8d%6b2joS>Y|ucjN=o2*@-&em!*be(3?LwY7V zU-KO~LO!b4n*+Q}Y=f8Z&Agvy=wy}N*tRze

7fc~`HRS5muK{;%xGttOFDu$Mo? zjM#u>2Yw_*Vqmoj>4-ZTA*mm-SDR7d%lqxE)5lE%RW8tA?}L;F{^On##@<*7Bw^Fu zyOPA(CA>3N7|#S16cCyhlqN@3Yw zk8C8SP@N$Nq)|WeJK2dyvJ<1Ui;5e7;x+7FY{ROJE;9W&UsaIe5uP}gNu)_MG4{O_ zZVYgE8MDb7)+2)2h^o4%kRDnk-2c7GMb!A^&;66y&-?0vv129&-(quv4NBjatMb0t zV`03e7SD`x@0@3`sZ9)`Gt|q_3EPO0f_xS@sk9vN<$N&|CpfmUT#~)mzfdt=m^r4K z>Yr7Gutb0AZZHEsETPIQpBE`)uWV~X4@Tfer93$~4+3}qGsQV{$0^ z@5hSIF4tk7$fxGB!Rtk>#yVU$L7sA@_ev7QZ_IBW%y!4@Ad=x)G`-}}(?0$-s2Fq< zTKchQdn6fxT_VickpFnJH^qm>OBS2C6cwIFYv-p($oddDfli~)iZFLZiIM=d(~?PC zH6_7q{QJ>@j&!Plq4AAPfAxWLFJAxAe+L0P)`2doVC1wP|4q9e%YnAH%>)$x>8TB~ zv5ahVU*;Z!Ao*O+L)VFk$MlnoTLfuorN31r`Z>?MF`YE~ljrFy(4vh!y=lMQCoRn% z5GY{zIa8N4S-qJFe?!tVu0+Vg`Sp3aRQ(4MpUn{EUX$HoD?L z0~`z;QJB>)v$85sV72rIrzaC5EI~U-*M~?!!U598r8DuX$g9w{{(z_;NT~VHSEO;LF&ZA9Ot|hqL8EHVKy=bq=WD!c#|TDbp_r@+mXAOX*5>BM z7`_?ByY5JiiVzs%H1X6>Lx!hZNHbBB zqrqO7I!=Ir$Y;9HmMM19O}dsSzwwlKBVldiwH*1;|W*Jp30* z@D>qZV(~hfyz2Z9tMdH6QBhz5c)JO8{R$Ly06^MzAY>HZQ@8 z7WvL@JC(g;DHpR3sBVB{QJY~LM(;t8Yum)Aa)xreU(szM?zkl8Eb3(`8DXLLglyAG zJKXsN1k|WkQ5Ew?M`Ua7a?w&yg;vRGWk2nfoNCKT++<WFp!oRTJNzhx7Rnk<~cHD)U$Z4 zWr3=H>nAF-e=1H$Nh8vc_^2Vp_~Xk`ZdD|nPkW|z*=ud>6+F<*%AeC$J#2 z93i zX%l?s&as;$8=XMQmn#KZc4Uis)Y+`k;Wzj59eYaAMU{xpFbwY6bgMb6i~G^cx~*wV zNOOTl_axpeBJ7)R8Tc5uP2TCtO|4>`t;mCv?k?EhBhtt+dm(&$`0^HUt+*!YQ=PhM zt1Og3OL2iurGiIx-JkhTrJJf%C*{XDS>YCczRK~4r5(xJ!Ep`Wrwbt~07vKZ7&ilq zr$j;kZ{LpISL1)LJThpuAT{x{NzD9(D%Of``azN2V%{-19+tyt)7?*OxX&iY?d!LnuahPs&Zz^Q0`jcSnZoSxG9B4G7>YKJ9y6Frz^Q@at_-T9HR>c{o! zY_{45W5$b)l#(3?jLlkUS)}h;uq|g$&p;sn{0l@iaJGE`ZRTRxCq?clvKB`#Hul|7uUy7|4goB`qO+&i2 z9E!(geb}HoD6KRt)>0b4Oi}U>((rw&BV`OlOpdQJGln)y=~*rcG^E-tWHt)%tA8P$ zH2kBQz_iz-)57R~4P}ad3bf&BD&kBD-zST(Otcy~*S~=+pZgL^J7#|nzMLlSkVgiD zUeS)`a-2R$N*R(Y_1IfB*h-*MWxFRXBX`~2F1>kgbw0p1?ZvaRXk)s_enZe6m}UN? z=+ycY@Ug}+Z~6`9O4M5La~vDKRXA)nd21n%+wl)bp!itHc>7JtlWaf6PwRtfm#y6V zld$jr@7}#u{H@T)#6Zp^>7mgkp1F;Rq0|*O)n-Lb8k~d4KWM|Dl;Qt{(e^(Zakj=6 z0HAPPQuv_{5|A|JT#RT^=RJQudpLLH&b1Bj=EC(ML99glQP)&UA>#S6bR8l?t2q7+ zPDLnnqI4#-e=Tt&==vBsZLFfB`2GHjy;&br%%!ag@Ri~Gk0%+{r|M9%gugYO~e4?6l zFQrr1bQH;%+S7wQW#Q3xjtc?G$I1{`isAD{!;VbJMsS#8&;JhO&9paR=jE-^1?mwn zFc&YR537Hk!p_Kw*~x#-(g?_4n1jDmb>rkxj+m(&5Nnc}zXr-4+ShIn8rkTXubx3c z*-up}RF*jAW9mIFu1Zq2AL1Ly`p>w2>9Z>1vYJI_F}-}p^d@MzytGp+3TJtrA(X-# z`2tI*l|r+uQKG1{&Q=~CtkvOl8F5c6(DzWk`S?q%X6EcG)}g^Dj^<@BP#|KrhU>)G ziHl`I%XG3leL7J1^JDUL-Cw93{hL>=M+Qe{s>bP?MpXH7#snHEsGlz_(k}xyQZSv~ zt`u^cf{`tQ2CHztQ9X6RJ*)gy?wAq9Edo`=cu%QN!s34--SO|Le9dhO<7XtJK-GZS zkYoEstSCZ{Qke5Kq;jhx01=+vvs6V|C8UXm^EZvn zuMr9&@9(Aoa8`xWvRNA|vrlX`+*9TNxXyJ|s5%KjmEi>1BVq$-6$m3XJ-J^r|i6Y8f`zhA8 zw_p(qxt>kKoN^rp!BmzA@Y|~tUR7iI{E3SkMPV0a-e0IdpH~D}JA%W=O5Eyap*?01 z7FvxTwl^n$DT=n*0{B;~)2$4s?yIy%@Y{?t0dNWe2N78_V+k1u5>y^6>c#@41f=1szMV(XELw z8M8?jdFSYceeO@ok~WWUfggLjn0G0lDGe)aFyXVHxQNNG+H;`@z78$poS>B>dl^}1 zAwu)IRK$?K=)1fm!ZOjy)zM(yVVFLsA;=sNJ0 zO4VCFEb56^hep4~T8yqTjQyzFpchn?Y7B}#OkA6H=bBKMz|tfdFWB}mit2`IjPRAX zk}|xhykuYUrs`#}X1#2q{=#=A_OUZsnEI+=in*ART^Cfx;Od**8J-ckET>5=TF`8<<#A;FqRSm|97~(hh0J z;fF)=11b?ivkIy}pXJL~)BM(2d)!c&aT12ByWO{_;qLM!!5Wn6^UrotEMeHqERn99 z!he*}-?Ho9N8_Y8zg6x4VU9bDJi%Y1vxhFI{z9$9pwq`M5KZ9y`GMn)a2yR*zP?CE zU}3D4B?9ItyI39d#elu;c- z*rW|8yjc5wX|fFJ?;>8h|6_Vn4oy&V-nX~(&85wGbKr-KdVChkxx}^O0B!uM$fMxm zHgJqPmpYZ?=|gzD=kr`PE=qF7mmO!U84Bi`A8WWn!={T|87y!*6EjT15k2ompCGXo z?LSYfg00jR`4g@d4hzSTjaGaVTiOi7!SB=yf)cL6?)~;8j~13rLjKNorIqPAE`H=|= zLNSOi9)xDh{?mUFK52^ez~)xQJH<>G)OEOZ{cFf56PQ^@2`T*n)lkALT zic^KZ;pO^P#4g_O7SirQSPwx#`~rkwkwyYUu3(!*H&v>^EUAa^ERk7qIOi#1;lNhI zFNVFNiv#4y8pezQJwjqcs!8iXS(Sr+!l+wSxIg4EIqvx?7U*Pk&qy|>zP>d!u5!##@-TMM6bR;V9N&0$u8j$0ve9VB0 zjr{`2jIz2Er^GZ$jWc%*&GpT(t9aAoVo3C~u*+zm)=MSKa~xWAfMu2^NGE|XB^G;C zD}dv5!ZT(gMzm|?UqUW&i+sn^l_&RS}NyV|V6W0MPbCQOiK5UML^dR5)H zrK_mZ$lxKufBn(goXc_fQP$8La5B{0a?Bt`@u*wgu{=5*@c%UX|6Tj~|F;N;{EN8m z|GXN(E^Yrj!DLwn0dr!*oUq|M_}T4DkzHpG@74CvHhgD0Z3*}%?X9{$@nFoFYk>kw zMxH*5)PuaklG@uv`s|Cv*CH40XjlcA-!7W%zdlq{v>U}|?!ms^YMd9wU?T|4q(2LX zl#R}uc-v>)K#A!TsJ$_m$E0hv+M=}Kn{K1`O-SvxUu_hccOOQuZM|TBw|?{Y8`DN| zbp7_b-mwokpXb=6|1XsOg}KNJm)Wgu{OlpmgS>u5&EQ)~7sgai(>yNCBeT+d^t|8> z2%x=Jb7tH7Lg7muUo(B;;^%-4i7`-u%+N{`hPVA<^c+_Nwz3)`Eo!=wm6VqfSPmN@ z0d61_2+@kp_kP6D+cI_`SD>B+PDQXI~^|#;ktOtwZ(%ko>Wi z{crkvpE>0V!dMw<{=oeKC|^H@J;Z40h(9SdP07~G1r}$S+uD3K_AS}bM}I_$9MVpo za<{7COd0MbOZkRyqK)=a3mjNvR&}_sl%QveYLm2G3oPV5iw*K1EoQJ%cdxBf@ZdXF zk+*FDG&pDf$hIkykYUIK6c$~RQ0-*2?i zmf(}ucxPC7zo&UW6cvXG)-x|WBh4ae_t~$X+ub8N*t>5?#pG_G{Z2NB=P}1_wB04M z)(}T+F`k56do=J(PR+_<63j-ln|b5;YU?>fRhFQKcSI$K^11?3pV$OecZ)6Tqu`{O zpkV+PnH&r!smR*GQfdqN*&14ijhwVO3{Q*#Gl^#0;Wo(6HuU07U|D!8%q}7ppEKh1 zhf;@+{1gB;e&5jwN^p^Kxnfo%;rGwJmAay_OK0gvjXL(e8cD@-Up!>OI zoy5AY=nvUa(@mC(D9J*ZiN9n6Ti*%NCj`*Ac%mLAHf%A68iUYyI$%9i&eH8kl%~su zk6blMkLbPVJ3faqp5sMi%Zi=#_?brJLa>Y|}4RD&V-erBRwBG$$5~8JUD3)Ug7;Gk~&l7#1~-7FJ;V z%T-W1%HEXWqt6bl>!W#7yxN4r-aLI3DdH58gWaVA*EJh$?x&BQ74#+SSp6cXYc4&H%I(mC7mwdCzSw8TpI`t4T6~l zIy|mZ?2r9B6mSuB;pgjY0e-d*-H7Z)j?vHKDd24qCd;~l;OEAB%MmZiy?d@V{p1Fb zJR=(1zmM?L>AlF%V@-&bx3GO{Q4=O?%>1p*zna09mxb z2pHCZ_1J@zNNez#4Eb|U7*_XCk{G5|#vVVtyz&$uxK89zVNNe4Z%*y1Qjn)9E%REQ z?i}H)%GCQIW=wL0WMP7eB=lHzXs{`ZYdorvFeml!Nxgg^M1JiZoJvcg34Je%>&4=SP9{laEwQA{Hm*9CSoK^l zJe+MS9X%id1#gJ9W#_Mr-0TSYq;Cj^0wNZz`6UmmAxn3#Rz)6QiLU4rNPIAquJ~zoO;EmUBP!pjx?lSBAsRwKic5`4TGYwVJ$#U|zgA_G2H-@?-kd@Tm6^gL`|Q z(5Xwr^)21f#B^tJa9mX&m*w8ua;@-M0o6-J8ac#wjQE!F(;3In@zwfpI_i#Bl5JGB93$9DI-~T zlX?zjxj4eAO`8PdPxwJK^oJi@=)%j%ekVhKE28)wPIO6S7gyL8g@=j_%pX`>U=m93FQE$HX*b&bMEs1uBwXVe4}gCN!^OqF@hZk$cvAW#7idC9 zLtX02gFs>6QifQeH-8++Suq3hrB4LPYB3o;6B}ljT!!`sW#4ClOv^GAPsXHEvjK?{ z&I+dht73OeL!z(kg}&%w`t=_C6gaN#UAT=@O6h}s9NK&wr4(ff%!}Cc87|OAaMJh8 zx>6t5t_o;Yb2u21aXq~-egxlt4oxXc_*Ue3E>;x(b%*^sLD1ekj!bJ$ zl=De(U^I<@B~OMGQnVG8oS@R6K(Ik{WEpKA^5Ug=(x~9z+vja^OCeYfWyKz_5zc+b zuK-C(FQQ(g9j6QD{=z`5gYqVt!TZDIa^c}V7Z<=8HCvtx&z9!%WABoF`&SFG4G|Zo zA~)aVIgT|?{GaY%BJ`>sMYaTvd6{K{1PtYCYpv``L=tLv?%FSI{b&-d;?No=QhYS)lZ_q;Il^|#oNrayz`3%-nYEq3p| zQ6;m5^q+XVEgn09S+p(9?&g>QU@e5yB~iNaV^YsRJ422{1h`l zJj?&koXRGa`9RiDlSnNsy&_6kVb+25vzg*hP+8-bF~P=MM6As$YpW{Zx7OBJ+R@CG z(dXzn8GUyHl{+p_PzN)Nd=p#6kvb%}stW_GmIZ zrvy`6QqNpf;mjSO15w3ICqE>ZMnPZKG;a9Qq2s<(!zu z@d(#bn;O$Y7KQswP@5&v+UZ+yqel!+KDA z<2aNPz4|8<>DUk_kPX0S)^TIrQG>3b7{+&bY?wk2>658(%IWLO0{#mXwYXGHHB>^g zx<1I%MrkMDH;w9(R1@dyF7-=|khT*&U-+~CjILHhwaLt@bQI_W%_+e_SPdf&c+TLHDjr`Xa|C!`3h}32+ zu$lEZCb@8brjE6cYz`*vza9>g5(x`GM#L`9PN@Vu+Z)m@}^+r13Z;d$Th=NpjZR=qt99#Woxy^lIbd~QRR=t44-Wyih5vqCmEJT*;iXeuZt86>VtSDXt!DG zDm7NYVE0Kiz_(^oN@enoZZhk#oe;7nRhKU!|-;0_0WjDiET^!L$J3M}bh= z?0o**$yk;S&}J*8$81WNb8*uk?7T(mo*OuCMx6Z{&tE7&`hLoxy22?uP}gw&uT4 z0(3u2$EbxYzh60_!(S661IfBy9i{g zaGMLGuf5jsX`fpF1&#$QaE?k(IKJ7l%0y8$NPnoP}&Ck=ce#4ySsve`w6Zt0j zS-fQ3)hN=Qc3|agc)FoDU8P;>yJ5Dj78C&ijn_<_l{GvG_Kug{O9JBce8l2<9ZM_& znik(;w9OvKGpsfRvb&2{8{!H9yra2WT3k}DHYqV#MRh}8B!yb4R8lAr@_LRWpv=o8 zD*)2~QQV3>fo7U()i}eUSvd45eT{Fvqk}EU>InjiN1+#bMAOd0;w?n6$tvz22H8KV z0rM)izi{wtuKjvHn$V;3V55;pj^YuYfF(q&Y|ji?x58TPntq~1PY#%`G8c*_7X9uB zi+3(>rNgvnASjPM4u6+Bcwx>dvAwLE!l|afUN)h1VE_J0*ANm^Ug;{+eNxjn^kyN-^Aa#; zzZU%6#`w3o_Y;mOBN~4;xe)#>PP@qikK#D@6MFN_rO`lI7n-M?e944O7Vw<0o=^!Z zB*sdJfa^<~43zUato|ntNr)m@6JPjkZ5nCPCqwk4VmUr>iEB#bj#EjkveEbRvleCS zs*8XRJc;h@vHpz^tzFEE_WQiFpcZEeNMA9Q^KH*6nTlADq5D9je~|hPMmuZ#MJtyp z$*gBKNm^NReH9u-BI#Cb9FE~h18sLTYTXtPz2Hazh4uS+L6p+#q1qDrLYnu|z%?r^ zQwjRoD5z_Jtu4%DxG>55e$Z_&P2=b2s;w~H^svmg`g7h7?p3MfnOx)!W4nI3R=#Pw zlqBFr9;>t$fm9y;L<4YR!74uq9YeFL7P)k7fv4j+wM_GFbadpAhQ12Kq}etn$VXKo zgAAkeN0K47NYN5NHy+Uev>EACOjYf0@b=4e?kBP-xuk{v zpjngrv)pPt!p>ngbyJ|s@_;V-{yuN$;!xeJ!h8bIn&C_4Gpo$`0AlkGzdjGP|E)zn zFYmnVQ~tEbgUQV|0cifdFEEAnC@Myq{O8giUTDyiE|NuU-kuXkQY5` z@R>)58BL+@lz!{&vVvyBNRV%W*{!7hc4?0~L^y0ylFG-vjE7xE&winVWl5eE z9pT|V_$`nUt43l9p!-#<=uEj4{44o1@+i20K$Bfh=y@T!8#IK>!LzL+tGHz~SppNb zIRHVtIgFPXuHygVZWY+uhgas?ee~8GIYKsNHvRIEIkIDp%_r%i&^O<7Olh*o+Lg8B zH#0cQbJR=XI!uI&2K!B8+X0EKR}utxvK^=}JB&^eAmXiFSp@HWo%`Pt90!o3u`Lt()edx`ElJkb9RVcL}{YyYTA+dR35UB`_kS$UMVbAH=j&;p2yHIPD4o4dy zv0ExD8Pg=ZcW+ir{K9d)c`SeYY*7|#{A|xk9LDfNl~)#1#^|6a>}Kn-Op5(-`NuoX z0jtIXgeh65KxE}{!LXKQA(8is#LiGzQQVi%khrZjcGKDPkMX4mkjyU%QqzA z%p1UjH9lqVj>jrm>}XUo67*TO?2wy073}<3Lx%O2-+-5mPS)Veca14JhD5yBjISZ; zABdVMRzay%s_z-atT`_G+TPciMR|pqVR_p9`~%4R4A6nj*}@G^p$2W*rV$jR+@ce> zMdL?j_Nr85u==xc01Efj1uS%^Euz~? zZ7lqiUx%?$y+m88KE$#f67VU~!;1GG(2!s40HPSJjKWD!3*TJwo_dF$=faC>r@z2` zDJkt+IpY9;3{iEaZGL7BVQ zGsLl4trKIM?E4zS#O=^(io#c#zuG( z+K2*kh3iaF%z)T5ZjM!Q^-xOOV=e`s7=S9-DWg)`EjTlXIYI}OAjNsnFZOUztYJz~zK7_rdp4@x z9%%}r=}7~r z+Q1zgZ7({4bz%O2RCaQF^~eNuWO{3^9?k44rWB3UmWlR}XTO)|=3t(tf$w^|ND?&rgfsdFD?Wp!}2<-}l)S(u^j+~#USMlAgDzy{M z+5v#ohdYi^2uGBoRB0>2Y)ap}FQ_&Y4N|jn26MedZQs)nb)gTxi|nqJ?w+u4L}Ndz zbBhT2M5&Yg)3eKey&nFp-uRyn6FSOu5;}aiMGNW8EGv9#_1<5o&o%F3{22x+Z(`fo z6su;}3g<3_Sc$hD)uRk1rXMFF(&NvECQW$E(A#zCVYGo!eWCfsU8^}og+67sBa9~15_$R4h2q2 z@<*B2JuGV=*^?qdf%X6HHyGWT_H*5laXHkkvuj$rz&06F8I4`mTd>uH?eG?X-i z))C=GcFJSUDABM{OZK2i4)CGMgmFoeyB$oQ{f0D33q%w5xW(rL0OPZ8!y4v8pd-+r zPIX2$)`y(uH+-xL6UX8;#g_OA6&hLvo%26se6<%6VvrskwxL?MHBrtj{V;ckOg>&; z;f$Rsxd$V{Q`QlM##1oHbzI| z6`Y0}!})23A$uX#qblVMb-Ku_f_%8YHm~Xfvkn4ao!`PZh)>TG+~T({IcpN?_$Z@B zIiORzpn2tr=U9_|*97cf=?U1ydpnOZCm|H! z`+&NivnA-W2o`K+XWrQ5xH#G^^2T={UaTgtE$8JRQZ4wZ=7+Im_@&i0>WMhkYw(AI zQwpkbPah4WdhTr4+3g<~Yb{dx4y*m!o@V;rEeZVBT~7V@^QC=EvZsF!>#q7>3g4>4 zv~vTAbAhyRjz8Qp#`$s4+Nb!M-w$<(IRsJQG~F?8 zMN#^K%)atizb-+5d@_4^T-oWOd^ip!Q&fTx*@_AlI-|bInP!LS`Q{II%aF4`~4Ssic*92)(Km@ zG+B@39fy0o?Upz=KKEBvzqX}ssy=wFdH`~-JY@?sY#=;&Lp>a&a%#ZQAtsAaN-2eO zy5>3Y&o;J4rY2L$u}-xxGN!*FvYAb$+XMCN@sAi{U|4J1a<}$t7DkND$SlRR zwd*n6_e=Io<(oerg=1t`4>GW=r|L7>o*?EA>Li$>A>Bw%(jllP!N8aHFOvX%}i+I<5-D|35 zLb4yn&O@3+GXJCDtJ;S6d={ zymXKhduTaKoH-MiQ&q@5uAh0B{=PJJ^uo^;@oEb!pVAo)Y>)k?6te&6PhkK4b2R1u z{1$?X=Y0(Mcxvkt?M!&%2j@?`D+xV?EZe3>TH~n{qdcIVyLpI+{C)*H#OhgnP*N_D zGt;m!v$XnY@dc>rS;7+vmMVxA5d@^~mR=LH3h=H&{L8BAr@<5D)=9u$MRNQU6!~%? z-%hnT3R2;&M8ytct>O6)JHNIX0ycvbUE+`hPYh}sf@H$@`874TEB9V!b6SDAB?A%T zJ%P4G@hMx-Ay0Kux+_w0nKx;Jwzx`2$*OV=Oh6^?hLCX=7sV-$!_l=^ctx9?CpU7J zwlA$I0!d`3YkJXluM*bdpP0WLC&%=~!f)VV%d8(qG$Y1Rjb>`Par1-@K03y`6o$Zs zGNkKeZ~?p=swh`$x8q!UOL6ID^nP!C3*b)>Ab?%b2l=?s@k-J!PryD%F%xg9n%R$| z%Pz3E7D=Dog#ieH#api56^w3)gRj)Nuwd(?lY4SA?zryDA_DF%#D2GRO4vwgV>v+K84J20ygod87v7C+P~2|Sew@@f#=#o#y5;v zHYrb1)MTegM!$NUcd5q}2C?mUbyTtr{q~J@p8MFXbJY)Xm^zgAWE7ElPt>M9vkOlZ zQGGh<+@LCwNPV$}RQL6NqD}r^pZwY?AIQpll-EPhW>a&`Kt3tKC5Ac?aOBpwJVSKo(PQ%8@`&qW+;7T6RC-dlo~2 zPu3^?a@SED)5TUxEbU@jy{rhJ?nr^>`pkMes}fgKL^t18>yG+ctf?ZR3cfMrfYDtM zS4fZ;AYWsZn2@4cT%rQWYW01#p}Fxe+C@pw^m(x+ff~T;Q>pq#Bb_JOi!}u-h%@MF zwVOA2U}@_@U%(!n`JMDoIe+9Ke0xbbVqb(zVhD}y2J-Bfh?6^-t2%9P+?Ol!fJ$>u zD)@NmdCP){Jortb+{rBojd=5&+xW?1+@cx6ca5iLoGSDQ_^||t=`R)+{5{ZKo}o{5 zq>HM+);M|JXCkPhQ*2t_z#-DzJnHO868+GM};`pZ~jOc3nv6?eL9_%s|4 zM$U|-;@F70qBl_C6G`ykpHKNgn2@1N$oQOmyXn%&NQw7YmbX<*d7tB_#lKV0KHohp zu-OaSC~7$HLfM=EF$GI&=oFQK?omURcSd4+wCfs^?$o1r`af^%1N-s zOVVMqe7LL{z`8kO(Bi{yTZ5kIt;p^T_E{F$6{lA^8ehZi!P9>nRMpJWurSO3(Z4Ar zMvllT?Kgr_J)%7}3Fb+m;&fD6b^YHaWfs$^%J|z?v3+h*gtd&+dpDN$%QM}%4Y3W+ zB*WhsPI8t%dMW!nkq{s{+drv~u2MaCZL{s?3@XbhGmX0t&T8DSil&Pc0 zfIx>rZ!a}bAdg&?-!#P8lZ5;W3~}bOroO<0wcPcop~eS@bz)%bWz{1;=rKkCFasC^ zCT7!H;;31cF|X!JOCYL*<>h~lpO-PKsieSoZbdo_;d-TLkV^U8r$Qeb9cuF@9zx0O z5pzP9jQbq{A;wxJk`u~#W3PGYF7;^ETYb8QdK-MPKNY_^xNW4EpsmBADDVXCH+HZe zGn{GYYGO1u-gQ~?_O-Rz5>1=OT^KPlQjRh!gTBzoqFLyqgnpg_Rc|YKP@?3<3I6(H zW2i~O8t7gz>_+)xfg(=kyc>T|rYOt`AdljY_RZbc>Vq+8GS#8o>$dPfZ$uq6!qv6` zF3(c}ReH@ogmW8Pe7w~rAsP9#wbe+jWR~`s_kG5uFl=#F>}kuC zQgtUDH@RbdSs2#*6ZzHDKbK;l-vgMHmozRJM`M0dCU%wBJDAgyNo)@3x<}!ohsMx9q^^!I;!4XJdQtm z%h(@DqOVEp!`~wI2Dtg}wNU@Rdg^_E(BFp|-d+RSC}7R`ou9A&uEMzLY)M4^+RSCr z>s8{CfzCs2!(l~M^(m)!Y}%x*RJ_A9cl?W(riN&MqRdNo!A+~InERbG8CeCmkT=VT zSIy@He{*vIg|I+mLgE^Y-=W`>cIf~lANQ#ACmIN|Y!5fl)#p0SaRN7L1=0?ug&~4s z`;7-G=x6&mfrxftWt803()q}Xi@rzfb=#*TD0~ETjMJ(fIgdyRRBfP8kGfR8qrpE0 zpOz>L^0^DTT;ldIG0SHqY=65Z-ibU7!MSN}ky+8~`;98~F?1h05uh8}3qH`|YH-+- z5Hxiq!C5vCG)iET+Dq=Lq6j;4R1|3_F2c%TUlR`;ChV#bh-?hgiEr(sn6e`syI1b> zZwKh!5Y4r6@fw$n+2mlpP<<$0X!;7Y!!yPb1I;SW479g`8*>Qwd9bMZiyqhU^&SPD zHB^dxVAHfLQ!ze{|hS z&Y*a(yCKmj5?qvcC(k+FO3B5kDkIhUnNG3!nvc5_1&j8B+Z9_^!uimv>zg$*2?Z;} zFs5g!-My7+4m92jgZfTrCbrBo;gG#<=JhLOs@=7R+l?d*?8v0zKdP!3v+)> z=AYEwd+Ycd)>WDtY(sTysW$AKZTJkAKubuo$mBJAOk%IrCOAICb^D`5f_i<7$tN>7 z5fsaz80|85I>9z?h<&7kz)veBO?jdOXZ9~ImfQQHwuL?F!#x;&#t$x>s?siG#S?zM zvfCaS2`4EMM}e$Qkx-zb7>Gt1VyR{D5P$x;osBZ1&U11hUsW1W)wb;BKFGmQZ@_`j zdZ)_MqpY~vMJ0OqCNzS_{X^p>=2PU>J|B6d`_I}Wy=W`IwQBoqbzpjY+39_RB?Bni~sR8(i)zpzzlEUB{!FqRPEu`)Fu4* zrDW8}fl8%oq`()IO&d7@mxh1wE=4m$jpg#ki9ex*R;n&KT^;XDEdPIBmH$?a3Hu*F zBL661`OmlEA`(XU`t;H=5>MZN{$Gi$%~GbMoq);37us=kezl84@1q!YS!ZqR?{3?_ z(uyl54|(|j{e=;22sK{&rLKJ^Og(r(#4K>mb#qz61s{AiFF_hAmSPrmlps^_!DGE~ z8!P)|S~nGMwLr*JDPO?meaR`zQ1fh|=O+n80rr`sax3cUN;BCyS}HmmD%gF~KLT{K zWmC{3Me<85)g$z}Z>bU!pNQYph%iDkIi?<0wH_Rq{>;j|e7Zi4fAqgSu1*#umL~SC z^5K;g?c@dq#c;n(N}q?g+<#%UJ^~KscC?4bROV(9Vd@T4y7Q8{;cR@KEkaB+(uLX0 zxhy)x71hXCI5kanHBJTiQnrQ>^F5|t;(nV0JLdzbg|z?&xJFD&72?Tfbh;UfHiUu z?Z;{rE+zLy0>f8hexIv8b^VFt%zH4;YiEbVi@C871?E5{7v4?d+;6!>V=?TCqMLN> z27;7NdzUf%dn#uzlo@~a;i#|2%1z(?&_nlf3~TkvAOiMd)FHbR-3IJ(+P^Rtuj?@A zP`jfPI`tE;rBCzF@e34b8R)I9tx7yA#ho6<$_TXdtAv)MOBah;R&ZSE1`*XJcm;4j z&3TI^6n(HP30t|^gvcfXXK7*=!c>N~T(BqQFMjuyq6{UNb#(~_-HtoY^m-*0bwYBVf0a&Bby_llF0+*_;|dYtx&MWQi<-vQ>H3O+0p@ z5}O0xgpvsklsjUG)D?7z4a;O^*B2Ss2-UIE7%@m{dy7++@udSPQFj1}I+yf% zcX}<#3*By?;T!@?T2^LuB{VJSq?#!j*|i}q)CQq$*9Zy>bgEMa>Ztksjmh`bZdQ(+ z=c$hCG~lrih7|2?abbj(!f{WRmM~AN`m)tIrQ~oMC`I{U zuLAwEWGp}OeHUK!h^q>!niFq!tUdGD2ykw{NgY>|zI^DK$*?DOKQ%;hM-zW-f`Z|R1Py=l7m$Gn)_Al)45JeufK;fw%HZ|kbq zmuhYJp7%98rTYT(bnI0@x{0cawJGSUyC{*qUVbhD3QNm&UJg0sgKry*^TSdG3(sNy z7d2D^F==u}_gW)#c5`VWkcRwn!m`ym(|o&4pmPA-uG_h6S_*pQ^<-!-r47uBz;$Fr zMClo>swh)?<091r0#b+5=}J`m+1lGU61nky7Nr zPU|IbG>6@)?xS?jpjY$28`odj1nElhgGNkp$VIAI>L^vlMR9V-=|}NiHb6KPT>!nYY#7C+mYCK0C#opi8+0cg?;VyOuouo7~hfUB$?gLS(S<=OJ=O# zVvYJz{>2&$oL9Olv#r7Bvq?gZ@&f76+5tUmwoPE7_@!+F1d{iK~`Jn`-p0I)0L=!!IIdIgZKlJ*J!M95hF2 zlC&>;aF${M*=#lCY~NHqPKsoc52`xmjlM(vY`+tLW~kF3fO=puA5%UnZOS%Gyea8J z3;|-_7P?#>+`|is65aPRtmRbob)eKFhpU^aND$H@l0?6|ExqT+yLc);Q_{K}%|`VN zlS!pOG;y7Zvx*Owlc(-d&~lpG0nO~QdDO7MZu#;D&1Nr`-W9X;dnT{;+*L4o%Ei11 zf{~{-u%$50go!lVZ{&8mXe6ww=yw_I5Gh%z6oXNf(D15A&B{GfmBZzj9c-;Jj@-%8 zM{D#>Z_7|!xOkk?`qk9Oj-;w6^I5?gtnB-=ik`%p-1x`(EE?iKD{bV;fW$|2yb*DR zvZtCN&QDP}qFKLMwa6?c5Knans4>&`d6Q=qznChGA)fzXIBwR3rEf0Wt})%^&LAi= z{>{ENrqn&`^uzY4EsUi)6MOolBl~UsbUniM7%l7HD&79IgZQ_noc{UEDtBA#y*Ax3 zSO(Ov#o8KXo{>WfJf1E3D#}<{x-lCgr|$Qe_PvNFsE^jx z_blj=ENSC7%Ch!IqDvo)L-?jp`!pv8zi*NEf@aedI6_;^?%ahRR@&is5IU@dc zYFuHGh^1yh7@dLaOA7II#N@v{|G@}7UN-Hx|QKuWZA^QP-=8!}Bk??yIXlAydt_bygd zn`6*;Bx*OfIBGaAodrOG?$2HF!|JWjz?s`EB z4G;Szz;XOclUz|bo>{aKqu#q?T?xdrv7xyy$?$BvK=qOM9L`2=UsWY|s;(i*A2xH9 zqLNhDeVVwK?Pes5^q&!&*$pc_Tt&0%GlUo~-?xTPeTt92cBnbbY$Ymvbs1DlbM-38 z{5J*;{v~(6J%{igp*#PT#bJ{#1=AKaepxrcP6V5oxz-HxD{Y~jA~P?3KmHxI9Xs33 zvt1I<_eY`rp6Y=;64H$7xx>?SGiW&REBVb%&bj`{IZMHcj-mjP#`EFzeM`~Dy2tVG zGd1ryg{%fH&^Ya0VqjC|B7giWeilmf+?&k&>X~g!er*$L<-J*%NY~lm5)nFUs}mB=%o}&LQWNpRZE;qg(|)>CdplR_g+d`v-`{jHuG0| zV4(B~YVP+D?Q&Gl@uV!Sto2wdd}@)wPl3le!ZQ@uv7C?)48)HB@3|OVEHhG~8te`# zU`iPR7`tx2bqkh^*o^cicZJm(jzX0#b4G*k!r*}?V@Xq{cPe4Nd$*slHkx*g;;o!$ z979c7#*Gz}me{KdH+dOoSDj0t zAOpk5r!!)qww%q$LuS)Oj7iBI)J+UVPJMkOPJ{Wx(qF2(3DyN0FH# z`P$*By>SBe4tNF;d+d%^_mjG|GoO>X64S|O@gekb^=u; za(7SA#MW(TQg(mw42L?rBp!Bhm~#)0HUfYyd^+WnD}(_IV`H3ZeR!zsrXSA}ko;$O zRM`zjOcv{qd2DIY4(ZEqLaj5OwcjJZmokvyhyh;Z6AbG{`A{3#k`bF{;Y=-?4hHPN zN{pJxcJ?lNViWO=HljFIj3PYbho~0{C9^<z4mF?$9r)_zr ziUel7jL#0KahtD<+)7hVg5U8 z`9o&{9=bJYTIY{v(j~GRUg5`(pQ@t4ouBxIqz6@7e-*XUyp8$S@jT{CX45V-GNcZ% zga0&w>n(Tc+@)mZ0{$LL>A%j4LjMtD@xLorq(zON8^U+j)q74sdidG8qJXdz!p}80 zZhH?;OT3qTN^VwHOp4Np60OFh7D2Dt=)aF|YIa_^HlH59Fje@So=hGopl^eDI`L&* zpVo0tnP=%gPV7z2bP^^#r)40GD17TT=C*OEiXh%fdOgX!FRl1w_c^`F(iv)PB0S02 z%jFg8;{40*>P z9tETDM(An9YqJwZTL_?0XUO3|e%BA<(#q}01&ZO_PfU&iIk>zjCGN)7U;*p%KYy*H zZf=dxjk8ILbYf1^o-5mYn%&2aFcH*}Bkm}75M5hTjzc7xB9nP37Ws}7z}OYRn;^xF z_0HVbV^S_wXKZRJ0_!U1Iu}lDEF|`WOKwDpRwyXfz)C_u#@6O*5d9f(a$cF^Xb%w} z*X`wPVea2~Xwem%blBw!|WRQ$;G*$X>+%lcq%GpkcW5#B`&r)yM_E$`m$5 zm9?pm=w{r}mgp*_$nz|SY#7=!^MfbGP;E|kv}*DDA8$iD`?FJx}nW~xi`s6IRXE^_gsUl0Sa&37n6sb-) zwsIvVnp-oU07-w0TGIL30P{a0=Ra!V|MT$lW^W_v5BrVf1IvJSTcm-lF-rGjiagI5Wj8@UVGx_!+Fi9<$IyBX2U3! z~i$q$l6z5qE70 zUBOI$DyL!J4Itt@sYJP9CXZi;_3fI@WGz*5ag(oMIcrqe!9$$FqMT0U#M4g2#~ktS z@eYM?PEYtl-U-75(8Ah$`mQ-jN-#DRBSo&*(i%X?RS4$;T=+prrc8iK!7&}Hf)C64 zqp)VCa?awTVcLG;Qu>KzQmNpN+`iyALA!nM`-;pIGvlsZ;$#SVv}9QXkRo)r`>ob} z`G>APOp$)yLX;YCbTZ8<5zyg9&?Ux^-r zfvlcP7N_I#CzFSMSUYlp_RJM7=8wWo~!Q7N{iglHPm5$6}#=I&7FEQJq9-4(jf0LAQ$P+)0< zD}KP_BGvcrb8Vt+31b&Pz6tRqx0%g%FQf1Q)KeY{SQ2Mr7?85Xfq?8lTR`cDCd$Nx zV(R#Lz!(Z9GS?YjWFA=go5OE@{@PQG#`hzVOlMn-aj&COBdEXc~s3L(f-y@zfNzvdCBPpODtK96qQt7nF^QKNp zHU`vOiCrdJo8Z0F#aLe+)7zNz+AJHo%N3Kg>%aQ#^&{VYMQkWT>(t^VH*e8rn*|<0 z^;mmE!<@F5mw}nx0Rf@ti_xxVgSi=t*x;E+u3y8S*e%~*wR8}F>W6s$)5ugdh8vF@ znEr~-|ArOu|D1#-`42eq{~FWp@i#;F*|81)ct$~bX=^CR`naO#g#B6Ea^`kS>N>$y zl%Cm5TNP3GDDyw?nYt+ReYeif4aYN`w(RW)Q<$0brcUQcricLB;*2segv6(UfAB|j z*GF>chl*s~cK@Ii`BCu7%ghKFl|;Ptd4AXZvQ2&F-m&BikX!*p1IybH=!29jg~6}*uqs{3$Ha;wT9?DOQsv zFlF(~K$&sVrpz*a5XcXkdWvtI4zU5l6y_3~5)*#na+jxs(!QUZMgYqiXFPPvS?NYq zudyNFssW6HQ_?3`i2Wo)otG3HSDVx9S%`y4AG9aL`GKq3Z3^*6-7fH(od*5m_{ZT6 z86cxEYVT0h$0SH?rUMeOBvw&vEN@5T)fxk;$D8^{6t(J!$-4aW`1!rK%K!p@v5DbY zuLEIXDmH}N!bvCVDL*x8KaqsCy0rgoT1B~E--g}p+Cdj>0!}$1K;`VVm*o*S=v7D^ zUCJnPrAq0gp&eTJx88)~` zXVY}C1e{Uc2uf97O|vdBhOu84^-zKwn`=(|k!%KvB^B1ub|*2)T0Q$_kBnk$Z+2rR z;fnufMEyIH_Wu77Fa4hz?ti5_*c$jm>4ToTxyQd?2Je-v3`q6FpQFNi)ZLxj$Y&k5zJD>{mtt*OT=_+nAfy@`(@NMt7q2&4 ze9yH%wfr+}g8NvT!%@Lv%wcmos6pmnz47C!^brG68}b3UIJbEvxtfU9JGfZYnbN#k z2HN4%p?^dZySBXCYT=Vf5V_!WjzTi^lx4vi+eN;lZxPn6y2V&W9BbEg!JRA*|8Tmz zl4u}4DexIG#L1|)H)@e+c{U(Wipyj2sU$|?3mcnSj;MBBOH4X5h1S5trV>#!c!z5cb954e6EA!e4vsbZraZQ(gPjtYkfo6 zXbhIKWKZjCHxnuUj<<7N9fFBBsT$rfkAc!Pn$T|27%X4yv=Z7p!~S`-c~hebZ=Qv8 zye}i?oV9RFp{Hj^4_o7vIBEL3CNBvcHkaKxrh}eE%nD&Vxr1QxunO{Fh?wKD6jC+!e%-FcWvR}SRlbNp4EYmEorE+r!IwVT7(Gsl z16u7n&M|Hdn_D}jPldYngZpU#n4Uwnu%h!(z1eHpyoZ0n?Ctx^wF(Q&Wr8n9<540RsPgv>ub7DR?pugvi?`r z`p@Xw|C;#TmS}Zt2_&k!&he> z7EHT`@1vyK+E%_=pYl6da8YtBJU07d-J zQ1Zl98|dX1Aw+&APo>hzS-M5fq5projsL9#<)7Schj&CA>M|Ro|9Wf)_NbA}Ax~=K zn4I!quNux0cb9vNR*w(lza00cQ(Jn?V3hdi!z`*dx{bN?3zo$=NT#592iA?SiBOm( z#-maIHSJA{=gFbH)`FTwVEAdao&(DFN#EmKs(q@QXLnAT1S8-sL$ka*e~+WYQnCskqoOa$bQ@dWSKYR&0&JRHiP2!TvF@+IC%+ol zBMaJDor%Joi0NE4RCbVYkT4y7nl^$;h@XesZ(QQ~b+uz2>(aw3)YCLA&hSWue@^S= z@}SQ7`Rx=mTh(jrJW06(vx|IN`qaGBEW2%mj4K@}#cHVp89>ERDx>W1=urQH z@$9HTlv*dRN#C>itRN*^=pfh-O^}&jx48VQJ~B!7C$IA4g|pympEQ|ct%SOxj$m!- zb8t=GZOx(KCw^fMIp(=bq(eJDlxvkhlQE`14$Pwb7nWYmbBgSmk0!Xi6mGx!Hn2M>PIRi; z61(66s#|?D15>VQ`&C0(YnS!bwFtzn$;{$?l>=WJj;6=IH~1kIj8!CWm%S*NnFGAa zu-EYiblGFnpd=Am_S%1=peFf$(KG$$uEL{8s9QA{%AD{22+bJ@DV4!*lHJ6`s+w;ETzLUWK@mFjAgS3Qxsdv>PP2BN#QH% zq#d>Zb*v1cM&lc$+@5D!S?d`^OQbBWXLd^gEkz8h0$+J$?Pc!Pl2Ems7K(@5I8R)g ztb3(oP6(Zj!KDMwhy&uo4Z0Bk9T9Ez0Nj~YGQ2z;u_;^h6+paPxg??9&IJ@pp85vO zV=kzFp>b2(PlhtMT5Z?z6&4(Y(5@Y;)f5E%p*H~iF>ga)C)QHUtBA9_`ZGk9@7aaA zcmcbR{GkUUWBCWq5t{OCk(p+@cGQ6Rz!C`b>0Q@Ney`?dTSV_K!bZ>aAOfE84lr~5 zQQfapEEA@+Ye@*2MM&c;C!zz|9jJfqhHh&5Gzz3Y{s0Lr=%U|OR238JmiM00*=bd16l$4 zHHmkmi&GRw zu+xq;Oy(VSW_r7+N!RSo_bM8>OA#Gdi_?(y#6;}Yi=b-mO6tDx3PQt%WJw+~pH4X7 zh}HO+>sj^B@Pa{wKepNO_2%wn<7?y%6KiH=2(da73G>$gUCQYNn^(Y$kK-1@IkIhh z1Y-k(Thn(5nG`vOzhJr)IdAYK%o&+vi#_ohagRSY#6lOh!vaq_aXnVmE^vP3Ckm#V zeE2zbWD!f4A7{21fgr+76VvcKpqV}ZG1;8#zg!|nD*0mO8NBdHl89mt_|w+pME>)S z?SbBYN=X#$`hg^N`@$}YkUE$eP>A;js8r$~9-<%%ESu$*-dRUUzFAj3Q;@)tp1tN@ z7)`btanh(g&L;j-=wq7K9A(gG{R0Fz;CTYPsS4IJsspU&EK%%G=*#CxV{I;epJHz@ zc^h>Gos114eNBodCZTjh_o0A0moNx7WKipgp1^CpBhSs4JcRE$Y=_>qlZ+8=rx#{G`JFN{abt< z|Nj@gXxK(yIv&dEfkZC~>c3zNra5Y}B$XPQ?h?ciu8s}NeV_=E(&NM_Bs2pW3!g0! zeJ?Y%)`LT7=5*W)KK|hH^K0(+(2DswdU*J0_=$LcBa%O`QlW3}g4!Fhixe_Tp`MzCNK2?#n7XSu9( zZO9q9!#GgcLNsF_*%7+MUzenoN$6*HP53L8ptJrv$MLxRS?4@WavjG~Ax_u*uI7m4 z<36tomHdJ|`{9*d#yh0xG6HE1Hzgb;QHO359@3jb!}x8qS(d%zBf=4ARc+{ zO!i)MRkM?fMBS2YPMXnn?$AP`^ZV;>Y?{1L+SrR$%5Al|3z@Ry12i-qe6dbCs>zW_ zD71`AFa>*h_qSC7c|=7m5JK-FRo2HVRAGc$4sYQ-hRH4LHrG|Mkw!05@>naP;uk^m zbu90<2}sD5aQWTH0tp4P=$1U21g+qM5bNP&18|}qRl>G^^AFAW@cUm?NcBIR32~mN zLMmlQgTDiV4i#5^?lSk6=#)(EmO9$00ST@Wr5)JuhaSD+*dexf9n39DY-y-8tQ$+SFZ^L6d{lMwn*|Pm>e)+q+>E*vyyIKcx*~qn zR{J4v+*vJ7-@#^8oL{P<=lVx)&5qv5_>1^pbA(#m-UwP+HXVSYk=~k3+-+6?7tiEf zzu9vA(lLiMF@J^YhmE5|7kw%RMsip9v4fJ7|EIG)#KT{ooU4&7K~cc?#gMA@aj@ z_v_a{L%C)t2Q(__oi}kf`;^Pz+4Fzhr%-u0g-3{BM-t{{JDa@Lu>>ybId!3)@PNSmdc;SBdC*aP;6ohwbnH zREwYf&&m8VaWxwCfQf4nf&(_^4Y)$6q(%BIr>)Z z9%HMT&#hH8q4BIe*8oF&cO@O=?9O9^_LI8#*aDky)>Lb%xRK4WdEg^eCQ*Xdt0hkj zuX-_bEPe6TV}Q%p)T39eFo(zD%1F+?HRq(RAxjOnDbS((2Pm{*@3~aW%dEd#5 zQR!=dPhj*J=C-n+(k_|?!TBganCDQL=_`@T+D}3niXu^WreO}$$hmOJ;3V_i0NyE% z=?>d3i)$_Y3^!cC@pC!~T6=?jwDdqtUa9sLRuVr5wT$~$`#iaKnP79R)ll*@GLP{u zW)y1qoAySoPE>6_xr>_;J`3KxLl4-#KA+B&sVj%;23`bpi{hR* zz^&X1+eJTti`CK91d)XHX^y9mj?*3`3fGa5Hk|fWz?O$E&X5)U`{?l5yMBpYskRS% z(p|Kj>Em*{obaR8pD9ZX1Z=bIW;j;945Grb25M&v4AuRV7!iH9P>pWqY<*&-OFdKZ z89|^NT#L)Am0p!NCdZMsC2p*uG3O@{T>|dY(_@}|f&IPFOr!EdhC{HjeZelZPudp> zJEhdfmXylMQCIM7_hXkjp}V`_&G_M*v{t>bm2o{HroH}Z$1y&8{u5!Nbff;5CueX0 zITc~n`*`ZTbpBgcR){l6a&qV0x%!)#Qiqoo(nQj%rGTCQZ+z_qbN}xL>if`FvegZb zsLkTW6~RUVX+zODeQ`*1)(F$S`Z@;Yz|2SNrvd3ctO7WE_G`Usij0gT8%tV8d~x16xbdDfASg&kWlmkQXJJ_U7x;w|2E4iAwEG01&&L)cOaj@yU{fe668cNff~n#}W^c!LPf?kgIK2 znn_oZyj?%_q*|#BZci6pjtApy4OdTQJNpS9V}=wG(HOLu`lr)q!3v5ulc!)UP z^*s{jNkNf+ENQkY1;5a90t)?1!58ax{F$W{eU%cZD84$@6$Se`*2^KR|96PNyZ;EO zLNztGbc@(Jc2Bwcu8;5p*^9X8_tbiUq68bZC;v9{YDP}Qj7r#zPIdD++(C;b2$^HT zZljK}>UzB#^30fm!-o}8HvE+4M9hHgp>j|0kmH?lv4M&7c=UYrf|k}$6Am2Px5e9Q zZRYvyPs-PHbn8Z8=XMz^pku`HctVjX@c-x((gwas9 zVlPOU_?dI)k^P`GDRD0GuM+INcD*}GpYK0q4vGil9@7UGekPqaJ5v>fRbPE|9h6Cz zO2z0MCE4gQG}gPy&JPiggHEPNpC2pJn3m_644Wm~ecT*Q9n;T6eSE0^LplcBj9w{y zw~C}0QyMQbe^BTz!@+GPS#DuV(J-p|pW`~|~%sU1lTl0_PB2^35#0Zg|pHMJfFL?e~I3mQPNW|P$I zTSKHAm_3i3Y1!DcrzBLf^JmE(%{h(~)|NFP1eR@DR?|s2aiF71*%@W?CTb0>z(ee? zJ+XtMC8-|?k?4gx8;20i@lbCIsm!ROX{jTTeUrsvJjTTe39Vdo{Nl|0Armq~p0EwT zId|cvuleF(-|^gscm#xyt`|0&Xfz-3eyzV*8#tJcmWh+I%k*Of8@y>%1?6Y)fvwWS zy5HG;#kAF$6_+%Ef}CWN+$=IBKS+7pU`em4StItlFb>t>i}$zJe7L;Ciq9k j{> z7(vn6>7OYPARzrU|3Y|4A)dO`G?0a~s{1o@%cM;`3Fn}Wq4`Tp37m{k(1dhNLziVV zAD54xaeQfw%S-Q{0-?=J91_&6_J`<;&>4T62YbEIFX>}VDIuK}40{1hEG2H;@d#x# zwLKQ}MQ=8Fc31^UFVKv>%fl$DqDnd>oW~jdQWduM+3%o4E|aDP!4+;CF61#@{&>G7 zst+?0;1LWB+H)3KY}CEen+wh5w~vQYqYr!qY|$K^F)XCFQRIiBfcE^i6pv~O6*fbq zNxxOw`RXZyYTr!?WvTPl>Bh6qx4&b@8ⅇWgc;6^YsEBml(*e4aUnHW@qKSNX!cY zY|#s(PEFflJYa5zZfZ(LFX;|}-Gjz!u97Pon3ry0JEv@ft28k@OMsD*Uk?O-L@Blr zr(}}dJ#yeO%$)jYRI(FZ#D)<{{1{=?DtT@`T+b2k$l1|Lj9{vi zf~dwt{^G9|+T^FJi5ztLLi2fzwp#0zW@&GYFD&=5!h7Zg4YgyzN3@(z`V%L(WwgD( zW&D;u^0Gjl)6>D1vD~>@tAZ%`EVj+1&0t&cd~|rSks%6wY(8IH;B0wc=Pslo>8oBV z>^<;D!}hinb%Rd!0zoAp-?M#NJbpTy3QfebCaVIkJA0n{(1jJ#Idq`M^RaCa>qxvQ zZ~EMw(LMsp%z?UP*`0ygIAs&fRQpBPl67dMD=1Tw|HdokPwck~|K2R!zWNGY4z68? zYsHdA@9cR_%RKjeFA_Zu$t|3y+yi&7@H%+zJPYrZA?E#eT}WQu=mz>;e-tGV;R_>M zwKYNvoj%0>0UC(=`{u~Lc@zhe$?37uY}D<2kDiFIEwiEe(gLVJl-b326f+9iC`A0> zz?1vwJwG$nJ4PEf(}j|pAqU{I)hVNcb{25G^-^WIpmwd> zuMBm9`?hpnq}D^K4$7EI+*1_D&zdTN+ax2*{dK%He?5jB4AZ^_JVM0kL`VFtO0&MUELmxS!EoRtaHYO81<*hd z7MuLWA{0_I>}k=nJEPP$jZNV+5Q-A8nM%1MPo%MO8`#RG%W|^mZ!VyE&usIFIsZb* z^)44hO-Wfjd^_ouVXf9|cQ8Ph{j@P8}yFzvr%x8|)*dsUw=nn~M@m^-Bm#iR8P864@2vt3B8^km|= zb4?Fm&ijyFrF9`obB}l+sc?Iz#i&un4!!hHTjWsu)sD6^&OS)Mf%}QW8P_mDT`=>r zqyZZC6SXq9U7&zD_`&Wsb4kR5dSOhp)C%>|4)}RRJ?|g+i3C9->2SEmR*en9{(r=s z|MlkI#I#Xu`-mB)UwGc7yc&_bLa8b_Z@An>v>B?;hLh}em{Z1|4 z{3yiR_Dzqp_F}hfp~of^(#I8+zwo4=Yjucligo~BrE`YAHB2Cy!{o?8@lW+Q-#lyc zmK8s2R2JD^A`NJ+JYP(R(|hKFTOdE(HTeL1eFXMrICMg+`m6)r&O94_)^~JO*vB~5x6vKuZQqwQS;%RvM& zC5(&me9mp(*(0}t?Dgg{_GwXh)mi9dNs+#Ze;^{*En&cF5MbX*4LIYME$e?XEm$qs zwakojmi&2NNk6I*+u?#DP%WmT-Y!)uA`)FL2+T%+<;EV>DGp5{bMm7({<*C4*03Nc zN@l_&Yjs+rX`1rVjMm6I+d4Q(-@RjsL49BCF<7HG(&AfOQiU>6KHf{Mrc%aNL3qPO z21A7UuG(3;5yQ(#_+zzxA!@EQ?eYU%@HIFv6rwl)`Wh9)?V&_jTMg=;t2IC$^J z**191Dpzda*b8Mu5@9BDUpqg3@(ZrbwO#{NE&!QJ_6pLD?97najLRRsn3Q{c9WAuRM4j5)eB-f`WfDx1Ul~?I~LSFq6aVR9|WF*)jmir;<;%sto z#TXsCVS${g%Hc1V)j_0(0kxaselI+mCt^41?Ozcp{;noB0gUNH|0B^k^JnK52HP-jr$!x zgQMEi3=meT)Gl&wQ$CNz$V46mvFr(PJAAQ7FmEJ{zytLDLz~fX5Oxh|{zUvu7P9EU zREl}8o($H??im~eJ6k9gqQN>eK*wb*x6PSuDq;GQ2Y@JmR?|8o*X9_2EI0)ath(j-^T{sy(U{r*!pX2m^+Yfe(=IG0!hTH1~z2d+65Ilow2u}#w z?zOL$tKm#2O8R2rrv~=9@JP2iCoohrCHrK)Fb#;(NBnDE`#)U$9h0OAZ(r*Y-G=#- z3S{Z|w4FCCL%oMgeMWwOO!d%8C~=W>sj8;sWarn1aR9{8F|R45J(jy#*1wg#--p_` zpVRg$GIi81)w8;4qTU(ErB~ixFqt@*7VDyN$CHo z>^#5WV7oOwNTLPNqGfcVgy=PT^fC+?C3^3|gfNI23C3Ww=sk#NQAe+%w=qPE=)Dsq z#B=7;S?`Ba*7GOaYu#(FeeM0**98<91HUe_Ps~wwe2V>%4gMZj*rqB+G&-mJV6~-X zs~CFY*uWF)84As(MEA4zOGKga;H>Jy z{)xaJ;;5H@r;f%STq(0WbcW2dTMiGW{M}|b9hIek9`*UWO0zRjNoU4HQ$z%D`L1R* z>AZB5wb)|HeDWx8{YS24iAp({-pIAZp?zCR#vdma`|RPC>W%1~U-bdLTz+N`9)U=nHEid0DMYJVI2xTN*yQ5d}lg<(!wzsHPQ7@?8sPSxyX>In^*QJpoj7#o07O7!&CXNh*7wK~9 zK69uHD(5TPsCzGc_d%KW9;-6g=Gg(yOq&*6e$HaS5d;heGquU?9`{TPnh?{u!YHRo zeBArUWZl#WM!dromcD?w!8HYO9>l}XpHAUC!E;^Kt&kf7D$GW9v?AG&yZD*W@3#RI ztKvy1!?6zaNM(}L0Ya&Mn3kk5A-^oSE6*|T3l z8x(yP2@SOBe4DWQM%ExgDYOu|0?r?h*SlD_BL(behi>rZhnwGF>HC;w>Yt2C5o5 zjgsmouh9<9SQqBB`@f=D>C>%SBE8#$n1G%7iX1H6>f-yVId2`H$ItIb*pB;`pGV#a zxHKw|<}rpu|E6Eh>}}RDc|6mt$Ve=Kcay%sm7ZWv8PTt`9qZ){vD`Ts%k}hFdHJe; z2*5F4p1i&R43>&gSh7!=qLE4gQYcIxqKPz;SJi?)_+p{Y zlD5euNV;t3ULy5q#rR3L%!Q$2naooisn z)$_2&gGKP}u4kz|L}rzdp6ImA@j@MywEn6F(~RNw3yN6%6%EUcu2e*2r%-Rc)T4z? zc{Odjojuc&Zx<{q`;<1E{|D#Z8pVh#QBx2dd48A@+T`fMxt_KB@Xy+p;9Uo>Fe0*_ zm{((E{luUyduE#se$If4Fg-poX$&5Rz>#! z%SvDy+%s zZb;;kboA*wRUD{%C&UH!=w5#K2Az@cE$o;kaVb%w#KpzC%z`vfpHw~sAjOH1p}dgn zsv=NwaunZTH;$Sf_|##_$r2Dh)xeMNePk4U-tn<+Av?r478G=tlA*b9Q}gs$2p-%x z*Q_FON*PE_w+4cHc!&B@ssWYI4mg|M63Z$jHy;dXuAf) zh7$`)Q9mapG$&_!P1Pu1B+(P-Bzqp6cmt&=>cToaJA92XSLO|E=$G)587`BFQrb*P ze+@@g6dx>{7jS@Sly?+Xe9UV41TIf3x61&sbLH2rV~y)&_Ajy#wO;7i;H$H*IZ`Z8 ztgZ>pS0u=~%-e~sckiZ8mgIbw7d|gWSi+eBvVMl%(4*kMRO6q6=xx0R^GZF<)YMq< zB1}iNqrIsCj9U`o0;}Y$p~8xEVgA*m_I|V??D@8wWUP+MFc>zSQTv%ka!51LGRC>I z91$S;6xsUJoW#6Dht0cNHLg>7Z6+>ZOZ#!+f zcRKUvVh#1PBw>Om>AW4dyXCKsi@l)_0HrAV#GzA(Y0r-_#@3eex2c}8kWYlH&+-Yk zR1Zo;HZSN6!**gc&q#eB@f)LbZa-CYxuZP&9c+oe+qd}uvzITXht2boW_-wTq)-m&|`%b5(; zcNzk&50A_#xEINbq-AFji4i$&8j%#63%!;+(|7DwEk-9tF-~-_hFV{)^;2^FG`ocC z8F2-^hyncOeAKJ=`1v7EH_=k8&^@y!C6cAT_M?s8>51+sGJ928rkfmC<3xW%>M=Zu zkl=b^p*}h=D{f=(3}6tY9Aeq}myg#d88}uyEVUcB)fK`xr&RjWA7qJF7wjYaaJYrp zC<2d*VcQ6&EMFuEr~Gyr+q`zoZKDYuJf5;@IbJGLh^$97EY6Wl4zzxoQ26P45H6e` zW4zB0tYI9Ey3Ua$KR$KBRJlDlCXMwQSU`Gr{s}a$QD@pO-v8>ccw9qIYsox=_zQ0U z7e&#tx4oS*R*#(08_}};A3C@HhKX=Tb^k6ri{iyq>}(^aJ1KGG?mi({ zp;`9FnD^rlkYJ(5=7oAA(*CS}x^eDx?Q%Soe~-zu7dO^RFlcx%Q)Hx~JN}R_G4%d> zu@iCrY2R|$hWCvm`uUo;TlB;jY zhKS&Dl=$u}#}aBoBCG|T%-2B3{ypiCJvp&lRs<>3 zu~l!s3RX6+CQY0SWjNB!KP^bNWf|Ux-oEd)|3hHpSK|I1{_(4s!a$EN%3qT#fR|Lc z*G>%Q=eX<#PxRM9_4$jMd6U=b4({o-wM^{&Ofi2?gEjvcryJ@bq88*-jIkbfG(kMr zAg8Y>7TN{|z|yoYL+UGx zyGynhw<=2uLA;^<`q-zz%!JJF*aSRwC2Eh8D$=qGAU(Tdx}69Y?>`C zyDgwFJ*VYz+LLPm@-AN)lAW3G-aSX*!<>wV0Xzr1p$v1%2pcG z&OYPiP}B>=l_{B&JSe8zlpDj11wdNn{mM1PPo`v|1r=FzwyrU$MWZ`Vvl)#7!#6#R z47e2ixx9({gUY|9w{9wy>`!uww1kD zY{Z)`^0lnh1JlaudKAqERbG09r5#L%%3!tk#->xJ6aAbVCFYmaPBSFC)IZ(|g&5bJ zT1IYOY(gWWmc)k#wk94flY^A3v;!5dliLbg6mnSRb1$Mh{uaJx*YtMUdVQs$Lgtn? zH>5G}^tsxks7zZx)Px{)o;RgG`CyP_e$}cYbnakQILV)Bv#nLHfr;9`T{|g>KDvFq>K0G61oupH z_@4R?;1vmF4gUFh(CA*`j#cPdE%7FO^s1}e#kqn@=dw+B4?0rDYd65N?9J$-SkBPi z_fF!Guj(X|P_Y|BhJG@~4@AwzU?ymYS%R6r-i<-iFX>a8T~I0RmkQcp^C5gPz~6C| z@kN5eQU&hEmPUh|fp_9*)h#5`M>UmckfggqZGTR3T!a$k`Hq2QjE0f@!V79scG9^K zZ$LYghjd&e%<_JSZ_f1n{G2n96%*^VdLJ!_gu8QcBLQv+nY_SK8kSv+w+zFY6VD2- z^P+_UzAo0+m<8xZF?4YNn6aP7KK7Ww>Y__6&hS}M0vlP@4EW;h!Qt`;$AllOy6-4t z4o>-Z=a>J^+Ti3?Kd`A%8q1&X`zUIOE(vWZTsztI4?yj^f%n_~!vs1$(S;H5J~J4Q z^26MkRb3jczq{=HaNLjzx{wG5vzNX<|2$|bSKePH04nI3Xw`G1w~Zm15doNcA7Q>Q zWmkt@5HM6CqHde1x=S^rq>DMI-*?`w?U^G9Dn7ikhk$(YQ5~*Lin4~D=)Q3Qf7cvq ze)E+CerVDU48oeX?{iT%yy8ixZ$lE>Cn>Mbe#L=dGxPNoBLEqy{;8NWRI6?|kNq3J zH|2d);^J$n^l0dzt0G2YSa3Y;LH^ z>MRM12^a8(?TZ z4PM+k0&^j^4|@}VMjEajbOLNKKlO})O5k9YdWWkY2RgtetDz(@aI2u%TSs|)4*GA7 zPGmzFjtK5%kpZEvKB9Z3qNRr%c3!cn=BewF?vQ6APFXKA<#eHKqr`)86zLr$t~;;s z+B|sENqOgm(J(_b`)?;oBXLbP`u8IfK_e&t42wnT4eaFY*Nd@5X=XnbdMEl2AfgwD zw`bX4@o_85blq|G3Z0d>?>*O^>*i71(+HywkC*fBlsX@MpBtJ#sJFFowWuzNy6U(I zx|{a7DmQArx_>->z@$3m8Fum@pLFZsoqmdq7X#sgC2sUxe(o&ep?<6BD6z@yOzj7D zd*`#fPdjvKx7SRI9>TCRf%`Lvw->lqolH zH6$e&@fT|4+w(c?ZTczdg3`x=~03+wn$WLw?udy%QMu)j}mpSg*Kb$Mi~`gE4kWU_ZCIa{Vm z4=(Ia3*jpU{wd65Eo1#nyZh7^+U-)}$R+f@H+vNSiY_DA8lM+6Yr)(yc{vbL?n=7d z>!l+9SzL2SE~M^lmF0LMn%W`&T&Ko7=t893!*u^@y3-v1N@OfYbHbasDo^Av`4=`14E)A|fPn z+Zw`WUh2y09CNea;xQs5wHbT5&y8gK-k8mZ5M>1}A#iHW2TlN^Bxa5O=qe{3dnwi?Yx11cfNP z_e`|({t(x0kB3{*MfAPrpE|#ZBK0ER7oogtBD>w=l@oMf5XF%W)Rtd&eHIEl5Llu~ zb*0dr_?ykvYtgsyev>Kk40q%6Rq+)@pfbzX!-9vIiq}R2KQ;*CwN}fy=YD-CVUPoj zdfnr&Tpawmh(fNqaJoFnF{xS4ICGU)Dw&+r5}x>N6eCK+>7)6VchNfuMS?E=B*&M$ z?iEnkNudIAAct6SJh^4MW#yxv4@sS*Lg7HG8X-qs6#4}HM*EM`Mh z+K9&5^=Y0dZ3W@TU3bC0w1Epn(wkzbHBLyvyO(Wajk;Lnq~t-GrOip%IFUO|#btm$ zdsLk6W)}xROak{OJ{_i{T-ZlcK}`MVLO_lDguJ;E4SXY?U(2H5JZ}g_@~9~6)R_i& zDMqDclM!2MJK`!4p*qX>2Kb!~`0379#7-^QU!Rjd?wZ=IUYbsF0DAdy0?4_+_eho$)mVNi^^n23JEllaH*KzVO*| zR~kcP2M+o)d?fpo$Q2Z{xBsq4h#=(?JNpcXGqkwL|agqZeAj&4IgKY2o#EL4U( z+dqKt&^wGJ_Z6tvG>GR|xh<+{wM8A(I$dZ@)>dYXRQ0-5S|_|e&Oe6XKgj#`EgqTL zlKXMuWsT^;9eeLh0xZ|?=rGt#kl$p`v{DB*uU9GjK(3Y z!`U@EWwN$lY0x3~;m(ZYQhTp)ebTBEV;RRspsrETb^LU!+n^`MF({h&?_IvFz{cgQ z)YB8%8wmr0p{&;mJfmf3s-TjVpOV>Mh|@M4=9mA#?i|}O@!kGp{N{&sEe);JF@E%3 z&B2|;`)jY7Mz$`HU#<%rb|C{F>@5kh@DQKxWvuo%QWeLVNPZ0rVBDl9!gjZs;oNXX VV1HCL|3iHK=lL$KauNJ9_h0vxN6-KO literal 0 HcmV?d00001 diff --git a/node_modules/.bin/atob b/node_modules/.bin/atob new file mode 120000 index 0000000000000..a68344a381a7d --- /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/npm-run-all b/node_modules/.bin/npm-run-all new file mode 120000 index 0000000000000..f8dc87b0f7c17 --- /dev/null +++ b/node_modules/.bin/npm-run-all @@ -0,0 +1 @@ +../npm-run-all/bin/npm-run-all.js \ No newline at end of file diff --git a/node_modules/.bin/onchange b/node_modules/.bin/onchange new file mode 120000 index 0000000000000..bc1e9e8fd485a --- /dev/null +++ b/node_modules/.bin/onchange @@ -0,0 +1 @@ +../onchange/cli.js \ No newline at end of file diff --git a/node_modules/.bin/ps-tree b/node_modules/.bin/ps-tree new file mode 120000 index 0000000000000..64a2a388c7184 --- /dev/null +++ b/node_modules/.bin/ps-tree @@ -0,0 +1 @@ +../ps-tree/bin/ps-tree.js \ No newline at end of file diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 0000000000000..b6afda6c753f1 --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000000000..317eb293d8e12 --- /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/uglifyjs b/node_modules/.bin/uglifyjs new file mode 120000 index 0000000000000..fef3468b6f6c6 --- /dev/null +++ b/node_modules/.bin/uglifyjs @@ -0,0 +1 @@ +../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 120000 index 0000000000000..f62471c8511ba --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1 @@ +../which/bin/which \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000000000..d3bc688bb4dd4 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,3372 @@ +{ + "name": "minimal-mistakes", + "version": "3.4.2", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "dependencies": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "node_modules/arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha512-dtXTVMkh6VkEEA7OhXnN1Ecb8aAGFdZ1LFxtOCoqj4qkyOJMt7+qs6Ahdy6p/NQCPYsRSXXivhSB/J5E9jmYKA==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha512-G2n5bG5fSUCpnsXz4+8FUkYsGPkNfLn9YvS66U5qbTIXI2Ynnlo4Bi42bWv+omKUCqz+ejzfClwne0alJWJPhg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dev": true, + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", + "dev": true, + "dependencies": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cache-base/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "dev": true, + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chokidar": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.5.2.tgz", + "integrity": "sha512-Hc3T2qGwrnnZORa+Gmnoa5yGkr4cqYURAYBC/RXxPBAeO12C7/stcWXhjvxSnE3gTJMZvSOimFFarZUdd08NfA==", + "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.", + "dev": true, + "dependencies": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + }, + "optionalDependencies": { + "fsevents": "^1.0.0" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/class-utils/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "dev": true, + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "dev": true, + "hasInstallScript": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA==", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "node_modules/cross-spawn-async": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz", + "integrity": "sha512-snteb3aVrxYYOX9e8BabYFK9WhCDhTlw1YQktfTthBogxri4/2r9U2nQc0ffY73ZAxezDc+U8gvHAeU1wy1ubQ==", + "deprecated": "cross-spawn no longer requires a build toolchain, use it instead", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.0", + "which": "^1.2.8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", + "dev": true, + "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" + } + }, + "node_modules/expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha512-hxx03P2dJxss6ceIeri9cmYOT4SRs3Zk3afZwWpOsRqLqprhTR8u++SlC+sFGsQr7WGFPdMF7Gjc1njDLDK6UA==", + "dev": true, + "dependencies": { + "is-posix-bracket": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha512-AFASGfIlnIbkKPQwX1yHaDjFvh/1gyKJODme52V6IORh69uEYgZp0o9C+qsIGNVEiuuhQU0CSSl++Rlegg1qvA==", + "dev": true, + "dependencies": { + "fill-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha512-1FOj1LOwn42TMrruOHGt18HemVnbwAmAak7krWk+wa93KXxGbK+2jpezm+ytJYDaBX0/SPLZFHKM7m+tKobWGg==", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha512-BTCqyBaWBTsauvnHiE8i562+EdJj+oUpkqWp2R1iCoR8f6oo8STRu3of7WJJ0TqWtxN50a5YFpzYK4Jj9esYfQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "dependencies": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==", + "dev": true, + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha512-ab1S1g1EbO7YzauaJLkgLp7DZVAqj9M/dvKlTt8DkXA2tiOIcSMrlVI2J1RZyB5iJVccEscjGn+kpOG9788MHA==", + "dev": true, + "dependencies": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", + "dev": true, + "dependencies": { + "is-glob": "^2.0.0" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-value/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha512-9YclgOGtN/f8zx0Pr4FQYMdibBiTaH3sn52vjYip4ZSf6C4/6RfTEZ+MR4GvKhCxdPh21Bg42/WL55f6KSnKpg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha512-0EygVC5qPvIyb+gSz7zdD5/AAoS6Qrx1e//6N4yv4oNm30kqvdmG66oZFWVlQHUWe5OjP08FuTw2IdT0EOTcYA==", + "dev": true, + "dependencies": { + "is-primitive": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha512-Yu68oeXJ7LeWNmZ3Zov/xg/oDBnBK2RNxwYY1ilNJX+tKKZqgPK+qOn/Gs9jEu66KDY9Netf5XLKNGzas/vPfQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha512-N3w1tFaRfk3UrPfqeRyD+GYDASU3W5VinKhlORy8EWVf/sIdDL9GAcew85XmktCfH+ngG7SRXEVDoO18WMdB/Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==", + "dev": true + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, + "node_modules/micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", + "dev": true, + "dependencies": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-1.8.0.tgz", + "integrity": "sha512-nd09iSzPliO4SFyny0hpgWq0rnWwQfS1+xejnQcb6w4RnWLDlOQiLHW7EJgGFRs54aUkJfmr+TSbY5DaJdsTYQ==", + "dev": true, + "dependencies": { + "babel-runtime": "^6.3.13", + "chalk": "^1.1.3", + "cross-spawn-async": "^2.1.9", + "minimatch": "^3.0.0", + "ps-tree": "^1.0.1", + "read-pkg": "^1.1.0", + "shell-quote": "^1.4.3", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all.js" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-visit/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha512-UiAM5mhmIuKLsOvrL+B0U2d1hXHF3bFYWIuH1LMpuV2EJEHG1Ntz06PgLEHjm6VFd87NpH8rastvPoyv6UW2fA==", + "dev": true, + "dependencies": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/onchange": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/onchange/-/onchange-2.5.0.tgz", + "integrity": "sha512-XCsIq8JCwMsMbJC2ITPD5RlOsJ4ItZ/fkdh+dH3qkQaa/EXhoqXvOyvp+OwhqpAvDA60ljFuzKnNxZ4lcoXR7g==", + "dev": true, + "dependencies": { + "arrify": "~1.0.1", + "chokidar": "~1.5.1", + "cross-spawn": "~4.0.0", + "minimist": "~1.2.0" + }, + "bin": { + "onchange": "cli.js" + } + }, + "node_modules/parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha512-FC5TeK0AwXzq3tUBFtH74naWkPQCEWs4K+xMxWZBlKDWu0bVHXGZa+KKqxKidd7xwhdZ19ZNuF2uO1M/r196HA==", + "dev": true, + "dependencies": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", + "dev": true, + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha512-s/46sYeylUfHNjI+sA/78FAHlmIuKqI9wNnzEOGehAlUUYeObv5C2mOinXBjyUyWmJ2SfcS2/ydApH4hTF4WXQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/ps-tree": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", + "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", + "dev": true, + "dependencies": { + "event-stream": "=3.3.4" + }, + "bin": { + "ps-tree": "bin/ps-tree.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, + "node_modules/randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "dependencies": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/randomatic/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/randomatic/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "dev": true, + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/readdirp/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/readdirp/node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "node_modules/regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "dependencies": { + "is-equal-shallow": "^0.1.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "dev": true, + "dependencies": { + "align-text": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true + }, + "node_modules/split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==", + "dev": true, + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==", + "dev": true, + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string.prototype.padend": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.5.tgz", + "integrity": "sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "dev": true, + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "dev": true, + "dependencies": { + "source-map": "~0.5.1", + "yargs": "~3.10.0" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + }, + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + } + }, + "node_modules/uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "dev": true, + "optional": true + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, + "node_modules/yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "dev": true, + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } +} diff --git a/node_modules/align-text/LICENSE b/node_modules/align-text/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/align-text/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/align-text/README.md b/node_modules/align-text/README.md new file mode 100644 index 0000000000000..476b97ff450e4 --- /dev/null +++ b/node_modules/align-text/README.md @@ -0,0 +1,236 @@ +# align-text [![NPM version](https://badge.fury.io/js/align-text.svg)](http://badge.fury.io/js/align-text) [![Build Status](https://travis-ci.org/jonschlinkert/align-text.svg)](https://travis-ci.org/jonschlinkert/align-text) + +> Align the text in a string. + +**Examples** + +Align text values in an array: + +```js +align([1, 2, 3, 100]); +//=> [' 1', ' 2', ' 3', '100'] +``` + +Or [do stuff like this](./example.js): + +[![screen shot 2015-06-09 at 2 08 34 am](https://cloud.githubusercontent.com/assets/383994/8051597/7b716fbc-0e4c-11e5-9aef-4493fd22db58.png)](./example.js) + +Visit [the example](./example.js) to see how this works. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i align-text --save +``` + +## Usage + +```js +var align = require('align-text'); +align(text, callback_function_or_integer); +``` + +**Params** + +* `text` can be a **string or array**. If a string is passed, a string will be returned. If an array is passed, an array will be returned. +* `callback|integer`: if an integer, the text will be indented by that amount. If a function, it must return an integer representing the amount of leading indentation to use as `align` loops over each line. + +**Example** + +```js +align(text, 4); +``` + +Would align: + +``` +abc +abc +abc +``` + +To: + +``` + abc + abc + abc +``` + +## callback + +### params + +The callback is used to determine the indentation of each line and gets the following params: + +* `len` the length of the "current" line +* `longest` the length of the longest line +* `line` the current line (string) being aligned +* `lines` the array of all lines + +### return + +The callback may return: + +* an integer that represents the number of spaces to use for padding, +* or an object with the following properties: + - `indent`: **{Number}** the amount of indentation to use. Default is `0` when an object is returned. + - `character`: **{String}** the character to use for indentation. Default is `''` (empty string) when an object is returned. + - `prefix`: **{String}** leading characters to use at the beginning of each line. `''` (empty string) when an object is returned. + +**Integer example:** + +```js +// calculate half the difference between the length +// of the current line and the longest line +function centerAlign(len, longest, line, lines) { + return Math.floor((longest - len) / 2); +} +``` + +**Object example:** + +```js +function centerAlign(len, longest, line, lines) { + return { + character: '\t', + indent: Math.floor((longest - len) / 2), + prefix: '~ ', + } +} +``` + +## Usage examples + +### Center align + +Using the `centerAlign` function from above: + +```js +align(text, centerAlign); +``` + +Would align this text: + +```js +Lorem ipsum dolor sit amet +consectetur adipiscin +elit, sed do eiusmod tempor incididun +ut labore et dolor +magna aliqua. Ut enim ad mini +veniam, quis +``` + +Resulting in this: + +``` + Lorem ipsum dolor sit amet, + consectetur adipiscing +elit, sed do eiusmod tempor incididunt + ut labore et dolore + magna aliqua. Ut enim ad minim + veniam, quis +``` + +**Customize** + +If you wanted to add more padding on the left, just pass the number in the callback. + +For example, to add 4 spaces before every line: + +```js +function centerAlign(len, longest, line, lines) { + return 4 + Math.floor((longest - len) / 2); +} +``` + +Would result in: + +``` + Lorem ipsum dolor sit amet, + consectetur adipiscing + elit, sed do eiusmod tempor incididunt + ut labore et dolore + magna aliqua. Ut enim ad minim + veniam, quis +``` + +### Bullets + +```js +align(text, function (len, max, line, lines) { + return {prefix: ' - '}; +}); +``` + +Would return: + +``` +- Lorem ipsum dolor sit amet, +- consectetur adipiscing +- elit, sed do eiusmod tempor incididunt +- ut labore et dolore +- magna aliqua. Ut enim ad minim +- veniam, quis +``` + +### Different indent character + +```js +align(text, function (len, max, line, lines) { + return { + indent: Math.floor((max - len) / 2), + character: '~', + }; +}); +``` + +Would return + +``` +~~~~~Lorem ipsum dolor sit amet, +~~~~~~~~consectetur adipiscing +elit, sed do eiusmod tempor incididunt +~~~~~~~~~ut labore et dolore +~~~~magna aliqua. Ut enim ad minim +~~~~~~~~~~~~~veniam, quis +``` + +## Related projects + +* [center-align](https://github.com/jonschlinkert/center-align): Center-align the text in a string. +* [justify](https://github.com/bahamas10/node-justify): Left or right (or both) justify text using a custom width and character +* [longest](https://github.com/jonschlinkert/longest): Get the longest item in an array. +* [right-align](https://github.com/jonschlinkert/right-align): Right-align the text in a string. +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. + +## 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/align-text/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-cli](https://github.com/assemble/verb-cli) on June 09, 2015._ diff --git a/node_modules/align-text/index.js b/node_modules/align-text/index.js new file mode 100644 index 0000000000000..75902a3f3d84d --- /dev/null +++ b/node_modules/align-text/index.js @@ -0,0 +1,52 @@ +/*! + * align-text + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var repeat = require('repeat-string'); +var longest = require('longest'); + +module.exports = function alignText(val, fn) { + var lines, type = typeOf(val); + + if (type === 'array') { + lines = val; + } else if (type === 'string') { + lines = val.split(/(?:\r\n|\n)/); + } else { + throw new TypeError('align-text expects a string or array.'); + } + + var fnType = typeOf(fn); + var len = lines.length; + var max = longest(lines); + var res = [], i = 0; + + while (len--) { + var line = String(lines[i++]); + var diff; + + if (fnType === 'function') { + diff = fn(line.length, max.length, line, lines, i); + } else if (fnType === 'number') { + diff = fn; + } else { + diff = max.length - line.length; + } + + if (typeOf(diff) === 'number') { + res.push(repeat(' ', diff) + line); + } else if (typeOf(diff) === 'object') { + var result = repeat(diff.character || ' ', diff.indent || 0); + res.push((diff.prefix || '') + result + line); + } + } + + if (type === 'array') return res; + return res.join('\n'); +}; diff --git a/node_modules/align-text/package.json b/node_modules/align-text/package.json new file mode 100644 index 0000000000000..10f49bb1e2b1f --- /dev/null +++ b/node_modules/align-text/package.json @@ -0,0 +1,52 @@ +{ + "name": "align-text", + "description": "Align the text in a string.", + "version": "0.1.4", + "homepage": "https://github.com/jonschlinkert/align-text", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/align-text.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/align-text/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "devDependencies": { + "mocha": "*", + "should": "*", + "word-wrap": "^1.0.3" + }, + "keywords": [ + "align", + "align-center", + "alignment", + "center", + "center-align", + "indent", + "pad", + "padding", + "right", + "right-align", + "text", + "typography" + ] +} diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js new file mode 100644 index 0000000000000..b9574ed7e8201 --- /dev/null +++ b/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/ansi-regex/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/ansi-regex/package.json b/node_modules/ansi-regex/package.json new file mode 100644 index 0000000000000..eb44fb5c1fe8b --- /dev/null +++ b/node_modules/ansi-regex/package.json @@ -0,0 +1,64 @@ +{ + "name": "ansi-regex", + "version": "2.1.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js" + ], + "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" + ], + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000000000..6a928edf0f6b0 --- /dev/null +++ b/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js new file mode 100644 index 0000000000000..78945278f78a7 --- /dev/null +++ b/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +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 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/ansi-styles/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/ansi-styles/package.json b/node_modules/ansi-styles/package.json new file mode 100644 index 0000000000000..78c535f7450c5 --- /dev/null +++ b/node_modules/ansi-styles/package.json @@ -0,0 +1,50 @@ +{ + "name": "ansi-styles", + "version": "2.2.1", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000000000..3f933f6162e58 --- /dev/null +++ b/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# 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 --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.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` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## 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. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/anymatch/LICENSE b/node_modules/anymatch/LICENSE new file mode 100644 index 0000000000000..bc424705fb9c7 --- /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 0000000000000..62f65da875798 --- /dev/null +++ b/node_modules/anymatch/README.md @@ -0,0 +1,98 @@ +anymatch [![Build Status](https://travis-ci.org/es128/anymatch.svg?branch=master)](https://travis-ci.org/es128/anymatch) [![Coverage Status](https://img.shields.io/coveralls/es128/anymatch.svg?branch=master)](https://coveralls.io/r/es128/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. + +[![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/es128/anymatch/releases) + +NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. The glob matching behavior should be functionally +equivalent to the commonly used [minimatch](https://github.com/isaacs/minimatch) +library (aside from some fixed bugs and greater performance), so a major +version bump wasn't merited. 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/es128/anymatch/master/LICENSE) diff --git a/node_modules/anymatch/index.js b/node_modules/anymatch/index.js new file mode 100644 index 0000000000000..e411618506c85 --- /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 0000000000000..c575a09b2f0d8 --- /dev/null +++ b/node_modules/anymatch/package.json @@ -0,0 +1,47 @@ +{ + "name": "anymatch", + "version": "1.3.2", + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "files": [ + "index.js" + ], + "author": { + "name": "Elan Shanker", + "url": "http://github.com/es128" + }, + "license": "ISC", + "homepage": "https://github.com/es128/anymatch", + "repository": { + "type": "git", + "url": "https://github.com/es128/anymatch" + }, + "bugs": { + "url": "https://github.com/es128/anymatch/issues" + }, + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.13", + "mocha": "^2.2.4" + } +} diff --git a/node_modules/arr-diff/LICENSE b/node_modules/arr-diff/LICENSE new file mode 100755 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/arr-diff/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/arr-diff/README.md b/node_modules/arr-diff/README.md new file mode 100644 index 0000000000000..7705c6cd52801 --- /dev/null +++ b/node_modules/arr-diff/README.md @@ -0,0 +1,74 @@ +# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base) + +> 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 i arr-diff --save +``` +Install with [bower](http://bower.io/) + +```sh +$ bower install arr-diff --save +``` + +## API + +### [diff](index.js#L33) + +Return the difference between the first array and additional arrays. + +**Params** + +* `a` **{Array}** +* `b` **{Array}** +* `returns` **{Array}** + +**Example** + +```js +var diff = require('arr-diff'); + +var a = ['a', 'b', 'c', 'd']; +var b = ['b', 'c']; + +console.log(diff(a, b)) +//=> ['a', 'd'] +``` + +## 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) +* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter) +* [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://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection) + +## 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/arr-diff/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 Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._ diff --git a/node_modules/arr-diff/index.js b/node_modules/arr-diff/index.js new file mode 100644 index 0000000000000..bc7200d8e8949 --- /dev/null +++ b/node_modules/arr-diff/index.js @@ -0,0 +1,58 @@ +/*! + * arr-diff + * + * Copyright (c) 2014 Jon Schlinkert, contributors. + * Licensed under the MIT License + */ + +'use strict'; + +var flatten = require('arr-flatten'); +var slice = [].slice; + +/** + * Return the difference between the first array and + * additional arrays. + * + * ```js + * var diff = require('{%= name %}'); + * + * var a = ['a', 'b', 'c', 'd']; + * var b = ['b', 'c']; + * + * console.log(diff(a, b)) + * //=> ['a', 'd'] + * ``` + * + * @param {Array} `a` + * @param {Array} `b` + * @return {Array} + * @api public + */ + +function diff(arr, arrays) { + var argsLen = arguments.length; + var len = arr.length, i = -1; + var res = [], arrays; + + if (argsLen === 1) { + return arr; + } + + if (argsLen > 2) { + arrays = flatten(slice.call(arguments, 1)); + } + + while (++i < len) { + if (!~arrays.indexOf(arr[i])) { + res.push(arr[i]); + } + } + return res; +} + +/** + * Expose `diff` + */ + +module.exports = diff; diff --git a/node_modules/arr-diff/package.json b/node_modules/arr-diff/package.json new file mode 100644 index 0000000000000..d40c21030edc0 --- /dev/null +++ b/node_modules/arr-diff/package.json @@ -0,0 +1,49 @@ +{ + "name": "arr-diff", + "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.", + "version": "2.0.0", + "homepage": "https://github.com/jonschlinkert/arr-diff", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/arr-diff", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-flatten": "^1.0.1" + }, + "devDependencies": { + "array-differ": "^1.0.0", + "array-slice": "^0.2.3", + "benchmarked": "^0.1.4", + "chalk": "^1.1.1", + "mocha": "*", + "should": "*" + }, + "keywords": [ + "arr", + "array", + "diff", + "differ", + "difference" + ], + "verb": { + "related": { + "list": [ + "arr-flatten", + "array-filter", + "array-intersection" + ] + } + } +} \ No newline at end of file diff --git a/node_modules/arr-flatten/LICENSE b/node_modules/arr-flatten/LICENSE new file mode 100755 index 0000000000000..3f2eca18f1bc0 --- /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 0000000000000..7dc7a9746bc35 --- /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 0000000000000..0cb4ea4ecee49 --- /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 0000000000000..d2d33e9bc324c --- /dev/null +++ b/node_modules/arr-flatten/package.json @@ -0,0 +1,76 @@ +{ + "name": "arr-flatten", + "description": "Recursively flatten an array or arrays.", + "version": "1.1.0", + "homepage": "https://github.com/jonschlinkert/arr-flatten", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Luke Edwards (https://lukeed.com)" + ], + "repository": "jonschlinkert/arr-flatten", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-flatten/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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" + }, + "keywords": [ + "arr", + "array", + "elements", + "flat", + "flatten", + "nested", + "recurse", + "recursive", + "recursively" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-filter", + "arr-union", + "array-each", + "array-unique" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/arr-union/LICENSE b/node_modules/arr-union/LICENSE new file mode 100644 index 0000000000000..39245ac1c6061 --- /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 0000000000000..b3cd4f48d5e7f --- /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 0000000000000..5ae6c4a08b4ef --- /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 0000000000000..5ee87fd7da3bc --- /dev/null +++ b/node_modules/arr-union/package.json @@ -0,0 +1,76 @@ +{ + "name": "arr-union", + "description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.", + "version": "3.1.0", + "homepage": "https://github.com/jonschlinkert/arr-union", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/arr-union", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-union/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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": "*" + }, + "keywords": [ + "add", + "append", + "array", + "arrays", + "combine", + "concat", + "extend", + "union", + "uniq", + "unique", + "util", + "utility", + "utils" + ], + "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 + } + } +} diff --git a/node_modules/array-buffer-byte-length/.eslintrc b/node_modules/array-buffer-byte-length/.eslintrc new file mode 100644 index 0000000000000..3b5d9e90ec405 --- /dev/null +++ b/node_modules/array-buffer-byte-length/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/array-buffer-byte-length/.github/FUNDING.yml b/node_modules/array-buffer-byte-length/.github/FUNDING.yml new file mode 100644 index 0000000000000..b3b30fa8b8624 --- /dev/null +++ b/node_modules/array-buffer-byte-length/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/array-buffer-byte-length +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/array-buffer-byte-length/.nycrc b/node_modules/array-buffer-byte-length/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/array-buffer-byte-length/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/array-buffer-byte-length/CHANGELOG.md b/node_modules/array-buffer-byte-length/CHANGELOG.md new file mode 100644 index 0000000000000..197fa4bc70bdf --- /dev/null +++ b/node_modules/array-buffer-byte-length/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2023-02-28 + +### Commits + +- Initial implementation, tests, readme [`2db6cad`](https://github.com/inspect-js/array-buffer-byte-length/commit/2db6cad79270ab1966f5ea80160abbcd4534c91d) +- Initial commit [`b2a0c9c`](https://github.com/inspect-js/array-buffer-byte-length/commit/b2a0c9c2246514b7999d331aad868c4f32326db7) +- npm init [`376acdb`](https://github.com/inspect-js/array-buffer-byte-length/commit/376acdbd4435cb1d4c31d107cacb3b86f2363aee) +- Only apps should have lockfiles [`70cf325`](https://github.com/inspect-js/array-buffer-byte-length/commit/70cf32526fc727d0d16a12d85a4bddea70075e31) diff --git a/node_modules/array-buffer-byte-length/LICENSE b/node_modules/array-buffer-byte-length/LICENSE new file mode 100644 index 0000000000000..5ea30366fa48d --- /dev/null +++ b/node_modules/array-buffer-byte-length/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-buffer-byte-length/README.md b/node_modules/array-buffer-byte-length/README.md new file mode 100644 index 0000000000000..64836c2319716 --- /dev/null +++ b/node_modules/array-buffer-byte-length/README.md @@ -0,0 +1,40 @@ +# array-buffer-byte-length [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method. + +## Example + +```js +const assert = require('assert'); +const byteLength = require('array-buffer-byte-length'); + +assert.equal(byteLength([]), NaN, 'an array is not an ArrayBuffer, yields NaN'); + +assert.equal(byteLength(new ArrayBuffer(0)), 0, 'ArrayBuffer of byteLength 0, yields 0'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/array-buffer-byte-length +[npm-version-svg]: https://versionbadg.es/inspect-js/array-buffer-byte-length.svg +[deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length.svg +[deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length +[dev-deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/array-buffer-byte-length.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/array-buffer-byte-length.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/array-buffer-byte-length.svg +[downloads-url]: https://npm-stat.com/charts.html?package=array-buffer-byte-length +[codecov-image]: https://codecov.io/gh/inspect-js/array-buffer-byte-length/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/array-buffer-byte-length/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/array-buffer-byte-length +[actions-url]: https://github.com/inspect-js/array-buffer-byte-length/actions diff --git a/node_modules/array-buffer-byte-length/index.js b/node_modules/array-buffer-byte-length/index.js new file mode 100644 index 0000000000000..8e85e2526d59b --- /dev/null +++ b/node_modules/array-buffer-byte-length/index.js @@ -0,0 +1,13 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); + +var isArrayBuffer = require('is-array-buffer'); + +module.exports = function byteLength(ab) { + if (!isArrayBuffer(ab)) { + return NaN; + } + return $byteLength ? $byteLength(ab) : ab.byteLength; +}; // in node < 0.11, byteLength is an own nonconfigurable property diff --git a/node_modules/array-buffer-byte-length/package.json b/node_modules/array-buffer-byte-length/package.json new file mode 100644 index 0000000000000..17351994a0771 --- /dev/null +++ b/node_modules/array-buffer-byte-length/package.json @@ -0,0 +1,81 @@ +{ + "name": "array-buffer-byte-length", + "version": "1.0.0", + "description": "Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "keywords": [ + "shim", + "polyfill", + "ArrayBuffer", + "byteLength", + "byte", + "length", + "es-shim API", + "es-shims" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/array-buffer-byte-length.git" + }, + "bugs": { + "url": "https://github.com/inspect-js/array-buffer-byte-length/issues" + }, + "homepage": "https://github.com/inspect-js/array-buffer-byte-length#readme", + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.1", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/array-buffer-byte-length/test/index.js b/node_modules/array-buffer-byte-length/test/index.js new file mode 100644 index 0000000000000..3a4107a8aa750 --- /dev/null +++ b/node_modules/array-buffer-byte-length/test/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var test = require('tape'); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); +var inspect = require('object-inspect'); + +var byteLength = require('../'); + +test('byteLength', function (t) { + forEach(v.objects.concat(v.primitives), function (nonAB) { + t.equal(byteLength(nonAB), NaN, inspect(nonAB) + ' is not an ArrayBuffer, and yields NaN'); + }); + + t.test('ArrayBuffers', { skip: typeof ArrayBuffer !== 'function' }, function (st) { + var ab32 = new ArrayBuffer(32); + st.equal(byteLength(ab32), 32, 'works on an ArrayBuffer of length 32: ' + inspect(ab32)); + + var ab0 = new ArrayBuffer(0); + st.equal(byteLength(ab0), 0, 'works on an ArrayBuffer of length 0: ' + inspect(ab0)); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/array-unique/LICENSE b/node_modules/array-unique/LICENSE new file mode 100755 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/array-unique/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/array-unique/README.md b/node_modules/array-unique/README.md new file mode 100755 index 0000000000000..2e287743ae96a --- /dev/null +++ b/node_modules/array-unique/README.md @@ -0,0 +1,51 @@ +# array-unique [![NPM version](https://badge.fury.io/js/array-unique.svg)](http://badge.fury.io/js/array-unique) [![Build Status](https://travis-ci.org/jonschlinkert/array-unique.svg)](https://travis-ci.org/jonschlinkert/array-unique) + +> Return an array free of duplicate values. Fastest ES5 implementation. + +## Install with [npm](npmjs.org) + +```bash +npm i array-unique --save +``` + +## Usage + +```js +var unique = require('array-unique'); + +unique(['a', 'b', 'c', 'c']); +//=> ['a', 'b', 'c'] +``` + +## Related +* [arr-diff](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-union](https://github.com/jonschlinkert/arr-union): Returns an array of unique values using strict equality for comparisons. +* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. +* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements. +* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map. +* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection. + +## Run tests +Install dev dependencies. + +```bash +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/array-unique/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 24, 2015._ \ 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 100755 index 0000000000000..7fa75af90a263 --- /dev/null +++ b/node_modules/array-unique/index.js @@ -0,0 +1,28 @@ +/*! + * 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; +}; diff --git a/node_modules/array-unique/package.json b/node_modules/array-unique/package.json new file mode 100755 index 0000000000000..a493f69bf733d --- /dev/null +++ b/node_modules/array-unique/package.json @@ -0,0 +1,37 @@ +{ + "name": "array-unique", + "description": "Return an array free of duplicate values. Fastest ES5 implementation.", + "version": "0.2.1", + "homepage": "https://github.com/jonschlinkert/array-unique", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/array-unique.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/array-unique/blob/master/LICENSE" + }, + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "mocha": "*", + "should": "*" + } +} diff --git a/node_modules/arraybuffer.prototype.slice/.editorconfig b/node_modules/arraybuffer.prototype.slice/.editorconfig new file mode 100644 index 0000000000000..eaa214161f5cd --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/arraybuffer.prototype.slice/.eslintrc b/node_modules/arraybuffer.prototype.slice/.eslintrc new file mode 100644 index 0000000000000..963e2a847aba4 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/.eslintrc @@ -0,0 +1,34 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "max-params": 0, + "max-statements": 0, + "multiline-comment-style": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "IsSharedArrayBuffer", + "ToIntegerOrInfinity", + "GetIntrinsic", + "IsDetachedBuffer", + "SpeciesConstructor", + ], + }], + }, + + "overrides": [ + { + "files": "test/**", + "globals": { + "ArrayBuffer": false, + "Uint8Array": false, + }, + "rules": { + "max-lines-per-function": 0, + }, + }, + ], +} diff --git a/node_modules/arraybuffer.prototype.slice/.nycrc b/node_modules/arraybuffer.prototype.slice/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/arraybuffer.prototype.slice/CHANGELOG.md b/node_modules/arraybuffer.prototype.slice/CHANGELOG.md new file mode 100644 index 0000000000000..a0bf12def0a7c --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/es-shims/ArrayBuffer.prototype.slice/compare/v1.0.1...v1.0.2) - 2023-09-05 + +### Commits + +- [Deps] update `es-abstract` [`a9ab0d2`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/a9ab0d2551bb301b740e333ea3795fad23fcbe40) +- [Dev Deps] update `tape` [`6b24af5`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/6b24af585dc9176c8ac3fd482cb1d5257e550a09) +- [Fix] move `es-abstract` to runtime deps [`63a8397`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/63a8397623d7749856f6392ae93bf87152c3916c) + +## [v1.0.1](https://github.com/es-shims/ArrayBuffer.prototype.slice/compare/v1.0.0...v1.0.1) - 2023-07-11 + +### Commits + +- [Fix] node < 0.11 has an own nonconfigurable `slice` property; use it [`554823c`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/554823c92ce16d6b7184a7d0ccfe315b663584d7) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `tape` [`53b0421`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/53b04217048c645306597e2cfc55adb69c384146) +- [Deps] update `define-properties`, `get-intrinsic` [`4966b02`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/4966b02bc25ac006709b29ca370b9f6e159f723a) + +## v1.0.0 - 2023-07-09 + +### Commits + +- Initial implementation, tests, readme [`36b4b5e`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/36b4b5eedfa225c3086e9453b9db0088c299640a) +- Initial commit [`51499df`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/51499dfac7d8c67c2928cb47363a4de7ff17904a) +- npm init [`8ec604e`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/8ec604e7d3ef8d4c27376b09645f779c2244b08f) +- Only apps should have lockfiles [`ac54435`](https://github.com/es-shims/ArrayBuffer.prototype.slice/commit/ac54435161d4415e2122e3a682499f3a6df2f6de) diff --git a/node_modules/arraybuffer.prototype.slice/LICENSE b/node_modules/arraybuffer.prototype.slice/LICENSE new file mode 100644 index 0000000000000..eb970aa5c97e8 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/arraybuffer.prototype.slice/README.md b/node_modules/arraybuffer.prototype.slice/README.md new file mode 100644 index 0000000000000..503585715baa2 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/README.md @@ -0,0 +1,61 @@ +# ArrayBuffer.prototype.slice [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES spec-compliant `ArrayBuffer.prototype.slice` shim. Invoke its "shim" method to shim ArrayBuffer.prototype.slice if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice). + +Most common usage: +```js +var assert = require('assert'); +var slice = require('arraybuffer.prototype.slice'); + +var ab = new ArrayBuffer(1); +var arr = new Uint8Array(ab); +arr[0] = 123; + +var ab2 = slice(ab); + +var arr2 = new Uint8Array(ab2); +arr2[0] = 234; + +assert.deepEqual(arr, new Uint8Array([123])); +assert.deepEqual(arr2, new Uint8Array([234])); + +if (!ArrayBuffer.prototype.transfer) { + slice.shim(); +} + +var ab2 = ab.slice(); + +var arr2 = new Uint8Array(ab2); +arr2[0] = 234; + +assert.deepEqual(arr, new Uint8Array([123])); +assert.deepEqual(arr2, new Uint8Array([234])); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/arraybuffer.prototype.slice +[npm-version-svg]: https://versionbadg.es/es-shims/ArrayBuffer.prototype.slice.svg +[deps-svg]: https://david-dm.org/es-shims/ArrayBuffer.prototype.slice.svg +[deps-url]: https://david-dm.org/es-shims/ArrayBuffer.prototype.slice +[dev-deps-svg]: https://david-dm.org/es-shims/ArrayBuffer.prototype.slice/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/ArrayBuffer.prototype.slice#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/arraybuffer.prototype.slice.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/arraybuffer.prototype.slice.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/arraybuffer.prototype.slice.svg +[downloads-url]: https://npm-stat.com/charts.html?package=arraybuffer.prototype.slice +[codecov-image]: https://codecov.io/gh/es-shims/ArrayBuffer.prototype.slice/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/ArrayBuffer.prototype.slice/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/ArrayBuffer.prototype.slice +[actions-url]: https://github.com/es-shims/ArrayBuffer.prototype.slice/actions diff --git a/node_modules/arraybuffer.prototype.slice/auto.js b/node_modules/arraybuffer.prototype.slice/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/arraybuffer.prototype.slice/implementation.js b/node_modules/arraybuffer.prototype.slice/implementation.js new file mode 100644 index 0000000000000..4b0133796abd5 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/implementation.js @@ -0,0 +1,84 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var IsDetachedBuffer = require('es-abstract/2023/IsDetachedBuffer'); +var IsSharedArrayBuffer = require('es-abstract/2023/IsSharedArrayBuffer'); +var max = require('es-abstract/2023/max'); +var min = require('es-abstract/2023/min'); +var SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor'); +var ToIntegerOrInfinity = require('es-abstract/2023/ToIntegerOrInfinity'); + +var arrayBufferByteLength = require('array-buffer-byte-length'); +var isArrayBuffer = require('is-array-buffer'); + +module.exports = function slice(start, end) { + var O = this; // step 1 + + if (!isArrayBuffer(O) || IsSharedArrayBuffer(O) || IsDetachedBuffer(O)) { + throw new $TypeError('receiver must be a non-detached, non-shared ArrayBuffer'); // steps 2-4 + } + + var len = arrayBufferByteLength(O); // step 5 + + var relativeStart = ToIntegerOrInfinity(start); // step 6 + + var first; + if (relativeStart === -Infinity) { + first = 0; // step 7 + } else if (relativeStart < 0) { + first = max(len + relativeStart, 0); // step 8 + } else { + first = min(relativeStart, len); // step 9 + } + + var relativeEnd = typeof end === 'undefined' ? len : ToIntegerOrInfinity(end); // step 10 + + var final; + if (relativeEnd === -Infinity) { + final = 0; // step 11 + } else if (relativeEnd < 0) { + final = max(len + relativeEnd, 0); // step 12 + } else { + final = min(relativeEnd, len); // step 13 + } + + var newLen = max(final - first, 0); // step 14 + + var Ctor = SpeciesConstructor(O, $ArrayBuffer); // step 15 + + var new$ = new Ctor(newLen); // step 16 + + if (!isArrayBuffer(new$) || IsSharedArrayBuffer(new$) || IsDetachedBuffer(new$)) { + throw new $TypeError('Species constructor must produce a non-detached, non-shared Array Buffer'); // steps 17-19 + } + + if (new$ === O) { + throw new $TypeError('new ArrayBuffer should not have been the same as the receiver'); // step 20 + } + + if (arrayBufferByteLength(new$) < newLen) { + throw new $TypeError('new ArrayBuffer\'s byteLength must be at least the requested length'); // step 21 + } + + if (IsDetachedBuffer(O)) { + throw new $TypeError('receiver became an detached ArrayBuffer'); // step 23 + } + + /* + 24. Let fromBuf be O.[[ArrayBufferData]]. + 25. Let toBuf be new.[[ArrayBufferData]]. + 26. Perform CopyDataBlockBytes(toBuf, 0, fromBuf, first, newLen). + */ + var sourceArr = new $Uint8Array(O); + var destArr = new $Uint8Array(new$); + for (var i = start, ii = 0; i < end; i++, ii++) { + destArr[ii] = sourceArr[i]; + } + + return new$; // step 27 +}; diff --git a/node_modules/arraybuffer.prototype.slice/index.js b/node_modules/arraybuffer.prototype.slice/index.js new file mode 100644 index 0000000000000..517c4147e95eb --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(getPolyfill()); + +define(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; diff --git a/node_modules/arraybuffer.prototype.slice/package.json b/node_modules/arraybuffer.prototype.slice/package.json new file mode 100644 index 0000000000000..58f019b8a9c9d --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/package.json @@ -0,0 +1,103 @@ +{ + "name": "arraybuffer.prototype.slice", + "version": "1.0.2", + "description": "ES spec-compliant shim for ArrayBuffer.prototype.slice", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "main": "index.js", + "exports": { + ".": "./index.js", + "./auto": "./auto.js", + "./polyfill": "./polyfill.js", + "./implementation": "./implementation.js", + "./shim": "./shim.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "postlint": "evalmd README.md && es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/ArrayBuffer.prototype.slice.git" + }, + "homepage": "https://github.com/es-shims/ArrayBuffer.prototype.slice#readme", + "bugs": { + "url": "https://github.com/es-shims/ArrayBuffer.prototype.slice/issues" + }, + "keywords": [ + "javascript", + "ecmascript", + "ArrayBuffer.prototype.slice", + "polyfill", + "shim", + "ArrayBuffer", + "array", + "buffer", + "ArrayBuffer#slice", + "slice", + "typed array", + "es-shim API" + ], + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "covert": "^1.1.1", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "testling": { + "files": "test/index.js" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/arraybuffer.prototype.slice/polyfill.js b/node_modules/arraybuffer.prototype.slice/polyfill.js new file mode 100644 index 0000000000000..a4a90ca166ee0 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/polyfill.js @@ -0,0 +1,21 @@ +'use strict'; + +var callBind = require('call-bind'); + +var implementation = require('./implementation'); + +var ownSlice = typeof ArrayBuffer === 'function' && new ArrayBuffer(0).slice; +var ownSliceBound = ownSlice && callBind(ownSlice); +var ownSliceWrapper = ownSliceBound && function slice(start, end) { + /* eslint no-invalid-this: 0 */ + if (arguments.length < 2) { + return ownSliceBound(this, arguments.length > 0 ? start : 0); + } + return ownSliceBound(this, start, end); +}; + +module.exports = function getPolyfill() { + return (typeof ArrayBuffer === 'function' && ArrayBuffer.prototype.slice) + || ownSliceWrapper + || implementation; +}; diff --git a/node_modules/arraybuffer.prototype.slice/shim.js b/node_modules/arraybuffer.prototype.slice/shim.js new file mode 100644 index 0000000000000..cb52c07102818 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/shim.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); + +var getPolyfill = require('./polyfill'); + +module.exports = function shimArrayBufferSlice() { + if (typeof ArrayBuffer === 'function') { + var polyfill = getPolyfill(); + define( + ArrayBuffer.prototype, + { slice: polyfill }, + { slice: function () { return ArrayBuffer.prototype.slice !== polyfill; } } + ); + } + + return polyfill; +}; diff --git a/node_modules/arraybuffer.prototype.slice/test/implementation.js b/node_modules/arraybuffer.prototype.slice/test/implementation.js new file mode 100644 index 0000000000000..7d97bb77c3e91 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/test/implementation.js @@ -0,0 +1,32 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('ArrayBuffer support', { skip: typeof ArrayBuffer === 'undefined' }, function (st) { + st.test('bad array/this value', { skip: !hasStrictMode }, function (s2t) { + /* eslint no-useless-call: 0 */ + s2t['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); + s2t['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); + s2t.end(); + }); + + runTests(callBind(implementation), st); + + st.end(); + }); + + t.test('no ArrayBuffer support', { skip: typeof ArrayBuffer !== 'undefined' }, function (st) { + st['throws']( + function () { implementation.call({}); }, + SyntaxError, + 'ArrayBuffer is not supported' + ); + }); + + t.end(); +}); diff --git a/node_modules/arraybuffer.prototype.slice/test/index.js b/node_modules/arraybuffer.prototype.slice/test/index.js new file mode 100644 index 0000000000000..0e9dd102cd8e7 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var index = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('ArrayBuffer support', { skip: typeof ArrayBuffer === 'undefined' }, function (st) { + st.test('bad array/this value', function (s2t) { + s2t['throws'](function () { index(undefined); }, TypeError, 'undefined is not an object'); + s2t['throws'](function () { index(null); }, TypeError, 'null is not an object'); + s2t.end(); + }); + + runTests(index, st); + + st.end(); + }); + + t.test('no ArrayBuffer support', { skip: typeof ArrayBuffer !== 'undefined' }, function (st) { + st['throws']( + function () { index({}); }, + SyntaxError, + 'ArrayBuffer is not supported' + ); + }); + + t.end(); +}); diff --git a/node_modules/arraybuffer.prototype.slice/test/shimmed.js b/node_modules/arraybuffer.prototype.slice/test/shimmed.js new file mode 100644 index 0000000000000..8dd4f72142e89 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/test/shimmed.js @@ -0,0 +1,54 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); + +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); +var hasStrictMode = require('has-strict-mode')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.test('ArrayBuffer support', { skip: typeof ArrayBuffer === 'undefined' }, function (st) { + var method = ArrayBuffer.prototype.slice; + + st.equal(method.length, 2, 'ArrayBuffer#slice has a length of 2'); + + st.test('Function name', { skip: !functionsHaveNames }, function (s2t) { + s2t.equal(method.name, 'slice', 'ArrayBuffer#slice name "slice"'); + s2t.end(); + }); + + st.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(ArrayBuffer.prototype, 'slice'), 'ArrayBuffer#slice is not enumerable'); + et.end(); + }); + + st.test('bad array/this value', { skip: !hasStrictMode }, function (s2t) { + /* eslint no-useless-call: 0 */ + s2t['throws'](function () { return method.call(undefined); }, TypeError, 'undefined is not an object'); + s2t['throws'](function () { return method.call(null); }, TypeError, 'null is not an object'); + s2t.end(); + }); + + t.test('has the correct descriptor', { skip: !Object.getOwnPropertyDescriptor }, function (s2t) { + var descriptor = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'slice'); + + s2t.equal(descriptor.configurable, true); + s2t.equal(descriptor.enumerable, false); + s2t.equal(typeof descriptor.value, 'function'); + s2t.equal(descriptor.writable, true); + s2t.end(); + }); + + runTests(callBind(method), st); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/arraybuffer.prototype.slice/test/tests.js b/node_modules/arraybuffer.prototype.slice/test/tests.js new file mode 100644 index 0000000000000..77d30cb0ee991 --- /dev/null +++ b/node_modules/arraybuffer.prototype.slice/test/tests.js @@ -0,0 +1,81 @@ +'use strict'; + +var inspect = require('object-inspect'); +var IsDetachedBuffer = require('es-abstract/2023/IsDetachedBuffer'); + +var forEach = require('for-each'); +var v = require('es-value-fixtures'); + +var byteLength = require('array-buffer-byte-length'); + +module.exports = function runTests(slice, t) { + forEach(v.primitives.concat(v.objects), function (nonAB) { + t['throws']( + function () { slice(nonAB); }, + TypeError, + inspect(nonAB) + ' is not an ArrayBuffer' + ); + }); + + t.test('ArrayBuffers', { skip: typeof ArrayBuffer === 'undefined' }, function (st) { + var ab = new ArrayBuffer(0); + + st.equal(IsDetachedBuffer(ab), false, 'ArrayBuffer is not detached'); + + try { + var nb = slice(ab); + } catch (e) { + if (e instanceof SyntaxError) { + st.skip('Detaching ArrayBuffer is not supported'); + return st.end(); + } + console.log(e.stack); + } + + st.notEqual(nb, ab, 'new ArrayBuffer is not the same as the original'); + st.equal(IsDetachedBuffer(ab), false, 'old ArrayBuffer is not detached'); + st.equal(IsDetachedBuffer(nb), false, 'new ArrayBuffer is not detached'); + + var ab2 = new ArrayBuffer(8); + st.equal(byteLength(ab2), 8, 'original ArrayBuffer has length 8'); + try { + var nbLen = slice(ab2, 4); + } catch (e) { + if (e instanceof SyntaxError) { + st.skip('Detaching ArrayBuffer is not supported'); + return st.end(); + } + } + st.equal(IsDetachedBuffer(ab2), false, 'old ArrayBuffer is not detached'); + st.equal(IsDetachedBuffer(nbLen), false, 'new ArrayBuffer is not detached'); + + st.equal(byteLength(ab2), 8, 'original ArrayBuffer has length 8'); + st.equal(byteLength(nbLen), 4, 'newly sliced ArrayBuffer has length 4'); + + var one = new ArrayBuffer(1); + var arr = new Uint8Array(one); + arr[0] = 123; + + var two = slice(one); + + var arr2 = new Uint8Array(two); + arr2[0] = 234; + + st.deepEqual(arr, new Uint8Array([123]), 'original buffer is unchanged'); + st.deepEqual(arr2, new Uint8Array([234]), 'sliced buffer is changed'); + + return st.end(); + }); + + t.test('SharedArrayBuffers', { skip: typeof SharedArrayBuffer === 'undefined' }, function (st) { + var sab = new SharedArrayBuffer(0); + + st['throws']( + function () { slice(sab); }, + TypeError, + inspect(sab) + ' is not an ArrayBuffer' + ); + + st.end(); + }); +}; diff --git a/node_modules/arrify/index.js b/node_modules/arrify/index.js new file mode 100644 index 0000000000000..2a2fdeeb1dc5a --- /dev/null +++ b/node_modules/arrify/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = function (val) { + if (val === null || val === undefined) { + return []; + } + + return Array.isArray(val) ? val : [val]; +}; diff --git a/node_modules/arrify/license b/node_modules/arrify/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/arrify/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/arrify/package.json b/node_modules/arrify/package.json new file mode 100644 index 0000000000000..1e63e59714a5a --- /dev/null +++ b/node_modules/arrify/package.json @@ -0,0 +1,33 @@ +{ + "name": "arrify", + "version": "1.0.1", + "description": "Convert a value to an array", + "license": "MIT", + "repository": "sindresorhus/arrify", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "array", + "arr", + "arrify", + "arrayify", + "convert", + "value" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/arrify/readme.md b/node_modules/arrify/readme.md new file mode 100644 index 0000000000000..183d07576f1ae --- /dev/null +++ b/node_modules/arrify/readme.md @@ -0,0 +1,36 @@ +# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify) + +> Convert a value to an array + + +## Install + +``` +$ npm install --save arrify +``` + + +## Usage + +```js +const arrify = require('arrify'); + +arrify('unicorn'); +//=> ['unicorn'] + +arrify(['unicorn']); +//=> ['unicorn'] + +arrify(null); +//=> [] + +arrify(undefined); +//=> [] +``` + +*Supplying `null` or `undefined` results in an empty array.* + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/assign-symbols/LICENSE b/node_modules/assign-symbols/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /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 0000000000000..422729d45eb1f --- /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 0000000000000..c08a232b7fe47 --- /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 0000000000000..7f77b58d147c2 --- /dev/null +++ b/node_modules/assign-symbols/package.json @@ -0,0 +1,40 @@ +{ + "name": "assign-symbols", + "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.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/assign-symbols", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/assign-symbols", + "bugs": { + "url": "https://github.com/jonschlinkert/assign-symbols/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "^3.0.0" + }, + "keywords": [ + "assign", + "symbols" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "mixin-deep", + "merge-deep", + "extend-shallow", + "clone-deep" + ] + } + } +} diff --git a/node_modules/async-each/LICENSE b/node_modules/async-each/LICENSE new file mode 100644 index 0000000000000..b4d4dec9276c1 --- /dev/null +++ b/node_modules/async-each/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Paul Miller (https://paulmillr.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/async-each/README.md b/node_modules/async-each/README.md new file mode 100644 index 0000000000000..6b03be4a77f24 --- /dev/null +++ b/node_modules/async-each/README.md @@ -0,0 +1,35 @@ +# async-each + +No-bullshit, ultra-simple, 40-lines-of-code async parallel forEach function for JavaScript. + +We don't need junky 30K async libs. Really. + +For browsers and node.js. + +## Usage + +`npm install async-each` if you're using NPM. + +For browsers, just include async-each before your scripts and use global variable `asyncEach` + +* `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`. + +```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); +}); + +asyncEach(list, fn, callback); // use global var in browser +``` + +## License + +The MIT License (MIT) + +Copyright (c) 2016 Paul Miller [(paulmillr.com)](https://paulmillr.com) + +See [LICENSE](https://github.com/paulmillr/async-each/blob/master/LICENSE) file. diff --git a/node_modules/async-each/index.js b/node_modules/async-each/index.js new file mode 100644 index 0000000000000..8806c5fd9f54b --- /dev/null +++ b/node_modules/async-each/index.js @@ -0,0 +1,39 @@ +/*! async-each - MIT License (c) 2016 Paul Miller (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 + + var total = items.length; + if (total === 0) return callback(undefined, items); + var transformed = new Array(total); + var transformedCount = 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; + transformedCount += 1; // can't use index: last item could take more time + if (transformedCount === total) 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.6.12/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.6.12/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.6.12/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 0000000000000..2275aeb246eba --- /dev/null +++ b/node_modules/core-js/bower.json @@ -0,0 +1,49 @@ +{ + "name": "core.js", + "main": "client/core.js", + "version": "2.6.11", + "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 0000000000000..7b8e46562dc48 --- /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 0000000000000..6dbfa582578dc --- /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 0000000000000..0d1b234ca68be --- /dev/null +++ b/node_modules/core-js/build/config.js @@ -0,0 +1,275 @@ +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.exec', + '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 0000000000000..1df7f10cca286 --- /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 0000000000000..797c0d5d029cf --- /dev/null +++ b/node_modules/core-js/client/core.js @@ -0,0 +1,9100 @@ +/** + * core-js 2.6.12 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2020 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 = 134); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(13); +var hide = __webpack_require__(14); +var redefine = __webpack_require__(15); +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__(4); +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 (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(47)('wks'); +var uid = __webpack_require__(37); +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__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(3)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(21); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var IE8_DOM_DEFINE = __webpack_require__(98); +var toPrimitive = __webpack_require__(23); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(6) ? 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; +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(24); +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__(48); +var defined = __webpack_require__(24); +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) { + +var core = module.exports = { version: '2.6.12' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var createDesc = __webpack_require__(31); +module.exports = __webpack_require__(6) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(14); +var has = __webpack_require__(12); +var SRC = __webpack_require__(37)('src'); +var $toString = __webpack_require__(136); +var TO_STRING = 'toString'; +var TPL = ('' + $toString).split(TO_STRING); + +__webpack_require__(13).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); +}); + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(49); +var createDesc = __webpack_require__(31); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(23); +var has = __webpack_require__(12); +var IE8_DOM_DEFINE = __webpack_require__(98); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(6) ? 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]); +}; + + +/***/ }), +/* 17 */ +/***/ (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__(71)('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; +}; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var fails = __webpack_require__(3); +var defined = __webpack_require__(24); +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); +}; + + +/***/ }), +/* 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) { + +// 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); +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(3); + +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); + }); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(4); +// 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"); +}; + + +/***/ }), +/* 24 */ +/***/ (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; +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(0); +var core = __webpack_require__(13); +var fails = __webpack_require__(3); +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__(48); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(7); +var asc = __webpack_require__(86); +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__(100); +var enumBugKeys = __webpack_require__(72); + +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__(101); +var enumBugKeys = __webpack_require__(72); +var IE_PROTO = __webpack_require__(71)('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__(69)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(73).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__(6)) { + var LIBRARY = __webpack_require__(32); + var global = __webpack_require__(2); + var fails = __webpack_require__(3); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(65); + var $buffer = __webpack_require__(96); + var ctx = __webpack_require__(19); + var anInstance = __webpack_require__(42); + var propertyDesc = __webpack_require__(31); + var hide = __webpack_require__(14); + var redefineAll = __webpack_require__(43); + var toInteger = __webpack_require__(21); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(123); + var toAbsoluteIndex = __webpack_require__(38); + var toPrimitive = __webpack_require__(23); + var has = __webpack_require__(12); + var classof = __webpack_require__(34); + var isObject = __webpack_require__(4); + var toObject = __webpack_require__(9); + var isArrayIter = __webpack_require__(84); + var create = __webpack_require__(28); + var getPrototypeOf = __webpack_require__(17); + var gOPN = __webpack_require__(39).f; + var getIterFn = __webpack_require__(50); + var uid = __webpack_require__(37); + var wks = __webpack_require__(5); + var createArrayMethod = __webpack_require__(26); + var createArrayIncludes = __webpack_require__(53); + var speciesConstructor = __webpack_require__(52); + var ArrayIterators = __webpack_require__(88); + var Iterators = __webpack_require__(40); + var $iterDetect = __webpack_require__(60); + var setSpecies = __webpack_require__(41); + var arrayFill = __webpack_require__(87); + var arrayCopyWithin = __webpack_require__(113); + var $DP = __webpack_require__(8); + var $GOPD = __webpack_require__(16); + 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__(118); +var $export = __webpack_require__(0); +var shared = __webpack_require__(47)('metadata'); +var store = shared.store || (shared.store = new (__webpack_require__(121))()); + +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) { + +module.exports = false; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(37)('meta'); +var isObject = __webpack_require__(4); +var has = __webpack_require__(12); +var setDesc = __webpack_require__(8).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(3)(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 +}; + + +/***/ }), +/* 34 */ +/***/ (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; +}; + + +/***/ }), +/* 35 */ +/***/ (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__(14)(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(19); +var call = __webpack_require__(111); +var isArrayIter = __webpack_require__(84); +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(7); +var getIterFn = __webpack_require__(50); +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; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(21); +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); +}; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(100); +var hiddenKeys = __webpack_require__(72).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var dP = __webpack_require__(8); +var DESCRIPTORS = __webpack_require__(6); +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__(15); +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 isObject = __webpack_require__(4); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(8).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 }); +}; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var defined = __webpack_require__(24); +var fails = __webpack_require__(3); +var spaces = __webpack_require__(78); +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; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(13); +var global = __webpack_require__(2); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(32) ? 'pure' : 'global', + copyright: '© 2020 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 48 */ +/***/ (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); +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(34); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(40); +module.exports = __webpack_require__(13).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 51 */ +/***/ (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; +}; + + +/***/ }), +/* 52 */ +/***/ (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); +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(7); +var toAbsoluteIndex = __webpack_require__(38); +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; + }; +}; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 55 */ +/***/ (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'; +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(21); +var defined = __webpack_require__(24); +// 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; + }; +}; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(4); +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'); +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(32); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(15); +var hide = __webpack_require__(14); +var Iterators = __webpack_require__(40); +var $iterCreate = __webpack_require__(59); +var setToStringTag = __webpack_require__(45); +var getPrototypeOf = __webpack_require__(17); +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 = $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 && typeof IteratorPrototype[ITERATOR] != 'function') 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; +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(28); +var descriptor = __webpack_require__(31); +var setToStringTag = __webpack_require__(45); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(14)(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'); +}; + + +/***/ }), +/* 60 */ +/***/ (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; +}; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var classof = __webpack_require__(34); +var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(114); +var redefine = __webpack_require__(15); +var hide = __webpack_require__(14); +var fails = __webpack_require__(3); +var defined = __webpack_require__(24); +var wks = __webpack_require__(5); +var regexpExec = __webpack_require__(90); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + 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); } + ); + } +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(15); +var redefineAll = __webpack_require__(43); +var meta = __webpack_require__(33); +var forOf = __webpack_require__(36); +var anInstance = __webpack_require__(42); +var isObject = __webpack_require__(4); +var fails = __webpack_require__(3); +var $iterDetect = __webpack_require__(60); +var setToStringTag = __webpack_require__(45); +var inheritIfRequired = __webpack_require__(77); + +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; +}; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(14); +var uid = __webpack_require__(37); +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 +}; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// Forced replacement prototype accessors methods +module.exports = __webpack_require__(32) || !__webpack_require__(3)(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]; +}); + + +/***/ }), +/* 67 */ +/***/ (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); + } }); +}; + + +/***/ }), +/* 68 */ +/***/ (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__(36); + +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); + } }); +}; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +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) : {}; +}; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(13); +var LIBRARY = __webpack_require__(32); +var wksExt = __webpack_require__(99); +var defineProperty = __webpack_require__(8).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) }); +}; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(47)('keys'); +var uid = __webpack_require__(37); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(2).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(6); +var getKeys = __webpack_require__(27); +var gOPS = __webpack_require__(54); +var pIE = __webpack_require__(49); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(48); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(3)(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) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), +/* 75 */ +/***/ (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__(4); +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__(16).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 +}; + + +/***/ }), +/* 76 */ +/***/ (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); +}; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +var setPrototypeOf = __webpack_require__(75).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; +}; + + +/***/ }), +/* 78 */ +/***/ (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'; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(21); +var defined = __webpack_require__(24); + +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; +}; + + +/***/ }), +/* 80 */ +/***/ (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; +}; + + +/***/ }), +/* 81 */ +/***/ (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; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(57); +var defined = __webpack_require__(24); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), +/* 83 */ +/***/ (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; +}; + + +/***/ }), +/* 84 */ +/***/ (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); +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(8); +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; +}; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(218); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), +/* 87 */ +/***/ (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__(38); +var toLength = __webpack_require__(7); +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; +}; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(35); +var step = __webpack_require__(89); +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__(58)(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'); + + +/***/ }), +/* 89 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var regexpFlags = __webpack_require__(51); + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +module.exports = patchedExec; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var at = __webpack_require__(56)(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(19); +var invoke = __webpack_require__(76); +var html = __webpack_require__(73); +var cel = __webpack_require__(69); +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 +}; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var macrotask = __webpack_require__(92).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) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + 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; + }; +}; + + +/***/ }), +/* 94 */ +/***/ (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); +}; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(39); +var gOPS = __webpack_require__(54); +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; +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var DESCRIPTORS = __webpack_require__(6); +var LIBRARY = __webpack_require__(32); +var $typed = __webpack_require__(65); +var hide = __webpack_require__(14); +var redefineAll = __webpack_require__(43); +var fails = __webpack_require__(3); +var anInstance = __webpack_require__(42); +var toInteger = __webpack_require__(21); +var toLength = __webpack_require__(7); +var toIndex = __webpack_require__(123); +var gOPN = __webpack_require__(39).f; +var dP = __webpack_require__(8).f; +var arrayFill = __webpack_require__(87); +var setToStringTag = __webpack_require__(45); +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; + + +/***/ }), +/* 97 */ +/***/ (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); + }; +}; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(6) && !__webpack_require__(3)(function () { + return Object.defineProperty(__webpack_require__(69)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(5); + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(12); +var toIObject = __webpack_require__(11); +var arrayIndexOf = __webpack_require__(53)(false); +var IE_PROTO = __webpack_require__(71)('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; +}; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var anObject = __webpack_require__(1); +var getKeys = __webpack_require__(27); + +module.exports = __webpack_require__(6) ? 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; +}; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(11); +var gOPN = __webpack_require__(39).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)); +}; + + +/***/ }), +/* 103 */ +/***/ (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; +}; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(10); +var isObject = __webpack_require__(4); +var invoke = __webpack_require__(76); +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; +}; + + +/***/ }), +/* 105 */ +/***/ (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; +}; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__(4); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(2).parseFloat; +var $trim = __webpack_require__(46).trim; + +module.exports = 1 / $parseFloat(__webpack_require__(78) + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(2).parseInt; +var $trim = __webpack_require__(46).trim; +var ws = __webpack_require__(78); +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; + + +/***/ }), +/* 109 */ +/***/ (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); +}; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__(80); +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; +}; + + +/***/ }), +/* 111 */ +/***/ (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; + } +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(48); +var toLength = __webpack_require__(7); + +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; +}; + + +/***/ }), +/* 113 */ +/***/ (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__(38); +var toLength = __webpack_require__(7); + +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; +}; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var regexpExec = __webpack_require__(90); +__webpack_require__(0)({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +// 21.2.5.3 get RegExp.prototype.flags() +if (__webpack_require__(6) && /./g.flags != 'g') __webpack_require__(8).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(51) +}); + + +/***/ }), +/* 116 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var newPromiseCapability = __webpack_require__(94); + +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; +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(119); +var validate = __webpack_require__(44); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__(64)(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); + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(8).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__(36); +var $iterDefine = __webpack_require__(58); +var step = __webpack_require__(89); +var setSpecies = __webpack_require__(41); +var DESCRIPTORS = __webpack_require__(6); +var fastKey = __webpack_require__(33).fastKey; +var validate = __webpack_require__(44); +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); + } +}; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(119); +var validate = __webpack_require__(44); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = __webpack_require__(64)(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); + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var each = __webpack_require__(26)(0); +var redefine = __webpack_require__(15); +var meta = __webpack_require__(33); +var assign = __webpack_require__(74); +var weak = __webpack_require__(122); +var isObject = __webpack_require__(4); +var validate = __webpack_require__(44); +var NATIVE_WEAK_MAP = __webpack_require__(44); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +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__(64)(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + 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); + }); + }); +} + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(43); +var getWeak = __webpack_require__(33).getWeak; +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var anInstance = __webpack_require__(42); +var forOf = __webpack_require__(36); +var createArrayMethod = __webpack_require__(26); +var $has = __webpack_require__(12); +var validate = __webpack_require__(44); +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 +}; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(21); +var toLength = __webpack_require__(7); +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; +}; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = __webpack_require__(55); +var isObject = __webpack_require__(4); +var toLength = __webpack_require__(7); +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; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(7); +var repeat = __webpack_require__(79); +var defined = __webpack_require__(24); + +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; +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(6); +var getKeys = __webpack_require__(27); +var toIObject = __webpack_require__(11); +var isEnum = __webpack_require__(49).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) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(34); +var from = __webpack_require__(128); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +var forOf = __webpack_require__(36); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + + +/***/ }), +/* 129 */ +/***/ (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; +}; + + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(34); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(40); +module.exports = __webpack_require__(13).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)); +}; + + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var path = __webpack_require__(132); +var invoke = __webpack_require__(76); +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); + }; +}; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(2); + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(16); +var ownKeys = __webpack_require__(95); +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; +}; + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(135); +__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__(147); +__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__(213); +__webpack_require__(214); +__webpack_require__(215); +__webpack_require__(216); +__webpack_require__(217); +__webpack_require__(219); +__webpack_require__(220); +__webpack_require__(221); +__webpack_require__(222); +__webpack_require__(223); +__webpack_require__(224); +__webpack_require__(225); +__webpack_require__(226); +__webpack_require__(227); +__webpack_require__(228); +__webpack_require__(229); +__webpack_require__(230); +__webpack_require__(88); +__webpack_require__(231); +__webpack_require__(232); +__webpack_require__(114); +__webpack_require__(233); +__webpack_require__(115); +__webpack_require__(234); +__webpack_require__(235); +__webpack_require__(236); +__webpack_require__(237); +__webpack_require__(238); +__webpack_require__(118); +__webpack_require__(120); +__webpack_require__(121); +__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__(252); +__webpack_require__(253); +__webpack_require__(254); +__webpack_require__(255); +__webpack_require__(256); +__webpack_require__(258); +__webpack_require__(259); +__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__(327); +__webpack_require__(328); +__webpack_require__(329); +__webpack_require__(330); +__webpack_require__(331); +__webpack_require__(50); +__webpack_require__(333); +__webpack_require__(130); +__webpack_require__(334); +__webpack_require__(335); +__webpack_require__(336); +__webpack_require__(337); +__webpack_require__(338); +__webpack_require__(339); +__webpack_require__(340); +__webpack_require__(341); +__webpack_require__(342); +module.exports = __webpack_require__(343); + + +/***/ }), +/* 135 */ +/***/ (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__(6); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(15); +var META = __webpack_require__(33).KEY; +var $fails = __webpack_require__(3); +var shared = __webpack_require__(47); +var setToStringTag = __webpack_require__(45); +var uid = __webpack_require__(37); +var wks = __webpack_require__(5); +var wksExt = __webpack_require__(99); +var wksDefine = __webpack_require__(70); +var enumKeys = __webpack_require__(137); +var isArray = __webpack_require__(55); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var toObject = __webpack_require__(9); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(23); +var createDesc = __webpack_require__(31); +var _create = __webpack_require__(28); +var gOPNExt = __webpack_require__(102); +var $GOPD = __webpack_require__(16); +var $GOPS = __webpack_require__(54); +var $DP = __webpack_require__(8); +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' && !!$GOPS.f; +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__(39).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(49).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(32)) { + 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 +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 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__(14)($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); + + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(47)('native-function-to-string', Function.toString); + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(27); +var gOPS = __webpack_require__(54); +var pIE = __webpack_require__(49); +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; +}; + + +/***/ }), +/* 138 */ +/***/ (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__(6), 'Object', { defineProperty: __webpack_require__(8).f }); + + +/***/ }), +/* 139 */ +/***/ (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__(6), 'Object', { defineProperties: __webpack_require__(101) }); + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(11); +var $getOwnPropertyDescriptor = __webpack_require__(16).f; + +__webpack_require__(25)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), +/* 141 */ +/***/ (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) }); + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(9); +var $getPrototypeOf = __webpack_require__(17); + +__webpack_require__(25)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 143 */ +/***/ (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)); + }; +}); + + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__(25)('getOwnPropertyNames', function () { + return __webpack_require__(102).f; +}); + + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(33).onFreeze; + +__webpack_require__(25)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(33).onFreeze; + +__webpack_require__(25)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(33).onFreeze; + +__webpack_require__(25)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__(4); + +__webpack_require__(25)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__(4); + +__webpack_require__(25)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__(4); + +__webpack_require__(25)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), +/* 151 */ +/***/ (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__(74) }); + + +/***/ }), +/* 152 */ +/***/ (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__(103) }); + + +/***/ }), +/* 153 */ +/***/ (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__(75).set }); + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.3.6 Object.prototype.toString() +var classof = __webpack_require__(34); +var test = {}; +test[__webpack_require__(5)('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + __webpack_require__(15)(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + + +/***/ }), +/* 155 */ +/***/ (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__(104) }); + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8).f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || __webpack_require__(6) && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var isObject = __webpack_require__(4); +var getPrototypeOf = __webpack_require__(17); +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__(8).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; +} }); + + +/***/ }), +/* 158 */ +/***/ (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__(77); +var toPrimitive = __webpack_require__(23); +var fails = __webpack_require__(3); +var gOPN = __webpack_require__(39).f; +var gOPD = __webpack_require__(16).f; +var dP = __webpack_require__(8).f; +var $trim = __webpack_require__(46).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__(6) ? 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__(15)(global, NUMBER, $Number); +} + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toInteger = __webpack_require__(21); +var aNumberValue = __webpack_require__(105); +var repeat = __webpack_require__(79); +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__(3)(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; + } +}); + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $fails = __webpack_require__(3); +var aNumberValue = __webpack_require__(105); +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); + } +}); + + +/***/ }), +/* 161 */ +/***/ (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) }); + + +/***/ }), +/* 162 */ +/***/ (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); + } +}); + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { isInteger: __webpack_require__(106) }); + + +/***/ }), +/* 164 */ +/***/ (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; + } +}); + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.5 Number.isSafeInteger(number) +var $export = __webpack_require__(0); +var isInteger = __webpack_require__(106); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + + +/***/ }), +/* 166 */ +/***/ (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 }); + + +/***/ }), +/* 167 */ +/***/ (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 }); + + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(107); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(108); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(108); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(107); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.3 Math.acosh(x) +var $export = __webpack_require__(0); +var log1p = __webpack_require__(109); +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)); + } +}); + + +/***/ }), +/* 173 */ +/***/ (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 }); + + +/***/ }), +/* 174 */ +/***/ (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; + } +}); + + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.9 Math.cbrt(x) +var $export = __webpack_require__(0); +var sign = __webpack_require__(80); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + + +/***/ }), +/* 176 */ +/***/ (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; + } +}); + + +/***/ }), +/* 177 */ +/***/ (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; + } +}); + + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.14 Math.expm1(x) +var $export = __webpack_require__(0); +var $expm1 = __webpack_require__(81); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { fround: __webpack_require__(110) }); + + +/***/ }), +/* 180 */ +/***/ (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); + } +}); + + +/***/ }), +/* 181 */ +/***/ (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__(3)(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); + } +}); + + +/***/ }), +/* 182 */ +/***/ (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; + } +}); + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.20 Math.log1p(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { log1p: __webpack_require__(109) }); + + +/***/ }), +/* 184 */ +/***/ (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; + } +}); + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { sign: __webpack_require__(80) }); + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(81); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * __webpack_require__(3)(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); + } +}); + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.33 Math.tanh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(81); +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)); + } +}); + + +/***/ }), +/* 188 */ +/***/ (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); + } +}); + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toAbsoluteIndex = __webpack_require__(38); +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(''); + } +}); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(7); + +$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(''); + } +}); + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__(46)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $at = __webpack_require__(56)(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 193 */ +/***/ (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__(7); +var context = __webpack_require__(82); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(83)(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; + } +}); + + +/***/ }), +/* 194 */ +/***/ (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__(82); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(83)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), +/* 195 */ +/***/ (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__(79) +}); + + +/***/ }), +/* 196 */ +/***/ (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__(7); +var context = __webpack_require__(82); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(83)(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; + } +}); + + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(56)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(58)(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 }; +}); + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__(18)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__(18)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__(18)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__(18)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__(18)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__(18)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__(18)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__(18)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__(18)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__(18)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__(18)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__(18)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__(18)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), +/* 211 */ +/***/ (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__(55) }); + + +/***/ }), +/* 212 */ +/***/ (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__(111); +var isArrayIter = __webpack_require__(84); +var toLength = __webpack_require__(7); +var createProperty = __webpack_require__(85); +var getIterFn = __webpack_require__(50); + +$export($export.S + $export.F * !__webpack_require__(60)(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; + } +}); + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var createProperty = __webpack_require__(85); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * __webpack_require__(3)(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; + } +}); + + +/***/ }), +/* 214 */ +/***/ (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__(48) != Object || !__webpack_require__(22)(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var html = __webpack_require__(73); +var cof = __webpack_require__(20); +var toAbsoluteIndex = __webpack_require__(38); +var toLength = __webpack_require__(7); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * __webpack_require__(3)(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; + } +}); + + +/***/ }), +/* 216 */ +/***/ (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__(3); +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__(22)($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)); + } +}); + + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $forEach = __webpack_require__(26)(0); +var STRICT = __webpack_require__(22)([].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]); + } +}); + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +var isArray = __webpack_require__(55); +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; +}; + + +/***/ }), +/* 219 */ +/***/ (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__(22)([].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]); + } +}); + + +/***/ }), +/* 220 */ +/***/ (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__(22)([].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]); + } +}); + + +/***/ }), +/* 221 */ +/***/ (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__(22)([].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]); + } +}); + + +/***/ }), +/* 222 */ +/***/ (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__(22)([].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]); + } +}); + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(112); + +$export($export.P + $export.F * !__webpack_require__(22)([].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); + } +}); + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(112); + +$export($export.P + $export.F * !__webpack_require__(22)([].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); + } +}); + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $indexOf = __webpack_require__(53)(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(22)($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]); + } +}); + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toInteger = __webpack_require__(21); +var toLength = __webpack_require__(7); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(22)($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; + } +}); + + +/***/ }), +/* 227 */ +/***/ (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__(113) }); + +__webpack_require__(35)('copyWithin'); + + +/***/ }), +/* 228 */ +/***/ (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__(87) }); + +__webpack_require__(35)('fill'); + + +/***/ }), +/* 229 */ +/***/ (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__(35)(KEY); + + +/***/ }), +/* 230 */ +/***/ (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__(35)(KEY); + + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(41)('Array'); + + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var inheritIfRequired = __webpack_require__(77); +var dP = __webpack_require__(8).f; +var gOPN = __webpack_require__(39).f; +var isRegExp = __webpack_require__(57); +var $flags = __webpack_require__(51); +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__(6) && (!CORRECT_NEW || __webpack_require__(3)(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__(15)(global, 'RegExp', $RegExp); +} + +__webpack_require__(41)('RegExp'); + + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(115); +var anObject = __webpack_require__(1); +var $flags = __webpack_require__(51); +var DESCRIPTORS = __webpack_require__(6); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + __webpack_require__(15)(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (__webpack_require__(3)(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); + }); +} + + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(7); +var advanceStringIndex = __webpack_require__(91); +var regExpExec = __webpack_require__(61); + +// @@match logic +__webpack_require__(62)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); + + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(7); +var toInteger = __webpack_require__(21); +var advanceStringIndex = __webpack_require__(91); +var regExpExec = __webpack_require__(61); +var max = Math.max; +var min = Math.min; +var floor = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +__webpack_require__(62)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + 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); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } +}); + + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var sameValue = __webpack_require__(103); +var regExpExec = __webpack_require__(61); + +// @@search logic +__webpack_require__(62)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; +}); + + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isRegExp = __webpack_require__(57); +var anObject = __webpack_require__(1); +var speciesConstructor = __webpack_require__(52); +var advanceStringIndex = __webpack_require__(91); +var toLength = __webpack_require__(7); +var callRegExpExec = __webpack_require__(61); +var regexpExec = __webpack_require__(90); +var fails = __webpack_require__(3); +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +__webpack_require__(62)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = 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 ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + 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]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}); + + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(32); +var global = __webpack_require__(2); +var ctx = __webpack_require__(19); +var classof = __webpack_require__(34); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(4); +var aFunction = __webpack_require__(10); +var anInstance = __webpack_require__(42); +var forOf = __webpack_require__(36); +var speciesConstructor = __webpack_require__(52); +var task = __webpack_require__(92).set; +var microtask = __webpack_require__(93)(); +var newPromiseCapabilityModule = __webpack_require__(94); +var perform = __webpack_require__(116); +var userAgent = __webpack_require__(63); +var promiseResolve = __webpack_require__(117); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +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 + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } 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, exited; + 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); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + 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) { + if (domain && !exited) domain.exit(); + 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__(45)($Promise, PROMISE); +__webpack_require__(41)(PROMISE); +Wrapper = __webpack_require__(13)[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__(60)(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; + } +}); + + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var weak = __webpack_require__(122); +var validate = __webpack_require__(44); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +__webpack_require__(64)(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); + + +/***/ }), +/* 240 */ +/***/ (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__(3)(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); + } +}); + + +/***/ }), +/* 241 */ +/***/ (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__(4); +var fails = __webpack_require__(3); +var bind = __webpack_require__(104); +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; + } +}); + + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = __webpack_require__(8); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(23); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * __webpack_require__(3)(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; + } + } +}); + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = __webpack_require__(0); +var gOPD = __webpack_require__(16).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]; + } +}); + + +/***/ }), +/* 244 */ +/***/ (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__(59)(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); + } +}); + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = __webpack_require__(16); +var getPrototypeOf = __webpack_require__(17); +var has = __webpack_require__(12); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(4); +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 }); + + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = __webpack_require__(16); +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); + } +}); + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = __webpack_require__(0); +var getProto = __webpack_require__(17); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + + +/***/ }), +/* 248 */ +/***/ (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; + } +}); + + +/***/ }), +/* 249 */ +/***/ (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; + } +}); + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__(95) }); + + +/***/ }), +/* 251 */ +/***/ (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; + } + } +}); + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(16); +var getPrototypeOf = __webpack_require__(17); +var has = __webpack_require__(12); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(31); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); + +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; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + + +/***/ }), +/* 253 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = __webpack_require__(0); +var setProto = __webpack_require__(75); + +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; + } + } +}); + + +/***/ }), +/* 254 */ +/***/ (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(); } }); + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(23); + +$export($export.P + $export.F * __webpack_require__(3)(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(); + } +}); + + +/***/ }), +/* 256 */ +/***/ (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__(257); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = __webpack_require__(3); +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; + + +/***/ }), +/* 258 */ +/***/ (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__(15)(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; + }); +} + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +var TO_PRIMITIVE = __webpack_require__(5)('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) __webpack_require__(14)(proto, TO_PRIMITIVE, __webpack_require__(260)); + + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(23); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $typed = __webpack_require__(65); +var buffer = __webpack_require__(96); +var anObject = __webpack_require__(1); +var toAbsoluteIndex = __webpack_require__(38); +var toLength = __webpack_require__(7); +var isObject = __webpack_require__(4); +var ArrayBuffer = __webpack_require__(2).ArrayBuffer; +var speciesConstructor = __webpack_require__(52); +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__(3)(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 fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__(41)(ARRAY_BUFFER); + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +$export($export.G + $export.W + $export.F * !__webpack_require__(65).ABV, { + DataView: __webpack_require__(96).DataView +}); + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 265 */ +/***/ (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); + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__(0); +var $includes = __webpack_require__(53)(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +__webpack_require__(35)('includes'); + + +/***/ }), +/* 273 */ +/***/ (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__(124); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(7); +var aFunction = __webpack_require__(10); +var arraySpeciesCreate = __webpack_require__(86); + +$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__(35)('flatMap'); + + +/***/ }), +/* 274 */ +/***/ (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__(124); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(7); +var toInteger = __webpack_require__(21); +var arraySpeciesCreate = __webpack_require__(86); + +$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__(35)('flatten'); + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/mathiasbynens/String.prototype.at +var $export = __webpack_require__(0); +var $at = __webpack_require__(56)(true); +var $fails = __webpack_require__(3); + +var FORCED = $fails(function () { + return '𠮷'.at(0) !== '𠮷'; +}); + +$export($export.P + $export.F * FORCED, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 276 */ +/***/ (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__(125); +var userAgent = __webpack_require__(63); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + + +/***/ }), +/* 277 */ +/***/ (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__(125); +var userAgent = __webpack_require__(63); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(46)('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); + + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(46)('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); + + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/String.prototype.matchAll/ +var $export = __webpack_require__(0); +var defined = __webpack_require__(24); +var toLength = __webpack_require__(7); +var isRegExp = __webpack_require__(57); +var getFlags = __webpack_require__(51); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +__webpack_require__(59)($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); + } +}); + + +/***/ }), +/* 281 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(70)('asyncIterator'); + + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(70)('observable'); + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = __webpack_require__(0); +var ownKeys = __webpack_require__(95); +var toIObject = __webpack_require__(11); +var gOPD = __webpack_require__(16); +var createProperty = __webpack_require__(85); + +$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; + } +}); + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $values = __webpack_require__(126)(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $entries = __webpack_require__(126)(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + + +/***/ }), +/* 286 */ +/***/ (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__(8); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +__webpack_require__(6) && $export($export.P + __webpack_require__(66), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 287 */ +/***/ (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__(8); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +__webpack_require__(6) && $export($export.P + __webpack_require__(66), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(23); +var getPrototypeOf = __webpack_require__(17); +var getOwnPropertyDescriptor = __webpack_require__(16).f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +__webpack_require__(6) && $export($export.P + __webpack_require__(66), '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)); + } +}); + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(23); +var getPrototypeOf = __webpack_require__(17); +var getOwnPropertyDescriptor = __webpack_require__(16).f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +__webpack_require__(6) && $export($export.P + __webpack_require__(66), '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)); + } +}); + + +/***/ }), +/* 290 */ +/***/ (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__(127)('Map') }); + + +/***/ }), +/* 291 */ +/***/ (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__(127)('Set') }); + + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +__webpack_require__(67)('Map'); + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +__webpack_require__(67)('Set'); + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +__webpack_require__(67)('WeakMap'); + + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +__webpack_require__(67)('WeakSet'); + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +__webpack_require__(68)('Map'); + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +__webpack_require__(68)('Set'); + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +__webpack_require__(68)('WeakMap'); + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +__webpack_require__(68)('WeakSet'); + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.G, { global: __webpack_require__(2) }); + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.S, 'System', { global: __webpack_require__(2) }); + + +/***/ }), +/* 302 */ +/***/ (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'; + } +}); + + +/***/ }), +/* 303 */ +/***/ (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)); + } +}); + + +/***/ }), +/* 304 */ +/***/ (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 }); + + +/***/ }), +/* 305 */ +/***/ (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; + } +}); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var scale = __webpack_require__(129); +var fround = __webpack_require__(110); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + + +/***/ }), +/* 307 */ +/***/ (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; + } +}); + + +/***/ }), +/* 308 */ +/***/ (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; + } +}); + + +/***/ }), +/* 309 */ +/***/ (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); + } +}); + + +/***/ }), +/* 310 */ +/***/ (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 }); + + +/***/ }), +/* 311 */ +/***/ (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; + } +}); + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { scale: __webpack_require__(129) }); + + +/***/ }), +/* 313 */ +/***/ (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); + } +}); + + +/***/ }), +/* 314 */ +/***/ (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; +} }); + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(0); +var core = __webpack_require__(13); +var global = __webpack_require__(2); +var speciesConstructor = __webpack_require__(52); +var promiseResolve = __webpack_require__(117); + +$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 + ); +} }); + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(0); +var newPromiseCapability = __webpack_require__(94); +var perform = __webpack_require__(116); + +$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; +} }); + + +/***/ }), +/* 317 */ +/***/ (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)); +} }); + + +/***/ }), +/* 318 */ +/***/ (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); +} }); + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +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])); +} }); + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +var Set = __webpack_require__(120); +var from = __webpack_require__(128); +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +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])); +} }); + + +/***/ }), +/* 321 */ +/***/ (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])); +} }); + + +/***/ }), +/* 322 */ +/***/ (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])); +} }); + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +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])); +} }); + + +/***/ }), +/* 324 */ +/***/ (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])); +} }); + + +/***/ }), +/* 325 */ +/***/ (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) + ); + }; +} }); + + +/***/ }), +/* 326 */ +/***/ (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__(93)(); +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); + } +}); + + +/***/ }), +/* 327 */ +/***/ (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__(13); +var microtask = __webpack_require__(93)(); +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__(14); +var forOf = __webpack_require__(36); +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'); + + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $task = __webpack_require__(92); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + + +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { + +var $iterators = __webpack_require__(88); +var getKeys = __webpack_require__(27); +var redefine = __webpack_require__(15); +var global = __webpack_require__(2); +var hide = __webpack_require__(14); +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); + } +} + + +/***/ }), +/* 330 */ +/***/ (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__(63); +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) +}); + + +/***/ }), +/* 331 */ +/***/ (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__(74); +var create = __webpack_require__(28); +var getPrototypeOf = __webpack_require__(17); +var getKeys = __webpack_require__(27); +var dP = __webpack_require__(8); +var keyOf = __webpack_require__(332); +var aFunction = __webpack_require__(10); +var forOf = __webpack_require__(36); +var isIterable = __webpack_require__(130); +var $iterCreate = __webpack_require__(59); +var step = __webpack_require__(89); +var isObject = __webpack_require__(4); +var toIObject = __webpack_require__(11); +var DESCRIPTORS = __webpack_require__(6); +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 +}); + + +/***/ }), +/* 332 */ +/***/ (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; +}; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var get = __webpack_require__(50); +module.exports = __webpack_require__(13).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + + +/***/ }), +/* 334 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(13); +var $export = __webpack_require__(0); +var partial = __webpack_require__(131); +// 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); + }); + } +}); + + +/***/ }), +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +var path = __webpack_require__(132); +var $export = __webpack_require__(0); + +// Placeholder +__webpack_require__(13)._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: __webpack_require__(131) }); + + +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { isObject: __webpack_require__(4) }); + + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { classof: __webpack_require__(34) }); + + +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(133); + +$export($export.S + $export.F, 'Object', { define: define }); + + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(133); +var create = __webpack_require__(28); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); + + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(58)(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 }; +}); + + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/benjamingr/RexExp.escape +var $export = __webpack_require__(0); +var $re = __webpack_require__(97)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(97)(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); + + +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(97)(/&(?: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 0000000000000..e62af4089bffe --- /dev/null +++ b/node_modules/core-js/client/core.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.6.12 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2020 Denis Pushkarev + */ +!function(e,i,Jt){"use strict";!function(r){var e={};function __webpack_require__(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return r[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=r,__webpack_require__.c=e,__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=134)}([function(t,n,r){var v=r(2),g=r(13),y=r(14),d=r(15),b=r(19),_="prototype",S=function(t,n,r){var e,i,o,u,c=t&S.F,f=t&S.G,a=t&S.P,s=t&S.B,l=f?v:t&S.S?v[n]||(v[n]={}):(v[n]||{})[_],h=f?g:g[n]||(g[n]={}),p=h[_]||(h[_]={});for(e in f&&(r=n),r)o=((i=!c&&l&&l[e]!==Jt)?l:r)[e],u=s&&i?b(o,v):a&&"function"==typeof o?b(Function.call,o):o,l&&d(l,e,o,t&S.U),h[e]!=o&&y(h,e,u),a&&p[e]!=o&&(p[e]=o)};v.core=g,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(4);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof i&&(i=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(47)("wks"),i=r(37),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){t.exports=!r(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(21),i=Math.min;t.exports=function(t){return 0"+i+""};t.exports=function(n,t){var r={};r[n]=t(o),e(e.P+e.F*i(function(){var t=""[n]('"');return t!==t.toLowerCase()||3document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s[a][u[r]];return s()};t.exports=Object.create||function create(t,n){var r;return null!==t?(f[a]=i(t),r=new f,f[a]=null,r[c]=t):r=s(),n===Jt?r:o(r,n)}},function(t,n,r){if(r(6)){var y=r(32),d=r(2),b=r(3),_=r(0),S=r(65),e=r(96),h=r(19),x=r(42),i=r(31),m=r(14),o=r(43),u=r(21),w=r(7),E=r(123),c=r(38),f=r(23),a=r(12),O=r(34),M=r(4),p=r(9),v=r(84),P=r(28),I=r(17),F=r(39).f,g=r(50),s=r(37),l=r(5),A=r(26),k=r(53),j=r(52),N=r(88),R=r(40),T=r(60),D=r(41),L=r(87),C=r(113),U=r(8),W=r(16),G=U.f,V=W.f,B=d.RangeError,q=d.TypeError,z=d.Uint8Array,K="ArrayBuffer",J="Shared"+K,$="BYTES_PER_ELEMENT",H="prototype",Y=Array[H],X=e.ArrayBuffer,Z=e.DataView,Q=A(0),tt=A(2),nt=A(3),rt=A(4),et=A(5),it=A(6),ot=k(!0),ut=k(!1),ct=N.values,ft=N.keys,at=N.entries,st=Y.lastIndexOf,lt=Y.reduce,ht=Y.reduceRight,pt=Y.join,vt=Y.sort,gt=Y.slice,yt=Y.toString,dt=Y.toLocaleString,bt=l("iterator"),_t=l("toStringTag"),St=s("typed_constructor"),xt=s("def_constructor"),mt=S.CONSTR,wt=S.TYPED,Et=S.VIEW,Ot="Wrong length!",Mt=A(1,function(t,n){return kt(j(t,t[xt]),n)}),Pt=b(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),It=!!z&&!!z[H].set&&b(function(){new z(1).set({})}),Ft=function(t,n){var r=u(t);if(r<0||r%n)throw B("Wrong offset!");return r},At=function(t){if(M(t)&&wt in t)return t;throw q(t+" is not a typed array!")},kt=function(t,n){if(!(M(t)&&St in t))throw q("It is not a typed array constructor!");return new t(n)},jt=function(t,n){return Nt(j(t,t[xt]),n)},Nt=function(t,n){for(var r=0,e=n.length,i=kt(t,e);r")}),d=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(r,t,n){var e=p(r),o=!l(function(){var t={};return t[e]=function(){return 7},7!=""[r](t)}),i=o?!l(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===r&&(n.constructor={},n.constructor[g]=function(){return n}),n[e](""),!t}):Jt;if(!o||!i||"replace"===r&&!y||"split"===r&&!d){var u=/./[e],c=n(h,e,""[r],function maybeCallNative(t,n,r,e,i){return n.exec===v?o&&!i?{done:!0,value:u.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}}),f=c[1];a(String.prototype,r,c[0]),s(RegExp.prototype,e,2==t?function(t,n){return f.call(t,this,n)}:function(t){return f.call(t,this)})}}},function(t,n,r){var e=r(2).navigator;t.exports=e&&e.userAgent||""},function(t,n,r){var d=r(2),b=r(0),_=r(15),S=r(43),x=r(33),m=r(36),w=r(42),E=r(4),O=r(3),M=r(60),P=r(45),I=r(77);t.exports=function(e,t,n,r,i,o){var u=d[e],c=u,f=i?"set":"add",a=c&&c.prototype,s={},l=function(t){var r=a[t];_(a,t,"delete"==t?function(t){return!(o&&!E(t))&&r.call(this,0===t?0:t)}:"has"==t?function has(t){return!(o&&!E(t))&&r.call(this,0===t?0:t)}:"get"==t?function get(t){return o&&!E(t)?Jt:r.call(this,0===t?0:t)}:"add"==t?function add(t){return r.call(this,0===t?0:t),this}:function set(t,n){return r.call(this,0===t?0:t,n),this})};if("function"==typeof c&&(o||a.forEach&&!O(function(){(new c).entries().next()}))){var h=new c,p=h[f](o?{}:-0,1)!=h,v=O(function(){h.has(1)}),g=M(function(t){new c(t)}),y=!o&&O(function(){for(var t=new c,n=5;n--;)t[f](n,n);return!t.has(-0)});g||(((c=t(function(t,n){w(t,c,e);var r=I(new u,t,c);return n!=Jt&&m(n,i,r[f],r),r})).prototype=a).constructor=c),(v||y)&&(l("delete"),l("has"),i&&l("get")),(y||p)&&l(f),o&&a.clear&&delete a.clear}else c=r.getConstructor(t,e,i,f),S(c.prototype,n),x.NEED=!0;return P(c,e),b(b.G+b.W+b.F*((s[e]=c)!=u),s),o||r.setStrong(c,e,i),c}},function(t,n,r){for(var e,i=r(2),o=r(14),u=r(37),c=u("typed_array"),f=u("view"),a=!(!i.ArrayBuffer||!i.DataView),s=a,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(e=i[h[l++]])?(o(e.prototype,c,!0),o(e.prototype,f,!0)):s=!1;t.exports={ABV:a,CONSTR:s,TYPED:c,VIEW:f}},function(t,n,r){t.exports=r(32)||!r(3)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(2)[t]})},function(t,n,r){var e=r(0);t.exports=function(t){e(e.S,t,{of:function of(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}})}},function(t,n,r){var e=r(0),u=r(10),c=r(19),f=r(36);t.exports=function(t){e(e.S,t,{from:function from(t){var n,r,e,i,o=arguments[1];return u(this),(n=o!==Jt)&&u(o),t==Jt?new this:(r=[],n?(e=0,i=c(o,arguments[2],2),f(t,!1,function(t){r.push(i(t,e++))})):f(t,!1,r.push,r),new this(r))}})}},function(t,n,r){var e=r(4),i=r(2).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){var e=r(2),i=r(13),o=r(32),u=r(99),c=r(8).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){var e=r(47)("keys"),i=r(37);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(2).document;t.exports=e&&e.documentElement},function(t,n,r){var h=r(6),p=r(27),v=r(54),g=r(49),y=r(9),d=r(48),i=Object.assign;t.exports=!i||r(3)(function(){var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach(function(t){n[t]=t}),7!=i({},t)[r]||Object.keys(i({},n)).join("")!=e})?function assign(t,n){for(var r=y(t),e=arguments.length,i=1,o=v.f,u=g.f;i>>=1)&&(n+=n))1&e&&(r+=n);return r}},function(t,n){t.exports=Math.sign||function sign(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var r=Math.expm1;t.exports=!r||22025.465794806718>1,s=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=I(t))!=t||t===M?(i=t!=t?1:0,e=f):(e=A(k(t)/j),t*(o=F(2,-e))<1&&(e--,o*=2),2<=(t+=1<=e+a?s/o:s*F(2,1-a))*o&&(e++,o/=2),f<=e+a?(i=0,e=f):1<=e+a?(i=(t*o-1)*F(2,n),e+=a):(i=t*F(2,a-1)*F(2,n),e=0));8<=n;u[l++]=255&i,i/=256,n-=8);for(e=e<>1,c=i-7,f=r-1,a=t[f--],s=127&a;for(a>>=7;0>=-c,c+=n;0>8&255]}function packI32(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function packF64(t){return packIEEE754(t,52,8)}function packF32(t){return packIEEE754(t,23,4)}function addGetter(t,n,r){g(t[S],n,{get:function(){return this[r]}})}function get(t,n,r,e){var i=p(+r);if(t[D]>24)},setUint8:function setUint8(t,n){B.call(this,t,n<<24>>24)}},!0)}else m=function ArrayBuffer(t){s(this,m,b);var n=p(t);this._b=y.call(new Array(n),0),this[D]=n},w=function DataView(t,n,r){s(this,w,_),s(t,m,_);var e=t[D],i=l(n);if(i<0||e>24},getUint8:function getUint8(t){ +return get(this,1,t)[0]},getInt16:function getInt16(t){var n=get(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function getUint16(t){var n=get(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function getInt32(t){return unpackI32(get(this,4,t,arguments[1]))},getUint32:function getUint32(t){return unpackI32(get(this,4,t,arguments[1]))>>>0},getFloat32:function getFloat32(t){return unpackIEEE754(get(this,4,t,arguments[1]),23,4)},getFloat64:function getFloat64(t){return unpackIEEE754(get(this,8,t,arguments[1]),52,8)},setInt8:function setInt8(t,n){set(this,1,t,packI8,n)},setUint8:function setUint8(t,n){set(this,1,t,packI8,n)},setInt16:function setInt16(t,n){set(this,2,t,packI16,n,arguments[2])},setUint16:function setUint16(t,n){set(this,2,t,packI16,n,arguments[2])},setInt32:function setInt32(t,n){set(this,4,t,packI32,n,arguments[2])},setUint32:function setUint32(t,n){set(this,4,t,packI32,n,arguments[2])},setFloat32:function setFloat32(t,n){set(this,4,t,packF32,n,arguments[2])},setFloat64:function setFloat64(t,n){set(this,8,t,packF64,n,arguments[2])}});d(m,b),d(w,_),c(w[S],u.VIEW,!0),n[b]=m,n[_]=w},function(t,n){t.exports=function(n,r){var e=r===Object(r)?function(t){return r[t]}:r;return function(t){return String(t).replace(n,e)}}},function(t,n,r){t.exports=!r(6)&&!r(3)(function(){return 7!=Object.defineProperty(r(69)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){n.f=r(5)},function(t,n,r){var u=r(12),c=r(11),f=r(53)(!1),a=r(71)("IE_PROTO");t.exports=function(t,n){var r,e=c(t),i=0,o=[];for(r in e)r!=a&&u(e,r)&&o.push(r);for(;i>>0||(u.test(r)?16:10))}:e},function(t,n){t.exports=Math.log1p||function log1p(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){var o=r(80),e=Math.pow,u=e(2,-52),c=e(2,-23),f=e(2,127)*(2-c),a=e(2,-126);t.exports=Math.fround||function fround(t){var n,r,e=Math.abs(t),i=o(t);return e>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(0),i=Math.exp;e(e.S,"Math",{cosh:function cosh(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(0),i=r(81);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(0);e(e.S,"Math",{fround:r(110)})},function(t,n,r){var e=r(0),f=Math.abs;e(e.S,"Math",{hypot:function hypot(t,n){for(var r,e,i=0,o=0,u=arguments.length,c=0;o>>16)*u+o*(r&i>>>16)<<16>>>0)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log10:function log10(t){return Math.log(t)*Math.LOG10E}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log1p:r(109)})},function(t,n,r){var e=r(0);e(e.S,"Math",{log2:function log2(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(0);e(e.S,"Math",{sign:r(80)})},function(t,n,r){var e=r(0),i=r(81),o=Math.exp;e(e.S+e.F*r(3)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(0),i=r(81),o=Math.exp;e(e.S,"Math",{tanh:function tanh(t){var n=i(t=+t),r=i(-t);return n==Infinity?1:r==Infinity?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(0);e(e.S,"Math",{trunc:function trunc(t){return(0>10),n%1024+56320))}return r.join("")}})},function(t,n,r){var e=r(0),u=r(11),c=r(7);e(e.S,"String",{raw:function raw(t){for(var n=u(t.raw),r=c(n.length),e=arguments.length,i=[],o=0;o]*>)/g,v=/\$([$&`']|\d\d?)/g;r(62)("replace",2,function(i,o,x,m){return[function replace(t,n){var r=i(this),e=t==Jt?Jt:t[o];return e!==Jt?e.call(t,r,n):x.call(String(r),t,n)},function(t,n){var r=m(x,t,this,n);if(r.done)return r.value;var e=w(t),i=String(this),o="function"==typeof n;o||(n=String(n));var u=e.global;if(u){var c=e.unicode;e.lastIndex=0}for(var f=[];;){var a=P(e,i);if(null===a)break;if(f.push(a),!u)break;""===String(a[0])&&(e.lastIndex=M(i,E(e.lastIndex),c))}for(var s,l="",h=0,p=0;p>>0,a=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(e=l.call(a,r))&&!(c<(i=a[v])&&(u.push(r.slice(c,e.index)),1>>0;if(0===f)return[];if(0===i.length)return null===m(c,i)?[i]:[];for(var a=0,s=0,l=[];s>>0,o=r>>>0;return(n>>>0)+(e>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{isubh:function isubh(t,n,r,e){var i=t>>>0,o=r>>>0;return(n>>>0)-(e>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{imulh:function imulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>16,c=e>>16,f=(u*o>>>0)+(i*o>>>16);return u*c+(f>>16)+((i*c>>>0)+(65535&f)>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,n,r){var e=r(0),i=Math.PI/180;e(e.S,"Math",{radians:function radians(t){return t*i}})},function(t,n,r){var e=r(0);e(e.S,"Math",{scale:r(129)})},function(t,n,r){var e=r(0);e(e.S,"Math",{umulh:function umulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>>16,c=e>>>16,f=(u*o>>>0)+(i*o>>>16);return u*c+(f>>>16)+((i*c>>>0)+(65535&f)>>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{signbit:function signbit(t){return(t=+t)!=t?t:0==t?1/t==Infinity:0"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});e(e.P+e.F,"String",{escapeHTML:function escapeHTML(){return i(this)}})},function(t,n,r){var e=r(0),i=r(97)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});e(e.P+e.F,"String",{unescapeHTML:function unescapeHTML(){return i(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):i.core=e}(1,1); +//# sourceMappingURL=core.min.js.map \ No newline at end of file diff --git a/node_modules/core-js/client/core.min.js.map b/node_modules/core-js/client/core.min.js.map new file mode 100644 index 0000000000000..fb340f76c4e5a --- /dev/null +++ b/node_modules/core-js/client/core.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["core.js"],"names":["__e","__g","undefined","modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","global","core","hide","redefine","ctx","PROTOTYPE","$export","type","source","key","own","out","exp","IS_FORCED","F","IS_GLOBAL","G","IS_PROTO","P","IS_BIND","B","target","S","expProto","Function","U","W","R","isObject","it","TypeError","window","Math","self","exec","e","store","uid","Symbol","USE_SYMBOL","a","toInteger","min","anObject","IE8_DOM_DEFINE","toPrimitive","dP","f","O","Attributes","value","defined","IObject","version","createDesc","has","SRC","$toString","TO_STRING","TPL","split","inspectSource","val","safe","isFunction","join","String","toString","this","pIE","toIObject","gOPD","getOwnPropertyDescriptor","toObject","IE_PROTO","ObjectProto","getPrototypeOf","constructor","fails","quot","createHTML","string","tag","attribute","p1","replace","NAME","test","toLowerCase","length","aFunction","fn","that","b","apply","arguments","slice","ceil","floor","isNaN","method","arg","valueOf","KEY","toLength","asc","TYPE","$create","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","create","$this","callbackfn","res","index","result","push","$keys","enumBugKeys","keys","dPs","Empty","createDict","iframeDocument","iframe","style","display","appendChild","src","contentWindow","document","open","write","lt","close","Properties","LIBRARY","$typed","$buffer","anInstance","propertyDesc","redefineAll","toIndex","toAbsoluteIndex","classof","isArrayIter","gOPN","getIterFn","wks","createArrayMethod","createArrayIncludes","speciesConstructor","ArrayIterators","Iterators","$iterDetect","setSpecies","arrayFill","arrayCopyWithin","$DP","$GOPD","RangeError","Uint8Array","ARRAY_BUFFER","SHARED_BUFFER","BYTES_PER_ELEMENT","ArrayProto","Array","$ArrayBuffer","ArrayBuffer","$DataView","DataView","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayFind","arrayFindIndex","arrayIncludes","arrayIndexOf","arrayValues","values","arrayKeys","arrayEntries","entries","arrayLastIndexOf","lastIndexOf","arrayReduce","reduce","arrayReduceRight","reduceRight","arrayJoin","arraySort","sort","arraySlice","arrayToString","arrayToLocaleString","toLocaleString","ITERATOR","TAG","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","CONSTR","TYPED_ARRAY","TYPED","VIEW","WRONG_LENGTH","$map","allocate","LITTLE_ENDIAN","Uint16Array","buffer","FORCED_SET","set","toOffset","BYTES","offset","validate","C","speciesFromList","list","fromList","addGetter","internal","_d","$from","from","step","iterator","aLen","mapfn","mapping","iterFn","next","done","$of","of","TO_LOCALE_BUG","$toLocaleString","proto","copyWithin","start","every","fill","filter","find","predicate","findIndex","forEach","indexOf","searchElement","includes","separator","map","reverse","middle","some","comparefn","subarray","begin","end","$begin","byteOffset","$slice","$set","arrayLike","len","$iterators","isTAIndex","$getDesc","$setDesc","desc","writable","$TypedArrayPrototype$","wrapper","CLAMPED","GETTER","SETTER","TypedArray","Base","TAC","TypedArrayPrototype","addElement","data","v","round","ABV","$offset","$length","byteLength","klass","$len","iter","concat","$nativeIterator","CORRECT_ITER_NAME","$iterator","Map","shared","getOrCreateMetadataMap","targetKey","targetMetadata","keyMetadata","MetadataKey","metadataMap","MetadataValue","_","bitmap","META","setDesc","id","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","cof","ARG","T","tryGet","callee","UNSCOPABLES","BREAK","RETURN","iterable","px","random","max","hiddenKeys","getOwnPropertyNames","DESCRIPTORS","SPECIES","Constructor","forbiddenField","_t","def","stat","spaces","space","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","trim","SHARED","mode","copyright","propertyIsEnumerable","getIteratorMethod","ignoreCase","multiline","unicode","sticky","D","IS_INCLUDES","el","fromIndex","getOwnPropertySymbols","isArray","pos","charCodeAt","charAt","MATCH","isRegExp","$iterCreate","setToStringTag","BUGGY","VALUES","returnThis","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","SAFE_CLOSING","riter","skipClosing","arr","builtinExec","regexpExec","REPLACE_SUPPORTS_NAMED_GROUPS","re","groups","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","maybeCallNative","nativeMethod","regexp","str","arg2","forceStringMethod","rxfn","navigator","userAgent","forOf","inheritIfRequired","common","IS_WEAK","ADDER","fixMethod","add","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","clear","getConstructor","setStrong","Typed","TypedArrayConstructors","K","__defineSetter__","COLLECTION","A","cb","mapFn","nextItem","is","createElement","wksExt","$Symbol","documentElement","getKeys","gOPS","$assign","assign","k","getSymbols","isEnum","j","check","setPrototypeOf","buggy","__proto__","args","un","repeat","count","Infinity","sign","x","$expm1","expm1","searchString","$defineProperty","original","endPos","addToUnscopables","iterated","_i","_k","Arguments","re1","re2","regexpFlags","nativeExec","nativeReplace","patchedExec","LAST_INDEX","UPDATES_LAST_INDEX_WRONG","NPCG_INCLUDED","lastIndex","reCopy","match","at","defer","channel","port","invoke","html","cel","process","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","run","listener","event","nextTick","now","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","macrotask","Observer","MutationObserver","WebKitMutationObserver","Promise","isNode","head","last","notify","flush","parent","domain","exit","enter","standalone","resolve","promise","then","toggle","node","createTextNode","observe","characterData","task","PromiseCapability","reject","$$resolve","$$reject","Reflect","ownKeys","DATA_VIEW","WRONG_INDEX","BaseBuffer","abs","pow","log","LN2","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","NaN","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","view","isLittleEndian","intIndex","pack","_b","conversion","ArrayBufferProto","$setInt8","setInt8","getInt8","setUint8","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","regExp","replacer","part","names","defineProperties","windowNames","getWindowNames","y","factories","bind","partArgs","bound","construct","msg","isInteger","isFinite","$parseFloat","parseFloat","$trim","$parseInt","parseInt","ws","hex","radix","log1p","EPSILON","EPSILON32","MAX32","MIN32","fround","$abs","$sign","ret","memo","isRight","to","inc","forced","flags","newPromiseCapability","promiseCapability","strong","entry","getEntry","$iterDefine","SIZE","_f","_l","r","delete","prev","Set","InternalMap","each","weak","NATIVE_WEAK_MAP","IS_IE11","ActiveXObject","WEAK_MAP","uncaughtFrozenStore","ufstore","WeakMap","$WeakMap","$has","UncaughtFrozenStore","findUncaughtFrozen","splice","number","IS_CONCAT_SPREADABLE","flattenIntoArray","sourceLen","depth","mapper","thisArg","element","spreadable","targetIndex","sourceIndex","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","isEntries","toJSON","scale","inLow","inHigh","outLow","outHigh","isIterable","path","pargs","holder","define","mixin","$fails","wksDefine","enumKeys","_create","gOPNExt","$GOPS","$JSON","JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","protoDesc","wrap","sym","isSymbol","$defineProperties","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","es6Symbols","wellKnownSymbols","for","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","$replacer","symbols","$getPrototypeOf","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","FProto","nameRE","HAS_INSTANCE","FunctionProto","NUMBER","$Number","BROKEN_COF","TRIM","toNumber","argument","third","maxCode","first","code","digits","Number","aNumberValue","$toFixed","toFixed","ERROR","multiply","c2","divide","numToString","t","acc","fractionDigits","z","x2","$toPrecision","toPrecision","precision","_isFinite","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","sqrt","$acosh","acosh","MAX_VALUE","$asinh","asinh","$atanh","atanh","cbrt","clz32","LOG2E","cosh","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LOG10E","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","context","ENDS_WITH","$endsWith","endsWith","endPosition","search","INCLUDES","STARTS_WITH","$startsWith","startsWith","point","anchor","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","createProperty","upTo","cloned","$sort","$forEach","STRICT","$filter","$some","$every","$reduce","$indexOf","NEGATIVE_ZERO","$find","$flags","$RegExp","CORRECT_NEW","tiRE","piRE","fiU","proxy","advanceStringIndex","regExpExec","$match","rx","fullUnicode","matchStr","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","REPLACE","$replace","searchValue","replaceValue","functionalReplace","results","accumulatedResult","nextSourcePosition","matched","position","captures","namedCaptures","replacerArgs","replacement","getSubstitution","tailPos","ch","capture","sameValue","SEARCH","$search","previousLastIndex","callRegExpExec","$min","$push","$SPLIT","LENGTH","MAX_UINT32","SUPPORTS_Y","SPLIT","$split","internalSplit","limit","lastLength","output","lastLastIndex","splitLimit","separatorCopy","splitter","unicodeMatching","lim","q","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","microtask","newPromiseCapabilityModule","perform","promiseResolve","PROMISE","versions","v8","$Promise","empty","FakePromise","PromiseRejectionEvent","isThenable","isReject","_n","chain","_c","_v","ok","_s","reaction","exited","handler","fail","_h","onHandleUnhandled","onUnhandled","console","unhandled","isUnhandled","emit","onunhandledrejection","reason","error","_a","onrejectionhandled","$reject","_w","$resolve","executor","err","onFulfilled","onRejected","catch","capability","all","remaining","$index","alreadyCalled","race","WEAK_SET","WeakSet","rApply","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","propertyKey","attributes","deleteProperty","Enumerate","enumerate","receiver","getProto","V","existingDescriptor","ownDesc","setProto","Date","getTime","toISOString","pv","$toISOString","lz","num","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","DateProto","INVALID_DATE","hint","$isView","isView","fin","viewS","viewT","init","Int8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","arraySpeciesCreate","flatMap","flatten","depthArg","$pad","WEBKIT_BUG","padStart","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","_r","matchAll","getOwnPropertyDescriptors","getDesc","$values","__defineGetter__","__lookupGetter__","__lookupSetter__","isError","clamp","lower","upper","DEG_PER_RAD","PI","RAD_PER_DEG","degrees","radians","fscale","iaddh","x0","x1","y0","y1","$x0","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","signbit","finally","onFinally","try","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","deleteMetadata","ordinaryHasOwnMetadata","ordinaryGetOwnMetadata","ordinaryGetMetadata","getMetadata","ordinaryOwnMetadataKeys","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","$metadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","MSIE","time","boundArgs","setInterval","keyOf","createDictMethod","Dict","findKey","createDictIter","DictIterator","dict","mapPairs","isDict","getIterator","partial","delay","make","$re","escape","&","<",">","\"","'","escapeHTML","&","<",">",""","'","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,IACpB,cACS,SAAUC,GAET,IAAIC,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAJ,EAAQG,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASF,qBAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,oBAAoBO,EAAIT,EAGxBE,oBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAI,SAASP,EAASQ,EAAMC,GAC3CX,oBAAoBY,EAAEV,EAASQ,IAClCG,OAAOC,eAAeZ,EAASQ,EAAM,CACpCK,cAAc,EACdC,YAAY,EACZC,IAAKN,KAMRX,oBAAoBkB,EAAI,SAASf,GAChC,IAAIQ,EAASR,GAAUA,EAAOgB,WAC7B,SAASC,aAAe,OAAOjB,EAAgB,YAC/C,SAASkB,mBAAqB,OAAOlB,GAEtC,OADAH,oBAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,oBAAoBY,EAAI,SAASU,EAAQC,GAAY,OAAOV,OAAOW,UAAUC,eAAenB,KAAKgB,EAAQC,IAGzGvB,oBAAoB0B,EAAI,GAGjB1B,oBAAoBA,oBAAoB2B,EAAI,KA9DpD,CAiEC,CAEJ,SAAUxB,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3B8B,EAAO9B,EAAoB,IAC3B+B,EAAW/B,EAAoB,IAC/BgC,EAAMhC,EAAoB,IAC1BiC,EAAY,YAEZC,EAAU,SAAUC,EAAMzB,EAAM0B,GAClC,IAQIC,EAAKC,EAAKC,EAAKC,EARfC,EAAYN,EAAOD,EAAQQ,EAC3BC,EAAYR,EAAOD,EAAQU,EAE3BC,EAAWV,EAAOD,EAAQY,EAC1BC,EAAUZ,EAAOD,EAAQc,EACzBC,EAASN,EAAYf,EAHTO,EAAOD,EAAQgB,EAGetB,EAAOlB,KAAUkB,EAAOlB,GAAQ,KAAOkB,EAAOlB,IAAS,IAAIuB,GACrG/B,EAAUyC,EAAYd,EAAOA,EAAKnB,KAAUmB,EAAKnB,GAAQ,IACzDyC,EAAWjD,EAAQ+B,KAAe/B,EAAQ+B,GAAa,IAG3D,IAAKI,KADDM,IAAWP,EAAS1B,GACZ0B,EAIVG,IAFAD,GAAOG,GAAaQ,GAAUA,EAAOZ,KAASxC,IAEjCoD,EAASb,GAAQC,GAE9BG,EAAMO,GAAWT,EAAMN,EAAIO,EAAKX,GAAUiB,GAA0B,mBAAPN,EAAoBP,EAAIoB,SAAS9C,KAAMiC,GAAOA,EAEvGU,GAAQlB,EAASkB,EAAQZ,EAAKE,EAAKJ,EAAOD,EAAQmB,GAElDnD,EAAQmC,IAAQE,GAAKT,EAAK5B,EAASmC,EAAKG,GACxCK,GAAYM,EAASd,IAAQE,IAAKY,EAASd,GAAOE,IAG1DX,EAAOC,KAAOA,EAEdK,EAAQQ,EAAI,EACZR,EAAQU,EAAI,EACZV,EAAQgB,EAAI,EACZhB,EAAQY,EAAI,EACZZ,EAAQc,EAAI,GACZd,EAAQoB,EAAI,GACZpB,EAAQmB,EAAI,GACZnB,EAAQqB,EAAI,IACZpD,EAAOD,QAAUgC,GAKX,SAAU/B,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GACnCG,EAAOD,QAAU,SAAUuD,GACzB,IAAKD,EAASC,GAAK,MAAMC,UAAUD,EAAK,sBACxC,OAAOA,IAMH,SAAUtD,EAAQD,GAGxB,IAAI0B,EAASzB,EAAOD,QAA2B,oBAAVyD,QAAyBA,OAAOC,MAAQA,KACzED,OAAwB,oBAARE,MAAuBA,KAAKD,MAAQA,KAAOC,KAE3DT,SAAS,cAATA,GACc,iBAAPxD,IAAiBA,EAAMgC,IAK5B,SAAUzB,EAAQD,GAExBC,EAAOD,QAAU,SAAU4D,GACzB,IACE,QAASA,IACT,MAAOC,GACP,OAAO,KAOL,SAAU5D,EAAQD,GAExBC,EAAOD,QAAU,SAAUuD,GACzB,MAAqB,iBAAPA,EAAyB,OAAPA,EAA4B,mBAAPA,IAMjD,SAAUtD,EAAQD,EAASF,GAEjC,IAAIgE,EAAQhE,EAAoB,GAApBA,CAAwB,OAChCiE,EAAMjE,EAAoB,IAC1BkE,EAASlE,EAAoB,GAAGkE,OAChCC,EAA8B,mBAAVD,GAET/D,EAAOD,QAAU,SAAUQ,GACxC,OAAOsD,EAAMtD,KAAUsD,EAAMtD,GAC3ByD,GAAcD,EAAOxD,KAAUyD,EAAaD,EAASD,GAAK,UAAYvD,MAGjEsD,MAAQA,GAKX,SAAU7D,EAAQD,EAASF,GAGjCG,EAAOD,SAAWF,EAAoB,EAApBA,CAAuB,WACvC,OAA+E,GAAxEa,OAAOC,eAAe,GAAI,IAAK,CAAEG,IAAK,WAAc,OAAO,KAAQmD,KAMtE,SAAUjE,EAAQD,EAASF,GAGjC,IAAIqE,EAAYrE,EAAoB,IAChCsE,EAAMV,KAAKU,IACfnE,EAAOD,QAAU,SAAUuD,GACzB,OAAY,EAALA,EAASa,EAAID,EAAUZ,GAAK,kBAAoB,IAMnD,SAAUtD,EAAQD,EAASF,GAEjC,IAAIuE,EAAWvE,EAAoB,GAC/BwE,EAAiBxE,EAAoB,IACrCyE,EAAczE,EAAoB,IAClC0E,EAAK7D,OAAOC,eAEhBZ,EAAQyE,EAAI3E,EAAoB,GAAKa,OAAOC,eAAiB,SAASA,eAAe8D,EAAG9B,EAAG+B,GAIzF,GAHAN,EAASK,GACT9B,EAAI2B,EAAY3B,GAAG,GACnByB,EAASM,GACLL,EAAgB,IAClB,OAAOE,EAAGE,EAAG9B,EAAG+B,GAChB,MAAOd,IACT,GAAI,QAASc,GAAc,QAASA,EAAY,MAAMnB,UAAU,4BAEhE,MADI,UAAWmB,IAAYD,EAAE9B,GAAK+B,EAAWC,OACtCF,IAMH,SAAUzE,EAAQD,EAASF,GAGjC,IAAI+E,EAAU/E,EAAoB,IAClCG,EAAOD,QAAU,SAAUuD,GACzB,OAAO5C,OAAOkE,EAAQtB,MAMlB,SAAUtD,EAAQD,GAExBC,EAAOD,QAAU,SAAUuD,GACzB,GAAiB,mBAANA,EAAkB,MAAMC,UAAUD,EAAK,uBAClD,OAAOA,IAMH,SAAUtD,EAAQD,EAASF,GAGjC,IAAIgF,EAAUhF,EAAoB,IAC9B+E,EAAU/E,EAAoB,IAClCG,EAAOD,QAAU,SAAUuD,GACzB,OAAOuB,EAAQD,EAAQtB,MAMnB,SAAUtD,EAAQD,GAExB,IAAIuB,EAAiB,GAAGA,eACxBtB,EAAOD,QAAU,SAAUuD,EAAIpB,GAC7B,OAAOZ,EAAenB,KAAKmD,EAAIpB,KAM3B,SAAUlC,EAAQD,GAExB,IAAI2B,EAAO1B,EAAOD,QAAU,CAAE+E,QAAS,UACrB,iBAAPtF,IAAiBA,EAAMkC,IAK5B,SAAU1B,EAAQD,EAASF,GAEjC,IAAI0E,EAAK1E,EAAoB,GACzBkF,EAAalF,EAAoB,IACrCG,EAAOD,QAAUF,EAAoB,GAAK,SAAUsB,EAAQe,EAAKyC,GAC/D,OAAOJ,EAAGC,EAAErD,EAAQe,EAAK6C,EAAW,EAAGJ,KACrC,SAAUxD,EAAQe,EAAKyC,GAEzB,OADAxD,EAAOe,GAAOyC,EACPxD,IAMH,SAAUnB,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B8B,EAAO9B,EAAoB,IAC3BmF,EAAMnF,EAAoB,IAC1BoF,EAAMpF,EAAoB,GAApBA,CAAwB,OAC9BqF,EAAYrF,EAAoB,KAChCsF,EAAY,WACZC,GAAO,GAAKF,GAAWG,MAAMF,GAEjCtF,EAAoB,IAAIyF,cAAgB,SAAUhC,GAChD,OAAO4B,EAAU/E,KAAKmD,KAGvBtD,EAAOD,QAAU,SAAU0E,EAAGvC,EAAKqD,EAAKC,GACvC,IAAIC,EAA2B,mBAAPF,EACpBE,IAAYT,EAAIO,EAAK,SAAW5D,EAAK4D,EAAK,OAAQrD,IAClDuC,EAAEvC,KAASqD,IACXE,IAAYT,EAAIO,EAAKN,IAAQtD,EAAK4D,EAAKN,EAAKR,EAAEvC,GAAO,GAAKuC,EAAEvC,GAAOkD,EAAIM,KAAKC,OAAOzD,MACnFuC,IAAMhD,EACRgD,EAAEvC,GAAOqD,EACCC,EAGDf,EAAEvC,GACXuC,EAAEvC,GAAOqD,EAET5D,EAAK8C,EAAGvC,EAAKqD,WALNd,EAAEvC,GACTP,EAAK8C,EAAGvC,EAAKqD,OAOdtC,SAAS5B,UAAW8D,EAAW,SAASS,WACzC,MAAsB,mBAARC,MAAsBA,KAAKZ,IAAQC,EAAU/E,KAAK0F,SAM5D,SAAU7F,EAAQD,EAASF,GAEjC,IAAIiG,EAAMjG,EAAoB,IAC1BkF,EAAalF,EAAoB,IACjCkG,EAAYlG,EAAoB,IAChCyE,EAAczE,EAAoB,IAClCmF,EAAMnF,EAAoB,IAC1BwE,EAAiBxE,EAAoB,IACrCmG,EAAOtF,OAAOuF,yBAElBlG,EAAQyE,EAAI3E,EAAoB,GAAKmG,EAAO,SAASC,yBAAyBxB,EAAG9B,GAG/E,GAFA8B,EAAIsB,EAAUtB,GACd9B,EAAI2B,EAAY3B,GAAG,GACf0B,EAAgB,IAClB,OAAO2B,EAAKvB,EAAG9B,GACf,MAAOiB,IACT,GAAIoB,EAAIP,EAAG9B,GAAI,OAAOoC,GAAYe,EAAItB,EAAErE,KAAKsE,EAAG9B,GAAI8B,EAAE9B,MAMlD,SAAU3C,EAAQD,EAASF,GAGjC,IAAImF,EAAMnF,EAAoB,IAC1BqG,EAAWrG,EAAoB,GAC/BsG,EAAWtG,EAAoB,GAApBA,CAAwB,YACnCuG,EAAc1F,OAAOW,UAEzBrB,EAAOD,QAAUW,OAAO2F,gBAAkB,SAAU5B,GAElD,OADAA,EAAIyB,EAASzB,GACTO,EAAIP,EAAG0B,GAAkB1B,EAAE0B,GACH,mBAAjB1B,EAAE6B,aAA6B7B,aAAaA,EAAE6B,YAChD7B,EAAE6B,YAAYjF,UACdoD,aAAa/D,OAAS0F,EAAc,OAMzC,SAAUpG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B0G,EAAQ1G,EAAoB,GAC5B+E,EAAU/E,EAAoB,IAC9B2G,EAAO,KAEPC,EAAa,SAAUC,EAAQC,EAAKC,EAAWjC,GACjD,IAAI5B,EAAI4C,OAAOf,EAAQ8B,IACnBG,EAAK,IAAMF,EAEf,MADkB,KAAdC,IAAkBC,GAAM,IAAMD,EAAY,KAAOjB,OAAOhB,GAAOmC,QAAQN,EAAM,UAAY,KACtFK,EAAK,IAAM9D,EAAI,KAAO4D,EAAM,KAErC3G,EAAOD,QAAU,SAAUgH,EAAMpD,GAC/B,IAAIc,EAAI,GACRA,EAAEsC,GAAQpD,EAAK8C,GACf1E,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIgE,EAAM,WACpC,IAAIS,EAAO,GAAGD,GAAM,KACpB,OAAOC,IAASA,EAAKC,eAA0C,EAAzBD,EAAK3B,MAAM,KAAK6B,SACpD,SAAUzC,KAMV,SAAUzE,EAAQD,EAASF,GAGjC,IAAIsH,EAAYtH,EAAoB,IACpCG,EAAOD,QAAU,SAAUqH,EAAIC,EAAMH,GAEnC,GADAC,EAAUC,GACNC,IAAS3H,GAAW,OAAO0H,EAC/B,OAAQF,GACN,KAAK,EAAG,OAAO,SAAUjD,GACvB,OAAOmD,EAAGjH,KAAKkH,EAAMpD,IAEvB,KAAK,EAAG,OAAO,SAAUA,EAAGqD,GAC1B,OAAOF,EAAGjH,KAAKkH,EAAMpD,EAAGqD,IAE1B,KAAK,EAAG,OAAO,SAAUrD,EAAGqD,EAAGjH,GAC7B,OAAO+G,EAAGjH,KAAKkH,EAAMpD,EAAGqD,EAAGjH,IAG/B,OAAO,WACL,OAAO+G,EAAGG,MAAMF,EAAMG,cAOpB,SAAUxH,EAAQD,GAExB,IAAI6F,EAAW,GAAGA,SAElB5F,EAAOD,QAAU,SAAUuD,GACzB,OAAOsC,EAASzF,KAAKmD,GAAImE,MAAM,GAAI,KAM/B,SAAUzH,EAAQD,GAGxB,IAAI2H,EAAOjE,KAAKiE,KACZC,EAAQlE,KAAKkE,MACjB3H,EAAOD,QAAU,SAAUuD,GACzB,OAAOsE,MAAMtE,GAAMA,GAAM,GAAU,EAALA,EAASqE,EAAQD,GAAMpE,KAMjD,SAAUtD,EAAQD,EAASF,GAIjC,IAAI0G,EAAQ1G,EAAoB,GAEhCG,EAAOD,QAAU,SAAU8H,EAAQC,GACjC,QAASD,GAAUtB,EAAM,WAEvBuB,EAAMD,EAAO1H,KAAK,KAAM,aAA6B,GAAK0H,EAAO1H,KAAK,UAOpE,SAAUH,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAGnCG,EAAOD,QAAU,SAAUuD,EAAIP,GAC7B,IAAKM,EAASC,GAAK,OAAOA,EAC1B,IAAI8D,EAAI7B,EACR,GAAIxC,GAAkC,mBAArBqE,EAAK9D,EAAGsC,YAA4BvC,EAASkC,EAAM6B,EAAGjH,KAAKmD,IAAM,OAAOiC,EACzF,GAAgC,mBAApB6B,EAAK9D,EAAGyE,WAA2B1E,EAASkC,EAAM6B,EAAGjH,KAAKmD,IAAM,OAAOiC,EACnF,IAAKxC,GAAkC,mBAArBqE,EAAK9D,EAAGsC,YAA4BvC,EAASkC,EAAM6B,EAAGjH,KAAKmD,IAAM,OAAOiC,EAC1F,MAAMhC,UAAU,6CAMZ,SAAUvD,EAAQD,GAGxBC,EAAOD,QAAU,SAAUuD,GACzB,GAAIA,GAAM5D,GAAW,MAAM6D,UAAU,yBAA2BD,GAChE,OAAOA,IAMH,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B6B,EAAO7B,EAAoB,IAC3B0G,EAAQ1G,EAAoB,GAChCG,EAAOD,QAAU,SAAUiI,EAAKrE,GAC9B,IAAIyD,GAAM1F,EAAKhB,QAAU,IAAIsH,IAAQtH,OAAOsH,GACxC3F,EAAM,GACVA,EAAI2F,GAAOrE,EAAKyD,GAChBrF,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAIgE,EAAM,WAAca,EAAG,KAAQ,SAAU/E,KAMrE,SAAUrC,EAAQD,EAASF,GASjC,IAAIgC,EAAMhC,EAAoB,IAC1BgF,EAAUhF,EAAoB,IAC9BqG,EAAWrG,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BqI,EAAMrI,EAAoB,IAC9BG,EAAOD,QAAU,SAAUoI,EAAMC,GAC/B,IAAIC,EAAiB,GAARF,EACTG,EAAoB,GAARH,EACZI,EAAkB,GAARJ,EACVK,EAAmB,GAARL,EACXM,EAAwB,GAARN,EAChBO,EAAmB,GAARP,GAAaM,EACxBE,EAASP,GAAWF,EACxB,OAAO,SAAUU,EAAOC,EAAYxB,GAQlC,IAPA,IAMI9B,EAAKuD,EANLrE,EAAIyB,EAAS0C,GACblF,EAAOmB,EAAQJ,GACfD,EAAI3C,EAAIgH,EAAYxB,EAAM,GAC1BH,EAASe,EAASvE,EAAKwD,QACvB6B,EAAQ,EACRC,EAASX,EAASM,EAAOC,EAAO1B,GAAUoB,EAAYK,EAAOC,EAAO,GAAKlJ,GAE9DqJ,EAAT7B,EAAgB6B,IAAS,IAAIL,GAAYK,KAASrF,KAEtDoF,EAAMtE,EADNe,EAAM7B,EAAKqF,GACEA,EAAOtE,GAChB0D,GACF,GAAIE,EAAQW,EAAOD,GAASD,OACvB,GAAIA,EAAK,OAAQX,GACpB,KAAK,EAAG,OAAO,EACf,KAAK,EAAG,OAAO5C,EACf,KAAK,EAAG,OAAOwD,EACf,KAAK,EAAGC,EAAOC,KAAK1D,QACf,GAAIiD,EAAU,OAAO,EAGhC,OAAOC,GAAiB,EAAIF,GAAWC,EAAWA,EAAWQ,KAO3D,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIqJ,EAAQrJ,EAAoB,KAC5BsJ,EAActJ,EAAoB,IAEtCG,EAAOD,QAAUW,OAAO0I,MAAQ,SAASA,KAAK3E,GAC5C,OAAOyE,EAAMzE,EAAG0E,KAMZ,SAAUnJ,EAAQD,EAASF,GAGjC,IAAIuE,EAAWvE,EAAoB,GAC/BwJ,EAAMxJ,EAAoB,KAC1BsJ,EAActJ,EAAoB,IAClCsG,EAAWtG,EAAoB,GAApBA,CAAwB,YACnCyJ,EAAQ,aACRxH,EAAY,YAGZyH,EAAa,WAEf,IAIIC,EAJAC,EAAS5J,EAAoB,GAApBA,CAAwB,UACjCI,EAAIkJ,EAAYjC,OAcpB,IAVAuC,EAAOC,MAAMC,QAAU,OACvB9J,EAAoB,IAAI+J,YAAYH,GACpCA,EAAOI,IAAM,eAGbL,EAAiBC,EAAOK,cAAcC,UACvBC,OACfR,EAAeS,MAAMC,uCACrBV,EAAeW,QACfZ,EAAaC,EAAejH,EACrBtC,YAAYsJ,EAAWzH,GAAWqH,EAAYlJ,IACrD,OAAOsJ,KAGTvJ,EAAOD,QAAUW,OAAOiI,QAAU,SAASA,OAAOlE,EAAG2F,GACnD,IAAIpB,EAQJ,OAPU,OAANvE,GACF6E,EAAMxH,GAAasC,EAASK,GAC5BuE,EAAS,IAAIM,EACbA,EAAMxH,GAAa,KAEnBkH,EAAO7C,GAAY1B,GACduE,EAASO,IACTa,IAAe1K,GAAYsJ,EAASK,EAAIL,EAAQoB,KAMnD,SAAUpK,EAAQD,EAASF,GAIjC,GAAIA,EAAoB,GAAI,CAC1B,IAAIwK,EAAUxK,EAAoB,IAC9B4B,EAAS5B,EAAoB,GAC7B0G,EAAQ1G,EAAoB,GAC5BkC,EAAUlC,EAAoB,GAC9ByK,EAASzK,EAAoB,IAC7B0K,EAAU1K,EAAoB,IAC9BgC,EAAMhC,EAAoB,IAC1B2K,EAAa3K,EAAoB,IACjC4K,EAAe5K,EAAoB,IACnC8B,EAAO9B,EAAoB,IAC3B6K,EAAc7K,EAAoB,IAClCqE,EAAYrE,EAAoB,IAChCoI,EAAWpI,EAAoB,GAC/B8K,EAAU9K,EAAoB,KAC9B+K,EAAkB/K,EAAoB,IACtCyE,EAAczE,EAAoB,IAClCmF,EAAMnF,EAAoB,IAC1BgL,EAAUhL,EAAoB,IAC9BwD,EAAWxD,EAAoB,GAC/BqG,EAAWrG,EAAoB,GAC/BiL,EAAcjL,EAAoB,IAClC8I,EAAS9I,EAAoB,IAC7BwG,EAAiBxG,EAAoB,IACrCkL,EAAOlL,EAAoB,IAAI2E,EAC/BwG,EAAYnL,EAAoB,IAChCiE,EAAMjE,EAAoB,IAC1BoL,EAAMpL,EAAoB,GAC1BqL,EAAoBrL,EAAoB,IACxCsL,EAAsBtL,EAAoB,IAC1CuL,EAAqBvL,EAAoB,IACzCwL,EAAiBxL,EAAoB,IACrCyL,EAAYzL,EAAoB,IAChC0L,EAAc1L,EAAoB,IAClC2L,EAAa3L,EAAoB,IACjC4L,EAAY5L,EAAoB,IAChC6L,EAAkB7L,EAAoB,KACtC8L,EAAM9L,EAAoB,GAC1B+L,EAAQ/L,EAAoB,IAC5B0E,EAAKoH,EAAInH,EACTwB,EAAO4F,EAAMpH,EACbqH,EAAapK,EAAOoK,WACpBtI,EAAY9B,EAAO8B,UACnBuI,EAAarK,EAAOqK,WACpBC,EAAe,cACfC,EAAgB,SAAWD,EAC3BE,EAAoB,oBACpBnK,EAAY,YACZoK,EAAaC,MAAMrK,GACnBsK,EAAe7B,EAAQ8B,YACvBC,EAAY/B,EAAQgC,SACpBC,EAAetB,EAAkB,GACjCuB,GAAcvB,EAAkB,GAChCwB,GAAYxB,EAAkB,GAC9ByB,GAAazB,EAAkB,GAC/B0B,GAAY1B,EAAkB,GAC9B2B,GAAiB3B,EAAkB,GACnC4B,GAAgB3B,GAAoB,GACpC4B,GAAe5B,GAAoB,GACnC6B,GAAc3B,EAAe4B,OAC7BC,GAAY7B,EAAejC,KAC3B+D,GAAe9B,EAAe+B,QAC9BC,GAAmBnB,EAAWoB,YAC9BC,GAAcrB,EAAWsB,OACzBC,GAAmBvB,EAAWwB,YAC9BC,GAAYzB,EAAWxG,KACvBkI,GAAY1B,EAAW2B,KACvBC,GAAa5B,EAAWzE,MACxBsG,GAAgB7B,EAAWtG,SAC3BoI,GAAsB9B,EAAW+B,eACjCC,GAAWjD,EAAI,YACfkD,GAAMlD,EAAI,eACVmD,GAAoBtK,EAAI,qBACxBuK,GAAkBvK,EAAI,mBACtBwK,GAAmBhE,EAAOiE,OAC1BC,GAAclE,EAAOmE,MACrBC,GAAOpE,EAAOoE,KACdC,GAAe,gBAEfC,GAAO1D,EAAkB,EAAG,SAAUzG,EAAGyC,GAC3C,OAAO2H,GAASzD,EAAmB3G,EAAGA,EAAE4J,KAAmBnH,KAGzD4H,GAAgBvI,EAAM,WAExB,OAA0D,IAAnD,IAAIuF,EAAW,IAAIiD,YAAY,CAAC,IAAIC,QAAQ,KAGjDC,KAAenD,KAAgBA,EAAWhK,GAAWoN,KAAO3I,EAAM,WACpE,IAAIuF,EAAW,GAAGoD,IAAI,MAGpBC,GAAW,SAAU7L,EAAI8L,GAC3B,IAAIC,EAASnL,EAAUZ,GACvB,GAAI+L,EAAS,GAAKA,EAASD,EAAO,MAAMvD,EAAW,iBACnD,OAAOwD,GAGLC,GAAW,SAAUhM,GACvB,GAAID,EAASC,IAAOkL,MAAelL,EAAI,OAAOA,EAC9C,MAAMC,EAAUD,EAAK,2BAGnBuL,GAAW,SAAUU,EAAGrI,GAC1B,KAAM7D,EAASkM,IAAMnB,MAAqBmB,GACxC,MAAMhM,EAAU,wCAChB,OAAO,IAAIgM,EAAErI,IAGbsI,GAAkB,SAAU/K,EAAGgL,GACjC,OAAOC,GAAStE,EAAmB3G,EAAGA,EAAE4J,KAAmBoB,IAGzDC,GAAW,SAAUH,EAAGE,GAI1B,IAHA,IAAI1G,EAAQ,EACR7B,EAASuI,EAAKvI,OACd8B,EAAS6F,GAASU,EAAGrI,GACT6B,EAAT7B,GAAgB8B,EAAOD,GAAS0G,EAAK1G,KAC5C,OAAOC,GAGL2G,GAAY,SAAUrM,EAAIpB,EAAK0N,GACjCrL,EAAGjB,EAAIpB,EAAK,CAAEpB,IAAK,WAAc,OAAO+E,KAAKgK,GAAGD,OAG9CE,GAAQ,SAASC,KAAK9N,GACxB,IAKIhC,EAAGiH,EAAQ+F,EAAQjE,EAAQgH,EAAMC,EALjCxL,EAAIyB,EAASjE,GACbiO,EAAO1I,UAAUN,OACjBiJ,EAAe,EAAPD,EAAW1I,UAAU,GAAK9H,GAClC0Q,EAAUD,IAAUzQ,GACpB2Q,EAASrF,EAAUvG,GAEvB,GAAI4L,GAAU3Q,KAAcoL,EAAYuF,GAAS,CAC/C,IAAKJ,EAAWI,EAAOlQ,KAAKsE,GAAIwI,EAAS,GAAIhN,EAAI,IAAK+P,EAAOC,EAASK,QAAQC,KAAMtQ,IAClFgN,EAAOhE,KAAK+G,EAAKrL,OACjBF,EAAIwI,EAGR,IADImD,GAAkB,EAAPF,IAAUC,EAAQtO,EAAIsO,EAAO3I,UAAU,GAAI,IACrDvH,EAAI,EAAGiH,EAASe,EAASxD,EAAEyC,QAAS8B,EAAS6F,GAAShJ,KAAMqB,GAAkBjH,EAATiH,EAAYjH,IACpF+I,EAAO/I,GAAKmQ,EAAUD,EAAM1L,EAAExE,GAAIA,GAAKwE,EAAExE,GAE3C,OAAO+I,GAGLwH,GAAM,SAASC,KAIjB,IAHA,IAAI1H,EAAQ,EACR7B,EAASM,UAAUN,OACnB8B,EAAS6F,GAAShJ,KAAMqB,GACZ6B,EAAT7B,GAAgB8B,EAAOD,GAASvB,UAAUuB,KACjD,OAAOC,GAIL0H,KAAkB5E,GAAcvF,EAAM,WAAcyH,GAAoB7N,KAAK,IAAI2L,EAAW,MAE5F6E,GAAkB,SAAS1C,iBAC7B,OAAOD,GAAoBzG,MAAMmJ,GAAgB5C,GAAW3N,KAAKmP,GAASzJ,OAASyJ,GAASzJ,MAAO2B,YAGjGoJ,GAAQ,CACVC,WAAY,SAASA,WAAW/N,EAAQgO,GACtC,OAAOpF,EAAgBvL,KAAKmP,GAASzJ,MAAO/C,EAAQgO,EAA0B,EAAnBtJ,UAAUN,OAAaM,UAAU,GAAK9H,KAEnGqR,MAAO,SAASA,MAAMlI,GACpB,OAAO8D,GAAW2C,GAASzJ,MAAOgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,KAEtFsR,KAAM,SAASA,KAAKrM,GAClB,OAAO8G,EAAUlE,MAAM+H,GAASzJ,MAAO2B,YAEzCyJ,OAAQ,SAASA,OAAOpI,GACtB,OAAO2G,GAAgB3J,KAAM4G,GAAY6C,GAASzJ,MAAOgD,EACpC,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,MAE1CwR,KAAM,SAASA,KAAKC,GAClB,OAAOvE,GAAU0C,GAASzJ,MAAOsL,EAA8B,EAAnB3J,UAAUN,OAAaM,UAAU,GAAK9H,KAEpF0R,UAAW,SAASA,UAAUD,GAC5B,OAAOtE,GAAeyC,GAASzJ,MAAOsL,EAA8B,EAAnB3J,UAAUN,OAAaM,UAAU,GAAK9H,KAEzF2R,QAAS,SAASA,QAAQxI,GACxB2D,EAAa8C,GAASzJ,MAAOgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,KAEjF4R,QAAS,SAASA,QAAQC,GACxB,OAAOxE,GAAauC,GAASzJ,MAAO0L,EAAkC,EAAnB/J,UAAUN,OAAaM,UAAU,GAAK9H,KAE3F8R,SAAU,SAASA,SAASD,GAC1B,OAAOzE,GAAcwC,GAASzJ,MAAO0L,EAAkC,EAAnB/J,UAAUN,OAAaM,UAAU,GAAK9H,KAE5FgG,KAAM,SAASA,KAAK+L,GAClB,OAAO9D,GAAUpG,MAAM+H,GAASzJ,MAAO2B,YAEzC8F,YAAa,SAASA,YAAYiE,GAChC,OAAOlE,GAAiB9F,MAAM+H,GAASzJ,MAAO2B,YAEhDkK,IAAK,SAASA,IAAIvB,GAChB,OAAOvB,GAAKU,GAASzJ,MAAOsK,EAA0B,EAAnB3I,UAAUN,OAAaM,UAAU,GAAK9H,KAE3E8N,OAAQ,SAASA,OAAO3E,GACtB,OAAO0E,GAAYhG,MAAM+H,GAASzJ,MAAO2B,YAE3CkG,YAAa,SAASA,YAAY7E,GAChC,OAAO4E,GAAiBlG,MAAM+H,GAASzJ,MAAO2B,YAEhDmK,QAAS,SAASA,UAMhB,IALA,IAIIhN,EAJA0C,EAAOxB,KACPqB,EAASoI,GAASjI,GAAMH,OACxB0K,EAASnO,KAAKkE,MAAMT,EAAS,GAC7B6B,EAAQ,EAELA,EAAQ6I,GACbjN,EAAQ0C,EAAK0B,GACb1B,EAAK0B,KAAW1B,IAAOH,GACvBG,EAAKH,GAAUvC,EACf,OAAO0C,GAEXwK,KAAM,SAASA,KAAKhJ,GAClB,OAAO6D,GAAU4C,GAASzJ,MAAOgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,KAErFmO,KAAM,SAASA,KAAKiE,GAClB,OAAOlE,GAAUzN,KAAKmP,GAASzJ,MAAOiM,IAExCC,SAAU,SAASA,SAASC,EAAOC,GACjC,IAAIxN,EAAI6K,GAASzJ,MACbqB,EAASzC,EAAEyC,OACXgL,EAAStH,EAAgBoH,EAAO9K,GACpC,OAAO,IAAKkE,EAAmB3G,EAAGA,EAAE4J,KAA7B,CACL5J,EAAEuK,OACFvK,EAAE0N,WAAaD,EAASzN,EAAEwH,kBAC1BhE,GAAUgK,IAAQvS,GAAYwH,EAAS0D,EAAgBqH,EAAK/K,IAAWgL,MAKzEE,GAAS,SAAS3K,MAAMqJ,EAAOmB,GACjC,OAAOzC,GAAgB3J,KAAMiI,GAAW3N,KAAKmP,GAASzJ,MAAOiL,EAAOmB,KAGlEI,GAAO,SAASnD,IAAIoD,GACtBhD,GAASzJ,MACT,IAAIwJ,EAASF,GAAS3H,UAAU,GAAI,GAChCN,EAASrB,KAAKqB,OACd2C,EAAM3D,EAASoM,GACfC,EAAMtK,EAAS4B,EAAI3C,QACnB6B,EAAQ,EACZ,GAAmB7B,EAAfqL,EAAMlD,EAAiB,MAAMxD,EAAW8C,IAC5C,KAAO5F,EAAQwJ,GAAK1M,KAAKwJ,EAAStG,GAASc,EAAId,MAG7CyJ,GAAa,CACfpF,QAAS,SAASA,UAChB,OAAOD,GAAahN,KAAKmP,GAASzJ,QAEpCuD,KAAM,SAASA,OACb,OAAO8D,GAAU/M,KAAKmP,GAASzJ,QAEjCoH,OAAQ,SAASA,SACf,OAAOD,GAAY7M,KAAKmP,GAASzJ,SAIjC4M,GAAY,SAAU3P,EAAQZ,GAChC,OAAOmB,EAASP,IACXA,EAAO0L,KACO,iBAAPtM,GACPA,KAAOY,GACP6C,QAAQzD,IAAQyD,OAAOzD,IAE1BwQ,GAAW,SAASzM,yBAAyBnD,EAAQZ,GACvD,OAAOuQ,GAAU3P,EAAQZ,EAAMoC,EAAYpC,GAAK,IAC5CuI,EAAa,EAAG3H,EAAOZ,IACvB8D,EAAKlD,EAAQZ,IAEfyQ,GAAW,SAAShS,eAAemC,EAAQZ,EAAK0Q,GAClD,QAAIH,GAAU3P,EAAQZ,EAAMoC,EAAYpC,GAAK,KACxCmB,EAASuP,IACT5N,EAAI4N,EAAM,WACT5N,EAAI4N,EAAM,QACV5N,EAAI4N,EAAM,QAEVA,EAAKhS,cACJoE,EAAI4N,EAAM,cAAeA,EAAKC,UAC9B7N,EAAI4N,EAAM,gBAAiBA,EAAK/R,WAI9B0D,EAAGzB,EAAQZ,EAAK0Q,IAFvB9P,EAAOZ,GAAO0Q,EAAKjO,MACZ7B,IAINwL,KACH1C,EAAMpH,EAAIkO,GACV/G,EAAInH,EAAImO,IAGV5Q,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK+L,GAAkB,SAAU,CAC3DrI,yBAA0ByM,GAC1B/R,eAAgBgS,KAGdpM,EAAM,WAAcwH,GAAc5N,KAAK,QACzC4N,GAAgBC,GAAsB,SAASpI,WAC7C,OAAO+H,GAAUxN,KAAK0F,QAI1B,IAAIiN,GAAwBpI,EAAY,GAAIkG,IAC5ClG,EAAYoI,GAAuBN,IACnC7Q,EAAKmR,GAAuB5E,GAAUsE,GAAWvF,QACjDvC,EAAYoI,GAAuB,CACjCrL,MAAO2K,GACPlD,IAAKmD,GACL/L,YAAa,aACbV,SAAUmI,GACVE,eAAgB0C,KAElBhB,GAAUmD,GAAuB,SAAU,KAC3CnD,GAAUmD,GAAuB,aAAc,KAC/CnD,GAAUmD,GAAuB,aAAc,KAC/CnD,GAAUmD,GAAuB,SAAU,KAC3CvO,EAAGuO,GAAuB3E,GAAK,CAC7BrN,IAAK,WAAc,OAAO+E,KAAK2I,OAIjCxO,EAAOD,QAAU,SAAUiI,EAAKoH,EAAO2D,EAASC,GAE9C,IAAIjM,EAAOiB,IADXgL,IAAYA,GACgB,UAAY,IAAM,QAC1CC,EAAS,MAAQjL,EACjBkL,EAAS,MAAQlL,EACjBmL,EAAa1R,EAAOsF,GACpBqM,EAAOD,GAAc,GACrBE,EAAMF,GAAc9M,EAAe8M,GAEnC1O,EAAI,GACJ6O,EAAsBH,GAAcA,EAAWrR,GAU/CyR,EAAa,SAAUlM,EAAM0B,GAC/BxE,EAAG8C,EAAM0B,EAAO,CACdjI,IAAK,WACH,OAXA0S,EAWc3N,KAXFgK,IACJ4D,EAAER,GAUUlK,EAVMqG,EAAQoE,EAAK/S,EAAGqO,IAFnC,IACP0E,GAaFtE,IAAK,SAAUvK,GACb,OAXuBoE,EAWHA,EAXUpE,EAWHA,EAV3B6O,EAUc3N,KAVFgK,GACZmD,IAASrO,GAASA,EAAQlB,KAAKiQ,MAAM/O,IAAU,EAAI,EAAY,IAARA,EAAe,IAAe,IAARA,QACjF6O,EAAKC,EAAEP,GAAQnK,EAAQqG,EAAQoE,EAAK/S,EAAGkE,EAAOmK,IAHnC,IAAgB/F,EAAOpE,EAC9B6O,GAYF3S,YAAY,MApBFsS,IAAe7I,EAAOqJ,KAwBlCR,EAAaJ,EAAQ,SAAU1L,EAAMmM,EAAMI,EAASC,GAClDrJ,EAAWnD,EAAM8L,EAAYpM,EAAM,MACnC,IAEIiI,EAAQ8E,EAAY5M,EAAQ6M,EAF5BhL,EAAQ,EACRsG,EAAS,EAEb,GAAKhM,EAASmQ,GAIP,CAAA,KAAIA,aAAgBpH,IAAiB2H,EAAQlJ,EAAQ2I,KAAUzH,GAAgBgI,GAAS/H,GAaxF,OAAIwC,MAAegF,EACjB9D,GAASyD,EAAYK,GAErB1D,GAAM3P,KAAKgT,EAAYK,GAf9BxE,EAASwE,EACTnE,EAASF,GAASyE,EAASxE,GAC3B,IAAI4E,EAAOR,EAAKM,WAChB,GAAID,IAAYnU,GAAW,CACzB,GAAIsU,EAAO5E,EAAO,MAAMvD,EAAW8C,IAEnC,IADAmF,EAAaE,EAAO3E,GACH,EAAG,MAAMxD,EAAW8C,SAGrC,GAA0BqF,GAD1BF,EAAa7L,EAAS4L,GAAWzE,GAChBC,EAAe,MAAMxD,EAAW8C,IAEnDzH,EAAS4M,EAAa1E,OAftBlI,EAASyD,EAAQ6I,GAEjBxE,EAAS,IAAI5C,EADb0H,EAAa5M,EAASkI,GA2BxB,IAPAzN,EAAK0F,EAAM,KAAM,CACfC,EAAG0H,EACHvO,EAAG4O,EACHnP,EAAG4T,EACHlQ,EAAGsD,EACHuM,EAAG,IAAInH,EAAU0C,KAEZjG,EAAQ7B,GAAQqM,EAAWlM,EAAM0B,OAE1CuK,EAAsBH,EAAWrR,GAAa6G,EAAOmK,IACrDnR,EAAK2R,EAAqB,cAAeH,IAC/B5M,EAAM,WAChB4M,EAAW,MACN5M,EAAM,WACX,IAAI4M,GAAY,MACX5H,EAAY,SAAU0I,GAC3B,IAAId,EACJ,IAAIA,EAAW,MACf,IAAIA,EAAW,KACf,IAAIA,EAAWc,KACd,KACDd,EAAaJ,EAAQ,SAAU1L,EAAMmM,EAAMI,EAASC,GAElD,IAAIE,EAGJ,OAJAvJ,EAAWnD,EAAM8L,EAAYpM,GAIxB1D,EAASmQ,GACVA,aAAgBpH,IAAiB2H,EAAQlJ,EAAQ2I,KAAUzH,GAAgBgI,GAAS/H,EAC/E6H,IAAYnU,GACf,IAAI0T,EAAKI,EAAMrE,GAASyE,EAASxE,GAAQyE,GACzCD,IAAYlU,GACV,IAAI0T,EAAKI,EAAMrE,GAASyE,EAASxE,IACjC,IAAIgE,EAAKI,GAEbhF,MAAegF,EAAa9D,GAASyD,EAAYK,GAC9C1D,GAAM3P,KAAKgT,EAAYK,GATF,IAAIJ,EAAKzI,EAAQ6I,MAW/ChH,EAAa6G,IAAQpQ,SAAS5B,UAAY0J,EAAKqI,GAAMc,OAAOnJ,EAAKsI,IAAQtI,EAAKqI,GAAO,SAAUlR,GACvFA,KAAOiR,GAAaxR,EAAKwR,EAAYjR,EAAKkR,EAAKlR,MAEvDiR,EAAWrR,GAAawR,EACnBjJ,IAASiJ,EAAoBhN,YAAc6M,IAElD,IAAIgB,EAAkBb,EAAoBpF,IACtCkG,IAAsBD,IACI,UAAxBA,EAAgB5T,MAAoB4T,EAAgB5T,MAAQb,IAC9D2U,EAAY7B,GAAWvF,OAC3BtL,EAAKwR,EAAY/E,IAAmB,GACpCzM,EAAK2R,EAAqB9E,GAAazH,GACvCpF,EAAK2R,EAAqB5E,IAAM,GAChC/M,EAAK2R,EAAqBjF,GAAiB8E,IAEvCH,EAAU,IAAIG,EAAW,GAAGhF,KAAQpH,EAASoH,MAAOmF,IACtD/O,EAAG+O,EAAqBnF,GAAK,CAC3BrN,IAAK,WAAc,OAAOiG,KAM9BhF,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,IAFxCkC,EAAEsC,GAAQoM,IAEiDC,GAAO3O,GAElE1C,EAAQA,EAAQgB,EAAGgE,EAAM,CACvBkF,kBAAmBmD,IAGrBrN,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAIgE,EAAM,WAAc6M,EAAK3C,GAAGtQ,KAAKgT,EAAY,KAAQpM,EAAM,CACzFgJ,KAAMD,GACNW,GAAID,KAGAvE,KAAqBqH,GAAsB3R,EAAK2R,EAAqBrH,EAAmBmD,GAE9FrN,EAAQA,EAAQY,EAAGoE,EAAM6J,IAEzBpF,EAAWzE,GAEXhF,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI0M,GAAYlI,EAAM,CAAEmI,IAAKmD,KAEzDtQ,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK6R,EAAmBrN,EAAMyL,IAErDnI,GAAWiJ,EAAoB1N,UAAYmI,KAAeuF,EAAoB1N,SAAWmI,IAE9FhM,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIgE,EAAM,WACpC,IAAI4M,EAAW,GAAG1L,UAChBV,EAAM,CAAEU,MAAO2K,KAEnBrQ,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKgE,EAAM,WACrC,MAAO,CAAC,EAAG,GAAG0H,kBAAoB,IAAIkF,EAAW,CAAC,EAAG,IAAIlF,qBACpD1H,EAAM,WACX+M,EAAoBrF,eAAe9N,KAAK,CAAC,EAAG,OACzC4G,EAAM,CAAEkH,eAAgB0C,KAE7BrF,EAAUvE,GAAQqN,EAAoBD,EAAkBE,EACnDhK,GAAY+J,GAAmBzS,EAAK2R,EAAqBpF,GAAUmG,SAErErU,EAAOD,QAAU,cAKlB,SAAUC,EAAQD,EAASF,GAEjC,IAAIyU,EAAMzU,EAAoB,KAC1BkC,EAAUlC,EAAoB,GAC9B0U,EAAS1U,EAAoB,GAApBA,CAAwB,YACjCgE,EAAQ0Q,EAAO1Q,QAAU0Q,EAAO1Q,MAAQ,IAAKhE,EAAoB,OAEjE2U,EAAyB,SAAU1R,EAAQ2R,EAAW9L,GACxD,IAAI+L,EAAiB7Q,EAAM/C,IAAIgC,GAC/B,IAAK4R,EAAgB,CACnB,IAAK/L,EAAQ,OAAOjJ,GACpBmE,EAAMqL,IAAIpM,EAAQ4R,EAAiB,IAAIJ,GAEzC,IAAIK,EAAcD,EAAe5T,IAAI2T,GACrC,IAAKE,EAAa,CAChB,IAAKhM,EAAQ,OAAOjJ,GACpBgV,EAAexF,IAAIuF,EAAWE,EAAc,IAAIL,GAChD,OAAOK,GA0BX3U,EAAOD,QAAU,CACf8D,MAAOA,EACP6N,IAAK8C,EACLxP,IA3B2B,SAAU4P,EAAanQ,EAAG9B,GACrD,IAAIkS,EAAcL,EAAuB/P,EAAG9B,GAAG,GAC/C,OAAOkS,IAAgBnV,IAAoBmV,EAAY7P,IAAI4P,IA0B3D9T,IAxB2B,SAAU8T,EAAanQ,EAAG9B,GACrD,IAAIkS,EAAcL,EAAuB/P,EAAG9B,GAAG,GAC/C,OAAOkS,IAAgBnV,GAAYA,GAAYmV,EAAY/T,IAAI8T,IAuB/D1F,IArB8B,SAAU0F,EAAaE,EAAerQ,EAAG9B,GACvE6R,EAAuB/P,EAAG9B,GAAG,GAAMuM,IAAI0F,EAAaE,IAqBpD1L,KAnB4B,SAAUtG,EAAQ2R,GAC9C,IAAII,EAAcL,EAAuB1R,EAAQ2R,GAAW,GACxDrL,EAAO,GAEX,OADIyL,GAAaA,EAAYxD,QAAQ,SAAU0D,EAAG7S,GAAOkH,EAAKH,KAAK/G,KAC5DkH,GAgBPlH,IAdc,SAAUoB,GACxB,OAAOA,IAAO5D,IAA0B,iBAAN4D,EAAiBA,EAAKqC,OAAOrC,IAc/DjB,IAZQ,SAAUoC,GAClB1C,EAAQA,EAAQgB,EAAG,UAAW0B,MAiB1B,SAAUzE,EAAQD,GAExBC,EAAOD,QAAU,SAAUiV,EAAQrQ,GACjC,MAAO,CACL9D,aAAuB,EAATmU,GACdpU,eAAyB,EAAToU,GAChBnC,WAAqB,EAATmC,GACZrQ,MAAOA,KAOL,SAAU3E,EAAQD,GAExBC,EAAOD,SAAU,GAKX,SAAUC,EAAQD,EAASF,GAEjC,IAAIoV,EAAOpV,EAAoB,GAApBA,CAAwB,QAC/BwD,EAAWxD,EAAoB,GAC/BmF,EAAMnF,EAAoB,IAC1BqV,EAAUrV,EAAoB,GAAG2E,EACjC2Q,EAAK,EACLC,EAAe1U,OAAO0U,cAAgB,WACxC,OAAO,GAELC,GAAUxV,EAAoB,EAApBA,CAAuB,WACnC,OAAOuV,EAAa1U,OAAO4U,kBAAkB,OAE3CC,EAAU,SAAUjS,GACtB4R,EAAQ5R,EAAI2R,EAAM,CAAEtQ,MAAO,CACzB1E,EAAG,OAAQkV,EACXK,EAAG,OAgCHC,EAAOzV,EAAOD,QAAU,CAC1BiI,IAAKiN,EACLS,MAAM,EACNC,QAhCY,SAAUrS,EAAIqF,GAE1B,IAAKtF,EAASC,GAAK,MAAoB,iBAANA,EAAiBA,GAAmB,iBAANA,EAAiB,IAAM,KAAOA,EAC7F,IAAK0B,EAAI1B,EAAI2R,GAAO,CAElB,IAAKG,EAAa9R,GAAK,MAAO,IAE9B,IAAKqF,EAAQ,MAAO,IAEpB4M,EAAQjS,GAER,OAAOA,EAAG2R,GAAMhV,GAsBlB2V,QApBY,SAAUtS,EAAIqF,GAC1B,IAAK3D,EAAI1B,EAAI2R,GAAO,CAElB,IAAKG,EAAa9R,GAAK,OAAO,EAE9B,IAAKqF,EAAQ,OAAO,EAEpB4M,EAAQjS,GAER,OAAOA,EAAG2R,GAAMO,GAYlBK,SATa,SAAUvS,GAEvB,OADI+R,GAAUI,EAAKC,MAAQN,EAAa9R,KAAQ0B,EAAI1B,EAAI2R,IAAOM,EAAQjS,GAChEA,KAaH,SAAUtD,EAAQD,EAASF,GAGjC,IAAIiW,EAAMjW,EAAoB,IAC1BsO,EAAMtO,EAAoB,EAApBA,CAAuB,eAE7BkW,EAAkD,aAA5CD,EAAI,WAAc,OAAOtO,UAArB,IASdxH,EAAOD,QAAU,SAAUuD,GACzB,IAAImB,EAAGuR,EAAGnT,EACV,OAAOS,IAAO5D,GAAY,YAAqB,OAAP4D,EAAc,OAEN,iBAApC0S,EAVD,SAAU1S,EAAIpB,GACzB,IACE,OAAOoB,EAAGpB,GACV,MAAO0B,KAOOqS,CAAOxR,EAAI/D,OAAO4C,GAAK6K,IAAoB6H,EAEvDD,EAAMD,EAAIrR,GAEM,WAAf5B,EAAIiT,EAAIrR,KAAsC,mBAAZA,EAAEyR,OAAuB,YAAcrT,IAM1E,SAAU7C,EAAQD,EAASF,GAGjC,IAAIsW,EAActW,EAAoB,EAApBA,CAAuB,eACrCqM,EAAaC,MAAM9K,UACnB6K,EAAWiK,IAAgBzW,IAAWG,EAAoB,GAApBA,CAAwBqM,EAAYiK,EAAa,IAC3FnW,EAAOD,QAAU,SAAUmC,GACzBgK,EAAWiK,GAAajU,IAAO,IAM3B,SAAUlC,EAAQD,EAASF,GAEjC,IAAIgC,EAAMhC,EAAoB,IAC1BM,EAAON,EAAoB,KAC3BiL,EAAcjL,EAAoB,IAClCuE,EAAWvE,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BmL,EAAYnL,EAAoB,IAChCuW,EAAQ,GACRC,EAAS,IACTtW,EAAUC,EAAOD,QAAU,SAAUuW,EAAUlJ,EAAShG,EAAIC,EAAM6G,GACpE,IAGIhH,EAAQ8I,EAAMC,EAAUjH,EAHxBqH,EAASnC,EAAW,WAAc,OAAOoI,GAActL,EAAUsL,GACjE9R,EAAI3C,EAAIuF,EAAIC,EAAM+F,EAAU,EAAI,GAChCrE,EAAQ,EAEZ,GAAqB,mBAAVsH,EAAsB,MAAM9M,UAAU+S,EAAW,qBAE5D,GAAIxL,EAAYuF,IAAS,IAAKnJ,EAASe,EAASqO,EAASpP,QAAkB6B,EAAT7B,EAAgB6B,IAEhF,IADAC,EAASoE,EAAU5I,EAAEJ,EAAS4L,EAAOsG,EAASvN,IAAQ,GAAIiH,EAAK,IAAMxL,EAAE8R,EAASvN,OACjEqN,GAASpN,IAAWqN,EAAQ,OAAOrN,OAC7C,IAAKiH,EAAWI,EAAOlQ,KAAKmW,KAAatG,EAAOC,EAASK,QAAQC,MAEtE,IADAvH,EAAS7I,EAAK8P,EAAUzL,EAAGwL,EAAKrL,MAAOyI,MACxBgJ,GAASpN,IAAWqN,EAAQ,OAAOrN,IAG9CoN,MAAQA,EAChBrW,EAAQsW,OAASA,GAKX,SAAUrW,EAAQD,GAExB,IAAIoV,EAAK,EACLoB,EAAK9S,KAAK+S,SACdxW,EAAOD,QAAU,SAAUmC,GACzB,MAAO,UAAUgS,OAAOhS,IAAQxC,GAAY,GAAKwC,EAAK,QAASiT,EAAKoB,GAAI3Q,SAAS,OAM7E,SAAU5F,EAAQD,EAASF,GAEjC,IAAIqE,EAAYrE,EAAoB,IAChC4W,EAAMhT,KAAKgT,IACXtS,EAAMV,KAAKU,IACfnE,EAAOD,QAAU,SAAUgJ,EAAO7B,GAEhC,OADA6B,EAAQ7E,EAAU6E,IACH,EAAI0N,EAAI1N,EAAQ7B,EAAQ,GAAK/C,EAAI4E,EAAO7B,KAMnD,SAAUlH,EAAQD,EAASF,GAGjC,IAAIqJ,EAAQrJ,EAAoB,KAC5B6W,EAAa7W,EAAoB,IAAIqU,OAAO,SAAU,aAE1DnU,EAAQyE,EAAI9D,OAAOiW,qBAAuB,SAASA,oBAAoBlS,GACrE,OAAOyE,EAAMzE,EAAGiS,KAMZ,SAAU1W,EAAQD,GAExBC,EAAOD,QAAU,IAKX,SAAUC,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7B0E,EAAK1E,EAAoB,GACzB+W,EAAc/W,EAAoB,GAClCgX,EAAUhX,EAAoB,EAApBA,CAAuB,WAErCG,EAAOD,QAAU,SAAUiI,GACzB,IAAIuH,EAAI9N,EAAOuG,GACX4O,GAAerH,IAAMA,EAAEsH,IAAUtS,EAAGC,EAAE+K,EAAGsH,EAAS,CACpDjW,cAAc,EACdE,IAAK,WAAc,OAAO+E,UAOxB,SAAU7F,EAAQD,GAExBC,EAAOD,QAAU,SAAUuD,EAAIwT,EAAavW,EAAMwW,GAChD,KAAMzT,aAAcwT,IAAiBC,IAAmBrX,IAAaqX,KAAkBzT,EACrF,MAAMC,UAAUhD,EAAO,2BACvB,OAAO+C,IAML,SAAUtD,EAAQD,EAASF,GAEjC,IAAI+B,EAAW/B,EAAoB,IACnCG,EAAOD,QAAU,SAAU+C,EAAQ+G,EAAKrE,GACtC,IAAK,IAAItD,KAAO2H,EAAKjI,EAASkB,EAAQZ,EAAK2H,EAAI3H,GAAMsD,GACrD,OAAO1C,IAMH,SAAU9C,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GACnCG,EAAOD,QAAU,SAAUuD,EAAI6E,GAC7B,IAAK9E,EAASC,IAAOA,EAAG0T,KAAO7O,EAAM,MAAM5E,UAAU,0BAA4B4E,EAAO,cACxF,OAAO7E,IAMH,SAAUtD,EAAQD,EAASF,GAEjC,IAAIoX,EAAMpX,EAAoB,GAAG2E,EAC7BQ,EAAMnF,EAAoB,IAC1BsO,EAAMtO,EAAoB,EAApBA,CAAuB,eAEjCG,EAAOD,QAAU,SAAUuD,EAAIqD,EAAKuQ,GAC9B5T,IAAO0B,EAAI1B,EAAK4T,EAAO5T,EAAKA,EAAGjC,UAAW8M,IAAM8I,EAAI3T,EAAI6K,EAAK,CAAEvN,cAAc,EAAM+D,MAAOgC,MAM1F,SAAU3G,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAU/E,EAAoB,IAC9B0G,EAAQ1G,EAAoB,GAC5BsX,EAAStX,EAAoB,IAC7BuX,EAAQ,IAAMD,EAAS,IAEvBE,EAAQC,OAAO,IAAMF,EAAQA,EAAQ,KACrCG,EAAQD,OAAOF,EAAQA,EAAQ,MAE/BI,EAAW,SAAUxP,EAAKrE,EAAM8T,GAClC,IAAIpV,EAAM,GACNqV,EAAQnR,EAAM,WAChB,QAAS4Q,EAAOnP,MAPV,MAAA,KAOwBA,OAE5BZ,EAAK/E,EAAI2F,GAAO0P,EAAQ/T,EAAKgU,GAAQR,EAAOnP,GAC5CyP,IAAOpV,EAAIoV,GAASrQ,GACxBrF,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAImV,EAAO,SAAUrV,IAM/CsV,EAAOH,EAASG,KAAO,SAAUjR,EAAQyB,GAI3C,OAHAzB,EAASf,OAAOf,EAAQ8B,IACb,EAAPyB,IAAUzB,EAASA,EAAOI,QAAQuQ,EAAO,KAClC,EAAPlP,IAAUzB,EAASA,EAAOI,QAAQyQ,EAAO,KACtC7Q,GAGT1G,EAAOD,QAAUyX,GAKX,SAAUxX,EAAQD,EAASF,GAEjC,IAAI6B,EAAO7B,EAAoB,IAC3B4B,EAAS5B,EAAoB,GAC7B+X,EAAS,qBACT/T,EAAQpC,EAAOmW,KAAYnW,EAAOmW,GAAU,KAE/C5X,EAAOD,QAAU,SAAUmC,EAAKyC,GAC/B,OAAOd,EAAM3B,KAAS2B,EAAM3B,GAAOyC,IAAUjF,GAAYiF,EAAQ,MAChE,WAAY,IAAIsE,KAAK,CACtBnE,QAASpD,EAAKoD,QACd+S,KAAMhY,EAAoB,IAAM,OAAS,SACzCiY,UAAW,0CAMP,SAAU9X,EAAQD,EAASF,GAGjC,IAAIiW,EAAMjW,EAAoB,IAE9BG,EAAOD,QAAUW,OAAO,KAAKqX,qBAAqB,GAAKrX,OAAS,SAAU4C,GACxE,MAAkB,UAAXwS,EAAIxS,GAAkBA,EAAG+B,MAAM,IAAM3E,OAAO4C,KAM/C,SAAUtD,EAAQD,GAExBA,EAAQyE,EAAI,GAAGuT,sBAKT,SAAU/X,EAAQD,EAASF,GAEjC,IAAIgL,EAAUhL,EAAoB,IAC9BqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCyL,EAAYzL,EAAoB,IACpCG,EAAOD,QAAUF,EAAoB,IAAImY,kBAAoB,SAAU1U,GACrE,GAAIA,GAAM5D,GAAW,OAAO4D,EAAG4K,IAC1B5K,EAAG,eACHgI,EAAUT,EAAQvH,MAMnB,SAAUtD,EAAQD,EAASF,GAKjC,IAAIuE,EAAWvE,EAAoB,GACnCG,EAAOD,QAAU,WACf,IAAIsH,EAAOjD,EAASyB,MAChBmD,EAAS,GAMb,OALI3B,EAAK5F,SAAQuH,GAAU,KACvB3B,EAAK4Q,aAAYjP,GAAU,KAC3B3B,EAAK6Q,YAAWlP,GAAU,KAC1B3B,EAAK8Q,UAASnP,GAAU,KACxB3B,EAAK+Q,SAAQpP,GAAU,KACpBA,IAMH,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIuE,EAAWvE,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChCgX,EAAUhX,EAAoB,EAApBA,CAAuB,WACrCG,EAAOD,QAAU,SAAU0E,EAAG4T,GAC5B,IACItV,EADAwM,EAAInL,EAASK,GAAG6B,YAEpB,OAAOiJ,IAAM7P,KAAcqD,EAAIqB,EAASmL,GAAGsH,KAAanX,GAAY2Y,EAAIlR,EAAUpE,KAM9E,SAAU/C,EAAQD,EAASF,GAIjC,IAAIkG,EAAYlG,EAAoB,IAChCoI,EAAWpI,EAAoB,GAC/B+K,EAAkB/K,EAAoB,IAC1CG,EAAOD,QAAU,SAAUuY,GACzB,OAAO,SAAU1P,EAAO2P,EAAIC,GAC1B,IAGI7T,EAHAF,EAAIsB,EAAU6C,GACd1B,EAASe,EAASxD,EAAEyC,QACpB6B,EAAQ6B,EAAgB4N,EAAWtR,GAIvC,GAAIoR,GAAeC,GAAMA,GAAI,KAAgBxP,EAAT7B,GAGlC,IAFAvC,EAAQF,EAAEsE,OAEGpE,EAAO,OAAO,OAEtB,KAAeoE,EAAT7B,EAAgB6B,IAAS,IAAIuP,GAAevP,KAAStE,IAC5DA,EAAEsE,KAAWwP,EAAI,OAAOD,GAAevP,GAAS,EACpD,OAAQuP,IAAgB,KAOxB,SAAUtY,EAAQD,GAExBA,EAAQyE,EAAI9D,OAAO+X,uBAKb,SAAUzY,EAAQD,EAASF,GAGjC,IAAIiW,EAAMjW,EAAoB,IAC9BG,EAAOD,QAAUoM,MAAMuM,SAAW,SAASA,QAAQ5Q,GACjD,MAAmB,SAAZgO,EAAIhO,KAMP,SAAU9H,EAAQD,EAASF,GAEjC,IAAIqE,EAAYrE,EAAoB,IAChC+E,EAAU/E,EAAoB,IAGlCG,EAAOD,QAAU,SAAUoF,GACzB,OAAO,SAAUkC,EAAMsR,GACrB,IAGI1U,EAAGqD,EAHH9F,EAAImE,OAAOf,EAAQyC,IACnBpH,EAAIiE,EAAUyU,GACdzY,EAAIsB,EAAE0F,OAEV,OAAIjH,EAAI,GAAUC,GAALD,EAAekF,EAAY,GAAKzF,IAC7CuE,EAAIzC,EAAEoX,WAAW3Y,IACN,OAAc,MAAJgE,GAAchE,EAAI,IAAMC,IAAMoH,EAAI9F,EAAEoX,WAAW3Y,EAAI,IAAM,OAAc,MAAJqH,EACpFnC,EAAY3D,EAAEqX,OAAO5Y,GAAKgE,EAC1BkB,EAAY3D,EAAEiG,MAAMxH,EAAGA,EAAI,GAA2BqH,EAAI,OAAzBrD,EAAI,OAAU,IAAqB,SAOtE,SAAUjE,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/BiW,EAAMjW,EAAoB,IAC1BiZ,EAAQjZ,EAAoB,EAApBA,CAAuB,SACnCG,EAAOD,QAAU,SAAUuD,GACzB,IAAIyV,EACJ,OAAO1V,EAASC,MAASyV,EAAWzV,EAAGwV,MAAYpZ,KAAcqZ,EAAsB,UAAXjD,EAAIxS,MAM5E,SAAUtD,EAAQD,EAASF,GAIjC,IAAIwK,EAAUxK,EAAoB,IAC9BkC,EAAUlC,EAAoB,GAC9B+B,EAAW/B,EAAoB,IAC/B8B,EAAO9B,EAAoB,IAC3ByL,EAAYzL,EAAoB,IAChCmZ,EAAcnZ,EAAoB,IAClCoZ,EAAiBpZ,EAAoB,IACrCwG,EAAiBxG,EAAoB,IACrCqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCqZ,IAAU,GAAG9P,MAAQ,QAAU,GAAGA,QAGlC+P,EAAS,SAETC,EAAa,WAAc,OAAOvT,MAEtC7F,EAAOD,QAAU,SAAUqT,EAAMrM,EAAM+P,EAAaxG,EAAM+I,EAASC,EAAQC,GACzEP,EAAYlC,EAAa/P,EAAMuJ,GAC/B,IAeIkJ,EAAStX,EAAKuX,EAfdC,EAAY,SAAUC,GACxB,IAAKT,GAASS,KAAQ/I,EAAO,OAAOA,EAAM+I,GAC1C,OAAQA,GACN,IAVK,OAUM,OAAO,SAASvQ,OAAS,OAAO,IAAI0N,EAAYjR,KAAM8T,IACjE,KAAKR,EAAQ,OAAO,SAASlM,SAAW,OAAO,IAAI6J,EAAYjR,KAAM8T,IACrE,OAAO,SAASvM,UAAY,OAAO,IAAI0J,EAAYjR,KAAM8T,KAEzDxL,EAAMpH,EAAO,YACb6S,EAAaP,GAAWF,EACxBU,GAAa,EACbjJ,EAAQwC,EAAK/R,UACbyY,EAAUlJ,EAAM1C,IAAa0C,EAnBjB,eAmBuCyI,GAAWzI,EAAMyI,GACpEU,EAAWD,GAAWJ,EAAUL,GAChCW,EAAWX,EAAWO,EAAwBF,EAAU,WAArBK,EAAkCra,GACrEua,EAAqB,SAARlT,GAAkB6J,EAAMxD,SAAqB0M,EAwB9D,GArBIG,IACFR,EAAoBpT,EAAe4T,EAAW9Z,KAAK,IAAIiT,OAC7B1S,OAAOW,WAAaoY,EAAkBnJ,OAE9D2I,EAAeQ,EAAmBtL,GAAK,GAElC9D,GAAiD,mBAA/BoP,EAAkBvL,IAAyBvM,EAAK8X,EAAmBvL,EAAUkL,IAIpGQ,GAAcE,GAAWA,EAAQvZ,OAAS4Y,IAC5CU,GAAa,EACbE,EAAW,SAAS9M,SAAW,OAAO6M,EAAQ3Z,KAAK0F,QAG/CwE,IAAWkP,IAAYL,IAASW,GAAejJ,EAAM1C,IACzDvM,EAAKiP,EAAO1C,EAAU6L,GAGxBzO,EAAUvE,GAAQgT,EAClBzO,EAAU6C,GAAOiL,EACbC,EAMF,GALAG,EAAU,CACRvM,OAAQ2M,EAAaG,EAAWL,EAAUP,GAC1C/P,KAAMkQ,EAASS,EAAWL,EAhDrB,QAiDLtM,QAAS4M,GAEPT,EAAQ,IAAKrX,KAAOsX,EAChBtX,KAAO0O,GAAQhP,EAASgP,EAAO1O,EAAKsX,EAAQtX,SAC7CH,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK2W,GAASW,GAAa9S,EAAMyS,GAEtE,OAAOA,IAMH,SAAUxZ,EAAQD,EAASF,GAIjC,IAAI8I,EAAS9I,EAAoB,IAC7Bqa,EAAara,EAAoB,IACjCoZ,EAAiBpZ,EAAoB,IACrC4Z,EAAoB,GAGxB5Z,EAAoB,GAApBA,CAAwB4Z,EAAmB5Z,EAAoB,EAApBA,CAAuB,YAAa,WAAc,OAAOgG,OAEpG7F,EAAOD,QAAU,SAAU+W,EAAa/P,EAAMuJ,GAC5CwG,EAAYzV,UAAYsH,EAAO8Q,EAAmB,CAAEnJ,KAAM4J,EAAW,EAAG5J,KACxE2I,EAAenC,EAAa/P,EAAO,eAM/B,SAAU/G,EAAQD,EAASF,GAEjC,IAAIqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCsa,GAAe,EAEnB,IACE,IAAIC,EAAQ,CAAC,GAAGlM,KAChBkM,EAAc,UAAI,WAAcD,GAAe,GAE/ChO,MAAM4D,KAAKqK,EAAO,WAAc,MAAM,IACtC,MAAOxW,IAET5D,EAAOD,QAAU,SAAU4D,EAAM0W,GAC/B,IAAKA,IAAgBF,EAAc,OAAO,EAC1C,IAAI3U,GAAO,EACX,IACE,IAAI8U,EAAM,CAAC,GACPrG,EAAOqG,EAAIpM,KACf+F,EAAK3D,KAAO,WAAc,MAAO,CAAEC,KAAM/K,GAAO,IAChD8U,EAAIpM,GAAY,WAAc,OAAO+F,GACrCtQ,EAAK2W,GACL,MAAO1W,IACT,OAAO4B,IAMH,SAAUxF,EAAQD,EAASF,GAKjC,IAAIgL,EAAUhL,EAAoB,IAC9B0a,EAAcjD,OAAOjW,UAAUsC,KAInC3D,EAAOD,QAAU,SAAUqD,EAAGL,GAC5B,IAAIY,EAAOP,EAAEO,KACb,GAAoB,mBAATA,EAAqB,CAC9B,IAAIqF,EAASrF,EAAKxD,KAAKiD,EAAGL,GAC1B,GAAsB,iBAAXiG,EACT,MAAM,IAAIzF,UAAU,sEAEtB,OAAOyF,EAET,GAAmB,WAAf6B,EAAQzH,GACV,MAAM,IAAIG,UAAU,+CAEtB,OAAOgX,EAAYpa,KAAKiD,EAAGL,KAMvB,SAAU/C,EAAQD,EAASF,GAIjCA,EAAoB,KACpB,IAAI+B,EAAW/B,EAAoB,IAC/B8B,EAAO9B,EAAoB,IAC3B0G,EAAQ1G,EAAoB,GAC5B+E,EAAU/E,EAAoB,IAC9BoL,EAAMpL,EAAoB,GAC1B2a,EAAa3a,EAAoB,IAEjCgX,EAAU5L,EAAI,WAEdwP,GAAiClU,EAAM,WAIzC,IAAImU,EAAK,IAMT,OALAA,EAAG/W,KAAO,WACR,IAAIqF,EAAS,GAEb,OADAA,EAAO2R,OAAS,CAAE1W,EAAG,KACd+E,GAEyB,MAA3B,GAAGlC,QAAQ4T,EAAI,UAGpBE,EAAoC,WAEtC,IAAIF,EAAK,OACLG,EAAeH,EAAG/W,KACtB+W,EAAG/W,KAAO,WAAc,OAAOkX,EAAatT,MAAM1B,KAAM2B,YACxD,IAAIwB,EAAS,KAAK3D,MAAMqV,GACxB,OAAyB,IAAlB1R,EAAO9B,QAA8B,MAAd8B,EAAO,IAA4B,MAAdA,EAAO,GANpB,GASxChJ,EAAOD,QAAU,SAAUiI,EAAKd,EAAQvD,GACtC,IAAImX,EAAS7P,EAAIjD,GAEb+S,GAAuBxU,EAAM,WAE/B,IAAI9B,EAAI,GAER,OADAA,EAAEqW,GAAU,WAAc,OAAO,GACZ,GAAd,GAAG9S,GAAKvD,KAGbuW,EAAoBD,GAAuBxU,EAAM,WAEnD,IAAI0U,GAAa,EACbP,EAAK,IAST,OARAA,EAAG/W,KAAO,WAAiC,OAAnBsX,GAAa,EAAa,MACtC,UAARjT,IAGF0S,EAAGpU,YAAc,GACjBoU,EAAGpU,YAAYuQ,GAAW,WAAc,OAAO6D,IAEjDA,EAAGI,GAAQ,KACHG,IACLvb,GAEL,IACGqb,IACAC,GACQ,YAARhT,IAAsByS,GACd,UAARzS,IAAoB4S,EACrB,CACA,IAAIM,EAAqB,IAAIJ,GACzBK,EAAMxX,EACRiB,EACAkW,EACA,GAAG9S,GACH,SAASoT,gBAAgBC,EAAcC,EAAQC,EAAKC,EAAMC,GACxD,OAAIH,EAAO3X,OAAS6W,EACdO,IAAwBU,EAInB,CAAElL,MAAM,EAAM5L,MAAOuW,EAAmB/a,KAAKmb,EAAQC,EAAKC,IAE5D,CAAEjL,MAAM,EAAM5L,MAAO0W,EAAalb,KAAKob,EAAKD,EAAQE,IAEtD,CAAEjL,MAAM,KAIfmL,EAAOP,EAAI,GAEfvZ,EAAS+D,OAAOtE,UAAW2G,EAHfmT,EAAI,IAIhBxZ,EAAK2V,OAAOjW,UAAWyZ,EAAkB,GAAV5T,EAG3B,SAAUR,EAAQoB,GAAO,OAAO4T,EAAKvb,KAAKuG,EAAQb,KAAMiC,IAGxD,SAAUpB,GAAU,OAAOgV,EAAKvb,KAAKuG,EAAQb,WAQ/C,SAAU7F,EAAQD,EAASF,GAEjC,IACI8b,EADS9b,EAAoB,GACV8b,UAEvB3b,EAAOD,QAAU4b,GAAaA,EAAUC,WAAa,IAK/C,SAAU5b,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7BkC,EAAUlC,EAAoB,GAC9B+B,EAAW/B,EAAoB,IAC/B6K,EAAc7K,EAAoB,IAClC4V,EAAO5V,EAAoB,IAC3Bgc,EAAQhc,EAAoB,IAC5B2K,EAAa3K,EAAoB,IACjCwD,EAAWxD,EAAoB,GAC/B0G,EAAQ1G,EAAoB,GAC5B0L,EAAc1L,EAAoB,IAClCoZ,EAAiBpZ,EAAoB,IACrCic,EAAoBjc,EAAoB,IAE5CG,EAAOD,QAAU,SAAUgH,EAAMgM,EAASyG,EAASuC,EAAQ1T,EAAQ2T,GACjE,IAAI5I,EAAO3R,EAAOsF,GACdwI,EAAI6D,EACJ6I,EAAQ5T,EAAS,MAAQ,MACzBuI,EAAQrB,GAAKA,EAAElO,UACfoD,EAAI,GACJyX,EAAY,SAAUlU,GACxB,IAAIZ,EAAKwJ,EAAM5I,GACfpG,EAASgP,EAAO5I,EACP,UAAPA,EAAkB,SAAU/D,GAC1B,QAAO+X,IAAY3Y,EAASY,KAAamD,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,IAC5D,OAAP+D,EAAe,SAAShD,IAAIf,GAC9B,QAAO+X,IAAY3Y,EAASY,KAAamD,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,IAC5D,OAAP+D,EAAe,SAASlH,IAAImD,GAC9B,OAAO+X,IAAY3Y,EAASY,GAAKvE,GAAY0H,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,IAChE,OAAP+D,EAAe,SAASmU,IAAIlY,GAAqC,OAAhCmD,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,GAAW4B,MACxE,SAASqJ,IAAIjL,EAAGqD,GAAwC,OAAnCF,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,EAAGqD,GAAWzB,QAGvE,GAAgB,mBAAL0J,IAAqByM,GAAWpL,EAAMS,UAAY9K,EAAM,YACjE,IAAIgJ,GAAInC,UAAUkD,UAMb,CACL,IAAI8L,EAAW,IAAI7M,EAEf8M,EAAiBD,EAASH,GAAOD,EAAU,IAAM,EAAG,IAAMI,EAE1DE,EAAuB/V,EAAM,WAAc6V,EAASpX,IAAI,KAExDuX,EAAmBhR,EAAY,SAAU0I,GAAQ,IAAI1E,EAAE0E,KAEvDuI,GAAcR,GAAWzV,EAAM,WAIjC,IAFA,IAAIkW,EAAY,IAAIlN,EAChBxG,EAAQ,EACLA,KAAS0T,EAAUR,GAAOlT,EAAOA,GACxC,OAAQ0T,EAAUzX,KAAK,KAEpBuX,MACHhN,EAAIwD,EAAQ,SAAUjQ,EAAQwT,GAC5B9L,EAAW1H,EAAQyM,EAAGxI,GACtB,IAAIM,EAAOyU,EAAkB,IAAI1I,EAAQtQ,EAAQyM,GAEjD,OADI+G,GAAY5W,IAAWmc,EAAMvF,EAAUjO,EAAQhB,EAAK4U,GAAQ5U,GACzDA,KAEPhG,UAAYuP,GACRtK,YAAciJ,IAElB+M,GAAwBE,KAC1BN,EAAU,UACVA,EAAU,OACV7T,GAAU6T,EAAU,SAElBM,GAAcH,IAAgBH,EAAUD,GAExCD,GAAWpL,EAAM8L,cAAc9L,EAAM8L,WApCzCnN,EAAIwM,EAAOY,eAAe5J,EAAShM,EAAMsB,EAAQ4T,GACjDvR,EAAY6E,EAAElO,UAAWmY,GACzB/D,EAAKC,MAAO,EA4Cd,OAPAuD,EAAe1J,EAAGxI,GAGlBhF,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,IADxCkC,EAAEsC,GAAQwI,IACwC6D,GAAO3O,GAEpDuX,GAASD,EAAOa,UAAUrN,EAAGxI,EAAMsB,GAEjCkH,IAMH,SAAUvP,EAAQD,EAASF,GAiBjC,IAfA,IASIgd,EATApb,EAAS5B,EAAoB,GAC7B8B,EAAO9B,EAAoB,IAC3BiE,EAAMjE,EAAoB,IAC1B4O,EAAQ3K,EAAI,eACZ4K,EAAO5K,EAAI,QACX6P,KAASlS,EAAO4K,cAAe5K,EAAO8K,UACtCgC,EAASoF,EACT1T,EAAI,EAIJ6c,EAAyB,iHAE3BzX,MAAM,KAEDpF,EAPC,IAQF4c,EAAQpb,EAAOqb,EAAuB7c,QACxC0B,EAAKkb,EAAMxb,UAAWoN,GAAO,GAC7B9M,EAAKkb,EAAMxb,UAAWqN,GAAM,IACvBH,GAAS,EAGlBvO,EAAOD,QAAU,CACf4T,IAAKA,EACLpF,OAAQA,EACRE,MAAOA,EACPC,KAAMA,IAMF,SAAU1O,EAAQD,EAASF,GAKjCG,EAAOD,QAAUF,EAAoB,MAAQA,EAAoB,EAApBA,CAAuB,WAClE,IAAIkd,EAAItZ,KAAK+S,SAGbwG,iBAAiB7c,KAAK,KAAM4c,EAAG,qBACxBld,EAAoB,GAAGkd,MAM1B,SAAU/c,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAElCG,EAAOD,QAAU,SAAUkd,GACzBlb,EAAQA,EAAQgB,EAAGka,EAAY,CAAExM,GAAI,SAASA,KAG5C,IAFA,IAAIvJ,EAASM,UAAUN,OACnBgW,EAAI,IAAI/Q,MAAMjF,GACXA,KAAUgW,EAAEhW,GAAUM,UAAUN,GACvC,OAAO,IAAIrB,KAAKqX,QAOd,SAAUld,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAYtH,EAAoB,IAChCgC,EAAMhC,EAAoB,IAC1Bgc,EAAQhc,EAAoB,IAEhCG,EAAOD,QAAU,SAAUkd,GACzBlb,EAAQA,EAAQgB,EAAGka,EAAY,CAAElN,KAAM,SAASA,KAAK9N,GACnD,IACImO,EAAS8M,EAAGnc,EAAGoc,EADfC,EAAQ5V,UAAU,GAKtB,OAHAL,EAAUtB,OACVuK,EAAUgN,IAAU1d,KACPyH,EAAUiW,GACnBnb,GAAUvC,GAAkB,IAAImG,MACpCqX,EAAI,GACA9M,GACFrP,EAAI,EACJoc,EAAKtb,EAAIub,EAAO5V,UAAU,GAAI,GAC9BqU,EAAM5Z,GAAQ,EAAO,SAAUob,GAC7BH,EAAEjU,KAAKkU,EAAGE,EAAUtc,SAGtB8a,EAAM5Z,GAAQ,EAAOib,EAAEjU,KAAMiU,GAExB,IAAIrX,KAAKqX,SAOd,SAAUld,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GAC/BkK,EAAWlK,EAAoB,GAAGkK,SAElCuT,EAAKja,EAAS0G,IAAa1G,EAAS0G,EAASwT,eACjDvd,EAAOD,QAAU,SAAUuD,GACzB,OAAOga,EAAKvT,EAASwT,cAAcja,GAAM,KAMrC,SAAUtD,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3BwK,EAAUxK,EAAoB,IAC9B2d,EAAS3d,EAAoB,IAC7Bc,EAAiBd,EAAoB,GAAG2E,EAC5CxE,EAAOD,QAAU,SAAUQ,GACzB,IAAIkd,EAAU/b,EAAKqC,SAAWrC,EAAKqC,OAASsG,EAAU,GAAK5I,EAAOsC,QAAU,IACtD,KAAlBxD,EAAKsY,OAAO,IAAetY,KAAQkd,GAAU9c,EAAe8c,EAASld,EAAM,CAAEoE,MAAO6Y,EAAOhZ,EAAEjE,OAM7F,SAAUP,EAAQD,EAASF,GAEjC,IAAI0U,EAAS1U,EAAoB,GAApBA,CAAwB,QACjCiE,EAAMjE,EAAoB,IAC9BG,EAAOD,QAAU,SAAUmC,GACzB,OAAOqS,EAAOrS,KAASqS,EAAOrS,GAAO4B,EAAI5B,MAMrC,SAAUlC,EAAQD,GAGxBC,EAAOD,QAAU,gGAEfsF,MAAM,MAKF,SAAUrF,EAAQD,EAASF,GAEjC,IAAIkK,EAAWlK,EAAoB,GAAGkK,SACtC/J,EAAOD,QAAUgK,GAAYA,EAAS2T,iBAKhC,SAAU1d,EAAQD,EAASF,GAKjC,IAAI+W,EAAc/W,EAAoB,GAClC8d,EAAU9d,EAAoB,IAC9B+d,EAAO/d,EAAoB,IAC3BiG,EAAMjG,EAAoB,IAC1BqG,EAAWrG,EAAoB,GAC/BgF,EAAUhF,EAAoB,IAC9Bge,EAAUnd,OAAOod,OAGrB9d,EAAOD,SAAW8d,GAAWhe,EAAoB,EAApBA,CAAuB,WAClD,IAAIqd,EAAI,GACJra,EAAI,GAEJE,EAAIgB,SACJgZ,EAAI,uBAGR,OAFAG,EAAEna,GAAK,EACPga,EAAE1X,MAAM,IAAIgM,QAAQ,SAAU0M,GAAKlb,EAAEkb,GAAKA,IACd,GAArBF,EAAQ,GAAIX,GAAGna,IAAWrC,OAAO0I,KAAKyU,EAAQ,GAAIhb,IAAI6C,KAAK,KAAOqX,IACtE,SAASe,OAAOhb,EAAQb,GAM3B,IALA,IAAI+T,EAAI9P,EAASpD,GACboN,EAAO1I,UAAUN,OACjB6B,EAAQ,EACRiV,EAAaJ,EAAKpZ,EAClByZ,EAASnY,EAAItB,EACHuE,EAAPmH,GAML,IALA,IAIIhO,EAJAa,EAAI8B,EAAQ2C,UAAUuB,MACtBK,EAAO4U,EAAaL,EAAQ5a,GAAGmR,OAAO8J,EAAWjb,IAAM4a,EAAQ5a,GAC/DmE,EAASkC,EAAKlC,OACdgX,EAAI,EAEQA,EAAThX,GACLhF,EAAMkH,EAAK8U,KACNtH,IAAeqH,EAAO9d,KAAK4C,EAAGb,KAAM8T,EAAE9T,GAAOa,EAAEb,IAEtD,OAAO8T,GACP6H,GAKE,SAAU7d,EAAQD,EAASF,GAIjC,IAAIwD,EAAWxD,EAAoB,GAC/BuE,EAAWvE,EAAoB,GAC/Bse,EAAQ,SAAU1Z,EAAGmM,GAEvB,GADAxM,EAASK,IACJpB,EAASuN,IAAoB,OAAVA,EAAgB,MAAMrN,UAAUqN,EAAQ,8BAElE5Q,EAAOD,QAAU,CACfmP,IAAKxO,OAAO0d,iBAAmB,aAAe,GAC5C,SAAUpX,EAAMqX,EAAOnP,GACrB,KACEA,EAAMrP,EAAoB,GAApBA,CAAwBoD,SAAS9C,KAAMN,EAAoB,IAAI2E,EAAE9D,OAAOW,UAAW,aAAa6N,IAAK,IACvGlI,EAAM,IACVqX,IAAUrX,aAAgBmF,OAC1B,MAAOvI,GAAKya,GAAQ,EACtB,OAAO,SAASD,eAAe3Z,EAAGmM,GAIhC,OAHAuN,EAAM1Z,EAAGmM,GACLyN,EAAO5Z,EAAE6Z,UAAY1N,EACpB1B,EAAIzK,EAAGmM,GACLnM,GAVX,CAYE,IAAI,GAAS/E,IACjBye,MAAOA,IAMH,SAAUne,EAAQD,GAGxBC,EAAOD,QAAU,SAAUqH,EAAImX,EAAMlX,GACnC,IAAImX,EAAKnX,IAAS3H,GAClB,OAAQ6e,EAAKrX,QACX,KAAK,EAAG,OAAOsX,EAAKpX,IACAA,EAAGjH,KAAKkH,GAC5B,KAAK,EAAG,OAAOmX,EAAKpX,EAAGmX,EAAK,IACRnX,EAAGjH,KAAKkH,EAAMkX,EAAK,IACvC,KAAK,EAAG,OAAOC,EAAKpX,EAAGmX,EAAK,GAAIA,EAAK,IACjBnX,EAAGjH,KAAKkH,EAAMkX,EAAK,GAAIA,EAAK,IAChD,KAAK,EAAG,OAAOC,EAAKpX,EAAGmX,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAC1BnX,EAAGjH,KAAKkH,EAAMkX,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACzD,KAAK,EAAG,OAAOC,EAAKpX,EAAGmX,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACnCnX,EAAGjH,KAAKkH,EAAMkX,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAClE,OAAOnX,EAAGG,MAAMF,EAAMkX,KAMpB,SAAUve,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GAC/Bue,EAAiBve,EAAoB,IAAIqP,IAC7ClP,EAAOD,QAAU,SAAUsH,EAAMvE,EAAQyM,GACvC,IACI5M,EADAI,EAAID,EAAOwD,YAIb,OAFEvD,IAAMwM,GAAiB,mBAALxM,IAAoBJ,EAAII,EAAE1B,aAAekO,EAAElO,WAAagC,EAASV,IAAMyb,GAC3FA,EAAe/W,EAAM1E,GACd0E,IAML,SAAUrH,EAAQD,GAExBC,EAAOD,QAAU,oDAMX,SAAUC,EAAQD,EAASF,GAIjC,IAAIqE,EAAYrE,EAAoB,IAChC+E,EAAU/E,EAAoB,IAElCG,EAAOD,QAAU,SAAS0e,OAAOC,GAC/B,IAAInD,EAAM5V,OAAOf,EAAQiB,OACrBiD,EAAM,GACN/H,EAAImD,EAAUwa,GAClB,GAAI3d,EAAI,GAAKA,GAAK4d,SAAU,MAAM9S,WAAW,2BAC7C,KAAU,EAAJ9K,GAAQA,KAAO,KAAOwa,GAAOA,GAAc,EAAJxa,IAAO+H,GAAOyS,GAC3D,OAAOzS,IAMH,SAAU9I,EAAQD,GAGxBC,EAAOD,QAAU0D,KAAKmb,MAAQ,SAASA,KAAKC,GAE1C,OAAmB,IAAXA,GAAKA,IAAWA,GAAKA,EAAIA,EAAIA,EAAI,GAAK,EAAI,IAM9C,SAAU7e,EAAQD,GAGxB,IAAI+e,EAASrb,KAAKsb,MAClB/e,EAAOD,SAAY+e,GAED,mBAAbA,EAAO,KAA4BA,EAAO,IAAM,qBAE7B,OAAnBA,GAAQ,OACT,SAASC,MAAMF,GACjB,OAAmB,IAAXA,GAAKA,GAAUA,GAAS,KAALA,GAAaA,EAAI,KAAOA,EAAIA,EAAIA,EAAI,EAAIpb,KAAKpB,IAAIwc,GAAK,GAC/EC,GAKE,SAAU9e,EAAQD,EAASF,GAGjC,IAAIkZ,EAAWlZ,EAAoB,IAC/B+E,EAAU/E,EAAoB,IAElCG,EAAOD,QAAU,SAAUsH,EAAM2X,EAAcjY,GAC7C,GAAIgS,EAASiG,GAAe,MAAMzb,UAAU,UAAYwD,EAAO,0BAC/D,OAAOpB,OAAOf,EAAQyC,MAMlB,SAAUrH,EAAQD,EAASF,GAEjC,IAAIiZ,EAAQjZ,EAAoB,EAApBA,CAAuB,SACnCG,EAAOD,QAAU,SAAUiI,GACzB,IAAI0S,EAAK,IACT,IACE,MAAM1S,GAAK0S,GACX,MAAO9W,GACP,IAEE,OADA8W,EAAG5B,IAAS,GACJ,MAAM9Q,GAAK0S,GACnB,MAAOlW,KACT,OAAO,IAML,SAAUxE,EAAQD,EAASF,GAGjC,IAAIyL,EAAYzL,EAAoB,IAChCqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCqM,EAAaC,MAAM9K,UAEvBrB,EAAOD,QAAU,SAAUuD,GACzB,OAAOA,IAAO5D,KAAc4L,EAAUa,QAAU7I,GAAM4I,EAAWgC,KAAc5K,KAM3E,SAAUtD,EAAQD,EAASF,GAIjC,IAAIof,EAAkBpf,EAAoB,GACtCkF,EAAalF,EAAoB,IAErCG,EAAOD,QAAU,SAAUoB,EAAQ4H,EAAOpE,GACpCoE,KAAS5H,EAAQ8d,EAAgBza,EAAErD,EAAQ4H,EAAOhE,EAAW,EAAGJ,IAC/DxD,EAAO4H,GAASpE,IAMjB,SAAU3E,EAAQD,EAASF,GAGjC,IAAIuL,EAAqBvL,EAAoB,KAE7CG,EAAOD,QAAU,SAAUmf,EAAUhY,GACnC,OAAO,IAAKkE,EAAmB8T,GAAxB,CAAmChY,KAMtC,SAAUlH,EAAQD,EAASF,GAKjC,IAAIqG,EAAWrG,EAAoB,GAC/B+K,EAAkB/K,EAAoB,IACtCoI,EAAWpI,EAAoB,GACnCG,EAAOD,QAAU,SAASiR,KAAKrM,GAO7B,IANA,IAAIF,EAAIyB,EAASL,MACbqB,EAASe,EAASxD,EAAEyC,QACpBgJ,EAAO1I,UAAUN,OACjB6B,EAAQ6B,EAAuB,EAAPsF,EAAW1I,UAAU,GAAK9H,GAAWwH,GAC7D+K,EAAa,EAAP/B,EAAW1I,UAAU,GAAK9H,GAChCyf,EAASlN,IAAQvS,GAAYwH,EAAS0D,EAAgBqH,EAAK/K,GAC/C6B,EAAToW,GAAgB1a,EAAEsE,KAAWpE,EACpC,OAAOF,IAMH,SAAUzE,EAAQD,EAASF,GAIjC,IAAIuf,EAAmBvf,EAAoB,IACvCmQ,EAAOnQ,EAAoB,IAC3ByL,EAAYzL,EAAoB,IAChCkG,EAAYlG,EAAoB,IAMpCG,EAAOD,QAAUF,EAAoB,GAApBA,CAAwBsM,MAAO,QAAS,SAAUkT,EAAU1F,GAC3E9T,KAAKmR,GAAKjR,EAAUsZ,GACpBxZ,KAAKyZ,GAAK,EACVzZ,KAAK0Z,GAAK5F,GAET,WACD,IAAIlV,EAAIoB,KAAKmR,GACT2C,EAAO9T,KAAK0Z,GACZxW,EAAQlD,KAAKyZ,KACjB,OAAK7a,GAAcA,EAAEyC,QAAX6B,GACRlD,KAAKmR,GAAKtX,GACHsQ,EAAK,IAEaA,EAAK,EAApB,QAAR2J,EAA+B5Q,EACvB,UAAR4Q,EAAiClV,EAAEsE,GACxB,CAACA,EAAOtE,EAAEsE,MACxB,UAGHuC,EAAUkU,UAAYlU,EAAUa,MAEhCiT,EAAiB,QACjBA,EAAiB,UACjBA,EAAiB,YAKX,SAAUpf,EAAQD,GAExBC,EAAOD,QAAU,SAAUwQ,EAAM5L,GAC/B,MAAO,CAAEA,MAAOA,EAAO4L,OAAQA,KAM3B,SAAUvQ,EAAQD,EAASF,GAKjC,IAaM4f,EACAC,EAdFC,EAAc9f,EAAoB,IAElC+f,EAAatI,OAAOjW,UAAUsC,KAI9Bkc,EAAgBla,OAAOtE,UAAUyF,QAEjCgZ,EAAcF,EAEdG,EAAa,YAEbC,GAEEN,EAAM,MACVE,EAAWzf,KAFPsf,EAAM,IAEW,KACrBG,EAAWzf,KAAKuf,EAAK,KACM,IAApBD,EAAIM,IAAyC,IAApBL,EAAIK,IAIlCE,EAAgB,OAAOtc,KAAK,IAAI,KAAOjE,IAE/BsgB,GAA4BC,KAGtCH,EAAc,SAASnc,KAAK4X,GAC1B,IACI2E,EAAWC,EAAQC,EAAOngB,EAD1Bya,EAAK7U,KAwBT,OArBIoa,IACFE,EAAS,IAAI7I,OAAO,IAAMoD,EAAGzY,OAAS,WAAY0d,EAAYxf,KAAKua,KAEjEsF,IAA0BE,EAAYxF,EAAGqF,IAE7CK,EAAQR,EAAWzf,KAAKua,EAAIa,GAExByE,GAA4BI,IAC9B1F,EAAGqF,GAAcrF,EAAGjZ,OAAS2e,EAAMrX,MAAQqX,EAAM,GAAGlZ,OAASgZ,GAE3DD,GAAiBG,GAAwB,EAAfA,EAAMlZ,QAIlC2Y,EAAc1f,KAAKigB,EAAM,GAAID,EAAQ,WACnC,IAAKlgB,EAAI,EAAGA,EAAIuH,UAAUN,OAAS,EAAGjH,IAChCuH,UAAUvH,KAAOP,KAAW0gB,EAAMngB,GAAKP,MAK1C0gB,IAIXpgB,EAAOD,QAAU+f,GAKX,SAAU9f,EAAQD,EAASF,GAIjC,IAAIwgB,EAAKxgB,EAAoB,GAApBA,EAAwB,GAIjCG,EAAOD,QAAU,SAAUgD,EAAGgG,EAAOoP,GACnC,OAAOpP,GAASoP,EAAUkI,EAAGtd,EAAGgG,GAAO7B,OAAS,KAM5C,SAAUlH,EAAQD,EAASF,GAEjC,IAaIygB,EAAOC,EAASC,EAbhB3e,EAAMhC,EAAoB,IAC1B4gB,EAAS5gB,EAAoB,IAC7B6gB,EAAO7gB,EAAoB,IAC3B8gB,EAAM9gB,EAAoB,IAC1B4B,EAAS5B,EAAoB,GAC7B+gB,EAAUnf,EAAOmf,QACjBC,EAAUpf,EAAOqf,aACjBC,EAAYtf,EAAOuf,eACnBC,EAAiBxf,EAAOwf,eACxBC,EAAWzf,EAAOyf,SAClBC,EAAU,EACVC,EAAQ,GACRC,EAAqB,qBAErBC,EAAM,WACR,IAAInM,GAAMtP,KAEV,GAAIub,EAAM9f,eAAe6T,GAAK,CAC5B,IAAI/N,EAAKga,EAAMjM,UACRiM,EAAMjM,GACb/N,MAGAma,EAAW,SAAUC,GACvBF,EAAInhB,KAAKqhB,EAAMhO,OAGZqN,GAAYE,IACfF,EAAU,SAASC,aAAa1Z,GAG9B,IAFA,IAAImX,EAAO,GACPte,EAAI,EACkBA,EAAnBuH,UAAUN,QAAYqX,EAAKtV,KAAKzB,UAAUvH,MAMjD,OALAmhB,IAAQD,GAAW,WAEjBV,EAAoB,mBAANrZ,EAAmBA,EAAKnE,SAASmE,GAAKmX,IAEtD+B,EAAMa,GACCA,GAETJ,EAAY,SAASC,eAAe7L,UAC3BiM,EAAMjM,IAGyB,WAApCtV,EAAoB,GAApBA,CAAwB+gB,GAC1BN,EAAQ,SAAUnL,GAChByL,EAAQa,SAAS5f,EAAIyf,EAAKnM,EAAI,KAGvB+L,GAAYA,EAASQ,IAC9BpB,EAAQ,SAAUnL,GAChB+L,EAASQ,IAAI7f,EAAIyf,EAAKnM,EAAI,KAGnB8L,GAETT,GADAD,EAAU,IAAIU,GACCU,MACfpB,EAAQqB,MAAMC,UAAYN,EAC1BjB,EAAQze,EAAI2e,EAAKsB,YAAatB,EAAM,IAG3B/e,EAAOsgB,kBAA0C,mBAAfD,cAA8BrgB,EAAOugB,eAChF1B,EAAQ,SAAUnL,GAChB1T,EAAOqgB,YAAY3M,EAAK,GAAI,MAE9B1T,EAAOsgB,iBAAiB,UAAWR,GAAU,IAG7CjB,EADSe,KAAsBV,EAAI,UAC3B,SAAUxL,GAChBuL,EAAK9W,YAAY+W,EAAI,WAAWU,GAAsB,WACpDX,EAAKuB,YAAYpc,MACjByb,EAAInhB,KAAKgV,KAKL,SAAUA,GAChB+M,WAAWrgB,EAAIyf,EAAKnM,EAAI,GAAI,KAIlCnV,EAAOD,QAAU,CACfmP,IAAK2R,EACLnE,MAAOqE,IAMH,SAAU/gB,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7BsiB,EAAYtiB,EAAoB,IAAIqP,IACpCkT,EAAW3gB,EAAO4gB,kBAAoB5gB,EAAO6gB,uBAC7C1B,EAAUnf,EAAOmf,QACjB2B,EAAU9gB,EAAO8gB,QACjBC,EAA6C,WAApC3iB,EAAoB,GAApBA,CAAwB+gB,GAErC5gB,EAAOD,QAAU,WACf,IAAI0iB,EAAMC,EAAMC,EAEZC,EAAQ,WACV,IAAIC,EAAQzb,EAEZ,IADIob,IAAWK,EAASjC,EAAQkC,SAASD,EAAOE,OACzCN,GAAM,CACXrb,EAAKqb,EAAKrb,GACVqb,EAAOA,EAAKnS,KACZ,IACElJ,IACA,MAAOxD,GAGP,MAFI6e,EAAME,IACLD,EAAOhjB,GACNkE,GAER8e,EAAOhjB,GACLmjB,GAAQA,EAAOG,SAIrB,GAAIR,EACFG,EAAS,WACP/B,EAAQa,SAASmB,SAGd,IAAIR,GAAc3gB,EAAOka,WAAala,EAAOka,UAAUsH,WAQvD,GAAIV,GAAWA,EAAQW,QAAS,CAErC,IAAIC,EAAUZ,EAAQW,QAAQxjB,IAC9BijB,EAAS,WACPQ,EAAQC,KAAKR,SASfD,EAAS,WAEPR,EAAUhiB,KAAKsB,EAAQmhB,QAvBgD,CACzE,IAAIS,GAAS,EACTC,EAAOvZ,SAASwZ,eAAe,IACnC,IAAInB,EAASQ,GAAOY,QAAQF,EAAM,CAAEG,eAAe,IACnDd,EAAS,WACPW,EAAK9P,KAAO6P,GAAUA,GAsB1B,OAAO,SAAUjc,GACf,IAAIsc,EAAO,CAAEtc,GAAIA,EAAIkJ,KAAM5Q,IACvBgjB,IAAMA,EAAKpS,KAAOoT,GACjBjB,IACHA,EAAOiB,EACPf,KACAD,EAAOgB,KAOP,SAAU1jB,EAAQD,EAASF,GAKjC,IAAIsH,EAAYtH,EAAoB,IAEpC,SAAS8jB,kBAAkBpU,GACzB,IAAI2T,EAASU,EACb/d,KAAKsd,QAAU,IAAI5T,EAAE,SAAUsU,EAAWC,GACxC,GAAIZ,IAAYxjB,IAAakkB,IAAWlkB,GAAW,MAAM6D,UAAU,2BACnE2f,EAAUW,EACVD,EAASE,IAEXje,KAAKqd,QAAU/b,EAAU+b,GACzBrd,KAAK+d,OAASzc,EAAUyc,GAG1B5jB,EAAOD,QAAQyE,EAAI,SAAU+K,GAC3B,OAAO,IAAIoU,kBAAkBpU,KAMzB,SAAUvP,EAAQD,EAASF,GAGjC,IAAIkL,EAAOlL,EAAoB,IAC3B+d,EAAO/d,EAAoB,IAC3BuE,EAAWvE,EAAoB,GAC/BkkB,EAAUlkB,EAAoB,GAAGkkB,QACrC/jB,EAAOD,QAAUgkB,GAAWA,EAAQC,SAAW,SAASA,QAAQ1gB,GAC9D,IAAI8F,EAAO2B,EAAKvG,EAAEJ,EAASd,IACvB0a,EAAaJ,EAAKpZ,EACtB,OAAOwZ,EAAa5U,EAAK8K,OAAO8J,EAAW1a,IAAO8F,IAM9C,SAAUpJ,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7B+W,EAAc/W,EAAoB,GAClCwK,EAAUxK,EAAoB,IAC9ByK,EAASzK,EAAoB,IAC7B8B,EAAO9B,EAAoB,IAC3B6K,EAAc7K,EAAoB,IAClC0G,EAAQ1G,EAAoB,GAC5B2K,EAAa3K,EAAoB,IACjCqE,EAAYrE,EAAoB,IAChCoI,EAAWpI,EAAoB,GAC/B8K,EAAU9K,EAAoB,KAC9BkL,EAAOlL,EAAoB,IAAI2E,EAC/BD,EAAK1E,EAAoB,GAAG2E,EAC5BiH,EAAY5L,EAAoB,IAChCoZ,EAAiBpZ,EAAoB,IACrCkM,EAAe,cACfkY,EAAY,WACZniB,EAAY,YAEZoiB,EAAc,eACd9X,EAAe3K,EAAOsK,GACtBO,EAAY7K,EAAOwiB,GACnBxgB,EAAOhC,EAAOgC,KACdoI,EAAapK,EAAOoK,WAEpB8S,EAAWld,EAAOkd,SAClBwF,EAAa/X,EACbgY,EAAM3gB,EAAK2gB,IACXC,EAAM5gB,EAAK4gB,IACX1c,EAAQlE,EAAKkE,MACb2c,EAAM7gB,EAAK6gB,IACXC,EAAM9gB,EAAK8gB,IAEXC,EAAc,aACdC,EAAc,aACdC,EAAU9N,EAAc,KAHf,SAIT+N,EAAU/N,EAAc,KAAO4N,EAC/BI,EAAUhO,EAAc,KAAO6N,EAGnC,SAASI,YAAYlgB,EAAOmgB,EAAMC,GAChC,IAOInhB,EAAGxD,EAAGC,EAPN2O,EAAS,IAAI7C,MAAM4Y,GACnBC,EAAgB,EAATD,EAAaD,EAAO,EAC3BG,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBE,EAAc,KAATL,EAAcT,EAAI,GAAI,IAAMA,EAAI,GAAI,IAAM,EAC/CpkB,EAAI,EACJuB,EAAImD,EAAQ,GAAe,IAAVA,GAAe,EAAIA,EAAQ,EAAI,EAAI,EAkCxD,KAhCAA,EAAQyf,EAAIzf,KAECA,GAASA,IAAUga,GAE9Bve,EAAIuE,GAASA,EAAQ,EAAI,EACzBf,EAAIqhB,IAEJrhB,EAAI+D,EAAM2c,EAAI3f,GAAS4f,GACnB5f,GAAStE,EAAIgkB,EAAI,GAAIzgB,IAAM,IAC7BA,IACAvD,GAAK,GAOU,IAJfsE,GADe,GAAbf,EAAIshB,EACGC,EAAK9kB,EAEL8kB,EAAKd,EAAI,EAAG,EAAIa,IAEf7kB,IACVuD,IACAvD,GAAK,GAEU4kB,GAAbrhB,EAAIshB,GACN9kB,EAAI,EACJwD,EAAIqhB,GACkB,GAAbrhB,EAAIshB,GACb9kB,GAAKuE,EAAQtE,EAAI,GAAKgkB,EAAI,EAAGS,GAC7BlhB,GAAQshB,IAER9kB,EAAIuE,EAAQ0f,EAAI,EAAGa,EAAQ,GAAKb,EAAI,EAAGS,GACvClhB,EAAI,IAGO,GAARkhB,EAAW9V,EAAO/O,KAAW,IAAJG,EAASA,GAAK,IAAK0kB,GAAQ,GAG3D,IAFAlhB,EAAIA,GAAKkhB,EAAO1kB,EAChB4kB,GAAQF,EACM,EAAPE,EAAUhW,EAAO/O,KAAW,IAAJ2D,EAASA,GAAK,IAAKohB,GAAQ,GAE1D,OADAhW,IAAS/O,IAAU,IAAJuB,EACRwN,EAET,SAASoW,cAAcpW,EAAQ8V,EAAMC,GACnC,IAOI3kB,EAPA4kB,EAAgB,EAATD,EAAaD,EAAO,EAC3BG,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBI,EAAQL,EAAO,EACf/kB,EAAI8kB,EAAS,EACbvjB,EAAIwN,EAAO/O,KACX2D,EAAQ,IAAJpC,EAGR,IADAA,IAAM,EACS,EAAR6jB,EAAWzhB,EAAQ,IAAJA,EAAUoL,EAAO/O,GAAIA,IAAKolB,GAAS,GAIzD,IAHAjlB,EAAIwD,GAAK,IAAMyhB,GAAS,EACxBzhB,KAAOyhB,EACPA,GAASP,EACM,EAARO,EAAWjlB,EAAQ,IAAJA,EAAU4O,EAAO/O,GAAIA,IAAKolB,GAAS,GACzD,GAAU,IAANzhB,EACFA,EAAI,EAAIshB,MACH,CAAA,GAAIthB,IAAMqhB,EACf,OAAO7kB,EAAIklB,IAAM9jB,GAAKmd,EAAWA,EAEjCve,GAAQikB,EAAI,EAAGS,GACflhB,GAAQshB,EACR,OAAQ1jB,GAAK,EAAI,GAAKpB,EAAIikB,EAAI,EAAGzgB,EAAIkhB,GAGzC,SAASS,UAAUC,GACjB,OAAOA,EAAM,IAAM,GAAKA,EAAM,IAAM,GAAKA,EAAM,IAAM,EAAIA,EAAM,GAEjE,SAASC,OAAOniB,GACd,MAAO,CAAM,IAALA,GAEV,SAASoiB,QAAQpiB,GACf,MAAO,CAAM,IAALA,EAAWA,GAAM,EAAI,KAE/B,SAASqiB,QAAQriB,GACf,MAAO,CAAM,IAALA,EAAWA,GAAM,EAAI,IAAMA,GAAM,GAAK,IAAMA,GAAM,GAAK,KAEjE,SAASsiB,QAAQtiB,GACf,OAAOuhB,YAAYvhB,EAAI,GAAI,GAE7B,SAASuiB,QAAQviB,GACf,OAAOuhB,YAAYvhB,EAAI,GAAI,GAG7B,SAASqM,UAAUJ,EAAGrN,EAAK0N,GACzBrL,EAAGgL,EAAEzN,GAAYI,EAAK,CAAEpB,IAAK,WAAc,OAAO+E,KAAK+J,MAGzD,SAAS9O,IAAIglB,EAAMN,EAAOzc,EAAOgd,GAC/B,IACIC,EAAWrb,GADC5B,GAEhB,GAAuB+c,EAAKnB,GAAxBqB,EAAWR,EAAuB,MAAM3Z,EAAWqY,GACvD,IACIpT,EAAQkV,EAAWF,EAAKlB,GACxBqB,EAFQH,EAAKpB,GAASwB,GAETze,MAAMqJ,EAAOA,EAAQ0U,GACtC,OAAOO,EAAiBE,EAAOA,EAAKtU,UAEtC,SAASzC,IAAI4W,EAAMN,EAAOzc,EAAOod,EAAYxhB,EAAOohB,GAClD,IACIC,EAAWrb,GADC5B,GAEhB,GAAuB+c,EAAKnB,GAAxBqB,EAAWR,EAAuB,MAAM3Z,EAAWqY,GAIvD,IAHA,IAAIrgB,EAAQiiB,EAAKpB,GAASwB,GACtBpV,EAAQkV,EAAWF,EAAKlB,GACxBqB,EAAOE,GAAYxhB,GACd1E,EAAI,EAAGA,EAAIulB,EAAOvlB,IAAK4D,EAAMiN,EAAQ7Q,GAAKgmB,EAAKF,EAAiB9lB,EAAIulB,EAAQvlB,EAAI,GAG3F,GAAKqK,EAAOqJ,IAgFL,CACL,IAAKpN,EAAM,WACT6F,EAAa,OACR7F,EAAM,WACX,IAAI6F,GAAc,MACd7F,EAAM,WAIV,OAHA,IAAI6F,EACJ,IAAIA,EAAa,KACjB,IAAIA,EAAakZ,KACVlZ,EAAa7L,MAAQwL,IAC1B,CAMF,IADA,IACyC7J,EADrCkkB,GAJJha,EAAe,SAASC,YAAYnF,GAElC,OADAsD,EAAW3E,KAAMuG,GACV,IAAI+X,EAAWxZ,EAAQzD,MAEIpF,GAAaqiB,EAAWriB,GACnDsH,EAAO2B,EAAKoZ,GAAajG,EAAI,EAAsBA,EAAd9U,EAAKlC,SAC1ChF,EAAMkH,EAAK8U,QAAS9R,GAAezK,EAAKyK,EAAclK,EAAKiiB,EAAWjiB,IAE1EmI,IAAS+b,EAAiB9f,YAAc8F,GAG/C,IAAI0Z,EAAO,IAAIxZ,EAAU,IAAIF,EAAa,IACtCia,EAAW/Z,EAAUxK,GAAWwkB,QACpCR,EAAKQ,QAAQ,EAAG,YAChBR,EAAKQ,QAAQ,EAAG,aACZR,EAAKS,QAAQ,IAAOT,EAAKS,QAAQ,IAAI7b,EAAY4B,EAAUxK,GAAY,CACzEwkB,QAAS,SAASA,QAAQnU,EAAYxN,GACpC0hB,EAASlmB,KAAK0F,KAAMsM,EAAYxN,GAAS,IAAM,KAEjD6hB,SAAU,SAASA,SAASrU,EAAYxN,GACtC0hB,EAASlmB,KAAK0F,KAAMsM,EAAYxN,GAAS,IAAM,OAEhD,QAhHHyH,EAAe,SAASC,YAAYnF,GAClCsD,EAAW3E,KAAMuG,EAAcL,GAC/B,IAAI+H,EAAanJ,EAAQzD,GACzBrB,KAAKqgB,GAAKza,EAAUtL,KAAK,IAAIgM,MAAM2H,GAAa,GAChDjO,KAAK8e,GAAW7Q,GAGlBxH,EAAY,SAASC,SAASyC,EAAQmD,EAAY2B,GAChDtJ,EAAW3E,KAAMyG,EAAW2X,GAC5BzZ,EAAWwE,EAAQ5C,EAAc6X,GACjC,IAAIwC,EAAezX,EAAO2V,GACtBtV,EAASnL,EAAUiO,GACvB,GAAI9C,EAAS,GAAcoX,EAATpX,EAAuB,MAAMxD,EAAW,iBAE1D,GAA0B4a,EAAtBpX,GADJyE,EAAaA,IAAepU,GAAY+mB,EAAepX,EAASpH,EAAS6L,IACjC,MAAMjI,EAxJ/B,iBAyJfhG,KAAK6e,GAAW1V,EAChBnJ,KAAK+e,GAAWvV,EAChBxJ,KAAK8e,GAAW7Q,GAGd8C,IACFjH,UAAUvD,EAAcoY,EAAa,MACrC7U,UAAUrD,EAlJD,SAkJoB,MAC7BqD,UAAUrD,EAAWkY,EAAa,MAClC7U,UAAUrD,EAAWmY,EAAa,OAGpC/Z,EAAY4B,EAAUxK,GAAY,CAChCykB,QAAS,SAASA,QAAQpU,GACxB,OAAOrR,IAAI+E,KAAM,EAAGsM,GAAY,IAAM,IAAM,IAE9CuU,SAAU,SAASA,SAASvU;AAC1B,OAAOrR,IAAI+E,KAAM,EAAGsM,GAAY,IAElCwU,SAAU,SAASA,SAASxU,GAC1B,IAAIqT,EAAQ1kB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,IAC/C,OAAQge,EAAM,IAAM,EAAIA,EAAM,KAAO,IAAM,IAE7CoB,UAAW,SAASA,UAAUzU,GAC5B,IAAIqT,EAAQ1kB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,IAC/C,OAAOge,EAAM,IAAM,EAAIA,EAAM,IAE/BqB,SAAU,SAASA,SAAS1U,GAC1B,OAAOoT,UAAUzkB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,MAEtDsf,UAAW,SAASA,UAAU3U,GAC5B,OAAOoT,UAAUzkB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,OAAS,GAE/Duf,WAAY,SAASA,WAAW5U,GAC9B,OAAOiT,cAActkB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,IAAK,GAAI,IAEnEwf,WAAY,SAASA,WAAW7U,GAC9B,OAAOiT,cAActkB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,IAAK,GAAI,IAEnE8e,QAAS,SAASA,QAAQnU,EAAYxN,GACpCuK,IAAIrJ,KAAM,EAAGsM,EAAYsT,OAAQ9gB,IAEnC6hB,SAAU,SAASA,SAASrU,EAAYxN,GACtCuK,IAAIrJ,KAAM,EAAGsM,EAAYsT,OAAQ9gB,IAEnCsiB,SAAU,SAASA,SAAS9U,EAAYxN,GACtCuK,IAAIrJ,KAAM,EAAGsM,EAAYuT,QAAS/gB,EAAO6C,UAAU,KAErD0f,UAAW,SAASA,UAAU/U,EAAYxN,GACxCuK,IAAIrJ,KAAM,EAAGsM,EAAYuT,QAAS/gB,EAAO6C,UAAU,KAErD2f,SAAU,SAASA,SAAShV,EAAYxN,GACtCuK,IAAIrJ,KAAM,EAAGsM,EAAYwT,QAAShhB,EAAO6C,UAAU,KAErD4f,UAAW,SAASA,UAAUjV,EAAYxN,GACxCuK,IAAIrJ,KAAM,EAAGsM,EAAYwT,QAAShhB,EAAO6C,UAAU,KAErD6f,WAAY,SAASA,WAAWlV,EAAYxN,GAC1CuK,IAAIrJ,KAAM,EAAGsM,EAAY0T,QAASlhB,EAAO6C,UAAU,KAErD8f,WAAY,SAASA,WAAWnV,EAAYxN,GAC1CuK,IAAIrJ,KAAM,EAAGsM,EAAYyT,QAASjhB,EAAO6C,UAAU,OAsCzDyR,EAAe7M,EAAcL,GAC7BkN,EAAe3M,EAAW2X,GAC1BtiB,EAAK2K,EAAUxK,GAAYwI,EAAOoE,MAAM,GACxC3O,EAAQgM,GAAgBK,EACxBrM,EAAQkkB,GAAa3X,GAKf,SAAUtM,EAAQD,GAExBC,EAAOD,QAAU,SAAUwnB,EAAQzgB,GACjC,IAAI0gB,EAAW1gB,IAAYpG,OAAOoG,GAAW,SAAU2gB,GACrD,OAAO3gB,EAAQ2gB,IACb3gB,EACJ,OAAO,SAAUxD,GACf,OAAOqC,OAAOrC,GAAIwD,QAAQygB,EAAQC,MAOhC,SAAUxnB,EAAQD,EAASF,GAEjCG,EAAOD,SAAWF,EAAoB,KAAOA,EAAoB,EAApBA,CAAuB,WAClE,OAA2G,GAApGa,OAAOC,eAAed,EAAoB,GAApBA,CAAwB,OAAQ,IAAK,CAAEiB,IAAK,WAAc,OAAO,KAAQmD,KAMlG,SAAUjE,EAAQD,EAASF,GAEjCE,EAAQyE,EAAI3E,EAAoB,IAK1B,SAAUG,EAAQD,EAASF,GAEjC,IAAImF,EAAMnF,EAAoB,IAC1BkG,EAAYlG,EAAoB,IAChCkN,EAAelN,EAAoB,GAApBA,EAAwB,GACvCsG,EAAWtG,EAAoB,GAApBA,CAAwB,YAEvCG,EAAOD,QAAU,SAAUoB,EAAQumB,GACjC,IAGIxlB,EAHAuC,EAAIsB,EAAU5E,GACdlB,EAAI,EACJ+I,EAAS,GAEb,IAAK9G,KAAOuC,EAAOvC,GAAOiE,GAAUnB,EAAIP,EAAGvC,IAAQ8G,EAAOC,KAAK/G,GAE/D,KAAsBjC,EAAfynB,EAAMxgB,QAAgBlC,EAAIP,EAAGvC,EAAMwlB,EAAMznB,SAC7C8M,EAAa/D,EAAQ9G,IAAQ8G,EAAOC,KAAK/G,IAE5C,OAAO8G,IAMH,SAAUhJ,EAAQD,EAASF,GAEjC,IAAI0E,EAAK1E,EAAoB,GACzBuE,EAAWvE,EAAoB,GAC/B8d,EAAU9d,EAAoB,IAElCG,EAAOD,QAAUF,EAAoB,GAAKa,OAAOinB,iBAAmB,SAASA,iBAAiBljB,EAAG2F,GAC/FhG,EAASK,GAKT,IAJA,IAGI9B,EAHAyG,EAAOuU,EAAQvT,GACflD,EAASkC,EAAKlC,OACdjH,EAAI,EAEQA,EAATiH,GAAY3C,EAAGC,EAAEC,EAAG9B,EAAIyG,EAAKnJ,KAAMmK,EAAWzH,IACrD,OAAO8B,IAMH,SAAUzE,EAAQD,EAASF,GAGjC,IAAIkG,EAAYlG,EAAoB,IAChCkL,EAAOlL,EAAoB,IAAI2E,EAC/BoB,EAAW,GAAGA,SAEdgiB,EAA+B,iBAAVpkB,QAAsBA,QAAU9C,OAAOiW,oBAC5DjW,OAAOiW,oBAAoBnT,QAAU,GAUzCxD,EAAOD,QAAQyE,EAAI,SAASmS,oBAAoBrT,GAC9C,OAAOskB,GAAoC,mBAArBhiB,EAASzF,KAAKmD,GATjB,SAAUA,GAC7B,IACE,OAAOyH,EAAKzH,GACZ,MAAOM,GACP,OAAOgkB,EAAYngB,SAK0CogB,CAAevkB,GAAMyH,EAAKhF,EAAUzC,MAM/F,SAAUtD,EAAQD,GAGxBC,EAAOD,QAAUW,OAAO4c,IAAM,SAASA,GAAGuB,EAAGiJ,GAE3C,OAAOjJ,IAAMiJ,EAAU,IAANjJ,GAAW,EAAIA,GAAM,EAAIiJ,EAAIjJ,GAAKA,GAAKiJ,GAAKA,IAMzD,SAAU9nB,EAAQD,EAASF,GAIjC,IAAIsH,EAAYtH,EAAoB,IAChCwD,EAAWxD,EAAoB,GAC/B4gB,EAAS5gB,EAAoB,IAC7BiO,EAAa,GAAGrG,MAChBsgB,EAAY,GAUhB/nB,EAAOD,QAAUkD,SAAS+kB,MAAQ,SAASA,KAAK3gB,GAC9C,IAAID,EAAKD,EAAUtB,MACfoiB,EAAWna,EAAW3N,KAAKqH,UAAW,GACtC0gB,EAAQ,WACV,IAAI3J,EAAO0J,EAAS/T,OAAOpG,EAAW3N,KAAKqH,YAC3C,OAAO3B,gBAAgBqiB,EAbX,SAAU3lB,EAAGgQ,EAAKgM,GAChC,KAAMhM,KAAOwV,GAAY,CACvB,IAAK,IAAIhnB,EAAI,GAAId,EAAI,EAAGA,EAAIsS,EAAKtS,IAAKc,EAAEd,GAAK,KAAOA,EAAI,IAExD8nB,EAAUxV,GAAOtP,SAAS,MAAO,gBAAkBlC,EAAE2E,KAAK,KAAO,KACjE,OAAOqiB,EAAUxV,GAAKhQ,EAAGgc,GAQM4J,CAAU/gB,EAAImX,EAAKrX,OAAQqX,GAAQkC,EAAOrZ,EAAImX,EAAMlX,IAGrF,OADIhE,EAAS+D,EAAG/F,aAAY6mB,EAAM7mB,UAAY+F,EAAG/F,WAC1C6mB,IAMH,SAAUloB,EAAQD,EAASF,GAEjC,IAAIiW,EAAMjW,EAAoB,IAC9BG,EAAOD,QAAU,SAAUuD,EAAI8kB,GAC7B,GAAiB,iBAAN9kB,GAA6B,UAAXwS,EAAIxS,GAAiB,MAAMC,UAAU6kB,GAClE,OAAQ9kB,IAMJ,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/B8H,EAAQlE,KAAKkE,MACjB3H,EAAOD,QAAU,SAASsoB,UAAU/kB,GAClC,OAAQD,EAASC,IAAOglB,SAAShlB,IAAOqE,EAAMrE,KAAQA,IAMlD,SAAUtD,EAAQD,EAASF,GAEjC,IAAI0oB,EAAc1oB,EAAoB,GAAG2oB,WACrCC,EAAQ5oB,EAAoB,IAAI8X,KAEpC3X,EAAOD,QAAU,EAAIwoB,EAAY1oB,EAAoB,IAAM,QAAW8e,SAAW,SAAS6J,WAAWjN,GACnG,IAAI7U,EAAS+hB,EAAM9iB,OAAO4V,GAAM,GAC5BvS,EAASuf,EAAY7hB,GACzB,OAAkB,IAAXsC,GAAoC,KAApBtC,EAAOmS,OAAO,IAAa,EAAI7P,GACpDuf,GAKE,SAAUvoB,EAAQD,EAASF,GAEjC,IAAI6oB,EAAY7oB,EAAoB,GAAG8oB,SACnCF,EAAQ5oB,EAAoB,IAAI8X,KAChCiR,EAAK/oB,EAAoB,IACzBgpB,EAAM,cAEV7oB,EAAOD,QAAmC,IAAzB2oB,EAAUE,EAAK,OAA0C,KAA3BF,EAAUE,EAAK,QAAiB,SAASD,SAASpN,EAAKuN,GACpG,IAAIpiB,EAAS+hB,EAAM9iB,OAAO4V,GAAM,GAChC,OAAOmN,EAAUhiB,EAASoiB,IAAU,IAAOD,EAAI7hB,KAAKN,GAAU,GAAK,MACjEgiB,GAKE,SAAU1oB,EAAQD,GAGxBC,EAAOD,QAAU0D,KAAKslB,OAAS,SAASA,MAAMlK,GAC5C,OAAmB,MAAXA,GAAKA,IAAcA,EAAI,KAAOA,EAAIA,EAAIA,EAAI,EAAIpb,KAAK6gB,IAAI,EAAIzF,KAM/D,SAAU7e,EAAQD,EAASF,GAGjC,IAAI+e,EAAO/e,EAAoB,IAC3BwkB,EAAM5gB,KAAK4gB,IACX2E,EAAU3E,EAAI,GAAI,IAClB4E,EAAY5E,EAAI,GAAI,IACpB6E,EAAQ7E,EAAI,EAAG,MAAQ,EAAI4E,GAC3BE,EAAQ9E,EAAI,GAAI,KAMpBrkB,EAAOD,QAAU0D,KAAK2lB,QAAU,SAASA,OAAOvK,GAC9C,IAEI5a,EAAG+E,EAFHqgB,EAAO5lB,KAAK2gB,IAAIvF,GAChByK,EAAQ1K,EAAKC,GAEjB,OAAIwK,EAAOF,EAAcG,GAAwBD,EAAOF,EAAQF,EAPrD,EAAID,EAAU,EAAIA,GAOgDG,EAAQF,EAIxEC,GAFblgB,GADA/E,GAAK,EAAIglB,EAAYD,GAAWK,IAClBplB,EAAIolB,KAEIrgB,GAAUA,EAAesgB,EAAQ3K,SAChD2K,EAAQtgB,IAMX,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIuE,EAAWvE,EAAoB,GACnCG,EAAOD,QAAU,SAAUkQ,EAAU7I,EAAIzC,EAAOyI,GAC9C,IACE,OAAOA,EAAUhG,EAAGhD,EAASO,GAAO,GAAIA,EAAM,IAAMyC,EAAGzC,GAEvD,MAAOf,GACP,IAAI2lB,EAAMtZ,EAAiB,UAE3B,MADIsZ,IAAQ7pB,IAAW0E,EAASmlB,EAAIppB,KAAK8P,IACnCrM,KAOJ,SAAU5D,EAAQD,EAASF,GAEjC,IAAIsH,EAAYtH,EAAoB,IAChCqG,EAAWrG,EAAoB,GAC/BgF,EAAUhF,EAAoB,IAC9BoI,EAAWpI,EAAoB,GAEnCG,EAAOD,QAAU,SAAUsH,EAAMwB,EAAYqH,EAAMsZ,EAAMC,GACvDtiB,EAAU0B,GACV,IAAIpE,EAAIyB,EAASmB,GACb3D,EAAOmB,EAAQJ,GACfyC,EAASe,EAASxD,EAAEyC,QACpB6B,EAAQ0gB,EAAUviB,EAAS,EAAI,EAC/BjH,EAAIwpB,GAAW,EAAI,EACvB,GAAIvZ,EAAO,EAAG,OAAS,CACrB,GAAInH,KAASrF,EAAM,CACjB8lB,EAAO9lB,EAAKqF,GACZA,GAAS9I,EACT,MAGF,GADA8I,GAAS9I,EACLwpB,EAAU1gB,EAAQ,EAAI7B,GAAU6B,EAClC,MAAMxF,UAAU,+CAGpB,KAAMkmB,EAAmB,GAAT1gB,EAAsBA,EAAT7B,EAAgB6B,GAAS9I,EAAO8I,KAASrF,IACpE8lB,EAAO3gB,EAAW2gB,EAAM9lB,EAAKqF,GAAQA,EAAOtE,IAE9C,OAAO+kB,IAMH,SAAUxpB,EAAQD,EAASF,GAKjC,IAAIqG,EAAWrG,EAAoB,GAC/B+K,EAAkB/K,EAAoB,IACtCoI,EAAWpI,EAAoB,GAEnCG,EAAOD,QAAU,GAAG8Q,YAAc,SAASA,WAAW/N,EAAkBgO,GACtE,IAAIrM,EAAIyB,EAASL,MACb0M,EAAMtK,EAASxD,EAAEyC,QACjBwiB,EAAK9e,EAAgB9H,EAAQyP,GAC7BxC,EAAOnF,EAAgBkG,EAAOyB,GAC9BN,EAAyB,EAAnBzK,UAAUN,OAAaM,UAAU,GAAK9H,GAC5Cgf,EAAQjb,KAAKU,KAAK8N,IAAQvS,GAAY6S,EAAM3H,EAAgBqH,EAAKM,IAAQxC,EAAMwC,EAAMmX,GACrFC,EAAM,EAMV,IALI5Z,EAAO2Z,GAAMA,EAAK3Z,EAAO2O,IAC3BiL,GAAO,EACP5Z,GAAQ2O,EAAQ,EAChBgL,GAAMhL,EAAQ,GAEC,EAAVA,KACD3O,KAAQtL,EAAGA,EAAEilB,GAAMjlB,EAAEsL,UACbtL,EAAEilB,GACdA,GAAMC,EACN5Z,GAAQ4Z,EACR,OAAOllB,IAML,SAAUzE,EAAQD,EAASF,GAIjC,IAAI2a,EAAa3a,EAAoB,IACrCA,EAAoB,EAApBA,CAAuB,CACrBiD,OAAQ,SACR8N,OAAO,EACPgZ,OAAQpP,IAAe,IAAI7W,MAC1B,CACDA,KAAM6W,KAMF,SAAUxa,EAAQD,EAASF,GAG7BA,EAAoB,IAAoB,KAAd,KAAKgqB,OAAchqB,EAAoB,GAAG2E,EAAE8S,OAAOjW,UAAW,QAAS,CACnGT,cAAc,EACdE,IAAKjB,EAAoB,OAMrB,SAAUG,EAAQD,GAExBC,EAAOD,QAAU,SAAU4D,GACzB,IACE,MAAO,CAAEC,GAAG,EAAO6P,EAAG9P,KACtB,MAAOC,GACP,MAAO,CAAEA,GAAG,EAAM6P,EAAG7P,MAOnB,SAAU5D,EAAQD,EAASF,GAEjC,IAAIuE,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/BiqB,EAAuBjqB,EAAoB,IAE/CG,EAAOD,QAAU,SAAUwP,EAAGsP,GAE5B,GADAza,EAASmL,GACLlM,EAASwb,IAAMA,EAAEvY,cAAgBiJ,EAAG,OAAOsP,EAC/C,IAAIkL,EAAoBD,EAAqBtlB,EAAE+K,GAG/C,OADA2T,EADc6G,EAAkB7G,SACxBrE,GACDkL,EAAkB5G,UAMrB,SAAUnjB,EAAQD,EAASF,GAIjC,IAAImqB,EAASnqB,EAAoB,KAC7ByP,EAAWzP,EAAoB,IAInCG,EAAOD,QAAUF,EAAoB,GAApBA,CAHP,MAGoC,SAAUiB,GACtD,OAAO,SAASwT,MAAQ,OAAOxT,EAAI+E,KAAyB,EAAnB2B,UAAUN,OAAaM,UAAU,GAAK9H,MAC9E,CAEDoB,IAAK,SAASA,IAAIoB,GAChB,IAAI+nB,EAAQD,EAAOE,SAAS5a,EAASzJ,KAR/B,OAQ2C3D,GACjD,OAAO+nB,GAASA,EAAMxW,GAGxBvE,IAAK,SAASA,IAAIhN,EAAKyC,GACrB,OAAOqlB,EAAO/S,IAAI3H,EAASzJ,KAbrB,OAayC,IAAR3D,EAAY,EAAIA,EAAKyC,KAE7DqlB,GAAQ,IAKL,SAAUhqB,EAAQD,EAASF,GAIjC,IAAI0E,EAAK1E,EAAoB,GAAG2E,EAC5BmE,EAAS9I,EAAoB,IAC7B6K,EAAc7K,EAAoB,IAClCgC,EAAMhC,EAAoB,IAC1B2K,EAAa3K,EAAoB,IACjCgc,EAAQhc,EAAoB,IAC5BsqB,EAActqB,EAAoB,IAClCmQ,EAAOnQ,EAAoB,IAC3B2L,EAAa3L,EAAoB,IACjC+W,EAAc/W,EAAoB,GAClC8V,EAAU9V,EAAoB,IAAI8V,QAClCrG,EAAWzP,EAAoB,IAC/BuqB,EAAOxT,EAAc,KAAO,OAE5BsT,EAAW,SAAU7iB,EAAMnF,GAE7B,IACI+nB,EADAlhB,EAAQ4M,EAAQzT,GAEpB,GAAc,MAAV6G,EAAe,OAAO1B,EAAKiY,GAAGvW,GAElC,IAAKkhB,EAAQ5iB,EAAKgjB,GAAIJ,EAAOA,EAAQA,EAAMlpB,EACzC,GAAIkpB,EAAMlM,GAAK7b,EAAK,OAAO+nB,GAI/BjqB,EAAOD,QAAU,CACf4c,eAAgB,SAAU5J,EAAShM,EAAMsB,EAAQ4T,GAC/C,IAAI1M,EAAIwD,EAAQ,SAAU1L,EAAMiP,GAC9B9L,EAAWnD,EAAMkI,EAAGxI,EAAM,MAC1BM,EAAK2P,GAAKjQ,EACVM,EAAKiY,GAAK3W,EAAO,MACjBtB,EAAKgjB,GAAK3qB,GACV2H,EAAKijB,GAAK5qB,GACV2H,EAAK+iB,GAAQ,EACT9T,GAAY5W,IAAWmc,EAAMvF,EAAUjO,EAAQhB,EAAK4U,GAAQ5U,KAsDlE,OApDAqD,EAAY6E,EAAElO,UAAW,CAGvBqb,MAAO,SAASA,QACd,IAAK,IAAIrV,EAAOiI,EAASzJ,KAAMkB,GAAOyM,EAAOnM,EAAKiY,GAAI2K,EAAQ5iB,EAAKgjB,GAAIJ,EAAOA,EAAQA,EAAMlpB,EAC1FkpB,EAAMM,GAAI,EACNN,EAAM1oB,IAAG0oB,EAAM1oB,EAAI0oB,EAAM1oB,EAAER,EAAIrB,WAC5B8T,EAAKyW,EAAMhqB,GAEpBoH,EAAKgjB,GAAKhjB,EAAKijB,GAAK5qB,GACpB2H,EAAK+iB,GAAQ,GAIfI,SAAU,SAAUtoB,GAClB,IAAImF,EAAOiI,EAASzJ,KAAMkB,GACtBkjB,EAAQC,EAAS7iB,EAAMnF,GAC3B,GAAI+nB,EAAO,CACT,IAAI3Z,EAAO2Z,EAAMlpB,EACb0pB,EAAOR,EAAM1oB,SACV8F,EAAKiY,GAAG2K,EAAMhqB,GACrBgqB,EAAMM,GAAI,EACNE,IAAMA,EAAK1pB,EAAIuP,GACfA,IAAMA,EAAK/O,EAAIkpB,GACfpjB,EAAKgjB,IAAMJ,IAAO5iB,EAAKgjB,GAAK/Z,GAC5BjJ,EAAKijB,IAAML,IAAO5iB,EAAKijB,GAAKG,GAChCpjB,EAAK+iB,KACL,QAASH,GAIb5Y,QAAS,SAASA,QAAQxI,GACxByG,EAASzJ,KAAMkB,GAGf,IAFA,IACIkjB,EADAzlB,EAAI3C,EAAIgH,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,GAAW,GAElEuqB,EAAQA,EAAQA,EAAMlpB,EAAI8E,KAAKwkB,IAGpC,IAFA7lB,EAAEylB,EAAMxW,EAAGwW,EAAMlM,EAAGlY,MAEbokB,GAASA,EAAMM,GAAGN,EAAQA,EAAM1oB,GAK3CyD,IAAK,SAASA,IAAI9C,GAChB,QAASgoB,EAAS5a,EAASzJ,KAAMkB,GAAO7E,MAGxC0U,GAAarS,EAAGgL,EAAElO,UAAW,OAAQ,CACvCP,IAAK,WACH,OAAOwO,EAASzJ,KAAMkB,GAAMqjB,MAGzB7a,GAET0H,IAAK,SAAU5P,EAAMnF,EAAKyC,GACxB,IACI8lB,EAAM1hB,EADNkhB,EAAQC,EAAS7iB,EAAMnF,GAoBzB,OAjBE+nB,EACFA,EAAMxW,EAAI9O,GAGV0C,EAAKijB,GAAKL,EAAQ,CAChBhqB,EAAG8I,EAAQ4M,EAAQzT,GAAK,GACxB6b,EAAG7b,EACHuR,EAAG9O,EACHpD,EAAGkpB,EAAOpjB,EAAKijB,GACfvpB,EAAGrB,GACH6qB,GAAG,GAEAljB,EAAKgjB,KAAIhjB,EAAKgjB,GAAKJ,GACpBQ,IAAMA,EAAK1pB,EAAIkpB,GACnB5iB,EAAK+iB,KAES,MAAVrhB,IAAe1B,EAAKiY,GAAGvW,GAASkhB,IAC7B5iB,GAEX6iB,SAAUA,EACVtN,UAAW,SAAUrN,EAAGxI,EAAMsB,GAG5B8hB,EAAY5a,EAAGxI,EAAM,SAAUsY,EAAU1F,GACvC9T,KAAKmR,GAAK1H,EAAS+P,EAAUtY,GAC7BlB,KAAK0Z,GAAK5F,EACV9T,KAAKykB,GAAK5qB,IACT,WAKD,IAJA,IAAI2H,EAAOxB,KACP8T,EAAOtS,EAAKkY,GACZ0K,EAAQ5iB,EAAKijB,GAEVL,GAASA,EAAMM,GAAGN,EAAQA,EAAM1oB,EAEvC,OAAK8F,EAAK2P,KAAQ3P,EAAKijB,GAAKL,EAAQA,EAAQA,EAAMlpB,EAAIsG,EAAK2P,GAAGqT,IAMnCra,EAAK,EAApB,QAAR2J,EAA+BsQ,EAAMlM,EAC7B,UAARpE,EAAiCsQ,EAAMxW,EAC5B,CAACwW,EAAMlM,EAAGkM,EAAMxW,KAN7BpM,EAAK2P,GAAKtX,GACHsQ,EAAK,KAMb3H,EAAS,UAAY,UAAWA,GAAQ,GAG3CmD,EAAWzE,MAOT,SAAU/G,EAAQD,EAASF,GAIjC,IAAImqB,EAASnqB,EAAoB,KAC7ByP,EAAWzP,EAAoB,IAInCG,EAAOD,QAAUF,EAAoB,GAApBA,CAHP,MAGoC,SAAUiB,GACtD,OAAO,SAAS4pB,MAAQ,OAAO5pB,EAAI+E,KAAyB,EAAnB2B,UAAUN,OAAaM,UAAU,GAAK9H,MAC9E,CAEDyc,IAAK,SAASA,IAAIxX,GAChB,OAAOqlB,EAAO/S,IAAI3H,EAASzJ,KARrB,OAQiClB,EAAkB,IAAVA,EAAc,EAAIA,EAAOA,KAEzEqlB,IAKG,SAAUhqB,EAAQD,EAASF,GAIjC,IAcI8qB,EAdAlpB,EAAS5B,EAAoB,GAC7B+qB,EAAO/qB,EAAoB,GAApBA,CAAwB,GAC/B+B,EAAW/B,EAAoB,IAC/B4V,EAAO5V,EAAoB,IAC3Bie,EAASje,EAAoB,IAC7BgrB,EAAOhrB,EAAoB,KAC3BwD,EAAWxD,EAAoB,GAC/ByP,EAAWzP,EAAoB,IAC/BirB,EAAkBjrB,EAAoB,IACtCkrB,GAAWtpB,EAAOupB,eAAiB,kBAAmBvpB,EACtDwpB,EAAW,UACXrV,EAAUH,EAAKG,QACfR,EAAe1U,OAAO0U,aACtB8V,EAAsBL,EAAKM,QAG3BpY,EAAU,SAAUjS,GACtB,OAAO,SAASsqB,UACd,OAAOtqB,EAAI+E,KAAyB,EAAnB2B,UAAUN,OAAaM,UAAU,GAAK9H,MAIvD8Z,EAAU,CAEZ1Y,IAAK,SAASA,IAAIoB,GAChB,GAAImB,EAASnB,GAAM,CACjB,IAAIsR,EAAOoC,EAAQ1T,GACnB,OAAa,IAATsR,EAAsB0X,EAAoB5b,EAASzJ,KAAMolB,IAAWnqB,IAAIoB,GACrEsR,EAAOA,EAAK3N,KAAKyZ,IAAM5f,KAIlCwP,IAAK,SAASA,IAAIhN,EAAKyC,GACrB,OAAOkmB,EAAK5T,IAAI3H,EAASzJ,KAAMolB,GAAW/oB,EAAKyC,KAK/C0mB,EAAWrrB,EAAOD,QAAUF,EAAoB,GAApBA,CAAwBorB,EAAUlY,EAASyG,EAASqR,GAAM,GAAM,GAG5FC,GAAmBC,IAErBjN,GADA6M,EAAcE,EAAKlO,eAAe5J,EAASkY,IACxB5pB,UAAWmY,GAC9B/D,EAAKC,MAAO,EACZkV,EAAK,CAAC,SAAU,MAAO,MAAO,OAAQ,SAAU1oB,GAC9C,IAAI0O,EAAQya,EAAShqB,UACjBwG,EAAS+I,EAAM1O,GACnBN,EAASgP,EAAO1O,EAAK,SAAU+B,EAAGqD,GAEhC,GAAIjE,EAASY,KAAOmR,EAAanR,GAAI,CAC9B4B,KAAKwkB,KAAIxkB,KAAKwkB,GAAK,IAAIM,GAC5B,IAAI3hB,EAASnD,KAAKwkB,GAAGnoB,GAAK+B,EAAGqD,GAC7B,MAAc,OAAPpF,EAAe2D,KAAOmD,EAE7B,OAAOnB,EAAO1H,KAAK0F,KAAM5B,EAAGqD,SAQ9B,SAAUtH,EAAQD,EAASF,GAIjC,IAAI6K,EAAc7K,EAAoB,IAClC+V,EAAU/V,EAAoB,IAAI+V,QAClCxR,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/B2K,EAAa3K,EAAoB,IACjCgc,EAAQhc,EAAoB,IAC5BqL,EAAoBrL,EAAoB,IACxCyrB,EAAOzrB,EAAoB,IAC3ByP,EAAWzP,EAAoB,IAC/B+M,EAAY1B,EAAkB,GAC9B2B,EAAiB3B,EAAkB,GACnCiK,EAAK,EAGL+V,EAAsB,SAAU7jB,GAClC,OAAOA,EAAKijB,KAAOjjB,EAAKijB,GAAK,IAAIiB,IAE/BA,EAAsB,WACxB1lB,KAAK5B,EAAI,IAEPunB,EAAqB,SAAU3nB,EAAO3B,GACxC,OAAO0K,EAAU/I,EAAMI,EAAG,SAAUX,GAClC,OAAOA,EAAG,KAAOpB,KAGrBqpB,EAAoBlqB,UAAY,CAC9BP,IAAK,SAAUoB,GACb,IAAI+nB,EAAQuB,EAAmB3lB,KAAM3D,GACrC,GAAI+nB,EAAO,OAAOA,EAAM,IAE1BjlB,IAAK,SAAU9C,GACb,QAASspB,EAAmB3lB,KAAM3D,IAEpCgN,IAAK,SAAUhN,EAAKyC,GAClB,IAAIslB,EAAQuB,EAAmB3lB,KAAM3D,GACjC+nB,EAAOA,EAAM,GAAKtlB,EACjBkB,KAAK5B,EAAEgF,KAAK,CAAC/G,EAAKyC,KAEzB6lB,SAAU,SAAUtoB,GAClB,IAAI6G,EAAQ8D,EAAehH,KAAK5B,EAAG,SAAUX,GAC3C,OAAOA,EAAG,KAAOpB,IAGnB,OADK6G,GAAOlD,KAAK5B,EAAEwnB,OAAO1iB,EAAO,MACvBA,IAId/I,EAAOD,QAAU,CACf4c,eAAgB,SAAU5J,EAAShM,EAAMsB,EAAQ4T,GAC/C,IAAI1M,EAAIwD,EAAQ,SAAU1L,EAAMiP,GAC9B9L,EAAWnD,EAAMkI,EAAGxI,EAAM,MAC1BM,EAAK2P,GAAKjQ,EACVM,EAAKiY,GAAKnK,IAENmB,IADJjP,EAAKijB,GAAK5qB,KACiBmc,EAAMvF,EAAUjO,EAAQhB,EAAK4U,GAAQ5U,KAoBlE,OAlBAqD,EAAY6E,EAAElO,UAAW,CAGvBmpB,SAAU,SAAUtoB,GAClB,IAAKmB,EAASnB,GAAM,OAAO,EAC3B,IAAIsR,EAAOoC,EAAQ1T,GACnB,OAAa,IAATsR,EAAsB0X,EAAoB5b,EAASzJ,KAAMkB,IAAe,UAAE7E,GACvEsR,GAAQ8X,EAAK9X,EAAM3N,KAAKyZ,YAAc9L,EAAK3N,KAAKyZ,KAIzDta,IAAK,SAASA,IAAI9C,GAChB,IAAKmB,EAASnB,GAAM,OAAO,EAC3B,IAAIsR,EAAOoC,EAAQ1T,GACnB,OAAa,IAATsR,EAAsB0X,EAAoB5b,EAASzJ,KAAMkB,IAAO/B,IAAI9C,GACjEsR,GAAQ8X,EAAK9X,EAAM3N,KAAKyZ,OAG5B/P,GAET0H,IAAK,SAAU5P,EAAMnF,EAAKyC,GACxB,IAAI6O,EAAOoC,EAAQxR,EAASlC,IAAM,GAGlC,OAFa,IAATsR,EAAe0X,EAAoB7jB,GAAM6H,IAAIhN,EAAKyC,GACjD6O,EAAKnM,EAAKiY,IAAM3a,EACd0C,GAET8jB,QAASD,IAML,SAAUlrB,EAAQD,EAASF,GAGjC,IAAIqE,EAAYrE,EAAoB,IAChCoI,EAAWpI,EAAoB,GACnCG,EAAOD,QAAU,SAAUuD,GACzB,GAAIA,IAAO5D,GAAW,OAAO,EAC7B,IAAIgsB,EAASxnB,EAAUZ,GACnB4D,EAASe,EAASyjB,GACtB,GAAIA,IAAWxkB,EAAQ,MAAM2E,WAAW,iBACxC,OAAO3E,IAMH,SAAUlH,EAAQD,EAASF,GAKjC,IAAI6Y,EAAU7Y,EAAoB,IAC9BwD,EAAWxD,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BgC,EAAMhC,EAAoB,IAC1B8rB,EAAuB9rB,EAAoB,EAApBA,CAAuB,sBAgClDG,EAAOD,QA9BP,SAAS6rB,iBAAiB9oB,EAAQoc,EAAUjd,EAAQ4pB,EAAW/a,EAAOgb,EAAOC,EAAQC,GAMnF,IALA,IAGIC,EAASC,EAHTC,EAAcrb,EACdsb,EAAc,EACdhP,IAAQ2O,GAASlqB,EAAIkqB,EAAQC,EAAS,GAGnCI,EAAcP,GAAW,CAC9B,GAAIO,KAAenqB,EAAQ,CASzB,GARAgqB,EAAU7O,EAAQA,EAAMnb,EAAOmqB,GAAcA,EAAalN,GAAYjd,EAAOmqB,GAE7EF,GAAa,EACT7oB,EAAS4oB,KAEXC,GADAA,EAAaD,EAAQN,MACOjsB,KAAcwsB,EAAaxT,EAAQuT,IAG7DC,GAAsB,EAARJ,EAChBK,EAAcP,iBAAiB9oB,EAAQoc,EAAU+M,EAAShkB,EAASgkB,EAAQ/kB,QAASilB,EAAaL,EAAQ,GAAK,MACzG,CACL,GAAmB,kBAAfK,EAAiC,MAAM5oB,YAC3CT,EAAOqpB,GAAeF,EAGxBE,IAEFC,IAEF,OAAOD,IAQH,SAAUnsB,EAAQD,EAASF,GAGjC,IAAIoI,EAAWpI,EAAoB,GAC/B4e,EAAS5e,EAAoB,IAC7B+E,EAAU/E,EAAoB,IAElCG,EAAOD,QAAU,SAAUsH,EAAMglB,EAAWC,EAAYC,GACtD,IAAIxpB,EAAI4C,OAAOf,EAAQyC,IACnBmlB,EAAezpB,EAAEmE,OACjBulB,EAAUH,IAAe5sB,GAAY,IAAMiG,OAAO2mB,GAClDI,EAAezkB,EAASokB,GAC5B,GAAIK,GAAgBF,GAA2B,IAAXC,EAAe,OAAO1pB,EAC1D,IAAI4pB,EAAUD,EAAeF,EACzBI,EAAenO,EAAOte,KAAKssB,EAAShpB,KAAKiE,KAAKilB,EAAUF,EAAQvlB,SAEpE,OAD0BylB,EAAtBC,EAAa1lB,SAAkB0lB,EAAeA,EAAanlB,MAAM,EAAGklB,IACjEJ,EAAOK,EAAe7pB,EAAIA,EAAI6pB,IAMjC,SAAU5sB,EAAQD,EAASF,GAEjC,IAAI+W,EAAc/W,EAAoB,GAClC8d,EAAU9d,EAAoB,IAC9BkG,EAAYlG,EAAoB,IAChCoe,EAASpe,EAAoB,IAAI2E,EACrCxE,EAAOD,QAAU,SAAU8sB,GACzB,OAAO,SAAUvpB,GAOf,IANA,IAKIpB,EALAuC,EAAIsB,EAAUzC,GACd8F,EAAOuU,EAAQlZ,GACfyC,EAASkC,EAAKlC,OACdjH,EAAI,EACJ+I,EAAS,GAEG/I,EAATiH,GACLhF,EAAMkH,EAAKnJ,KACN2W,IAAeqH,EAAO9d,KAAKsE,EAAGvC,IACjC8G,EAAOC,KAAK4jB,EAAY,CAAC3qB,EAAKuC,EAAEvC,IAAQuC,EAAEvC,IAG9C,OAAO8G,KAOL,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIgL,EAAUhL,EAAoB,IAC9BkQ,EAAOlQ,EAAoB,KAC/BG,EAAOD,QAAU,SAAUgH,GACzB,OAAO,SAAS+lB,SACd,GAAIjiB,EAAQhF,OAASkB,EAAM,MAAMxD,UAAUwD,EAAO,yBAClD,OAAOgJ,EAAKlK,SAOV,SAAU7F,EAAQD,EAASF,GAEjC,IAAIgc,EAAQhc,EAAoB,IAEhCG,EAAOD,QAAU,SAAUkU,EAAM/F,GAC/B,IAAIlF,EAAS,GAEb,OADA6S,EAAM5H,GAAM,EAAOjL,EAAOC,KAAMD,EAAQkF,GACjClF,IAMH,SAAUhJ,EAAQD,GAGxBC,EAAOD,QAAU0D,KAAKspB,OAAS,SAASA,MAAMlO,EAAGmO,EAAOC,EAAQC,EAAQC,GACtE,OACuB,IAArB3lB,UAAUN,QAEL2X,GAAKA,GAELmO,GAASA,GAETC,GAAUA,GAEVC,GAAUA,GAEVC,GAAWA,EACT7H,IACLzG,IAAMF,UAAYE,KAAOF,SAAiBE,GACtCA,EAAImO,IAAUG,EAAUD,IAAWD,EAASD,GAASE,IAMzD,SAAUltB,EAAQD,EAASF,GAEjC,IAAIgL,EAAUhL,EAAoB,IAC9BqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCyL,EAAYzL,EAAoB,IACpCG,EAAOD,QAAUF,EAAoB,IAAIutB,WAAa,SAAU9pB,GAC9D,IAAImB,EAAI/D,OAAO4C,GACf,OAAOmB,EAAEyJ,KAAcxO,IAClB,eAAgB+E,GAEhB6G,EAAUhK,eAAeuJ,EAAQpG,MAMlC,SAAUzE,EAAQD,EAASF,GAIjC,IAAIwtB,EAAOxtB,EAAoB,KAC3B4gB,EAAS5gB,EAAoB,IAC7BsH,EAAYtH,EAAoB,IACpCG,EAAOD,QAAU,WAOf,IANA,IAAIqH,EAAKD,EAAUtB,MACfqB,EAASM,UAAUN,OACnBomB,EAAQ,IAAInhB,MAAMjF,GAClBjH,EAAI,EACJ8U,EAAIsY,EAAKtY,EACTwY,GAAS,EACGttB,EAATiH,IAAiBomB,EAAMrtB,GAAKuH,UAAUvH,QAAU8U,IAAGwY,GAAS,GACnE,OAAO,WACL,IAIIhP,EAHArO,EAAO1I,UAAUN,OACjBgX,EAAI,EACJH,EAAI,EAER,IAAKwP,IAAWrd,EAAM,OAAOuQ,EAAOrZ,EAAIkmB,EAL7BznB,MAOX,GADA0Y,EAAO+O,EAAM7lB,QACT8lB,EAAQ,KAAerP,EAAThX,EAAYgX,IAASK,EAAKL,KAAOnJ,IAAGwJ,EAAKL,GAAK1W,UAAUuW,MAC1E,KAAcA,EAAP7N,GAAUqO,EAAKtV,KAAKzB,UAAUuW,MACrC,OAAO0C,EAAOrZ,EAAImX,EATP1Y,SAgBT,SAAU7F,EAAQD,EAASF,GAEjCG,EAAOD,QAAUF,EAAoB,IAK/B,SAAUG,EAAQD,EAASF,GAEjC,IAAI0E,EAAK1E,EAAoB,GACzBmG,EAAOnG,EAAoB,IAC3BmkB,EAAUnkB,EAAoB,IAC9BkG,EAAYlG,EAAoB,IAEpCG,EAAOD,QAAU,SAASytB,OAAO1qB,EAAQ2qB,GAKvC,IAJA,IAGIvrB,EAHAkH,EAAO4a,EAAQje,EAAU0nB,IACzBvmB,EAASkC,EAAKlC,OACdjH,EAAI,EAEQA,EAATiH,GAAY3C,EAAGC,EAAE1B,EAAQZ,EAAMkH,EAAKnJ,KAAM+F,EAAKxB,EAAEipB,EAAOvrB,IAC/D,OAAOY,IAMH,SAAU9C,EAAQD,EAASF,GAEjCA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBG,EAAOD,QAAUF,EAAoB,MAK/B,SAAUG,EAAQD,EAASF,GAKjC,IAAI4B,EAAS5B,EAAoB,GAC7BmF,EAAMnF,EAAoB,IAC1B+W,EAAc/W,EAAoB,GAClCkC,EAAUlC,EAAoB,GAC9B+B,EAAW/B,EAAoB,IAC/BoV,EAAOpV,EAAoB,IAAImI,IAC/B0lB,EAAS7tB,EAAoB,GAC7B0U,EAAS1U,EAAoB,IAC7BoZ,EAAiBpZ,EAAoB,IACrCiE,EAAMjE,EAAoB,IAC1BoL,EAAMpL,EAAoB,GAC1B2d,EAAS3d,EAAoB,IAC7B8tB,EAAY9tB,EAAoB,IAChC+tB,EAAW/tB,EAAoB,KAC/B6Y,EAAU7Y,EAAoB,IAC9BuE,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/BqG,EAAWrG,EAAoB,GAC/BkG,EAAYlG,EAAoB,IAChCyE,EAAczE,EAAoB,IAClCkF,EAAalF,EAAoB,IACjCguB,EAAUhuB,EAAoB,IAC9BiuB,EAAUjuB,EAAoB,KAC9B+L,EAAQ/L,EAAoB,IAC5BkuB,EAAQluB,EAAoB,IAC5B8L,EAAM9L,EAAoB,GAC1BqJ,EAAQrJ,EAAoB,IAC5BmG,EAAO4F,EAAMpH,EACbD,EAAKoH,EAAInH,EACTuG,EAAO+iB,EAAQtpB,EACfiZ,EAAUhc,EAAOsC,OACjBiqB,EAAQvsB,EAAOwsB,KACfC,EAAaF,GAASA,EAAMG,UAC5BrsB,EAAY,YACZssB,EAASnjB,EAAI,WACbojB,EAAepjB,EAAI,eACnBgT,EAAS,GAAGlG,qBACZuW,EAAiB/Z,EAAO,mBACxBga,EAAaha,EAAO,WACpBia,EAAYja,EAAO,cACnBnO,EAAc1F,OAAOoB,GACrB2sB,EAA+B,mBAAXhR,KAA2BsQ,EAAMvpB,EACrDkqB,EAAUjtB,EAAOitB,QAEjBC,GAAUD,IAAYA,EAAQ5sB,KAAe4sB,EAAQ5sB,GAAW8sB,UAGhEC,EAAgBjY,GAAe8W,EAAO,WACxC,OAES,GAFFG,EAAQtpB,EAAG,GAAI,IAAK,CACzBzD,IAAK,WAAc,OAAOyD,EAAGsB,KAAM,IAAK,CAAElB,MAAO,IAAKV,MACpDA,IACD,SAAUX,EAAIpB,EAAKmW,GACtB,IAAIyW,EAAY9oB,EAAKI,EAAalE,GAC9B4sB,UAAkB1oB,EAAYlE,GAClCqC,EAAGjB,EAAIpB,EAAKmW,GACRyW,GAAaxrB,IAAO8C,GAAa7B,EAAG6B,EAAalE,EAAK4sB,IACxDvqB,EAEAwqB,EAAO,SAAUpoB,GACnB,IAAIqoB,EAAMT,EAAW5nB,GAAOknB,EAAQpQ,EAAQ3b,IAE5C,OADAktB,EAAIzP,GAAK5Y,EACFqoB,GAGLC,EAAWR,GAAyC,iBAApBhR,EAAQxN,SAAuB,SAAU3M,GAC3E,MAAoB,iBAANA,GACZ,SAAUA,GACZ,OAAOA,aAAcma,GAGnBwB,EAAkB,SAASte,eAAe2C,EAAIpB,EAAKmW,GAKrD,OAJI/U,IAAO8C,GAAa6Y,EAAgBuP,EAAWtsB,EAAKmW,GACxDjU,EAASd,GACTpB,EAAMoC,EAAYpC,GAAK,GACvBkC,EAASiU,GACLrT,EAAIupB,EAAYrsB,IACbmW,EAAExX,YAIDmE,EAAI1B,EAAI8qB,IAAW9qB,EAAG8qB,GAAQlsB,KAAMoB,EAAG8qB,GAAQlsB,IAAO,GAC1DmW,EAAIwV,EAAQxV,EAAG,CAAExX,WAAYkE,EAAW,GAAG,OAJtCC,EAAI1B,EAAI8qB,IAAS7pB,EAAGjB,EAAI8qB,EAAQrpB,EAAW,EAAG,KACnDzB,EAAG8qB,GAAQlsB,IAAO,GAIX2sB,EAAcvrB,EAAIpB,EAAKmW,IACzB9T,EAAGjB,EAAIpB,EAAKmW,IAEnB6W,EAAoB,SAASvH,iBAAiBrkB,EAAIX,GACpDyB,EAASd,GAKT,IAJA,IAGIpB,EAHAkH,EAAOwkB,EAASjrB,EAAIoD,EAAUpD,IAC9B1C,EAAI,EACJC,EAAIkJ,EAAKlC,OAEFjH,EAAJC,GAAO+e,EAAgB3b,EAAIpB,EAAMkH,EAAKnJ,KAAM0C,EAAET,IACrD,OAAOoB,GAKL6rB,EAAwB,SAASpX,qBAAqB7V,GACxD,IAAIktB,EAAInR,EAAO9d,KAAK0F,KAAM3D,EAAMoC,EAAYpC,GAAK,IACjD,QAAI2D,OAASO,GAAepB,EAAIupB,EAAYrsB,KAAS8C,EAAIwpB,EAAWtsB,QAC7DktB,IAAMpqB,EAAIa,KAAM3D,KAAS8C,EAAIupB,EAAYrsB,IAAQ8C,EAAIa,KAAMuoB,IAAWvoB,KAAKuoB,GAAQlsB,KAAOktB,IAE/FC,EAA4B,SAASppB,yBAAyB3C,EAAIpB,GAGpE,GAFAoB,EAAKyC,EAAUzC,GACfpB,EAAMoC,EAAYpC,GAAK,GACnBoB,IAAO8C,IAAepB,EAAIupB,EAAYrsB,IAAS8C,EAAIwpB,EAAWtsB,GAAlE,CACA,IAAImW,EAAIrS,EAAK1C,EAAIpB,GAEjB,OADImW,IAAKrT,EAAIupB,EAAYrsB,IAAU8C,EAAI1B,EAAI8qB,IAAW9qB,EAAG8qB,GAAQlsB,KAAOmW,EAAExX,YAAa,GAChFwX,IAELiX,GAAuB,SAAS3Y,oBAAoBrT,GAKtD,IAJA,IAGIpB,EAHAwlB,EAAQ3c,EAAKhF,EAAUzC,IACvB0F,EAAS,GACT/I,EAAI,EAEcA,EAAfynB,EAAMxgB,QACNlC,EAAIupB,EAAYrsB,EAAMwlB,EAAMznB,OAASiC,GAAOksB,GAAUlsB,GAAO+S,GAAMjM,EAAOC,KAAK/G,GACpF,OAAO8G,GAEPumB,GAAyB,SAAS9W,sBAAsBnV,GAM1D,IALA,IAIIpB,EAJAstB,EAAQlsB,IAAO8C,EACfshB,EAAQ3c,EAAKykB,EAAQhB,EAAYzoB,EAAUzC,IAC3C0F,EAAS,GACT/I,EAAI,EAEcA,EAAfynB,EAAMxgB,SACPlC,EAAIupB,EAAYrsB,EAAMwlB,EAAMznB,OAAUuvB,IAAQxqB,EAAIoB,EAAalE,IAAc8G,EAAOC,KAAKslB,EAAWrsB,IACxG,OAAO8G,GAINylB,IAYH7sB,GAXA6b,EAAU,SAAS1Z,SACjB,GAAI8B,gBAAgB4X,EAAS,MAAMla,UAAU,gCAC7C,IAAIoD,EAAM7C,EAAuB,EAAnB0D,UAAUN,OAAaM,UAAU,GAAK9H,IAChD2S,EAAO,SAAU1N,GACfkB,OAASO,GAAaiM,EAAKlS,KAAKquB,EAAW7pB,GAC3CK,EAAIa,KAAMuoB,IAAWppB,EAAIa,KAAKuoB,GAASznB,KAAMd,KAAKuoB,GAAQznB,IAAO,GACrEkoB,EAAchpB,KAAMc,EAAK5B,EAAW,EAAGJ,KAGzC,OADIiS,GAAe+X,GAAQE,EAAczoB,EAAaO,EAAK,CAAE/F,cAAc,EAAMsO,IAAKmD,IAC/E0c,EAAKpoB,KAEG7E,GAAY,WAAY,SAAS8D,WAChD,OAAOC,KAAK0Z,KAGd3T,EAAMpH,EAAI6qB,EACV1jB,EAAInH,EAAIya,EACRpf,EAAoB,IAAI2E,EAAIspB,EAAQtpB,EAAI8qB,GACxCzvB,EAAoB,IAAI2E,EAAI2qB,EAC5BpB,EAAMvpB,EAAI+qB,GAEN3Y,IAAgB/W,EAAoB,KACtC+B,EAASwE,EAAa,uBAAwB+oB,GAAuB,GAGvE3R,EAAOhZ,EAAI,SAAUjE,GACnB,OAAOwuB,EAAK9jB,EAAI1K,MAIpBwB,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,GAAKksB,EAAY,CAAE1qB,OAAQ0Z,IAEnE,IAAK,IAAIgS,GAAa,iHAGpBpqB,MAAM,KAAM6Y,GAAI,EAAuBA,GAApBuR,GAAWvoB,QAAY+D,EAAIwkB,GAAWvR,OAE3D,IAAK,IAAIwR,GAAmBxmB,EAAM+B,EAAIpH,OAAQka,GAAI,EAA6BA,GAA1B2R,GAAiBxoB,QAAaymB,EAAU+B,GAAiB3R,OAE9Ghc,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKksB,EAAY,SAAU,CAErDkB,MAAO,SAAUztB,GACf,OAAO8C,EAAIspB,EAAgBpsB,GAAO,IAC9BosB,EAAepsB,GACfosB,EAAepsB,GAAOub,EAAQvb,IAGpC0tB,OAAQ,SAASA,OAAOZ,GACtB,IAAKC,EAASD,GAAM,MAAMzrB,UAAUyrB,EAAM,qBAC1C,IAAK,IAAI9sB,KAAOosB,EAAgB,GAAIA,EAAepsB,KAAS8sB,EAAK,OAAO9sB,GAE1E2tB,UAAW,WAAclB,GAAS,GAClCmB,UAAW,WAAcnB,GAAS,KAGpC5sB,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKksB,EAAY,SAAU,CAErD9lB,OA/FY,SAASA,OAAOrF,EAAIX,GAChC,OAAOA,IAAMjD,GAAYmuB,EAAQvqB,GAAM4rB,EAAkBrB,EAAQvqB,GAAKX,IAgGtEhC,eAAgBse,EAEhB0I,iBAAkBuH,EAElBjpB,yBAA0BopB,EAE1B1Y,oBAAqB2Y,GAErB7W,sBAAuB8W,KAKzB,IAAIQ,GAAsBrC,EAAO,WAAcK,EAAMvpB,EAAE,KAEvDzC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAIwtB,GAAqB,SAAU,CAC7DtX,sBAAuB,SAASA,sBAAsBnV,GACpD,OAAOyqB,EAAMvpB,EAAE0B,EAAS5C,OAK5B0qB,GAASjsB,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAMksB,GAAcf,EAAO,WAC9D,IAAI3qB,EAAI0a,IAIR,MAA0B,UAAnByQ,EAAW,CAACnrB,KAA2C,MAAxBmrB,EAAW,CAAEjqB,EAAGlB,KAAyC,MAAzBmrB,EAAWxtB,OAAOqC,OACrF,OAAQ,CACXorB,UAAW,SAASA,UAAU7qB,GAI5B,IAHA,IAEIkkB,EAAUwI,EAFVzR,EAAO,CAACjb,GACRrD,EAAI,EAEkBA,EAAnBuH,UAAUN,QAAYqX,EAAKtV,KAAKzB,UAAUvH,MAEjD,GADA+vB,EAAYxI,EAAWjJ,EAAK,IACvBlb,EAASmkB,IAAalkB,IAAO5D,MAAauvB,EAAS3rB,GAMxD,OALKoV,EAAQ8O,KAAWA,EAAW,SAAUtlB,EAAKyC,GAEhD,GADwB,mBAAbqrB,IAAyBrrB,EAAQqrB,EAAU7vB,KAAK0F,KAAM3D,EAAKyC,KACjEsqB,EAAStqB,GAAQ,OAAOA,IAE/B4Z,EAAK,GAAKiJ,EACH0G,EAAW3mB,MAAMymB,EAAOzP,MAKnCd,EAAQ3b,GAAWusB,IAAiBxuB,EAAoB,GAApBA,CAAwB4d,EAAQ3b,GAAYusB,EAAc5Q,EAAQ3b,GAAWiG,SAEjHkR,EAAewE,EAAS,UAExBxE,EAAexV,KAAM,QAAQ,GAE7BwV,EAAexX,EAAOwsB,KAAM,QAAQ,IAK9B,SAAUjuB,EAAQD,EAASF,GAEjCG,EAAOD,QAAUF,EAAoB,GAApBA,CAAwB,4BAA6BoD,SAAS2C,WAKzE,SAAU5F,EAAQD,EAASF,GAGjC,IAAI8d,EAAU9d,EAAoB,IAC9B+d,EAAO/d,EAAoB,IAC3BiG,EAAMjG,EAAoB,IAC9BG,EAAOD,QAAU,SAAUuD,GACzB,IAAI0F,EAAS2U,EAAQra,GACjB0a,EAAaJ,EAAKpZ,EACtB,GAAIwZ,EAKF,IAJA,IAGI9b,EAHA+tB,EAAUjS,EAAW1a,GACrB2a,EAASnY,EAAItB,EACbvE,EAAI,EAEgBA,EAAjBgwB,EAAQ/oB,QAAgB+W,EAAO9d,KAAKmD,EAAIpB,EAAM+tB,EAAQhwB,OAAO+I,EAAOC,KAAK/G,GAChF,OAAO8G,IAML,SAAUhJ,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK1C,EAAoB,GAAI,SAAU,CAAEc,eAAgBd,EAAoB,GAAG2E,KAKtG,SAAUxE,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK1C,EAAoB,GAAI,SAAU,CAAE8nB,iBAAkB9nB,EAAoB,QAKrG,SAAUG,EAAQD,EAASF,GAGjC,IAAIkG,EAAYlG,EAAoB,IAChCwvB,EAA4BxvB,EAAoB,IAAI2E,EAExD3E,EAAoB,GAApBA,CAAwB,2BAA4B,WAClD,OAAO,SAASoG,yBAAyB3C,EAAIpB,GAC3C,OAAOmtB,EAA0BtpB,EAAUzC,GAAKpB,OAO9C,SAAUlC,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAE4F,OAAQ9I,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAGjC,IAAIqG,EAAWrG,EAAoB,GAC/BqwB,EAAkBrwB,EAAoB,IAE1CA,EAAoB,GAApBA,CAAwB,iBAAkB,WACxC,OAAO,SAASwG,eAAe/C,GAC7B,OAAO4sB,EAAgBhqB,EAAS5C,QAO9B,SAAUtD,EAAQD,EAASF,GAGjC,IAAIqG,EAAWrG,EAAoB,GAC/BqJ,EAAQrJ,EAAoB,IAEhCA,EAAoB,GAApBA,CAAwB,OAAQ,WAC9B,OAAO,SAASuJ,KAAK9F,GACnB,OAAO4F,EAAMhD,EAAS5C,QAOpB,SAAUtD,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,sBAAuB,WAC7C,OAAOA,EAAoB,KAAK2E,KAM5B,SAAUxE,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/B4V,EAAO5V,EAAoB,IAAIgW,SAEnChW,EAAoB,GAApBA,CAAwB,SAAU,SAAUswB,GAC1C,OAAO,SAASC,OAAO9sB,GACrB,OAAO6sB,GAAW9sB,EAASC,GAAM6sB,EAAQ1a,EAAKnS,IAAOA,MAOnD,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/B4V,EAAO5V,EAAoB,IAAIgW,SAEnChW,EAAoB,GAApBA,CAAwB,OAAQ,SAAUwwB,GACxC,OAAO,SAASC,KAAKhtB,GACnB,OAAO+sB,GAAShtB,EAASC,GAAM+sB,EAAM5a,EAAKnS,IAAOA,MAO/C,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/B4V,EAAO5V,EAAoB,IAAIgW,SAEnChW,EAAoB,GAApBA,CAAwB,oBAAqB,SAAU0wB,GACrD,OAAO,SAASjb,kBAAkBhS,GAChC,OAAOitB,GAAsBltB,EAASC,GAAMitB,EAAmB9a,EAAKnS,IAAOA,MAOzE,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU2wB,GAC5C,OAAO,SAASC,SAASntB,GACvB,OAAOD,EAASC,MAAMktB,GAAYA,EAAUltB,OAO1C,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU6wB,GAC5C,OAAO,SAASC,SAASrtB,GACvB,OAAOD,EAASC,MAAMotB,GAAYA,EAAUptB,OAO1C,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,eAAgB,SAAU+wB,GAChD,OAAO,SAASxb,aAAa9R,GAC3B,QAAOD,EAASC,MAAMstB,GAAgBA,EAActtB,QAOlD,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CAAEub,OAAQje,EAAoB,OAKjE,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEua,GAAIzd,EAAoB,QAKjD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEqb,eAAgBve,EAAoB,IAAIqP,OAKjE,SAAUlP,EAAQD,EAASF,GAKjC,IAAIgL,EAAUhL,EAAoB,IAC9BmH,EAAO,GACXA,EAAKnH,EAAoB,EAApBA,CAAuB,gBAAkB,IAC1CmH,EAAO,IAAM,cACfnH,EAAoB,GAApBA,CAAwBa,OAAOW,UAAW,WAAY,SAASuE,WAC7D,MAAO,WAAaiF,EAAQhF,MAAQ,MACnC,IAMC,SAAU7F,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAG,WAAY,CAAEqlB,KAAMnoB,EAAoB,QAKrD,SAAUG,EAAQD,EAASF,GAEjC,IAAI0E,EAAK1E,EAAoB,GAAG2E,EAC5BqsB,EAAS5tB,SAAS5B,UAClByvB,EAAS,wBACF,SAGHD,GAAUhxB,EAAoB,IAAM0E,EAAGssB,EAHpC,OAGkD,CAC3DjwB,cAAc,EACdE,IAAK,WACH,IACE,OAAQ,GAAK+E,MAAMua,MAAM0Q,GAAQ,GACjC,MAAOltB,GACP,MAAO,QAQP,SAAU5D,EAAQD,EAASF,GAIjC,IAAIwD,EAAWxD,EAAoB,GAC/BwG,EAAiBxG,EAAoB,IACrCkxB,EAAelxB,EAAoB,EAApBA,CAAuB,eACtCmxB,EAAgB/tB,SAAS5B,UAEvB0vB,KAAgBC,GAAgBnxB,EAAoB,GAAG2E,EAAEwsB,EAAeD,EAAc,CAAEpsB,MAAO,SAAUF,GAC7G,GAAmB,mBAARoB,OAAuBxC,EAASoB,GAAI,OAAO,EACtD,IAAKpB,EAASwC,KAAKxE,WAAY,OAAOoD,aAAaoB,KAEnD,KAAOpB,EAAI4B,EAAe5B,IAAI,GAAIoB,KAAKxE,YAAcoD,EAAG,OAAO,EAC/D,OAAO,MAMH,SAAUzE,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7BmF,EAAMnF,EAAoB,IAC1BiW,EAAMjW,EAAoB,IAC1Bic,EAAoBjc,EAAoB,IACxCyE,EAAczE,EAAoB,IAClC0G,EAAQ1G,EAAoB,GAC5BkL,EAAOlL,EAAoB,IAAI2E,EAC/BwB,EAAOnG,EAAoB,IAAI2E,EAC/BD,EAAK1E,EAAoB,GAAG2E,EAC5BikB,EAAQ5oB,EAAoB,IAAI8X,KAChCsZ,EAAS,SACTC,EAAUzvB,EAAOwvB,GACjB7d,EAAO8d,EACPtgB,EAAQsgB,EAAQ7vB,UAEhB8vB,EAAarb,EAAIjW,EAAoB,GAApBA,CAAwB+Q,KAAWqgB,EACpDG,EAAO,SAAUzrB,OAAOtE,UAGxBgwB,EAAW,SAAUC,GACvB,IAAIhuB,EAAKgB,EAAYgtB,GAAU,GAC/B,GAAiB,iBAANhuB,GAA8B,EAAZA,EAAG4D,OAAY,CAE1C,IACIqqB,EAAOzI,EAAO0I,EADdC,GADJnuB,EAAK8tB,EAAO9tB,EAAGqU,OAAS8Q,EAAMnlB,EAAI,IACnBsV,WAAW,GAE1B,GAAc,KAAV6Y,GAA0B,KAAVA,GAElB,GAAc,MADdF,EAAQjuB,EAAGsV,WAAW,KACQ,MAAV2Y,EAAe,OAAOjM,SACrC,GAAc,KAAVmM,EAAc,CACvB,OAAQnuB,EAAGsV,WAAW,IACpB,KAAK,GAAI,KAAK,GAAIkQ,EAAQ,EAAG0I,EAAU,GAAI,MAC3C,KAAK,GAAI,KAAK,IAAK1I,EAAQ,EAAG0I,EAAU,GAAI,MAC5C,QAAS,OAAQluB,EAEnB,IAAK,IAAoDouB,EAAhDC,EAASruB,EAAGmE,MAAM,GAAIxH,EAAI,EAAGC,EAAIyxB,EAAOzqB,OAAcjH,EAAIC,EAAGD,IAIpE,IAHAyxB,EAAOC,EAAO/Y,WAAW3Y,IAGd,IAAauxB,EAAPE,EAAgB,OAAOpM,IACxC,OAAOqD,SAASgJ,EAAQ7I,IAE5B,OAAQxlB,GAGZ,IAAK4tB,EAAQ,UAAYA,EAAQ,QAAUA,EAAQ,QAAS,CAC1DA,EAAU,SAASU,OAAOjtB,GACxB,IAAIrB,EAAKkE,UAAUN,OAAS,EAAI,EAAIvC,EAChC0C,EAAOxB,KACX,OAAOwB,aAAgB6pB,IAEjBC,EAAa5qB,EAAM,WAAcqK,EAAM7I,QAAQ5H,KAAKkH,KAAYyO,EAAIzO,IAAS4pB,GAC7EnV,EAAkB,IAAI1I,EAAKie,EAAS/tB,IAAM+D,EAAM6pB,GAAWG,EAAS/tB,IAE5E,IAAK,IAMgBpB,EANZkH,EAAOvJ,EAAoB,GAAKkL,EAAKqI,GAAQ,6KAMpD/N,MAAM,KAAM6Y,EAAI,EAAsBA,EAAd9U,EAAKlC,OAAYgX,IACrClZ,EAAIoO,EAAMlR,EAAMkH,EAAK8U,MAAQlZ,EAAIksB,EAAShvB,IAC5CqC,EAAG2sB,EAAShvB,EAAK8D,EAAKoN,EAAMlR,KAGhCgvB,EAAQ7vB,UAAYuP,GACdtK,YAAc4qB,EACpBrxB,EAAoB,GAApBA,CAAwB4B,EAAQwvB,EAAQC,KAMpC,SAAUlxB,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqE,EAAYrE,EAAoB,IAChCgyB,EAAehyB,EAAoB,KACnC4e,EAAS5e,EAAoB,IAC7BiyB,EAAW,GAAIC,QACfpqB,EAAQlE,KAAKkE,MACb6L,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GACvBwe,EAAQ,wCAGRC,EAAW,SAAUlxB,EAAGV,GAG1B,IAFA,IAAIJ,GAAK,EACLiyB,EAAK7xB,IACAJ,EAAI,GAEXuT,EAAKvT,IADLiyB,GAAMnxB,EAAIyS,EAAKvT,IACA,IACfiyB,EAAKvqB,EAAMuqB,EAAK,MAGhBC,EAAS,SAAUpxB,GAGrB,IAFA,IAAId,EAAI,EACJI,EAAI,EACM,KAALJ,GAEPuT,EAAKvT,GAAK0H,GADVtH,GAAKmT,EAAKvT,IACUc,GACpBV,EAAKA,EAAIU,EAAK,KAGdqxB,EAAc,WAGhB,IAFA,IAAInyB,EAAI,EACJuB,EAAI,GACM,KAALvB,GACP,GAAU,KAANuB,GAAkB,IAANvB,GAAuB,IAAZuT,EAAKvT,GAAU,CACxC,IAAIoyB,EAAI1sB,OAAO6N,EAAKvT,IACpBuB,EAAU,KAANA,EAAW6wB,EAAI7wB,EAAIid,EAAOte,KA1BzB,IA0BoC,EAAIkyB,EAAEnrB,QAAUmrB,EAE3D,OAAO7wB,GAEP6iB,EAAM,SAAUxF,EAAG9d,EAAGuxB,GACxB,OAAa,IAANvxB,EAAUuxB,EAAMvxB,EAAI,GAAM,EAAIsjB,EAAIxF,EAAG9d,EAAI,EAAGuxB,EAAMzT,GAAKwF,EAAIxF,EAAIA,EAAG9d,EAAI,EAAGuxB,IAelFvwB,EAAQA,EAAQY,EAAIZ,EAAQQ,KAAOuvB,IACV,UAAvB,KAAQC,QAAQ,IACG,MAAnB,GAAIA,QAAQ,IACS,SAArB,MAAMA,QAAQ,IACuB,yBAArC,mBAAsBA,QAAQ,MAC1BlyB,EAAoB,EAApBA,CAAuB,WAE3BiyB,EAAS3xB,KAAK,OACX,SAAU,CACb4xB,QAAS,SAASA,QAAQQ,GACxB,IAII3uB,EAAG4uB,EAAGtU,EAAGH,EAJTc,EAAIgT,EAAahsB,KAAMmsB,GACvBxtB,EAAIN,EAAUquB,GACd/wB,EAAI,GACJpB,EA3DG,IA6DP,GAAIoE,EAAI,GAAS,GAAJA,EAAQ,MAAMqH,WAAWmmB,GAEtC,GAAInT,GAAKA,EAAG,MAAO,MACnB,GAAIA,IAAM,MAAa,MAALA,EAAW,OAAOlZ,OAAOkZ,GAK3C,GAJIA,EAAI,IACNrd,EAAI,IACJqd,GAAKA,GAEC,MAAJA,EAKF,GAHA2T,GADA5uB,EArCI,SAAUib,GAGlB,IAFA,IAAI9d,EAAI,EACJ0xB,EAAK5T,EACI,MAAN4T,GACL1xB,GAAK,GACL0xB,GAAM,KAER,KAAa,GAANA,GACL1xB,GAAK,EACL0xB,GAAM,EACN,OAAO1xB,EA2BDujB,CAAIzF,EAAIwF,EAAI,EAAG,GAAI,IAAM,IACrB,EAAIxF,EAAIwF,EAAI,GAAIzgB,EAAG,GAAKib,EAAIwF,EAAI,EAAGzgB,EAAG,GAC9C4uB,GAAK,iBAEG,GADR5uB,EAAI,GAAKA,GACE,CAGT,IAFAquB,EAAS,EAAGO,GACZtU,EAAI1Z,EACQ,GAAL0Z,GACL+T,EAAS,IAAK,GACd/T,GAAK,EAIP,IAFA+T,EAAS5N,EAAI,GAAInG,EAAG,GAAI,GACxBA,EAAIta,EAAI,EACI,IAALsa,GACLiU,EAAO,GAAK,IACZjU,GAAK,GAEPiU,EAAO,GAAKjU,GACZ+T,EAAS,EAAG,GACZE,EAAO,GACP/xB,EAAIgyB,SAEJH,EAAS,EAAGO,GACZP,EAAS,IAAMruB,EAAG,GAClBxD,EAAIgyB,IAAgB3T,EAAOte,KA9FxB,IA8FmCqE,GAQxC,OAHApE,EAFM,EAAJoE,EAEEhD,IADJuc,EAAI3d,EAAE8G,SACQ1C,EAAI,KAAOia,EAAOte,KAnG3B,IAmGsCqE,EAAIuZ,GAAK3d,EAAIA,EAAEqH,MAAM,EAAGsW,EAAIvZ,GAAK,IAAMpE,EAAEqH,MAAMsW,EAAIvZ,IAE1FhD,EAAIpB,MAQR,SAAUJ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6tB,EAAS7tB,EAAoB,GAC7BgyB,EAAehyB,EAAoB,KACnC6yB,EAAe,GAAIC,YAEvB5wB,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKmrB,EAAO,WAEtC,MAA2C,MAApCgF,EAAavyB,KAAK,EAAGT,QACvBguB,EAAO,WAEZgF,EAAavyB,KAAK,OACf,SAAU,CACbwyB,YAAa,SAASA,YAAYC,GAChC,IAAIvrB,EAAOwqB,EAAahsB,KAAM,6CAC9B,OAAO+sB,IAAclzB,GAAYgzB,EAAavyB,KAAKkH,GAAQqrB,EAAavyB,KAAKkH,EAAMurB,OAOjF,SAAU5yB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEimB,QAASvlB,KAAK4gB,IAAI,GAAI,OAK/C,SAAUrkB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BgzB,EAAYhzB,EAAoB,GAAGyoB,SAEvCvmB,EAAQA,EAAQgB,EAAG,SAAU,CAC3BulB,SAAU,SAASA,SAAShlB,GAC1B,MAAoB,iBAANA,GAAkBuvB,EAAUvvB,OAOxC,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEslB,UAAWxoB,EAAoB,QAKxD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAC3B6E,MAAO,SAASA,MAAM8jB,GAEpB,OAAOA,GAAUA,MAOf,SAAU1rB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwoB,EAAYxoB,EAAoB,KAChCukB,EAAM3gB,KAAK2gB,IAEfriB,EAAQA,EAAQgB,EAAG,SAAU,CAC3B+vB,cAAe,SAASA,cAAcpH,GACpC,OAAOrD,EAAUqD,IAAWtH,EAAIsH,IAAW,qBAOzC,SAAU1rB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEgwB,iBAAkB,oBAK3C,SAAU/yB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEiwB,kBAAmB,oBAK5C,SAAUhzB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B0oB,EAAc1oB,EAAoB,KAEtCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKqvB,OAAOpJ,YAAcD,GAAc,SAAU,CAAEC,WAAYD,KAKtF,SAAUvoB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B6oB,EAAY7oB,EAAoB,KAEpCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKqvB,OAAOjJ,UAAYD,GAAY,SAAU,CAAEC,SAAUD,KAKhF,SAAU1oB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B6oB,EAAY7oB,EAAoB,KAEpCkC,EAAQA,EAAQU,EAAIV,EAAQQ,GAAKomB,UAAYD,GAAY,CAAEC,SAAUD,KAK/D,SAAU1oB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B0oB,EAAc1oB,EAAoB,KAEtCkC,EAAQA,EAAQU,EAAIV,EAAQQ,GAAKimB,YAAcD,GAAc,CAAEC,WAAYD,KAKrE,SAAUvoB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkpB,EAAQlpB,EAAoB,KAC5BozB,EAAOxvB,KAAKwvB,KACZC,EAASzvB,KAAK0vB,MAElBpxB,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAM2wB,GAEW,KAAxCzvB,KAAKkE,MAAMurB,EAAOtB,OAAOwB,aAEzBF,EAAOvU,WAAaA,UACtB,OAAQ,CACTwU,MAAO,SAASA,MAAMtU,GACpB,OAAQA,GAAKA,GAAK,EAAIyG,IAAU,kBAAJzG,EACxBpb,KAAK6gB,IAAIzF,GAAKpb,KAAK8gB,IACnBwE,EAAMlK,EAAI,EAAIoU,EAAKpU,EAAI,GAAKoU,EAAKpU,EAAI,QAOvC,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwzB,EAAS5vB,KAAK6vB,MAOlBvxB,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAM8wB,GAA0B,EAAhB,EAAIA,EAAO,IAAS,OAAQ,CAAEC,MAL1E,SAASA,MAAMzU,GACb,OAAQyJ,SAASzJ,GAAKA,IAAW,GAALA,EAAaA,EAAI,GAAKyU,OAAOzU,GAAKpb,KAAK6gB,IAAIzF,EAAIpb,KAAKwvB,KAAKpU,EAAIA,EAAI,IAAxDA,MASjC,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B0zB,EAAS9vB,KAAK+vB,MAGlBzxB,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAMgxB,GAAU,EAAIA,GAAQ,GAAK,GAAI,OAAQ,CACvEC,MAAO,SAASA,MAAM3U,GACpB,OAAmB,IAAXA,GAAKA,GAAUA,EAAIpb,KAAK6gB,KAAK,EAAIzF,IAAM,EAAIA,IAAM,MAOvD,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+e,EAAO/e,EAAoB,IAE/BkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB0wB,KAAM,SAASA,KAAK5U,GAClB,OAAOD,EAAKC,GAAKA,GAAKpb,KAAK4gB,IAAI5gB,KAAK2gB,IAAIvF,GAAI,EAAI,OAO9C,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB2wB,MAAO,SAASA,MAAM7U,GACpB,OAAQA,KAAO,GAAK,GAAKpb,KAAKkE,MAAMlE,KAAK6gB,IAAIzF,EAAI,IAAOpb,KAAKkwB,OAAS,OAOpE,SAAU3zB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwC,EAAMoB,KAAKpB,IAEfN,EAAQA,EAAQgB,EAAG,OAAQ,CACzB6wB,KAAM,SAASA,KAAK/U,GAClB,OAAQxc,EAAIwc,GAAKA,GAAKxc,GAAKwc,IAAM,MAO/B,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bif,EAASjf,EAAoB,IAEjCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKuc,GAAUrb,KAAKsb,OAAQ,OAAQ,CAAEA,MAAOD,KAKnE,SAAU9e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEqmB,OAAQvpB,EAAoB,QAKnD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BukB,EAAM3gB,KAAK2gB,IAEfriB,EAAQA,EAAQgB,EAAG,OAAQ,CACzB8wB,MAAO,SAASA,MAAMC,EAAQC,GAM5B,IALA,IAIIjsB,EAAKksB,EAJLC,EAAM,EACNh0B,EAAI,EACJiQ,EAAO1I,UAAUN,OACjBgtB,EAAO,EAEJj0B,EAAIiQ,GAELgkB,GADJpsB,EAAMsc,EAAI5c,UAAUvH,QAGlBg0B,EAAMA,GADND,EAAME,EAAOpsB,GACKksB,EAAM,EACxBE,EAAOpsB,GAGPmsB,GAFe,EAANnsB,GACTksB,EAAMlsB,EAAMosB,GACCF,EACDlsB,EAEhB,OAAOosB,IAASvV,SAAWA,SAAWuV,EAAOzwB,KAAKwvB,KAAKgB,OAOrD,SAAUj0B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bs0B,EAAQ1wB,KAAK2wB,KAGjBryB,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACrD,OAAgC,GAAzBs0B,EAAM,WAAY,IAA4B,GAAhBA,EAAMjtB,SACzC,OAAQ,CACVktB,KAAM,SAASA,KAAKvV,EAAGiJ,GACrB,IAAIuM,EAAS,MACTC,GAAMzV,EACN0V,GAAMzM,EACN0M,EAAKH,EAASC,EACdG,EAAKJ,EAASE,EAClB,OAAO,EAAIC,EAAKC,IAAOJ,EAASC,IAAO,IAAMG,EAAKD,GAAMH,EAASE,IAAO,KAAO,KAAO,OAOpF,SAAUv0B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB2xB,MAAO,SAASA,MAAM7V,GACpB,OAAOpb,KAAK6gB,IAAIzF,GAAKpb,KAAKkxB,WAOxB,SAAU30B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEgmB,MAAOlpB,EAAoB,QAKlD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB6xB,KAAM,SAASA,KAAK/V,GAClB,OAAOpb,KAAK6gB,IAAIzF,GAAKpb,KAAK8gB,QAOxB,SAAUvkB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAE6b,KAAM/e,EAAoB,OAKjD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bkf,EAAQlf,EAAoB,IAC5BwC,EAAMoB,KAAKpB,IAGfN,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACrD,OAA8B,QAAtB4D,KAAKoxB,MAAM,SACjB,OAAQ,CACVA,KAAM,SAASA,KAAKhW,GAClB,OAAOpb,KAAK2gB,IAAIvF,GAAKA,GAAK,GACrBE,EAAMF,GAAKE,GAAOF,IAAM,GACxBxc,EAAIwc,EAAI,GAAKxc,GAAKwc,EAAI,KAAOpb,KAAK2rB,EAAI,OAOzC,SAAUpvB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bkf,EAAQlf,EAAoB,IAC5BwC,EAAMoB,KAAKpB,IAEfN,EAAQA,EAAQgB,EAAG,OAAQ,CACzB+xB,KAAM,SAASA,KAAKjW,GAClB,IAAI5a,EAAI8a,EAAMF,GAAKA,GACfvX,EAAIyX,GAAOF,GACf,OAAO5a,GAAK0a,SAAW,EAAIrX,GAAKqX,UAAY,GAAK1a,EAAIqD,IAAMjF,EAAIwc,GAAKxc,GAAKwc,QAOvE,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBgyB,MAAO,SAASA,MAAMzxB,GACpB,OAAa,EAALA,EAASG,KAAKkE,MAAQlE,KAAKiE,MAAMpE,OAOvC,SAAUtD,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B+K,EAAkB/K,EAAoB,IACtCm1B,EAAervB,OAAOqvB,aACtBC,EAAiBtvB,OAAOuvB,cAG5BnzB,EAAQA,EAAQgB,EAAIhB,EAAQQ,KAAO0yB,GAA2C,GAAzBA,EAAe/tB,QAAc,SAAU,CAE1FguB,cAAe,SAASA,cAAcrW,GAKpC,IAJA,IAGI6S,EAHA5oB,EAAM,GACNoH,EAAO1I,UAAUN,OACjBjH,EAAI,EAEMA,EAAPiQ,GAAU,CAEf,GADAwhB,GAAQlqB,UAAUvH,KACd2K,EAAgB8mB,EAAM,WAAcA,EAAM,MAAM7lB,WAAW6lB,EAAO,8BACtE5oB,EAAIG,KAAKyoB,EAAO,MACZsD,EAAatD,GACbsD,EAAyC,QAA1BtD,GAAQ,QAAY,IAAcA,EAAO,KAAQ,QAEpE,OAAO5oB,EAAIpD,KAAK,QAOhB,SAAU1F,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BkG,EAAYlG,EAAoB,IAChCoI,EAAWpI,EAAoB,GAEnCkC,EAAQA,EAAQgB,EAAG,SAAU,CAE3BoyB,IAAK,SAASA,IAAIC,GAMhB,IALA,IAAIC,EAAMtvB,EAAUqvB,EAASD,KACzB5iB,EAAMtK,EAASotB,EAAInuB,QACnBgJ,EAAO1I,UAAUN,OACjB4B,EAAM,GACN7I,EAAI,EACKA,EAANsS,GACLzJ,EAAIG,KAAKtD,OAAO0vB,EAAIp1B,OAChBA,EAAIiQ,GAAMpH,EAAIG,KAAKtD,OAAO6B,UAAUvH,KACxC,OAAO6I,EAAIpD,KAAK,QAOhB,SAAU1F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAU4oB,GACxC,OAAO,SAAS9Q,OACd,OAAO8Q,EAAM5iB,KAAM,OAOjB,SAAU7F,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9By1B,EAAMz1B,EAAoB,GAApBA,EAAwB,GAClCkC,EAAQA,EAAQY,EAAG,SAAU,CAE3B4yB,YAAa,SAASA,YAAY5c,GAChC,OAAO2c,EAAIzvB,KAAM8S,OAOf,SAAU3Y,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BoI,EAAWpI,EAAoB,GAC/B21B,EAAU31B,EAAoB,IAC9B41B,EAAY,WACZC,EAAY,GAAGD,GAEnB1zB,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,GAApBA,CAAwB41B,GAAY,SAAU,CAC5EE,SAAU,SAASA,SAAS3W,GAC1B,IAAI3X,EAAOmuB,EAAQ3vB,KAAMmZ,EAAcyW,GACnCG,EAAiC,EAAnBpuB,UAAUN,OAAaM,UAAU,GAAK9H,GACpD6S,EAAMtK,EAASZ,EAAKH,QACpB+K,EAAM2jB,IAAgBl2B,GAAY6S,EAAM9O,KAAKU,IAAI8D,EAAS2tB,GAAcrjB,GACxEsjB,EAASlwB,OAAOqZ,GACpB,OAAO0W,EACHA,EAAUv1B,KAAKkH,EAAMwuB,EAAQ5jB,GAC7B5K,EAAKI,MAAMwK,EAAM4jB,EAAO3uB,OAAQ+K,KAAS4jB,MAO3C,SAAU71B,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B21B,EAAU31B,EAAoB,IAC9Bi2B,EAAW,WAEf/zB,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,GAApBA,CAAwBi2B,GAAW,SAAU,CAC3EtkB,SAAU,SAASA,SAASwN,GAC1B,SAAUwW,EAAQ3vB,KAAMmZ,EAAc8W,GACnCxkB,QAAQ0N,EAAiC,EAAnBxX,UAAUN,OAAaM,UAAU,GAAK9H,QAO7D,SAAUM,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAG,SAAU,CAE3B8b,OAAQ5e,EAAoB,OAMxB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BoI,EAAWpI,EAAoB,GAC/B21B,EAAU31B,EAAoB,IAC9Bk2B,EAAc,aACdC,EAAc,GAAGD,GAErBh0B,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,GAApBA,CAAwBk2B,GAAc,SAAU,CAC9EE,WAAY,SAASA,WAAWjX,GAC9B,IAAI3X,EAAOmuB,EAAQ3vB,KAAMmZ,EAAc+W,GACnChtB,EAAQd,EAASxE,KAAKU,IAAuB,EAAnBqD,UAAUN,OAAaM,UAAU,GAAK9H,GAAW2H,EAAKH,SAChF2uB,EAASlwB,OAAOqZ,GACpB,OAAOgX,EACHA,EAAY71B,KAAKkH,EAAMwuB,EAAQ9sB,GAC/B1B,EAAKI,MAAMsB,EAAOA,EAAQ8sB,EAAO3uB,UAAY2uB,MAO/C,SAAU71B,EAAQD,EAASF,GAIjC,IAAIy1B,EAAMz1B,EAAoB,GAApBA,EAAwB,GAGlCA,EAAoB,GAApBA,CAAwB8F,OAAQ,SAAU,SAAU0Z,GAClDxZ,KAAKmR,GAAKrR,OAAO0Z,GACjBxZ,KAAKyZ,GAAK,GAET,WACD,IAEI4W,EAFAzxB,EAAIoB,KAAKmR,GACTjO,EAAQlD,KAAKyZ,GAEjB,OAAa7a,EAAEyC,QAAX6B,EAA0B,CAAEpE,MAAOjF,GAAW6Q,MAAM,IACxD2lB,EAAQZ,EAAI7wB,EAAGsE,GACflD,KAAKyZ,IAAM4W,EAAMhvB,OACV,CAAEvC,MAAOuxB,EAAO3lB,MAAM,OAMzB,SAAUvQ,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,SAAU,SAAU4G,GAC1C,OAAO,SAAS0vB,OAAO51B,GACrB,OAAOkG,EAAWZ,KAAM,IAAK,OAAQtF,OAOnC,SAAUP,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAU4G,GACvC,OAAO,SAAS2vB,MACd,OAAO3vB,EAAWZ,KAAM,MAAO,GAAI,QAOjC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAU4G,GACzC,OAAO,SAAS4vB,QACd,OAAO5vB,EAAWZ,KAAM,QAAS,GAAI,QAOnC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAU4G,GACxC,OAAO,SAAS6vB,OACd,OAAO7vB,EAAWZ,KAAM,IAAK,GAAI,QAO/B,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAU4G,GACzC,OAAO,SAAS8vB,QACd,OAAO9vB,EAAWZ,KAAM,KAAM,GAAI,QAOhC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,YAAa,SAAU4G,GAC7C,OAAO,SAAS+vB,UAAUC,GACxB,OAAOhwB,EAAWZ,KAAM,OAAQ,QAAS4wB,OAOvC,SAAUz2B,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU4G,GAC5C,OAAO,SAASiwB,SAASC,GACvB,OAAOlwB,EAAWZ,KAAM,OAAQ,OAAQ8wB,OAOtC,SAAU32B,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,UAAW,SAAU4G,GAC3C,OAAO,SAASmwB,UACd,OAAOnwB,EAAWZ,KAAM,IAAK,GAAI,QAO/B,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAU4G,GACxC,OAAO,SAASowB,KAAKC,GACnB,OAAOrwB,EAAWZ,KAAM,IAAK,OAAQixB,OAOnC,SAAU92B,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAU4G,GACzC,OAAO,SAASswB,QACd,OAAOtwB,EAAWZ,KAAM,QAAS,GAAI,QAOnC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,SAAU,SAAU4G,GAC1C,OAAO,SAASuwB,SACd,OAAOvwB,EAAWZ,KAAM,SAAU,GAAI,QAOpC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAU4G,GACvC,OAAO,SAASwwB,MACd,OAAOxwB,EAAWZ,KAAM,MAAO,GAAI,QAOjC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAU4G,GACvC,OAAO,SAASywB,MACd,OAAOzwB,EAAWZ,KAAM,MAAO,GAAI,QAOjC,SAAU7F,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,QAAS,CAAE2V,QAAS7Y,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAIjC,IAAIgC,EAAMhC,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/BM,EAAON,EAAoB,KAC3BiL,EAAcjL,EAAoB,IAClCoI,EAAWpI,EAAoB,GAC/Bs3B,EAAiBt3B,EAAoB,IACrCmL,EAAYnL,EAAoB,IAEpCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,SAAUoU,GAAQ9H,MAAM4D,KAAKkE,KAAW,QAAS,CAExGlE,KAAM,SAASA,KAAKuC,GAClB,IAOIpL,EAAQ8B,EAAQgH,EAAMC,EAPtBxL,EAAIyB,EAASoM,GACb/C,EAAmB,mBAAR1J,KAAqBA,KAAOsG,MACvC+D,EAAO1I,UAAUN,OACjBiJ,EAAe,EAAPD,EAAW1I,UAAU,GAAK9H,GAClC0Q,EAAUD,IAAUzQ,GACpBqJ,EAAQ,EACRsH,EAASrF,EAAUvG,GAIvB,GAFI2L,IAASD,EAAQtO,EAAIsO,EAAc,EAAPD,EAAW1I,UAAU,GAAK9H,GAAW,IAEjE2Q,GAAU3Q,IAAe6P,GAAKpD,OAASrB,EAAYuF,GAMrD,IAAKrH,EAAS,IAAIuG,EADlBrI,EAASe,EAASxD,EAAEyC,SACkB6B,EAAT7B,EAAgB6B,IAC3CouB,EAAenuB,EAAQD,EAAOqH,EAAUD,EAAM1L,EAAEsE,GAAQA,GAAStE,EAAEsE,SANrE,IAAKkH,EAAWI,EAAOlQ,KAAKsE,GAAIuE,EAAS,IAAIuG,IAAOS,EAAOC,EAASK,QAAQC,KAAMxH,IAChFouB,EAAenuB,EAAQD,EAAOqH,EAAUjQ,EAAK8P,EAAUE,EAAO,CAACH,EAAKrL,MAAOoE,IAAQ,GAAQiH,EAAKrL,OASpG,OADAqE,EAAO9B,OAAS6B,EACTC,MAOL,SAAUhJ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bs3B,EAAiBt3B,EAAoB,IAGzCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACrD,SAAS0C,KACT,QAAS4J,MAAMsE,GAAGtQ,KAAKoC,aAAcA,KACnC,QAAS,CAEXkO,GAAI,SAASA,KAIX,IAHA,IAAI1H,EAAQ,EACRmH,EAAO1I,UAAUN,OACjB8B,EAAS,IAAoB,mBAARnD,KAAqBA,KAAOsG,OAAO+D,GAC9CnH,EAAPmH,GAAcinB,EAAenuB,EAAQD,EAAOvB,UAAUuB,MAE7D,OADAC,EAAO9B,OAASgJ,EACTlH,MAOL,SAAUhJ,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BkG,EAAYlG,EAAoB,IAChC8N,EAAY,GAAGjI,KAGnB3D,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,KAAOa,SAAWb,EAAoB,GAApBA,CAAwB8N,IAAa,QAAS,CACnHjI,KAAM,SAASA,KAAK+L,GAClB,OAAO9D,EAAUxN,KAAK4F,EAAUF,MAAO4L,IAAc/R,GAAY,IAAM+R,OAOrE,SAAUzR,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6gB,EAAO7gB,EAAoB,IAC3BiW,EAAMjW,EAAoB,IAC1B+K,EAAkB/K,EAAoB,IACtCoI,EAAWpI,EAAoB,GAC/BiO,EAAa,GAAGrG,MAGpB1F,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACjD6gB,GAAM5S,EAAW3N,KAAKugB,KACxB,QAAS,CACXjZ,MAAO,SAASA,MAAMuK,EAAOC,GAC3B,IAAIM,EAAMtK,EAASpC,KAAKqB,QACpB6M,EAAQ+B,EAAIjQ,MAEhB,GADAoM,EAAMA,IAAQvS,GAAY6S,EAAMN,EACnB,SAAT8B,EAAkB,OAAOjG,EAAW3N,KAAK0F,KAAMmM,EAAOC,GAM1D,IALA,IAAInB,EAAQlG,EAAgBoH,EAAOO,GAC/B6kB,EAAOxsB,EAAgBqH,EAAKM,GAC5BokB,EAAO1uB,EAASmvB,EAAOtmB,GACvBumB,EAAS,IAAIlrB,MAAMwqB,GACnB12B,EAAI,EACDA,EAAI02B,EAAM12B,IAAKo3B,EAAOp3B,GAAc,UAAT8T,EAC9BlO,KAAKgT,OAAO/H,EAAQ7Q,GACpB4F,KAAKiL,EAAQ7Q,GACjB,OAAOo3B,MAOL,SAAUr3B,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAYtH,EAAoB,IAChCqG,EAAWrG,EAAoB,GAC/B0G,EAAQ1G,EAAoB,GAC5By3B,EAAQ,GAAGzpB,KACX7G,EAAO,CAAC,EAAG,EAAG,GAElBjF,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKgE,EAAM,WAErCS,EAAK6G,KAAKnO,QACL6G,EAAM,WAEXS,EAAK6G,KAAK,UAELhO,EAAoB,GAApBA,CAAwBy3B,IAAS,QAAS,CAE/CzpB,KAAM,SAASA,KAAKiE,GAClB,OAAOA,IAAcpS,GACjB43B,EAAMn3B,KAAK+F,EAASL,OACpByxB,EAAMn3B,KAAK+F,EAASL,MAAOsB,EAAU2K,QAOvC,SAAU9R,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B03B,EAAW13B,EAAoB,GAApBA,CAAwB,GACnC23B,EAAS33B,EAAoB,GAApBA,CAAwB,GAAGwR,SAAS,GAEjDtP,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKi1B,EAAQ,QAAS,CAEhDnmB,QAAS,SAASA,QAAQxI,GACxB,OAAO0uB,EAAS1xB,KAAMgD,EAAYrB,UAAU,QAO1C,SAAUxH,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GAC/B6Y,EAAU7Y,EAAoB,IAC9BgX,EAAUhX,EAAoB,EAApBA,CAAuB,WAErCG,EAAOD,QAAU,SAAUmf,GACzB,IAAI3P,EASF,OAREmJ,EAAQwG,KAGM,mBAFhB3P,EAAI2P,EAAS5Y,cAEkBiJ,IAAMpD,QAASuM,EAAQnJ,EAAElO,aAAakO,EAAI7P,IACrE2D,EAASkM,IAED,QADVA,EAAIA,EAAEsH,MACUtH,EAAI7P,KAEf6P,IAAM7P,GAAYyM,MAAQoD,IAM/B,SAAUvP,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B+O,EAAO/O,EAAoB,GAApBA,CAAwB,GAEnCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAG6R,KAAK,GAAO,QAAS,CAE/EA,IAAK,SAASA,IAAI7I,GAChB,OAAO+F,EAAK/I,KAAMgD,EAAYrB,UAAU,QAOtC,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B43B,EAAU53B,EAAoB,GAApBA,CAAwB,GAEtCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAGoR,QAAQ,GAAO,QAAS,CAElFA,OAAQ,SAASA,OAAOpI,GACtB,OAAO4uB,EAAQ5xB,KAAMgD,EAAYrB,UAAU,QAOzC,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B63B,EAAQ73B,EAAoB,GAApBA,CAAwB,GAEpCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAGgS,MAAM,GAAO,QAAS,CAEhFA,KAAM,SAASA,KAAKhJ,GAClB,OAAO6uB,EAAM7xB,KAAMgD,EAAYrB,UAAU,QAOvC,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B83B,EAAS93B,EAAoB,GAApBA,CAAwB,GAErCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAGkR,OAAO,GAAO,QAAS,CAEjFA,MAAO,SAASA,MAAMlI,GACpB,OAAO8uB,EAAO9xB,KAAMgD,EAAYrB,UAAU,QAOxC,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B+3B,EAAU/3B,EAAoB,KAElCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAG2N,QAAQ,GAAO,QAAS,CAElFA,OAAQ,SAASA,OAAO3E,GACtB,OAAO+uB,EAAQ/xB,KAAMgD,EAAYrB,UAAUN,OAAQM,UAAU,IAAI,OAO/D,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B+3B,EAAU/3B,EAAoB,KAElCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAG6N,aAAa,GAAO,QAAS,CAEvFA,YAAa,SAASA,YAAY7E,GAChC,OAAO+uB,EAAQ/xB,KAAMgD,EAAYrB,UAAUN,OAAQM,UAAU,IAAI,OAO/D,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bg4B,EAAWh4B,EAAoB,GAApBA,EAAwB,GACnCia,EAAU,GAAGxI,QACbwmB,IAAkBhe,GAAW,EAAI,CAAC,GAAGxI,QAAQ,GAAI,GAAK,EAE1DvP,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKu1B,IAAkBj4B,EAAoB,GAApBA,CAAwBia,IAAW,QAAS,CAE7FxI,QAAS,SAASA,QAAQC,GACxB,OAAOumB,EAEHhe,EAAQvS,MAAM1B,KAAM2B,YAAc,EAClCqwB,EAAShyB,KAAM0L,EAAe/J,UAAU,QAO1C,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BkG,EAAYlG,EAAoB,IAChCqE,EAAYrE,EAAoB,IAChCoI,EAAWpI,EAAoB,GAC/Bia,EAAU,GAAGxM,YACbwqB,IAAkBhe,GAAW,EAAI,CAAC,GAAGxM,YAAY,GAAI,GAAK,EAE9DvL,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKu1B,IAAkBj4B,EAAoB,GAApBA,CAAwBia,IAAW,QAAS,CAE7FxM,YAAa,SAASA,YAAYiE,GAEhC,GAAIumB,EAAe,OAAOhe,EAAQvS,MAAM1B,KAAM2B,YAAc,EAC5D,IAAI/C,EAAIsB,EAAUF,MACdqB,EAASe,EAASxD,EAAEyC,QACpB6B,EAAQ7B,EAAS,EAGrB,IAFuB,EAAnBM,UAAUN,SAAY6B,EAAQtF,KAAKU,IAAI4E,EAAO7E,EAAUsD,UAAU,MAClEuB,EAAQ,IAAGA,EAAQ7B,EAAS6B,GACjB,GAATA,EAAYA,IAAS,GAAIA,KAAStE,GAAOA,EAAEsE,KAAWwI,EAAe,OAAOxI,GAAS,EAC3F,OAAQ,MAON,SAAU/I,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAG,QAAS,CAAEkO,WAAYhR,EAAoB,OAE9DA,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAG,QAAS,CAAEqO,KAAMnR,EAAoB,MAExDA,EAAoB,GAApBA,CAAwB,SAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bk4B,EAAQl4B,EAAoB,GAApBA,CAAwB,GAChCmI,EAAM,OACN4hB,GAAS,EAET5hB,IAAO,IAAImE,MAAM,GAAGnE,GAAK,WAAc4hB,GAAS,IACpD7nB,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIqnB,EAAQ,QAAS,CAC/C1Y,KAAM,SAASA,KAAKrI,GAClB,OAAOkvB,EAAMlyB,KAAMgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,OAGzEG,EAAoB,GAApBA,CAAwBmI,IAKlB,SAAUhI,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bk4B,EAAQl4B,EAAoB,GAApBA,CAAwB,GAChCmI,EAAM,YACN4hB,GAAS,EAET5hB,IAAO,IAAImE,MAAM,GAAGnE,GAAK,WAAc4hB,GAAS,IACpD7nB,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIqnB,EAAQ,QAAS,CAC/CxY,UAAW,SAASA,UAAUvI,GAC5B,OAAOkvB,EAAMlyB,KAAMgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,OAGzEG,EAAoB,GAApBA,CAAwBmI,IAKlB,SAAUhI,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAKlB,SAAUG,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7Bic,EAAoBjc,EAAoB,IACxC0E,EAAK1E,EAAoB,GAAG2E,EAC5BuG,EAAOlL,EAAoB,IAAI2E,EAC/BuU,EAAWlZ,EAAoB,IAC/Bm4B,EAASn4B,EAAoB,IAC7Bo4B,EAAUx2B,EAAO6V,OACjBlE,EAAO6kB,EACPrnB,EAAQqnB,EAAQ52B,UAChBoe,EAAM,KACNC,EAAM,KAENwY,EAAc,IAAID,EAAQxY,KAASA,EAEvC,GAAI5f,EAAoB,MAAQq4B,GAAer4B,EAAoB,EAApBA,CAAuB,WAGpE,OAFA6f,EAAI7f,EAAoB,EAApBA,CAAuB,WAAY,EAEhCo4B,EAAQxY,IAAQA,GAAOwY,EAAQvY,IAAQA,GAA4B,QAArBuY,EAAQxY,EAAK,QAC/D,CACHwY,EAAU,SAAS3gB,OAAO/V,EAAGiD,GAC3B,IAAI2zB,EAAOtyB,gBAAgBoyB,EACvBG,EAAOrf,EAASxX,GAChB82B,EAAM7zB,IAAM9E,GAChB,OAAQy4B,GAAQC,GAAQ72B,EAAE+E,cAAgB2xB,GAAWI,EAAM92B,EACvDua,EAAkBoc,EAChB,IAAI9kB,EAAKglB,IAASC,EAAM92B,EAAEU,OAASV,EAAGiD,GACtC4O,GAAMglB,EAAO72B,aAAa02B,GAAW12B,EAAEU,OAASV,EAAG62B,GAAQC,EAAML,EAAO73B,KAAKoB,GAAKiD,GACpF2zB,EAAOtyB,KAAO+K,EAAOqnB,IAS3B,IAPA,IAAIK,EAAQ,SAAUp2B,GACpBA,KAAO+1B,GAAW1zB,EAAG0zB,EAAS/1B,EAAK,CACjCtB,cAAc,EACdE,IAAK,WAAc,OAAOsS,EAAKlR,IAC/BgN,IAAK,SAAU5L,GAAM8P,EAAKlR,GAAOoB,MAG5B8F,EAAO2B,EAAKqI,GAAOnT,EAAI,EAAiBA,EAAdmJ,EAAKlC,QAAaoxB,EAAMlvB,EAAKnJ,OAChE2Q,EAAMtK,YAAc2xB,GACZ52B,UAAYuP,EACpB/Q,EAAoB,GAApBA,CAAwB4B,EAAQ,SAAUw2B,GAG5Cp4B,EAAoB,GAApBA,CAAwB,WAKlB,SAAUG,EAAQD,EAASF,GAIjCA,EAAoB,KACpB,IAAIuE,EAAWvE,EAAoB,GAC/Bm4B,EAASn4B,EAAoB,IAC7B+W,EAAc/W,EAAoB,GAClCsF,EAAY,WACZD,EAAY,IAAIC,GAEhBqoB,EAAS,SAAUpmB,GACrBvH,EAAoB,GAApBA,CAAwByX,OAAOjW,UAAW8D,EAAWiC,GAAI,IAIvDvH,EAAoB,EAApBA,CAAuB,WAAc,MAAsD,QAA/CqF,EAAU/E,KAAK,CAAE8B,OAAQ,IAAK4nB,MAAO,QACnF2D,EAAO,SAAS5nB,WACd,IAAIxC,EAAIgB,EAASyB,MACjB,MAAO,IAAIqO,OAAO9Q,EAAEnB,OAAQ,IAC1B,UAAWmB,EAAIA,EAAEymB,OAASjT,GAAexT,aAAakU,OAAS0gB,EAAO73B,KAAKiD,GAAK1D,MAG3EwF,EAAU3E,MAAQ4E,GAC3BqoB,EAAO,SAAS5nB,WACd,OAAOV,EAAU/E,KAAK0F,SAOpB,SAAU7F,EAAQD,EAASF,GAKjC,IAAIuE,EAAWvE,EAAoB;EAC/BoI,EAAWpI,EAAoB,GAC/B04B,EAAqB14B,EAAoB,IACzC24B,EAAa34B,EAAoB,IAGrCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+E,EAASkU,EAAO2f,EAAQrd,GACpE,MAAO,CAGL,SAASgF,MAAM9E,GACb,IAAI7W,EAAIG,EAAQiB,MACZuB,EAAKkU,GAAU5b,GAAYA,GAAY4b,EAAOxC,GAClD,OAAO1R,IAAO1H,GAAY0H,EAAGjH,KAAKmb,EAAQ7W,GAAK,IAAI6S,OAAOgE,GAAQxC,GAAOnT,OAAOlB,KAIlF,SAAU6W,GACR,IAAIxS,EAAMsS,EAAgBqd,EAAQnd,EAAQzV,MAC1C,GAAIiD,EAAIyH,KAAM,OAAOzH,EAAInE,MACzB,IAAI+zB,EAAKt0B,EAASkX,GACdvY,EAAI4C,OAAOE,MACf,IAAK6yB,EAAGj3B,OAAQ,OAAO+2B,EAAWE,EAAI31B,GAMtC,IALA,IAIIiG,EAJA2vB,EAAcD,EAAGvgB,QAEjB+E,EAAI,GACJnc,EAFJ23B,EAAGxY,UAAY,EAIyB,QAAhClX,EAASwvB,EAAWE,EAAI31B,KAAc,CAC5C,IAAI61B,EAAWjzB,OAAOqD,EAAO,IAEZ,MADjBkU,EAAEnc,GAAK63B,KACcF,EAAGxY,UAAYqY,EAAmBx1B,EAAGkF,EAASywB,EAAGxY,WAAYyY,IAClF53B,IAEF,OAAa,IAANA,EAAU,KAAOmc,OAQxB,SAAUld,EAAQD,EAASF,GAKjC,IAAIuE,EAAWvE,EAAoB,GAC/BqG,EAAWrG,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BqE,EAAYrE,EAAoB,IAChC04B,EAAqB14B,EAAoB,IACzC24B,EAAa34B,EAAoB,IACjC4W,EAAMhT,KAAKgT,IACXtS,EAAMV,KAAKU,IACXwD,EAAQlE,KAAKkE,MACbkxB,EAAuB,4BACvBC,EAAgC,oBAOpCj5B,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU+E,EAASm0B,EAASC,EAAU5d,GAC1E,MAAO,CAGL,SAAStU,QAAQmyB,EAAaC,GAC5B,IAAIz0B,EAAIG,EAAQiB,MACZuB,EAAK6xB,GAAev5B,GAAYA,GAAYu5B,EAAYF,GAC5D,OAAO3xB,IAAO1H,GACV0H,EAAGjH,KAAK84B,EAAax0B,EAAGy0B,GACxBF,EAAS74B,KAAKwF,OAAOlB,GAAIw0B,EAAaC,IAI5C,SAAU5d,EAAQ4d,GAChB,IAAIpwB,EAAMsS,EAAgB4d,EAAU1d,EAAQzV,KAAMqzB,GAClD,GAAIpwB,EAAIyH,KAAM,OAAOzH,EAAInE,MAEzB,IAAI+zB,EAAKt0B,EAASkX,GACdvY,EAAI4C,OAAOE,MACXszB,EAA4C,mBAAjBD,EAC1BC,IAAmBD,EAAevzB,OAAOuzB,IAC9C,IAAIz3B,EAASi3B,EAAGj3B,OAChB,GAAIA,EAAQ,CACV,IAAIk3B,EAAcD,EAAGvgB,QACrBugB,EAAGxY,UAAY,EAGjB,IADA,IAAIkZ,EAAU,KACD,CACX,IAAIpwB,EAASwvB,EAAWE,EAAI31B,GAC5B,GAAe,OAAXiG,EAAiB,MAErB,GADAowB,EAAQnwB,KAAKD,IACRvH,EAAQ,MAEI,KADFkE,OAAOqD,EAAO,MACR0vB,EAAGxY,UAAYqY,EAAmBx1B,EAAGkF,EAASywB,EAAGxY,WAAYyY,IAIpF,IAFA,IAxCwBr1B,EAwCpB+1B,EAAoB,GACpBC,EAAqB,EAChBr5B,EAAI,EAAGA,EAAIm5B,EAAQlyB,OAAQjH,IAAK,CACvC+I,EAASowB,EAAQn5B,GASjB,IARA,IAAIs5B,EAAU5zB,OAAOqD,EAAO,IACxBwwB,EAAW/iB,EAAItS,EAAID,EAAU8E,EAAOD,OAAQhG,EAAEmE,QAAS,GACvDuyB,EAAW,GAMNvb,EAAI,EAAGA,EAAIlV,EAAO9B,OAAQgX,IAAKub,EAASxwB,MApD3B3F,EAoD8C0F,EAAOkV,MAnDnExe,GAAY4D,EAAKqC,OAAOrC,IAoDhC,IAAIo2B,EAAgB1wB,EAAO2R,OAC3B,GAAIwe,EAAmB,CACrB,IAAIQ,EAAe,CAACJ,GAASrlB,OAAOulB,EAAUD,EAAUz2B,GACpD22B,IAAkBh6B,IAAWi6B,EAAa1wB,KAAKywB,GACnD,IAAIE,EAAcj0B,OAAOuzB,EAAa3xB,MAAM7H,GAAWi6B,SAEvDC,EAAcC,gBAAgBN,EAASx2B,EAAGy2B,EAAUC,EAAUC,EAAeR,GAE/DI,GAAZE,IACFH,GAAqBt2B,EAAE0E,MAAM6xB,EAAoBE,GAAYI,EAC7DN,EAAqBE,EAAWD,EAAQryB,QAG5C,OAAOmyB,EAAoBt2B,EAAE0E,MAAM6xB,KAKvC,SAASO,gBAAgBN,EAAShe,EAAKie,EAAUC,EAAUC,EAAeE,GACxE,IAAIE,EAAUN,EAAWD,EAAQryB,OAC7B9G,EAAIq5B,EAASvyB,OACb+oB,EAAU6I,EAKd,OAJIY,IAAkBh6B,KACpBg6B,EAAgBxzB,EAASwzB,GACzBzJ,EAAU4I,GAELG,EAAS74B,KAAKy5B,EAAa3J,EAAS,SAAU7P,EAAO2Z,GAC1D,IAAIC,EACJ,OAAQD,EAAGlhB,OAAO,IAChB,IAAK,IAAK,MAAO,IACjB,IAAK,IAAK,OAAO0gB,EACjB,IAAK,IAAK,OAAOhe,EAAI9T,MAAM,EAAG+xB,GAC9B,IAAK,IAAK,OAAOje,EAAI9T,MAAMqyB,GAC3B,IAAK,IACHE,EAAUN,EAAcK,EAAGtyB,MAAM,GAAI,IACrC,MACF,QACE,IAAI1G,GAAKg5B,EACT,GAAU,IAANh5B,EAAS,OAAOqf,EACpB,GAAQhgB,EAAJW,EAAO,CACT,IAAIyD,EAAImD,EAAM5G,EAAI,IAClB,OAAU,IAANyD,EAAgB4b,EAChB5b,GAAKpE,EAAUq5B,EAASj1B,EAAI,KAAO9E,GAAYq6B,EAAGlhB,OAAO,GAAK4gB,EAASj1B,EAAI,GAAKu1B,EAAGlhB,OAAO,GACvFuH,EAET4Z,EAAUP,EAAS14B,EAAI,GAE3B,OAAOi5B,IAAYt6B,GAAY,GAAKs6B,QAQpC,SAAUh6B,EAAQD,EAASF,GAKjC,IAAIuE,EAAWvE,EAAoB,GAC/Bo6B,EAAYp6B,EAAoB,KAChC24B,EAAa34B,EAAoB,IAGrCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU+E,EAASs1B,EAAQC,EAAS/e,GACvE,MAAO,CAGL,SAASya,OAAOva,GACd,IAAI7W,EAAIG,EAAQiB,MACZuB,EAAKkU,GAAU5b,GAAYA,GAAY4b,EAAO4e,GAClD,OAAO9yB,IAAO1H,GAAY0H,EAAGjH,KAAKmb,EAAQ7W,GAAK,IAAI6S,OAAOgE,GAAQ4e,GAAQv0B,OAAOlB,KAInF,SAAU6W,GACR,IAAIxS,EAAMsS,EAAgB+e,EAAS7e,EAAQzV,MAC3C,GAAIiD,EAAIyH,KAAM,OAAOzH,EAAInE,MACzB,IAAI+zB,EAAKt0B,EAASkX,GACdvY,EAAI4C,OAAOE,MACXu0B,EAAoB1B,EAAGxY,UACtB+Z,EAAUG,EAAmB,KAAI1B,EAAGxY,UAAY,GACrD,IAAIlX,EAASwvB,EAAWE,EAAI31B,GAE5B,OADKk3B,EAAUvB,EAAGxY,UAAWka,KAAoB1B,EAAGxY,UAAYka,GAC9C,OAAXpxB,GAAmB,EAAIA,EAAOD,WAQrC,SAAU/I,EAAQD,EAASF,GAKjC,IAAIkZ,EAAWlZ,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BuL,EAAqBvL,EAAoB,IACzC04B,EAAqB14B,EAAoB,IACzCoI,EAAWpI,EAAoB,GAC/Bw6B,EAAiBx6B,EAAoB,IACrC2a,EAAa3a,EAAoB,IACjC0G,EAAQ1G,EAAoB,GAC5By6B,EAAO72B,KAAKU,IACZo2B,EAAQ,GAAGtxB,KACXuxB,EAAS,QACTC,EAAS,SACT1a,EAAa,YACb2a,EAAa,WAGbC,GAAcp0B,EAAM,WAAc+Q,OAAOojB,EAAY,OAGzD76B,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+E,EAASg2B,EAAOC,EAAQzf,GACpE,IAAI0f,EAkDJ,OAxCEA,EAR6B,KAA7B,OAAON,GAAQ,QAAQ,IACe,GAAtC,OAAOA,GAAQ,QAAS,GAAGC,IACQ,GAAnC,KAAKD,GAAQ,WAAWC,IACW,GAAnC,IAAID,GAAQ,YAAYC,IACM,EAA9B,IAAID,GAAQ,QAAQC,IACpB,GAAGD,GAAQ,MAAMC,GAGD,SAAUhpB,EAAWspB,GACnC,IAAIr0B,EAASf,OAAOE,MACpB,GAAI4L,IAAc/R,IAAuB,IAAVq7B,EAAa,MAAO,GAEnD,IAAKhiB,EAAStH,GAAY,OAAOopB,EAAO16B,KAAKuG,EAAQ+K,EAAWspB,GAWhE,IAVA,IASI3a,EAAOF,EAAW8a,EATlBC,EAAS,GAKTC,EAAgB,EAChBC,EAAaJ,IAAUr7B,GAAYg7B,EAAaK,IAAU,EAE1DK,EAAgB,IAAI9jB,OAAO7F,EAAUxP,QAP5BwP,EAAUwG,WAAa,IAAM,KAC7BxG,EAAUyG,UAAY,IAAM,KAC5BzG,EAAU0G,QAAU,IAAM,KAC1B1G,EAAU2G,OAAS,IAAM,IAImB,MAElDgI,EAAQ5F,EAAWra,KAAKi7B,EAAe10B,OAE5Bw0B,GADhBhb,EAAYkb,EAAcrb,MAExBkb,EAAOhyB,KAAKvC,EAAOe,MAAMyzB,EAAe9a,EAAMrX,QAC1B,EAAhBqX,EAAMqa,IAAera,EAAMrX,MAAQrC,EAAO+zB,IAASF,EAAMhzB,MAAM0zB,EAAQ7a,EAAM3Y,MAAM,IACvFuzB,EAAa5a,EAAM,GAAGqa,GACtBS,EAAgBhb,EACMib,GAAlBF,EAAOR,MAETW,EAAcrb,KAAgBK,EAAMrX,OAAOqyB,EAAcrb,KAK/D,OAHImb,IAAkBx0B,EAAO+zB,IACvBO,GAAeI,EAAcp0B,KAAK,KAAKi0B,EAAOhyB,KAAK,IAClDgyB,EAAOhyB,KAAKvC,EAAOe,MAAMyzB,IACRC,EAAjBF,EAAOR,GAAuBQ,EAAOxzB,MAAM,EAAG0zB,GAAcF,GAG5D,IAAIT,GAAQ96B,GAAW,GAAG+6B,GACnB,SAAUhpB,EAAWspB,GACnC,OAAOtpB,IAAc/R,IAAuB,IAAVq7B,EAAc,GAAKF,EAAO16B,KAAK0F,KAAM4L,EAAWspB,IAGpEF,EAGX,CAGL,SAASx1B,MAAMoM,EAAWspB,GACxB,IAAIt2B,EAAIG,EAAQiB,MACZw1B,EAAW5pB,GAAa/R,GAAYA,GAAY+R,EAAUmpB,GAC9D,OAAOS,IAAa37B,GAChB27B,EAASl7B,KAAKsR,EAAWhN,EAAGs2B,GAC5BD,EAAc36B,KAAKwF,OAAOlB,GAAIgN,EAAWspB,IAO/C,SAAUzf,EAAQyf,GAChB,IAAIjyB,EAAMsS,EAAgB0f,EAAexf,EAAQzV,KAAMk1B,EAAOD,IAAkBD,GAChF,GAAI/xB,EAAIyH,KAAM,OAAOzH,EAAInE,MAEzB,IAAI+zB,EAAKt0B,EAASkX,GACdvY,EAAI4C,OAAOE,MACX0J,EAAInE,EAAmBstB,EAAIphB,QAE3BgkB,EAAkB5C,EAAGvgB,QAQrBkjB,EAAW,IAAI9rB,EAAEorB,EAAajC,EAAK,OAASA,EAAGz2B,OAAS,KAP/Cy2B,EAAGzgB,WAAa,IAAM,KACtBygB,EAAGxgB,UAAY,IAAM,KACrBwgB,EAAGvgB,QAAU,IAAM,KACnBwiB,EAAa,IAAM,MAK5BY,EAAMR,IAAUr7B,GAAYg7B,EAAaK,IAAU,EACvD,GAAY,IAARQ,EAAW,MAAO,GACtB,GAAiB,IAAbx4B,EAAEmE,OAAc,OAAuC,OAAhCmzB,EAAegB,EAAUt4B,GAAc,CAACA,GAAK,GAIxE,IAHA,IAAIxB,EAAI,EACJi6B,EAAI,EACJte,EAAI,GACDse,EAAIz4B,EAAEmE,QAAQ,CACnBm0B,EAASnb,UAAYya,EAAaa,EAAI,EACtC,IACI53B,EADA4uB,EAAI6H,EAAegB,EAAUV,EAAa53B,EAAIA,EAAE0E,MAAM+zB,IAE1D,GACQ,OAANhJ,IACC5uB,EAAI02B,EAAKryB,EAASozB,EAASnb,WAAaya,EAAa,EAAIa,IAAKz4B,EAAEmE,WAAa3F,EAE9Ei6B,EAAIjD,EAAmBx1B,EAAGy4B,EAAGF,OACxB,CAEL,GADApe,EAAEjU,KAAKlG,EAAE0E,MAAMlG,EAAGi6B,IACdte,EAAEhW,SAAWq0B,EAAK,OAAOre,EAC7B,IAAK,IAAIjd,EAAI,EAAGA,GAAKuyB,EAAEtrB,OAAS,EAAGjH,IAEjC,GADAid,EAAEjU,KAAKupB,EAAEvyB,IACLid,EAAEhW,SAAWq0B,EAAK,OAAOre,EAE/Bse,EAAIj6B,EAAIqC,GAIZ,OADAsZ,EAAEjU,KAAKlG,EAAE0E,MAAMlG,IACR2b,OAQP,SAAUld,EAAQD,EAASF,GAIjC,IAwBI47B,EAAUC,EAA6BC,EAAsBC,EAxB7DvxB,EAAUxK,EAAoB,IAC9B4B,EAAS5B,EAAoB,GAC7BgC,EAAMhC,EAAoB,IAC1BgL,EAAUhL,EAAoB,IAC9BkC,EAAUlC,EAAoB,GAC9BwD,EAAWxD,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChC2K,EAAa3K,EAAoB,IACjCgc,EAAQhc,EAAoB,IAC5BuL,EAAqBvL,EAAoB,IACzC6jB,EAAO7jB,EAAoB,IAAIqP,IAC/B2sB,EAAYh8B,EAAoB,GAApBA,GACZi8B,EAA6Bj8B,EAAoB,IACjDk8B,EAAUl8B,EAAoB,KAC9B+b,EAAY/b,EAAoB,IAChCm8B,EAAiBn8B,EAAoB,KACrCo8B,EAAU,UACV14B,EAAY9B,EAAO8B,UACnBqd,EAAUnf,EAAOmf,QACjBsb,EAAWtb,GAAWA,EAAQsb,SAC9BC,EAAKD,GAAYA,EAASC,IAAM,GAChCC,EAAW36B,EAAOw6B,GAClBzZ,EAA6B,WAApB3X,EAAQ+V,GACjByb,EAAQ,aAERvS,EAAuB4R,EAA8BI,EAA2Bt3B,EAEhFiqB,IAAe,WACjB,IAEE,IAAItL,EAAUiZ,EAASlZ,QAAQ,GAC3BoZ,GAAenZ,EAAQ7c,YAAc,IAAIzG,EAAoB,EAApBA,CAAuB,YAAc,SAAU8D,GAC1FA,EAAK04B,EAAOA,IAGd,OAAQ7Z,GAA0C,mBAAzB+Z,wBACpBpZ,EAAQC,KAAKiZ,aAAkBC,GAIT,IAAtBH,EAAG7qB,QAAQ,SACyB,IAApCsK,EAAUtK,QAAQ,aACvB,MAAO1N,KAfQ,GAmBf44B,EAAa,SAAUl5B,GACzB,IAAI8f,EACJ,SAAO/f,EAASC,IAAkC,mBAAnB8f,EAAO9f,EAAG8f,QAAsBA,GAE7DT,EAAS,SAAUQ,EAASsZ,GAC9B,IAAItZ,EAAQuZ,GAAZ,CACAvZ,EAAQuZ,IAAK,EACb,IAAIC,EAAQxZ,EAAQyZ,GACpBf,EAAU,WAoCR,IAnCA,IAAIl3B,EAAQwe,EAAQ0Z,GAChBC,EAAmB,GAAd3Z,EAAQ4Z,GACb98B,EAAI,EACJqhB,EAAM,SAAU0b,GAClB,IAIIh0B,EAAQoa,EAAM6Z,EAJdC,EAAUJ,EAAKE,EAASF,GAAKE,EAASG,KACtCja,EAAU8Z,EAAS9Z,QACnBU,EAASoZ,EAASpZ,OAClBd,EAASka,EAASla,OAEtB,IACMoa,GACGJ,IACe,GAAd3Z,EAAQia,IAASC,EAAkBla,GACvCA,EAAQia,GAAK,IAEC,IAAZF,EAAkBl0B,EAASrE,GAEzBme,GAAQA,EAAOE,QACnBha,EAASk0B,EAAQv4B,GACbme,IACFA,EAAOC,OACPka,GAAS,IAGTj0B,IAAWg0B,EAAS7Z,QACtBS,EAAOrgB,EAAU,yBACR6f,EAAOoZ,EAAWxzB,IAC3Boa,EAAKjjB,KAAK6I,EAAQka,EAASU,GACtBV,EAAQla,IACV4a,EAAOjf,GACd,MAAOf,GACHkf,IAAWma,GAAQna,EAAOC,OAC9Ba,EAAOhgB,KAGW3D,EAAf08B,EAAMz1B,QAAYoa,EAAIqb,EAAM18B,MACnCkjB,EAAQyZ,GAAK,GACbzZ,EAAQuZ,IAAK,EACTD,IAAatZ,EAAQia,IAAIE,EAAYna,OAGzCma,EAAc,SAAUna,GAC1BO,EAAKvjB,KAAKsB,EAAQ,WAChB,IAEIuH,EAAQk0B,EAASK,EAFjB54B,EAAQwe,EAAQ0Z,GAChBW,EAAYC,EAAYta,GAe5B,GAbIqa,IACFx0B,EAAS+yB,EAAQ,WACXvZ,EACF5B,EAAQ8c,KAAK,qBAAsB/4B,EAAOwe,IACjC+Z,EAAUz7B,EAAOk8B,sBAC1BT,EAAQ,CAAE/Z,QAASA,EAASya,OAAQj5B,KAC1B44B,EAAU97B,EAAO87B,UAAYA,EAAQM,OAC/CN,EAAQM,MAAM,8BAA+Bl5B,KAIjDwe,EAAQia,GAAK5a,GAAUib,EAAYta,GAAW,EAAI,GAClDA,EAAQ2a,GAAKp+B,GACX89B,GAAax0B,EAAOpF,EAAG,MAAMoF,EAAOyK,KAGxCgqB,EAAc,SAAUta,GAC1B,OAAsB,IAAfA,EAAQia,IAAkD,KAArCja,EAAQ2a,IAAM3a,EAAQyZ,IAAI11B,QAEpDm2B,EAAoB,SAAUla,GAChCO,EAAKvjB,KAAKsB,EAAQ,WAChB,IAAIy7B,EACA1a,EACF5B,EAAQ8c,KAAK,mBAAoBva,IACxB+Z,EAAUz7B,EAAOs8B,qBAC1Bb,EAAQ,CAAE/Z,QAASA,EAASya,OAAQza,EAAQ0Z,QAI9CmB,EAAU,SAAUr5B,GACtB,IAAIwe,EAAUtd,KACVsd,EAAQtT,KACZsT,EAAQtT,IAAK,GACbsT,EAAUA,EAAQ8a,IAAM9a,GAChB0Z,GAAKl4B,EACbwe,EAAQ4Z,GAAK,EACR5Z,EAAQ2a,KAAI3a,EAAQ2a,GAAK3a,EAAQyZ,GAAGn1B,SACzCkb,EAAOQ,GAAS,KAEd+a,EAAW,SAAUv5B,GACvB,IACIye,EADAD,EAAUtd,KAEd,IAAIsd,EAAQtT,GAAZ,CACAsT,EAAQtT,IAAK,EACbsT,EAAUA,EAAQ8a,IAAM9a,EACxB,IACE,GAAIA,IAAYxe,EAAO,MAAMpB,EAAU,qCACnC6f,EAAOoZ,EAAW73B,IACpBk3B,EAAU,WACR,IAAI9oB,EAAU,CAAEkrB,GAAI9a,EAAStT,IAAI,GACjC,IACEuT,EAAKjjB,KAAKwE,EAAO9C,EAAIq8B,EAAUnrB,EAAS,GAAIlR,EAAIm8B,EAASjrB,EAAS,IAClE,MAAOnP,GACPo6B,EAAQ79B,KAAK4S,EAASnP,OAI1Buf,EAAQ0Z,GAAKl4B,EACbwe,EAAQ4Z,GAAK,EACbpa,EAAOQ,GAAS,IAElB,MAAOvf,GACPo6B,EAAQ79B,KAAK,CAAE89B,GAAI9a,EAAStT,IAAI,GAASjM,MAKxC6qB,IAEH2N,EAAW,SAAS7Z,QAAQ4b,GAC1B3zB,EAAW3E,KAAMu2B,EAAUH,EAAS,MACpC90B,EAAUg3B,GACV1C,EAASt7B,KAAK0F,MACd,IACEs4B,EAASt8B,EAAIq8B,EAAUr4B,KAAM,GAAIhE,EAAIm8B,EAASn4B,KAAM,IACpD,MAAOu4B,GACPJ,EAAQ79B,KAAK0F,KAAMu4B,MAIvB3C,EAAW,SAASlZ,QAAQ4b,GAC1Bt4B,KAAK+2B,GAAK,GACV/2B,KAAKi4B,GAAKp+B,GACVmG,KAAKk3B,GAAK,EACVl3B,KAAKgK,IAAK,EACVhK,KAAKg3B,GAAKn9B,GACVmG,KAAKu3B,GAAK,EACVv3B,KAAK62B,IAAK,IAEHr7B,UAAYxB,EAAoB,GAApBA,CAAwBu8B,EAAS/6B,UAAW,CAE/D+hB,KAAM,SAASA,KAAKib,EAAaC,GAC/B,IAAItB,EAAWlT,EAAqB1e,EAAmBvF,KAAMu2B,IAO7D,OANAY,EAASF,GAA2B,mBAAfuB,GAA4BA,EACjDrB,EAASG,KAA4B,mBAAdmB,GAA4BA,EACnDtB,EAASla,OAASN,EAAS5B,EAAQkC,OAASpjB,GAC5CmG,KAAK+2B,GAAG3zB,KAAK+zB,GACTn3B,KAAKi4B,IAAIj4B,KAAKi4B,GAAG70B,KAAK+zB,GACtBn3B,KAAKk3B,IAAIpa,EAAO9c,MAAM,GACnBm3B,EAAS7Z,SAGlBob,QAAS,SAAUD,GACjB,OAAOz4B,KAAKud,KAAK1jB,GAAW4+B,MAGhC3C,EAAuB,WACrB,IAAIxY,EAAU,IAAIsY,EAClB51B,KAAKsd,QAAUA,EACftd,KAAKqd,QAAUrhB,EAAIq8B,EAAU/a,EAAS,GACtCtd,KAAK+d,OAAS/hB,EAAIm8B,EAAS7a,EAAS,IAEtC2Y,EAA2Bt3B,EAAIslB,EAAuB,SAAUva,GAC9D,OAAOA,IAAM6sB,GAAY7sB,IAAMqsB,EAC3B,IAAID,EAAqBpsB,GACzBmsB,EAA4BnsB,KAIpCxN,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,GAAKksB,EAAY,CAAElM,QAAS6Z,IACpEv8B,EAAoB,GAApBA,CAAwBu8B,EAAUH,GAClCp8B,EAAoB,GAApBA,CAAwBo8B,GACxBL,EAAU/7B,EAAoB,IAAIo8B,GAGlCl6B,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKksB,EAAYwN,EAAS,CAEpDrY,OAAQ,SAASA,OAAO2G,GACtB,IAAIiU,EAAa1U,EAAqBjkB,MAGtC,OADAie,EADe0a,EAAW5a,QACjB2G,GACFiU,EAAWrb,WAGtBphB,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK8H,IAAYokB,GAAawN,EAAS,CAEjE/Y,QAAS,SAASA,QAAQrE,GACxB,OAAOmd,EAAe3xB,GAAWxE,OAAS+1B,EAAUQ,EAAWv2B,KAAMgZ,MAGzE9c,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAMksB,GAAc5uB,EAAoB,GAApBA,CAAwB,SAAUoU,GAChFmoB,EAASqC,IAAIxqB,GAAa,SAAEooB,MACzBJ,EAAS,CAEZwC,IAAK,SAASA,IAAInoB,GAChB,IAAI/G,EAAI1J,KACJ24B,EAAa1U,EAAqBva,GAClC2T,EAAUsb,EAAWtb,QACrBU,EAAS4a,EAAW5a,OACpB5a,EAAS+yB,EAAQ,WACnB,IAAI9uB,EAAS,GACTlE,EAAQ,EACR21B,EAAY,EAChB7iB,EAAMvF,GAAU,EAAO,SAAU6M,GAC/B,IAAIwb,EAAS51B,IACT61B,GAAgB,EACpB3xB,EAAOhE,KAAKvJ,IACZg/B,IACAnvB,EAAE2T,QAAQC,GAASC,KAAK,SAAUze,GAC5Bi6B,IACJA,GAAgB,EAChB3xB,EAAO0xB,GAAUh6B,IACf+5B,GAAaxb,EAAQjW,KACtB2W,OAEH8a,GAAaxb,EAAQjW,KAGzB,OADIjE,EAAOpF,GAAGggB,EAAO5a,EAAOyK,GACrB+qB,EAAWrb,SAGpB0b,KAAM,SAASA,KAAKvoB,GAClB,IAAI/G,EAAI1J,KACJ24B,EAAa1U,EAAqBva,GAClCqU,EAAS4a,EAAW5a,OACpB5a,EAAS+yB,EAAQ,WACnBlgB,EAAMvF,GAAU,EAAO,SAAU6M,GAC/B5T,EAAE2T,QAAQC,GAASC,KAAKob,EAAWtb,QAASU,OAIhD,OADI5a,EAAOpF,GAAGggB,EAAO5a,EAAOyK,GACrB+qB,EAAWrb,YAOhB,SAAUnjB,EAAQD,EAASF,GAIjC,IAAIgrB,EAAOhrB,EAAoB,KAC3ByP,EAAWzP,EAAoB,IAC/Bi/B,EAAW,UAGfj/B,EAAoB,GAApBA,CAAwBi/B,EAAU,SAAUh+B,GAC1C,OAAO,SAASi+B,UAAY,OAAOj+B,EAAI+E,KAAyB,EAAnB2B,UAAUN,OAAaM,UAAU,GAAK9H,MAClF,CAEDyc,IAAK,SAASA,IAAIxX,GAChB,OAAOkmB,EAAK5T,IAAI3H,EAASzJ,KAAMi5B,GAAWn6B,GAAO,KAElDkmB,GAAM,GAAO,IAKV,SAAU7qB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAYtH,EAAoB,IAChCuE,EAAWvE,EAAoB,GAC/Bm/B,GAAUn/B,EAAoB,GAAGkkB,SAAW,IAAIxc,MAChD03B,EAASh8B,SAASsE,MAEtBxF,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK1C,EAAoB,EAApBA,CAAuB,WACtDm/B,EAAO,gBACL,UAAW,CACbz3B,MAAO,SAASA,MAAMzE,EAAQo8B,EAAcC,GAC1C,IAAInpB,EAAI7O,EAAUrE,GACds8B,EAAIh7B,EAAS+6B,GACjB,OAAOH,EAASA,EAAOhpB,EAAGkpB,EAAcE,GAAKH,EAAO9+B,KAAK6V,EAAGkpB,EAAcE,OAOxE,SAAUp/B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B8I,EAAS9I,EAAoB,IAC7BsH,EAAYtH,EAAoB,IAChCuE,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/B0G,EAAQ1G,EAAoB,GAC5BmoB,EAAOnoB,EAAoB,KAC3Bw/B,GAAcx/B,EAAoB,GAAGkkB,SAAW,IAAIoE,UAIpDmX,EAAiB/4B,EAAM,WACzB,SAAShE,KACT,QAAS88B,EAAW,aAA6B,GAAI98B,aAAcA,KAEjEg9B,GAAYh5B,EAAM,WACpB84B,EAAW,gBAGbt9B,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK+8B,GAAkBC,GAAW,UAAW,CACvEpX,UAAW,SAASA,UAAUqX,EAAQjhB,GACpCpX,EAAUq4B,GACVp7B,EAASma,GACT,IAAIkhB,EAAYj4B,UAAUN,OAAS,EAAIs4B,EAASr4B,EAAUK,UAAU,IACpE,GAAI+3B,IAAaD,EAAgB,OAAOD,EAAWG,EAAQjhB,EAAMkhB,GACjE,GAAID,GAAUC,EAAW,CAEvB,OAAQlhB,EAAKrX,QACX,KAAK,EAAG,OAAO,IAAIs4B,EACnB,KAAK,EAAG,OAAO,IAAIA,EAAOjhB,EAAK,IAC/B,KAAK,EAAG,OAAO,IAAIihB,EAAOjhB,EAAK,GAAIA,EAAK,IACxC,KAAK,EAAG,OAAO,IAAIihB,EAAOjhB,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACjD,KAAK,EAAG,OAAO,IAAIihB,EAAOjhB,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAG5D,IAAImhB,EAAQ,CAAC,MAEb,OADAA,EAAMz2B,KAAK1B,MAAMm4B,EAAOnhB,GACjB,IAAKyJ,EAAKzgB,MAAMi4B,EAAQE,IAGjC,IAAI9uB,EAAQ6uB,EAAUp+B,UAClB+a,EAAWzT,EAAOtF,EAASuN,GAASA,EAAQlQ,OAAOW,WACnD2H,EAAS/F,SAASsE,MAAMpH,KAAKq/B,EAAQpjB,EAAUmC,GACnD,OAAOlb,EAAS2F,GAAUA,EAASoT,MAOjC,SAAUpc,EAAQD,EAASF,GAGjC,IAAI0E,EAAK1E,EAAoB,GACzBkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAC/ByE,EAAczE,EAAoB,IAGtCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WAErDkkB,QAAQpjB,eAAe4D,EAAGC,EAAE,GAAI,EAAG,CAAEG,MAAO,IAAM,EAAG,CAAEA,MAAO,MAC5D,UAAW,CACbhE,eAAgB,SAASA,eAAemC,EAAQ68B,EAAaC,GAC3Dx7B,EAAStB,GACT68B,EAAcr7B,EAAYq7B,GAAa,GACvCv7B,EAASw7B,GACT,IAEE,OADAr7B,EAAGC,EAAE1B,EAAQ68B,EAAaC,IACnB,EACP,MAAOh8B,GACP,OAAO,OAQP,SAAU5D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BmG,EAAOnG,EAAoB,IAAI2E,EAC/BJ,EAAWvE,EAAoB,GAEnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAC5B88B,eAAgB,SAASA,eAAe/8B,EAAQ68B,GAC9C,IAAI/sB,EAAO5M,EAAK5B,EAAStB,GAAS68B,GAClC,QAAO/sB,IAASA,EAAKhS,sBAA8BkC,EAAO68B,OAOxD,SAAU3/B,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAC/BigC,EAAY,SAAUzgB,GACxBxZ,KAAKmR,GAAK5S,EAASib,GACnBxZ,KAAKyZ,GAAK,EACV,IACIpd,EADAkH,EAAOvD,KAAK0Z,GAAK,GAErB,IAAKrd,KAAOmd,EAAUjW,EAAKH,KAAK/G,IAElCrC,EAAoB,GAApBA,CAAwBigC,EAAW,SAAU,WAC3C,IAEI59B,EADAkH,EADOvD,KACK0Z,GAEhB,GACE,GAAenW,EAAKlC,QAJXrB,KAIAyZ,GAAmB,MAAO,CAAE3a,MAAOjF,GAAW6Q,MAAM,YACnDrO,EAAMkH,EALPvD,KAKiByZ,SALjBzZ,KAKgCmR,KAC3C,MAAO,CAAErS,MAAOzC,EAAKqO,MAAM,KAG7BxO,EAAQA,EAAQgB,EAAG,UAAW,CAC5Bg9B,UAAW,SAASA,UAAUj9B,GAC5B,OAAO,IAAIg9B,EAAUh9B,OAOnB,SAAU9C,EAAQD,EAASF,GAGjC,IAAImG,EAAOnG,EAAoB,IAC3BwG,EAAiBxG,EAAoB,IACrCmF,EAAMnF,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BwD,EAAWxD,EAAoB,GAC/BuE,EAAWvE,EAAoB,GAcnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAAEjC,IAZhC,SAASA,IAAIgC,EAAQ68B,GACnB,IACI/sB,EAAMhC,EADNovB,EAAWx4B,UAAUN,OAAS,EAAIpE,EAAS0E,UAAU,GAEzD,OAAIpD,EAAStB,KAAYk9B,EAAiBl9B,EAAO68B,IAC7C/sB,EAAO5M,EAAKxB,EAAE1B,EAAQ68B,IAAqB36B,EAAI4N,EAAM,SACrDA,EAAKjO,MACLiO,EAAK9R,MAAQpB,GACXkT,EAAK9R,IAAIX,KAAK6/B,GACdtgC,GACF2D,EAASuN,EAAQvK,EAAevD,IAAiBhC,IAAI8P,EAAO+uB,EAAaK,QAA7E,MAQI,SAAUhgC,EAAQD,EAASF,GAGjC,IAAImG,EAAOnG,EAAoB,IAC3BkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAEnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAC5BkD,yBAA0B,SAASA,yBAAyBnD,EAAQ68B,GAClE,OAAO35B,EAAKxB,EAAEJ,EAAStB,GAAS68B,OAO9B,SAAU3/B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BogC,EAAWpgC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAEnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAC5BsD,eAAgB,SAASA,eAAevD,GACtC,OAAOm9B,EAAS77B,EAAStB,QAOvB,SAAU9C,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,UAAW,CAC5BiC,IAAK,SAASA,IAAIlC,EAAQ68B,GACxB,OAAOA,KAAe78B,MAOpB,SAAU9C,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAC/B+wB,EAAgBlwB,OAAO0U,aAE3BrT,EAAQA,EAAQgB,EAAG,UAAW,CAC5BqS,aAAc,SAASA,aAAatS,GAElC,OADAsB,EAAStB,IACF8tB,GAAgBA,EAAc9tB,OAOnC,SAAU9C,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,UAAW,CAAEihB,QAASnkB,EAAoB,OAKvD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAC/B0wB,EAAqB7vB,OAAO4U,kBAEhCvT,EAAQA,EAAQgB,EAAG,UAAW,CAC5BuS,kBAAmB,SAASA,kBAAkBxS,GAC5CsB,EAAStB,GACT,IAEE,OADIytB,GAAoBA,EAAmBztB,IACpC,EACP,MAAOc,GACP,OAAO,OAQP,SAAU5D,EAAQD,EAASF,GAGjC,IAAI0E,EAAK1E,EAAoB,GACzBmG,EAAOnG,EAAoB,IAC3BwG,EAAiBxG,EAAoB,IACrCmF,EAAMnF,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BkF,EAAalF,EAAoB,IACjCuE,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAwBnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAAEmM,IAtBhC,SAASA,IAAIpM,EAAQ68B,EAAaO,GAChC,IAEIC,EAAoBvvB,EAFpBovB,EAAWx4B,UAAUN,OAAS,EAAIpE,EAAS0E,UAAU,GACrD44B,EAAUp6B,EAAKxB,EAAEJ,EAAStB,GAAS68B,GAEvC,IAAKS,EAAS,CACZ,GAAI/8B,EAASuN,EAAQvK,EAAevD,IAClC,OAAOoM,IAAI0B,EAAO+uB,EAAaO,EAAGF,GAEpCI,EAAUr7B,EAAW,GAEvB,GAAIC,EAAIo7B,EAAS,SAAU,CACzB,IAAyB,IAArBA,EAAQvtB,WAAuBxP,EAAS28B,GAAW,OAAO,EAC9D,GAAIG,EAAqBn6B,EAAKxB,EAAEw7B,EAAUL,GAAc,CACtD,GAAIQ,EAAmBr/B,KAAOq/B,EAAmBjxB,MAAuC,IAAhCixB,EAAmBttB,SAAoB,OAAO,EACtGstB,EAAmBx7B,MAAQu7B,EAC3B37B,EAAGC,EAAEw7B,EAAUL,EAAaQ,QACvB57B,EAAGC,EAAEw7B,EAAUL,EAAa56B,EAAW,EAAGm7B,IACjD,OAAO,EAET,OAAOE,EAAQlxB,MAAQxP,KAAqB0gC,EAAQlxB,IAAI/O,KAAK6/B,EAAUE,IAAI,OAQvE,SAAUlgC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwgC,EAAWxgC,EAAoB,IAE/BwgC,GAAUt+B,EAAQA,EAAQgB,EAAG,UAAW,CAC1Cqb,eAAgB,SAASA,eAAetb,EAAQ8N,GAC9CyvB,EAASliB,MAAMrb,EAAQ8N,GACvB,IAEE,OADAyvB,EAASnxB,IAAIpM,EAAQ8N,IACd,EACP,MAAOhN,GACP,OAAO,OAQP,SAAU5D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAE2e,IAAK,WAAc,OAAO,IAAI4e,MAAOC,cAK5D,SAAUvgC,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/ByE,EAAczE,EAAoB,IAEtCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACrD,OAAkC,OAA3B,IAAIygC,KAAKhb,KAAKwH,UAC2D,IAA3EwT,KAAKj/B,UAAUyrB,OAAO3sB,KAAK,CAAEqgC,YAAa,WAAc,OAAO,OAClE,OAAQ,CAEV1T,OAAQ,SAASA,OAAO5qB,GACtB,IAAIuC,EAAIyB,EAASL,MACb46B,EAAKn8B,EAAYG,GACrB,MAAoB,iBAANg8B,GAAmBnY,SAASmY,GAAah8B,EAAE+7B,cAAT,SAO9C,SAAUxgC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B2gC,EAAc3gC,EAAoB,KAGtCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK+9B,KAAKj/B,UAAUm/B,cAAgBA,GAAc,OAAQ,CACpFA,YAAaA,KAMT,SAAUxgC,EAAQD,EAASF,GAKjC,IAAI0G,EAAQ1G,EAAoB,GAC5B0gC,EAAUD,KAAKj/B,UAAUk/B,QACzBG,EAAeJ,KAAKj/B,UAAUm/B,YAE9BG,EAAK,SAAUC,GACjB,OAAa,EAANA,EAAUA,EAAM,IAAMA,GAI/B5gC,EAAOD,QAAWwG,EAAM,WACtB,MAAiD,4BAA1Cm6B,EAAavgC,KAAK,IAAImgC,MAAM,KAAO,QACrC/5B,EAAM,WACXm6B,EAAavgC,KAAK,IAAImgC,KAAKhb,QACvB,SAASkb,cACb,IAAKlY,SAASiY,EAAQpgC,KAAK0F,OAAQ,MAAMgG,WAAW,sBACpD,IAAIvL,EAAIuF,KACJiiB,EAAIxnB,EAAEugC,iBACNzgC,EAAIE,EAAEwgC,qBACNt/B,EAAIsmB,EAAI,EAAI,IAAU,KAAJA,EAAW,IAAM,GACvC,OAAOtmB,GAAK,QAAUiC,KAAK2gB,IAAI0D,IAAIrgB,MAAMjG,GAAK,GAAK,GACjD,IAAMm/B,EAAGrgC,EAAEygC,cAAgB,GAAK,IAAMJ,EAAGrgC,EAAE0gC,cAC3C,IAAML,EAAGrgC,EAAE2gC,eAAiB,IAAMN,EAAGrgC,EAAE4gC,iBACvC,IAAMP,EAAGrgC,EAAE6gC,iBAAmB,KAAW,GAAJ/gC,EAASA,EAAI,IAAMugC,EAAGvgC,IAAM,KACjEsgC,GAKE,SAAU1gC,EAAQD,EAASF,GAEjC,IAAIuhC,EAAYd,KAAKj/B,UACjBggC,EAAe,eACfl8B,EAAY,WACZD,EAAYk8B,EAAUj8B,GACtBo7B,EAAUa,EAAUb,QACpB,IAAID,KAAKhb,KAAO,IAAM+b,GACxBxhC,EAAoB,GAApBA,CAAwBuhC,EAAWj8B,EAAW,SAASS,WACrD,IAAIjB,EAAQ47B,EAAQpgC,KAAK0F,MAEzB,OAAOlB,GAAUA,EAAQO,EAAU/E,KAAK0F,MAAQw7B,KAO9C,SAAUrhC,EAAQD,EAASF,GAEjC,IAAIwuB,EAAexuB,EAAoB,EAApBA,CAAuB,eACtC+Q,EAAQ0vB,KAAKj/B,UAEXgtB,KAAgBzd,GAAQ/Q,EAAoB,GAApBA,CAAwB+Q,EAAOyd,EAAcxuB,EAAoB,OAKzF,SAAUG,EAAQD,EAASF,GAIjC,IAAIuE,EAAWvE,EAAoB,GAC/ByE,EAAczE,EAAoB,IAGtCG,EAAOD,QAAU,SAAUuhC,GACzB,GAAa,WAATA,GAHO,WAGcA,GAA4B,YAATA,EAAoB,MAAM/9B,UAAU,kBAChF,OAAOe,EAAYF,EAASyB,MAJjB,UAIwBy7B,KAM/B,SAAUthC,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9ByK,EAASzK,EAAoB,IAC7BmP,EAASnP,EAAoB,IAC7BuE,EAAWvE,EAAoB,GAC/B+K,EAAkB/K,EAAoB,IACtCoI,EAAWpI,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/BwM,EAAcxM,EAAoB,GAAGwM,YACrCjB,EAAqBvL,EAAoB,IACzCuM,EAAe4C,EAAO3C,YACtBC,EAAY0C,EAAOzC,SACnBg1B,EAAUj3B,EAAOqJ,KAAOtH,EAAYm1B,OACpCpvB,EAAShG,EAAa/K,UAAUoG,MAChCiH,EAAOpE,EAAOoE,KACd3C,EAAe,cAEnBhK,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,GAAK8J,IAAgBD,GAAe,CAAEC,YAAaD,IAE3FrK,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK+H,EAAOiE,OAAQxC,EAAc,CAE5Dy1B,OAAQ,SAASA,OAAOl+B,GACtB,OAAOi+B,GAAWA,EAAQj+B,IAAOD,EAASC,IAAOoL,KAAQpL,KAI7DvB,EAAQA,EAAQY,EAAIZ,EAAQmB,EAAInB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACjE,OAAQ,IAAIuM,EAAa,GAAG3E,MAAM,EAAG/H,IAAWoU,aAC9C/H,EAAc,CAEhBtE,MAAO,SAASA,MAAMqJ,EAAOmB,GAC3B,GAAIG,IAAW1S,IAAauS,IAAQvS,GAAW,OAAO0S,EAAOjS,KAAKiE,EAASyB,MAAOiL,GAQlF,IAPA,IAAIyB,EAAMnO,EAASyB,MAAMiO,WACrB2d,EAAQ7mB,EAAgBkG,EAAOyB,GAC/BkvB,EAAM72B,EAAgBqH,IAAQvS,GAAY6S,EAAMN,EAAKM,GACrDvJ,EAAS,IAAKoC,EAAmBvF,KAAMuG,GAA9B,CAA6CnE,EAASw5B,EAAMhQ,IACrEiQ,EAAQ,IAAIp1B,EAAUzG,MACtB87B,EAAQ,IAAIr1B,EAAUtD,GACtBD,EAAQ,EACL0oB,EAAQgQ,GACbE,EAAMnb,SAASzd,IAAS24B,EAAMhb,SAAS+K,MACvC,OAAOzoB,KAIbnJ,EAAoB,GAApBA,CAAwBkM,IAKlB,SAAU/L,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,GAAK1C,EAAoB,IAAI8T,IAAK,CACxEpH,SAAU1M,EAAoB,IAAI0M,YAM9B,SAAUvM,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,OAAQ,EAAG,SAAU+hC,GAC3C,OAAO,SAASC,UAAUruB,EAAMrB,EAAYjL,GAC1C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+hC,GAC5C,OAAO,SAAS91B,WAAW0H,EAAMrB,EAAYjL,GAC3C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+hC,GAC5C,OAAO,SAASE,kBAAkBtuB,EAAMrB,EAAYjL,GAClD,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,MAErC,IAKG,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+hC,GAC5C,OAAO,SAASG,WAAWvuB,EAAMrB,EAAYjL,GAC3C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU+hC,GAC7C,OAAO,SAAS7yB,YAAYyE,EAAMrB,EAAYjL,GAC5C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+hC,GAC5C,OAAO,SAASI,WAAWxuB,EAAMrB,EAAYjL,GAC3C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU+hC,GAC7C,OAAO,SAASK,YAAYzuB,EAAMrB,EAAYjL,GAC5C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU+hC,GAC9C,OAAO,SAASM,aAAa1uB,EAAMrB,EAAYjL,GAC7C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU+hC,GAC9C,OAAO,SAASO,aAAa3uB,EAAMrB,EAAYjL,GAC7C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BuiC,EAAYviC,EAAoB,GAApBA,EAAwB,GAExCkC,EAAQA,EAAQY,EAAG,QAAS,CAC1B6O,SAAU,SAASA,SAAS+G,GAC1B,OAAO6pB,EAAUv8B,KAAM0S,EAAuB,EAAnB/Q,UAAUN,OAAaM,UAAU,GAAK9H,OAIrEG,EAAoB,GAApBA,CAAwB,aAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+rB,EAAmB/rB,EAAoB,KACvCqG,EAAWrG,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChCwiC,EAAqBxiC,EAAoB,IAE7CkC,EAAQA,EAAQY,EAAG,QAAS,CAC1B2/B,QAAS,SAASA,QAAQz5B,GACxB,IACIgjB,EAAW3O,EADXzY,EAAIyB,EAASL,MAMjB,OAJAsB,EAAU0B,GACVgjB,EAAY5jB,EAASxD,EAAEyC,QACvBgW,EAAImlB,EAAmB59B,EAAG,GAC1BmnB,EAAiB1O,EAAGzY,EAAGA,EAAGonB,EAAW,EAAG,EAAGhjB,EAAYrB,UAAU,IAC1D0V,KAIXrd,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+rB,EAAmB/rB,EAAoB,KACvCqG,EAAWrG,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BqE,EAAYrE,EAAoB,IAChCwiC,EAAqBxiC,EAAoB,IAE7CkC,EAAQA,EAAQY,EAAG,QAAS,CAC1B4/B,QAAS,SAASA,UAChB,IAAIC,EAAWh7B,UAAU,GACrB/C,EAAIyB,EAASL,MACbgmB,EAAY5jB,EAASxD,EAAEyC,QACvBgW,EAAImlB,EAAmB59B,EAAG,GAE9B,OADAmnB,EAAiB1O,EAAGzY,EAAGA,EAAGonB,EAAW,EAAG2W,IAAa9iC,GAAY,EAAIwE,EAAUs+B,IACxEtlB,KAIXrd,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9By1B,EAAMz1B,EAAoB,GAApBA,EAAwB,GAG9B0Z,EAFS1Z,EAAoB,EAEpB6tB,CAAO,WAClB,MAAsB,OAAf,KAAKrN,GAAG,KAGjBte,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIgX,EAAQ,SAAU,CAChD8G,GAAI,SAASA,GAAG1H,GACd,OAAO2c,EAAIzvB,KAAM8S,OAOf,SAAU3Y,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4iC,EAAO5iC,EAAoB,KAC3B+b,EAAY/b,EAAoB,IAGhC6iC,EAAa,mDAAmD17B,KAAK4U,GAEzE7Z,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAImgC,EAAY,SAAU,CACpDC,SAAU,SAASA,SAAStW,GAC1B,OAAOoW,EAAK58B,KAAMwmB,EAA8B,EAAnB7kB,UAAUN,OAAaM,UAAU,GAAK9H,IAAW,OAO5E,SAAUM,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4iC,EAAO5iC,EAAoB,KAC3B+b,EAAY/b,EAAoB,IAGhC6iC,EAAa,mDAAmD17B,KAAK4U,GAEzE7Z,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAImgC,EAAY,SAAU,CACpDE,OAAQ,SAASA,OAAOvW,GACtB,OAAOoW,EAAK58B,KAAMwmB,EAA8B,EAAnB7kB,UAAUN,OAAaM,UAAU,GAAK9H,IAAW,OAO5E,SAAUM,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU4oB,GAC5C,OAAO,SAASoa,WACd,OAAOpa,EAAM5iB,KAAM,KAEpB,cAKG,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,YAAa,SAAU4oB,GAC7C,OAAO,SAASqa,YACd,OAAOra,EAAM5iB,KAAM,KAEpB,YAKG,SAAU7F,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAU/E,EAAoB,IAC9BoI,EAAWpI,EAAoB,GAC/BkZ,EAAWlZ,EAAoB,IAC/BkjC,EAAWljC,EAAoB,IAC/BmjC,EAAc1rB,OAAOjW,UAErB4hC,EAAwB,SAAU3nB,EAAQ5U,GAC5Cb,KAAKq9B,GAAK5nB,EACVzV,KAAKk3B,GAAKr2B,GAGZ7G,EAAoB,GAApBA,CAAwBojC,EAAuB,gBAAiB,SAAS3yB,OACvE,IAAI8P,EAAQva,KAAKq9B,GAAGv/B,KAAKkC,KAAKk3B,IAC9B,MAAO,CAAEp4B,MAAOyb,EAAO7P,KAAgB,OAAV6P,KAG/Bre,EAAQA,EAAQY,EAAG,SAAU,CAC3BwgC,SAAU,SAASA,SAAS7nB,GAE1B,GADA1W,EAAQiB,OACHkT,EAASuC,GAAS,MAAM/X,UAAU+X,EAAS,qBAChD,IAAIvY,EAAI4C,OAAOE,MACXgkB,EAAQ,UAAWmZ,EAAcr9B,OAAO2V,EAAOuO,OAASkZ,EAAS5iC,KAAKmb,GACtEod,EAAK,IAAIphB,OAAOgE,EAAOrZ,QAAS4nB,EAAMvY,QAAQ,KAAOuY,EAAQ,IAAMA,GAEvE,OADA6O,EAAGxY,UAAYjY,EAASqT,EAAO4E,WACxB,IAAI+iB,EAAsBvK,EAAI31B,OAOnC,SAAU/C,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,kBAKlB,SAAUG,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BmkB,EAAUnkB,EAAoB,IAC9BkG,EAAYlG,EAAoB,IAChCmG,EAAOnG,EAAoB,IAC3Bs3B,EAAiBt3B,EAAoB,IAEzCkC,EAAQA,EAAQgB,EAAG,SAAU,CAC3BqgC,0BAA2B,SAASA,0BAA0BjiC,GAO5D,IANA,IAKIe,EAAK0Q,EALLnO,EAAIsB,EAAU5E,GACdkiC,EAAUr9B,EAAKxB,EACf4E,EAAO4a,EAAQvf,GACfuE,EAAS,GACT/I,EAAI,EAEaA,EAAdmJ,EAAKlC,SACV0L,EAAOywB,EAAQ5+B,EAAGvC,EAAMkH,EAAKnJ,SAChBP,IAAWy3B,EAAenuB,EAAQ9G,EAAK0Q,GAEtD,OAAO5J,MAOL,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9ByjC,EAAUzjC,EAAoB,IAApBA,EAAyB,GAEvCkC,EAAQA,EAAQgB,EAAG,SAAU,CAC3BkK,OAAQ,SAASA,OAAO3J,GACtB,OAAOggC,EAAQhgC,OAOb,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bma,EAAWna,EAAoB,IAApBA,EAAyB,GAExCkC,EAAQA,EAAQgB,EAAG,SAAU,CAC3BqK,QAAS,SAASA,QAAQ9J,GACxB,OAAO0W,EAAS1W,OAOd,SAAUtD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChCof,EAAkBpf,EAAoB,GAG1CA,EAAoB,IAAMkC,EAAQA,EAAQY,EAAI9C,EAAoB,IAAK,SAAU,CAC/E0jC,iBAAkB,SAASA,iBAAiB5gC,EAAGnC,GAC7Cye,EAAgBza,EAAE0B,EAASL,MAAOlD,EAAG,CAAE7B,IAAKqG,EAAU3G,GAASK,YAAY,EAAMD,cAAc,QAO7F,SAAUZ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChCof,EAAkBpf,EAAoB,GAG1CA,EAAoB,IAAMkC,EAAQA,EAAQY,EAAI9C,EAAoB,IAAK,SAAU,CAC/Emd,iBAAkB,SAASA,iBAAiBra,EAAGgsB,GAC7C1P,EAAgBza,EAAE0B,EAASL,MAAOlD,EAAG,CAAEuM,IAAK/H,EAAUwnB,GAAS9tB,YAAY,EAAMD,cAAc,QAO7F,SAAUZ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/ByE,EAAczE,EAAoB,IAClCwG,EAAiBxG,EAAoB,IACrCoG,EAA2BpG,EAAoB,IAAI2E,EAGvD3E,EAAoB,IAAMkC,EAAQA,EAAQY,EAAI9C,EAAoB,IAAK,SAAU,CAC/E2jC,iBAAkB,SAASA,iBAAiB7gC,GAC1C,IAEI0V,EAFA5T,EAAIyB,EAASL,MACbkX,EAAIzY,EAAY3B,GAAG,GAEvB,GACE,GAAI0V,EAAIpS,EAAyBxB,EAAGsY,GAAI,OAAO1E,EAAEvX,UAC1C2D,EAAI4B,EAAe5B,QAO1B,SAAUzE,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/ByE,EAAczE,EAAoB,IAClCwG,EAAiBxG,EAAoB,IACrCoG,EAA2BpG,EAAoB,IAAI2E,EAGvD3E,EAAoB,IAAMkC,EAAQA,EAAQY,EAAI9C,EAAoB,IAAK,SAAU,CAC/E4jC,iBAAkB,SAASA,iBAAiB9gC,GAC1C,IAEI0V,EAFA5T,EAAIyB,EAASL,MACbkX,EAAIzY,EAAY3B,GAAG,GAEvB,GACE,GAAI0V,EAAIpS,EAAyBxB,EAAGsY,GAAI,OAAO1E,EAAEnJ,UAC1CzK,EAAI4B,EAAe5B,QAO1B,SAAUzE,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAIZ,EAAQqB,EAAG,MAAO,CAAE0pB,OAAQjtB,EAAoB,IAApBA,CAAyB,UAKnE,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAIZ,EAAQqB,EAAG,MAAO,CAAE0pB,OAAQjtB,EAAoB,IAApBA,CAAyB,UAKnE,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQU,EAAG,CAAEhB,OAAQ5B,EAAoB,MAK3C,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEtB,OAAQ5B,EAAoB,MAKrD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BiW,EAAMjW,EAAoB,IAE9BkC,EAAQA,EAAQgB,EAAG,QAAS,CAC1B2gC,QAAS,SAASA,QAAQpgC,GACxB,MAAmB,UAAZwS,EAAIxS,OAOT,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB4gC,MAAO,SAASA,MAAM9kB,EAAG+kB,EAAOC,GAC9B,OAAOpgC,KAAKU,IAAI0/B,EAAOpgC,KAAKgT,IAAImtB,EAAO/kB,QAOrC,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAE+gC,YAAargC,KAAKsgC,GAAK,OAK9C,SAAU/jC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BmkC,EAAc,IAAMvgC,KAAKsgC,GAE7BhiC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBkhC,QAAS,SAASA,QAAQC,GACxB,OAAOA,EAAUF,MAOf,SAAUhkC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BktB,EAAQltB,EAAoB,KAC5BupB,EAASvpB,EAAoB,KAEjCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBohC,OAAQ,SAASA,OAAOtlB,EAAGmO,EAAOC,EAAQC,EAAQC,GAChD,OAAO/D,EAAO2D,EAAMlO,EAAGmO,EAAOC,EAAQC,EAAQC,QAO5C,SAAUntB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBqhC,MAAO,SAASA,MAAMC,EAAIC,EAAIC,EAAIC,GAChC,IAAIC,EAAMJ,IAAO,EAEbK,EAAMH,IAAO,EACjB,OAFUD,IAAO,IAEHE,IAAO,KAAOC,EAAMC,GAAOD,EAAMC,KAASD,EAAMC,IAAQ,MAAQ,IAAM,MAOlF,SAAU1kC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB4hC,MAAO,SAASA,MAAMN,EAAIC,EAAIC,EAAIC,GAChC,IAAIC,EAAMJ,IAAO,EAEbK,EAAMH,IAAO,EACjB,OAFUD,IAAO,IAEHE,IAAO,MAAQC,EAAMC,IAAQD,EAAMC,GAAOD,EAAMC,IAAQ,KAAO,IAAM,MAOjF,SAAU1kC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB6hC,MAAO,SAASA,MAAMC,EAAGpxB,GACvB,IACIqxB,GAAMD,EACNE,GAAMtxB,EACNuxB,EAHS,MAGJF,EACLG,EAJS,MAIJF,EACLG,EAAKJ,GAAM,GACXK,EAAKJ,GAAM,GACX1S,GAAK6S,EAAKD,IAAO,IAAMD,EAAKC,IAAO,IACvC,OAAOC,EAAKC,GAAM9S,GAAK,MAAQ2S,EAAKG,IAAO,IAR9B,MAQoC9S,IAAe,QAO9D,SAAUryB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEihC,YAAa,IAAMvgC,KAAKsgC,MAK/C,SAAU/jC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BikC,EAAcrgC,KAAKsgC,GAAK,IAE5BhiC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBmhC,QAAS,SAASA,QAAQD,GACxB,OAAOA,EAAUH,MAOf,SAAU9jC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEgqB,MAAOltB,EAAoB,QAKlD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBqiC,MAAO,SAASA,MAAMP,EAAGpxB,GACvB,IACIqxB,GAAMD,EACNE,GAAMtxB,EACNuxB,EAHS,MAGJF,EACLG,EAJS,MAIJF,EACLG,EAAKJ,IAAO,GACZK,EAAKJ,IAAO,GACZ1S,GAAK6S,EAAKD,IAAO,IAAMD,EAAKC,IAAO,IACvC,OAAOC,EAAKC,GAAM9S,IAAM,MAAQ2S,EAAKG,IAAO,IAR/B,MAQqC9S,KAAgB,QAOhE,SAAUryB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEsiC,QAAS,SAASA,QAAQxmB,GAErD,OAAQA,GAAKA,IAAMA,EAAIA,EAAS,GAALA,EAAS,EAAIA,GAAKF,SAAe,EAAJE,MAMpD,SAAU7e,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B6B,EAAO7B,EAAoB,IAC3B4B,EAAS5B,EAAoB,GAC7BuL,EAAqBvL,EAAoB,IACzCm8B,EAAiBn8B,EAAoB,KAEzCkC,EAAQA,EAAQY,EAAIZ,EAAQqB,EAAG,UAAW,CAAEkiC,UAAW,SAAUC,GAC/D,IAAIh2B,EAAInE,EAAmBvF,KAAMnE,EAAK6gB,SAAW9gB,EAAO8gB,SACpD9c,EAAiC,mBAAb8/B,EACxB,OAAO1/B,KAAKud,KACV3d,EAAa,SAAUoZ,GACrB,OAAOmd,EAAezsB,EAAGg2B,KAAaniB,KAAK,WAAc,OAAOvE,KAC9D0mB,EACJ9/B,EAAa,SAAU7B,GACrB,OAAOo4B,EAAezsB,EAAGg2B,KAAaniB,KAAK,WAAc,MAAMxf,KAC7D2hC,OAOF,SAAUvlC,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BiqB,EAAuBjqB,EAAoB,IAC3Ck8B,EAAUl8B,EAAoB,KAElCkC,EAAQA,EAAQgB,EAAG,UAAW,CAAEyiC,MAAO,SAAU38B,GAC/C,IAAIkhB,EAAoBD,EAAqBtlB,EAAEqB,MAC3CmD,EAAS+yB,EAAQlzB,GAErB,OADCG,EAAOpF,EAAImmB,EAAkBnG,OAASmG,EAAkB7G,SAASla,EAAOyK,GAClEsW,EAAkB5G,YAMrB,SAAUnjB,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/B6lC,EAAYD,EAASvjC,IACrByjC,EAA4BF,EAASv2B,IAEzCu2B,EAASpjC,IAAI,CAAEujC,eAAgB,SAASA,eAAeC,EAAaC,EAAehjC,EAAQ2R,GACzFkxB,EAA0BE,EAAaC,EAAe1hC,EAAStB,GAAS4iC,EAAUjxB,QAM9E,SAAUzU,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/B6lC,EAAYD,EAASvjC,IACrBsS,EAAyBixB,EAAS/zB,IAClC7N,EAAQ4hC,EAAS5hC,MAErB4hC,EAASpjC,IAAI,CAAE0jC,eAAgB,SAASA,eAAeF,EAAa/iC,GAClE,IAAI2R,EAAYjN,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,IACnEqN,EAAcL,EAAuBpQ,EAAStB,GAAS2R,GAAW,GACtE,GAAII,IAAgBnV,KAAcmV,EAAoB,UAAEgxB,GAAc,OAAO,EAC7E,GAAIhxB,EAAY8hB,KAAM,OAAO,EAC7B,IAAIjiB,EAAiB7Q,EAAM/C,IAAIgC,GAE/B,OADA4R,EAAuB,UAAED,KAChBC,EAAeiiB,MAAQ9yB,EAAc,UAAEf,OAM5C,SAAU9C,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BwG,EAAiBxG,EAAoB,IACrCmmC,EAAyBP,EAASzgC,IAClCihC,EAAyBR,EAAS3kC,IAClC4kC,EAAYD,EAASvjC,IAErBgkC,EAAsB,SAAUtxB,EAAanQ,EAAG9B,GAElD,GADaqjC,EAAuBpxB,EAAanQ,EAAG9B,GACxC,OAAOsjC,EAAuBrxB,EAAanQ,EAAG9B,GAC1D,IAAIkgB,EAASxc,EAAe5B,GAC5B,OAAkB,OAAXoe,EAAkBqjB,EAAoBtxB,EAAaiO,EAAQlgB,GAAKjD,IAGzE+lC,EAASpjC,IAAI,CAAE8jC,YAAa,SAASA,YAAYN,EAAa/iC,GAC5D,OAAOojC,EAAoBL,EAAazhC,EAAStB,GAAS0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAM7G,SAAUxH,EAAQD,EAASF,GAEjC,IAAI6qB,EAAM7qB,EAAoB,KAC1BkQ,EAAOlQ,EAAoB,KAC3B4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BwG,EAAiBxG,EAAoB,IACrCumC,EAA0BX,EAASr8B,KACnCs8B,EAAYD,EAASvjC,IAErBmkC,EAAuB,SAAU5hC,EAAG9B,GACtC,IAAI2jC,EAAQF,EAAwB3hC,EAAG9B,GACnCkgB,EAASxc,EAAe5B,GAC5B,GAAe,OAAXoe,EAAiB,OAAOyjB,EAC5B,IAAIC,EAAQF,EAAqBxjB,EAAQlgB,GACzC,OAAO4jC,EAAMr/B,OAASo/B,EAAMp/B,OAAS6I,EAAK,IAAI2a,EAAI4b,EAAMpyB,OAAOqyB,KAAWA,EAAQD,GAGpFb,EAASpjC,IAAI,CAAEmkC,gBAAiB,SAASA,gBAAgB1jC,GACvD,OAAOujC,EAAqBjiC,EAAStB,GAAS0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAMjG,SAAUxH,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BomC,EAAyBR,EAAS3kC,IAClC4kC,EAAYD,EAASvjC,IAEzBujC,EAASpjC,IAAI,CAAEokC,eAAgB,SAASA,eAAeZ,EAAa/iC,GAClE,OAAOmjC,EAAuBJ,EAAazhC,EAAStB,GAChD0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAMvD,SAAUxH,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BumC,EAA0BX,EAASr8B,KACnCs8B,EAAYD,EAASvjC,IAEzBujC,EAASpjC,IAAI,CAAEqkC,mBAAoB,SAASA,mBAAmB5jC,GAC7D,OAAOsjC,EAAwBhiC,EAAStB,GAAS0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAMpG,SAAUxH,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BwG,EAAiBxG,EAAoB,IACrCmmC,EAAyBP,EAASzgC,IAClC0gC,EAAYD,EAASvjC,IAErBykC,EAAsB,SAAU/xB,EAAanQ,EAAG9B,GAElD,GADaqjC,EAAuBpxB,EAAanQ,EAAG9B,GACxC,OAAO,EACnB,IAAIkgB,EAASxc,EAAe5B,GAC5B,OAAkB,OAAXoe,GAAkB8jB,EAAoB/xB,EAAaiO,EAAQlgB,IAGpE8iC,EAASpjC,IAAI,CAAEukC,YAAa,SAASA,YAAYf,EAAa/iC,GAC5D,OAAO6jC,EAAoBd,EAAazhC,EAAStB,GAAS0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAM7G,SAAUxH,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BmmC,EAAyBP,EAASzgC,IAClC0gC,EAAYD,EAASvjC,IAEzBujC,EAASpjC,IAAI,CAAEwkC,eAAgB,SAASA,eAAehB,EAAa/iC,GAClE,OAAOkjC,EAAuBH,EAAazhC,EAAStB,GAChD0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAMvD,SAAUxH,EAAQD,EAASF,GAEjC,IAAIinC,EAAYjnC,EAAoB,IAChCuE,EAAWvE,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChC6lC,EAAYoB,EAAU5kC,IACtByjC,EAA4BmB,EAAU53B,IAE1C43B,EAAUzkC,IAAI,CAAEojC,SAAU,SAASA,SAASI,EAAaC,GACvD,OAAO,SAASiB,UAAUjkC,EAAQ2R,GAChCkxB,EACEE,EAAaC,GACZrxB,IAAc/U,GAAY0E,EAAW+C,GAAWrE,GACjD4iC,EAAUjxB,SAQV,SAAUzU,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bg8B,EAAYh8B,EAAoB,GAApBA,GACZ+gB,EAAU/gB,EAAoB,GAAG+gB,QACjC4B,EAA6C,WAApC3iB,EAAoB,GAApBA,CAAwB+gB,GAErC7e,EAAQA,EAAQU,EAAG,CACjBukC,KAAM,SAASA,KAAK5/B,GAClB,IAAI0b,EAASN,GAAU5B,EAAQkC,OAC/B+Y,EAAU/Y,EAASA,EAAOkF,KAAK5gB,GAAMA,OAOnC,SAAUpH,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3Bg8B,EAAYh8B,EAAoB,GAApBA,GACZonC,EAAapnC,EAAoB,EAApBA,CAAuB,cACpCsH,EAAYtH,EAAoB,IAChCuE,EAAWvE,EAAoB,GAC/B2K,EAAa3K,EAAoB,IACjC6K,EAAc7K,EAAoB,IAClC8B,EAAO9B,EAAoB,IAC3Bgc,EAAQhc,EAAoB,IAC5BwW,EAASwF,EAAMxF,OAEfqD,EAAY,SAAUtS,GACxB,OAAa,MAANA,EAAa1H,GAAYyH,EAAUC,IAGxC8/B,EAAsB,SAAUC,GAClC,IAAIC,EAAUD,EAAavK,GACvBwK,IACFD,EAAavK,GAAKl9B,GAClB0nC,MAIAC,EAAqB,SAAUF,GACjC,OAAOA,EAAaG,KAAO5nC,IAGzB6nC,EAAoB,SAAUJ,GAC3BE,EAAmBF,KACtBA,EAAaG,GAAK5nC,GAClBwnC,EAAoBC,KAIpBK,EAAe,SAAUC,EAAUC,GACrCtjC,EAASqjC,GACT5hC,KAAK+2B,GAAKl9B,GACVmG,KAAKyhC,GAAKG,EACVA,EAAW,IAAIE,EAAqB9hC,MACpC,IACE,IAAIuhC,EAAUM,EAAWD,GACrBN,EAAeC,EACJ,MAAXA,IACiC,mBAAxBA,EAAQQ,YAA4BR,EAAU,WAAcD,EAAaS,eAC/EzgC,EAAUigC,GACfvhC,KAAK+2B,GAAKwK,GAEZ,MAAOxjC,GAEP,YADA6jC,EAAS5J,MAAMj6B,GAEXyjC,EAAmBxhC,OAAOqhC,EAAoBrhC,OAGtD2hC,EAAanmC,UAAYqJ,EAAY,GAAI,CACvCk9B,YAAa,SAASA,cAAgBL,EAAkB1hC,SAG1D,IAAI8hC,EAAuB,SAAUR,GACnCthC,KAAKk3B,GAAKoK,GAGZQ,EAAqBtmC,UAAYqJ,EAAY,GAAI,CAC/C4F,KAAM,SAASA,KAAK3L,GAClB,IAAIwiC,EAAethC,KAAKk3B,GACxB,IAAKsK,EAAmBF,GAAe,CACrC,IAAIM,EAAWN,EAAaG,GAC5B,IACE,IAAIlnC,EAAIsZ,EAAU+tB,EAASn3B,MAC3B,GAAIlQ,EAAG,OAAOA,EAAED,KAAKsnC,EAAU9iC,GAC/B,MAAOf,GACP,IACE2jC,EAAkBJ,GAClB,QACA,MAAMvjC,MAKdi6B,MAAO,SAASA,MAAMl5B,GACpB,IAAIwiC,EAAethC,KAAKk3B,GACxB,GAAIsK,EAAmBF,GAAe,MAAMxiC,EAC5C,IAAI8iC,EAAWN,EAAaG,GAC5BH,EAAaG,GAAK5nC,GAClB,IACE,IAAIU,EAAIsZ,EAAU+tB,EAAS5J,OAC3B,IAAKz9B,EAAG,MAAMuE,EACdA,EAAQvE,EAAED,KAAKsnC,EAAU9iC,GACzB,MAAOf,GACP,IACEsjC,EAAoBC,GACpB,QACA,MAAMvjC,GAGV,OADEsjC,EAAoBC,GACfxiC,GAETkjC,SAAU,SAASA,SAASljC,GAC1B,IAAIwiC,EAAethC,KAAKk3B,GACxB,IAAKsK,EAAmBF,GAAe,CACrC,IAAIM,EAAWN,EAAaG,GAC5BH,EAAaG,GAAK5nC,GAClB,IACE,IAAIU,EAAIsZ,EAAU+tB,EAASI,UAC3BljC,EAAQvE,EAAIA,EAAED,KAAKsnC,EAAU9iC,GAASjF,GACtC,MAAOkE,GACP,IACEsjC,EAAoBC,GACpB,QACA,MAAMvjC,GAGV,OADEsjC,EAAoBC,GACfxiC,MAKb,IAAImjC,EAAc,SAASC,WAAWL,GACpCl9B,EAAW3E,KAAMiiC,EAAa,aAAc,MAAMzd,GAAKljB,EAAUugC,IAGnEh9B,EAAYo9B,EAAYzmC,UAAW,CACjC2mC,UAAW,SAASA,UAAUP,GAC5B,OAAO,IAAID,EAAaC,EAAU5hC,KAAKwkB,KAEzChZ,QAAS,SAASA,QAAQjK,GACxB,IAAIC,EAAOxB,KACX,OAAO,IAAKnE,EAAK6gB,SAAW9gB,EAAO8gB,SAAS,SAAUW,EAASU,GAC7Dzc,EAAUC,GACV,IAAI+/B,EAAe9/B,EAAK2gC,UAAU,CAChC13B,KAAM,SAAU3L,GACd,IACE,OAAOyC,EAAGzC,GACV,MAAOf,GACPggB,EAAOhgB,GACPujC,EAAaS,gBAGjB/J,MAAOja,EACPikB,SAAU3kB,SAMlBxY,EAAYo9B,EAAa,CACvB/3B,KAAM,SAASA,KAAK8O,GAClB,IAAItP,EAAoB,mBAAT1J,KAAsBA,KAAOiiC,EACxCjgC,EAAS6R,EAAUtV,EAASya,GAAGooB,IACnC,GAAIp/B,EAAQ,CACV,IAAIogC,EAAa7jC,EAASyD,EAAO1H,KAAK0e,IACtC,OAAOopB,EAAW3hC,cAAgBiJ,EAAI04B,EAAa,IAAI14B,EAAE,SAAUk4B,GACjE,OAAOQ,EAAWD,UAAUP,KAGhC,OAAO,IAAIl4B,EAAE,SAAUk4B,GACrB,IAAIl3B,GAAO,EAeX,OAdAsrB,EAAU,WACR,IAAKtrB,EAAM,CACT,IACE,GAAIsL,EAAMgD,GAAG,EAAO,SAAUvb,GAE5B,GADAmkC,EAASn3B,KAAKhN,GACViN,EAAM,OAAO8F,MACZA,EAAQ,OACf,MAAOzS,GACP,GAAI2M,EAAM,MAAM3M,EAEhB,YADA6jC,EAAS5J,MAAMj6B,GAEf6jC,EAASI,cAGR,WAAct3B,GAAO,MAGhCE,GAAI,SAASA,KACX,IAAK,IAAIxQ,EAAI,EAAGC,EAAIsH,UAAUN,OAAQghC,EAAQ,IAAI/7B,MAAMjM,GAAID,EAAIC,GAAIgoC,EAAMjoC,GAAKuH,UAAUvH,KACzF,OAAO,IAAqB,mBAAT4F,KAAsBA,KAAOiiC,GAAa,SAAUL,GACrE,IAAIl3B,GAAO,EASX,OARAsrB,EAAU,WACR,IAAKtrB,EAAM,CACT,IAAK,IAAI2N,EAAI,EAAGA,EAAIgqB,EAAMhhC,SAAUgX,EAElC,GADAupB,EAASn3B,KAAK43B,EAAMhqB,IAChB3N,EAAM,OACVk3B,EAASI,cAGR,WAAct3B,GAAO,QAKlC5O,EAAKmmC,EAAYzmC,UAAW4lC,EAAY,WAAc,OAAOphC,OAE7D9D,EAAQA,EAAQU,EAAG,CAAEslC,WAAYD,IAEjCjoC,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BsoC,EAAQtoC,EAAoB,IAChCkC,EAAQA,EAAQU,EAAIV,EAAQc,EAAG,CAC7Bie,aAAcqnB,EAAMj5B,IACpB8R,eAAgBmnB,EAAMzrB,SAMlB,SAAU1c,EAAQD,EAASF,GA+CjC,IA7CA,IAAI2S,EAAa3S,EAAoB,IACjC8d,EAAU9d,EAAoB,IAC9B+B,EAAW/B,EAAoB,IAC/B4B,EAAS5B,EAAoB,GAC7B8B,EAAO9B,EAAoB,IAC3ByL,EAAYzL,EAAoB,IAChCoL,EAAMpL,EAAoB,GAC1BqO,EAAWjD,EAAI,YACfm9B,EAAgBn9B,EAAI,eACpBo9B,EAAc/8B,EAAUa,MAExBm8B,EAAe,CACjBC,aAAa,EACbC,qBAAqB,EACrBC,cAAc,EACdC,gBAAgB,EAChBC,aAAa,EACbC,eAAe,EACfC,cAAc,EACdC,sBAAsB,EACtBC,UAAU,EACVC,mBAAmB,EACnBC,gBAAgB,EAChBC,iBAAiB,EACjBC,mBAAmB,EACnBC,WAAW,EACXC,eAAe,EACfC,cAAc,EACdC,UAAU,EACVC,kBAAkB,EAClBC,QAAQ,EACRC,aAAa,EACbC,eAAe,EACfC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,EAClBC,gBAAgB,EAChBC,kBAAkB,EAClBC,eAAe,EACfC,WAAW,GAGJC,EAAc3sB,EAAQ2qB,GAAeroC,EAAI,EAAGA,EAAIqqC,EAAYpjC,OAAQjH,IAAK,CAChF,IAIIiC,EAJA6E,EAAOujC,EAAYrqC,GACnBsqC,EAAWjC,EAAavhC,GACxByjC,EAAa/oC,EAAOsF,GACpB6J,EAAQ45B,GAAcA,EAAWnpC,UAErC,GAAIuP,IACGA,EAAM1C,IAAWvM,EAAKiP,EAAO1C,EAAUm6B,GACvCz3B,EAAMw3B,IAAgBzmC,EAAKiP,EAAOw3B,EAAerhC,GACtDuE,EAAUvE,GAAQshC,EACdkC,GAAU,IAAKroC,KAAOsQ,EAAiB5B,EAAM1O,IAAMN,EAASgP,EAAO1O,EAAKsQ,EAAWtQ,IAAM,KAO3F,SAAUlC,EAAQD,EAASF,GAGjC,IAAI4B,EAAS5B,EAAoB,GAC7BkC,EAAUlC,EAAoB,GAC9B+b,EAAY/b,EAAoB,IAChC4H,EAAQ,GAAGA,MACXgjC,EAAO,WAAWzjC,KAAK4U,GACvBmT,EAAO,SAAU7f,GACnB,OAAO,SAAU9H,EAAIsjC,GACnB,IAAIC,EAA+B,EAAnBnjC,UAAUN,OACtBqX,IAAOosB,GAAYljC,EAAMtH,KAAKqH,UAAW,GAC7C,OAAO0H,EAAIy7B,EAAY,YAEP,mBAANvjC,EAAmBA,EAAKnE,SAASmE,IAAKG,MAAM1B,KAAM0Y,IACxDnX,EAAIsjC,KAGZ3oC,EAAQA,EAAQU,EAAIV,EAAQc,EAAId,EAAQQ,EAAIkoC,EAAM,CAChDvoB,WAAY6M,EAAKttB,EAAOygB,YACxB0oB,YAAa7b,EAAKttB,EAAOmpC,gBAMrB,SAAU5qC,EAAQD,EAASF,GAIjC,IAAIgC,EAAMhC,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BkF,EAAalF,EAAoB,IACjCie,EAASje,EAAoB,IAC7B8I,EAAS9I,EAAoB,IAC7BwG,EAAiBxG,EAAoB,IACrC8d,EAAU9d,EAAoB,IAC9B0E,EAAK1E,EAAoB,GACzBgrC,EAAQhrC,EAAoB,KAC5BsH,EAAYtH,EAAoB,IAChCgc,EAAQhc,EAAoB,IAC5ButB,EAAavtB,EAAoB,KACjCmZ,EAAcnZ,EAAoB,IAClCmQ,EAAOnQ,EAAoB,IAC3BwD,EAAWxD,EAAoB,GAC/BkG,EAAYlG,EAAoB,IAChC+W,EAAc/W,EAAoB,GAClCmF,EAAMnF,EAAoB,IAU1BirC,EAAmB,SAAU3iC,GAC/B,IAAIE,EAAiB,GAARF,EACTK,EAAmB,GAARL,EACf,OAAO,SAAUhH,EAAQ0H,EAAYxB,GACnC,IAIInF,EAAKqD,EAAKuD,EAJVtE,EAAI3C,EAAIgH,EAAYxB,EAAM,GAC1B5C,EAAIsB,EAAU5E,GACd6H,EAASX,GAAkB,GAARF,GAAqB,GAARA,EAC5B,IAAoB,mBAARtC,KAAqBA,KAAOklC,MAAUrrC,GAE1D,IAAKwC,KAAOuC,EAAG,GAAIO,EAAIP,EAAGvC,KAExB4G,EAAMtE,EADNe,EAAMd,EAAEvC,GACKA,EAAKf,GACdgH,GACF,GAAIE,EAAQW,EAAO9G,GAAO4G,OACrB,GAAIA,EAAK,OAAQX,GACpB,KAAK,EAAGa,EAAO9G,GAAOqD,EAAK,MAC3B,KAAK,EAAG,OAAO,EACf,KAAK,EAAG,OAAOA,EACf,KAAK,EAAG,OAAOrD,EACf,KAAK,EAAG8G,EAAOF,EAAI,IAAMA,EAAI,QACxB,GAAIN,EAAU,OAAO,EAGhC,OAAe,GAARL,GAAaK,EAAWA,EAAWQ,IAG1CgiC,EAAUF,EAAiB,GAE3BG,EAAiB,SAAUtxB,GAC7B,OAAO,SAAUrW,GACf,OAAO,IAAI4nC,EAAa5nC,EAAIqW,KAG5BuxB,EAAe,SAAU7rB,EAAU1F,GACrC9T,KAAKmR,GAAKjR,EAAUsZ,GACpBxZ,KAAKi4B,GAAKngB,EAAQ0B,GAClBxZ,KAAKyZ,GAAK,EACVzZ,KAAK0Z,GAAK5F,GAmBZ,SAASoxB,KAAKz0B,GACZ,IAAI60B,EAAOxiC,EAAO,MAQlB,OAPI2N,GAAY5W,KACV0tB,EAAW9W,GACbuF,EAAMvF,GAAU,EAAM,SAAUpU,EAAKyC,GACnCwmC,EAAKjpC,GAAOyC,IAETmZ,EAAOqtB,EAAM70B,IAEf60B,EA1BTnyB,EAAYkyB,EAAc,OAAQ,WAChC,IAIIhpC,EAHAuC,EADOoB,KACEmR,GACT5N,EAFOvD,KAEKi4B,GACZnkB,EAHO9T,KAGK0Z,GAEhB,GACE,GAAenW,EAAKlC,QANXrB,KAMAyZ,GAEP,OAROzZ,KAOFmR,GAAKtX,GACHsQ,EAAK,UAENhL,EAAIP,EAAGvC,EAAMkH,EAVZvD,KAUsByZ,QACjC,OAA2BtP,EAAK,EAApB,QAAR2J,EAA+BzX,EACvB,UAARyX,EAAiClV,EAAEvC,GACxB,CAACA,EAAKuC,EAAEvC,OAczB6oC,KAAK1pC,UAAY,KAwCjBU,EAAQA,EAAQU,EAAIV,EAAQQ,EAAG,CAAEwoC,KAAMA,OAEvChpC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBqG,KAAM6hC,EAAe,QACrBh+B,OAAQg+B,EAAe,UACvB79B,QAAS69B,EAAe,WACxB55B,QAASy5B,EAAiB,GAC1Bp5B,IAAKo5B,EAAiB,GACtB75B,OAAQ65B,EAAiB,GACzBj5B,KAAMi5B,EAAiB,GACvB/5B,MAAO+5B,EAAiB,GACxB55B,KAAM45B,EAAiB,GACvBE,QAASA,EACTI,SAAUN,EAAiB,GAC3Bt9B,OApDF,SAASA,OAAOrM,EAAQgP,EAAOyxB,GAC7Bz6B,EAAUgJ,GACV,IAIIqZ,EAAMtnB,EAJNuC,EAAIsB,EAAU5E,GACdiI,EAAOuU,EAAQlZ,GACfyC,EAASkC,EAAKlC,OACdjH,EAAI,EAER,GAAIuH,UAAUN,OAAS,EAAG,CACxB,IAAKA,EAAQ,MAAM3D,UAAU,gDAC7BimB,EAAO/kB,EAAE2E,EAAKnJ,WACTupB,EAAO9oB,OAAOkhC,GACrB,KAAgB3hC,EAATiH,GAAgBlC,EAAIP,EAAGvC,EAAMkH,EAAKnJ,QACvCupB,EAAOrZ,EAAMqZ,EAAM/kB,EAAEvC,GAAMA,EAAKf,IAElC,OAAOqoB,GAuCPqhB,MAAOA,EACPr5B,SArCF,SAASA,SAASrQ,EAAQoX,GAExB,OAAQA,GAAMA,EAAKsyB,EAAM1pC,EAAQoX,GAAMyyB,EAAQ7pC,EAAQ,SAAUmC,GAE/D,OAAOA,GAAMA,OACP5D,IAiCRsF,IAAKA,EACLlE,IA/BF,SAASA,IAAIK,EAAQe,GACnB,GAAI8C,EAAI7D,EAAQe,GAAM,OAAOf,EAAOe,IA+BpCgN,IA7BF,SAASA,IAAI/N,EAAQe,EAAKyC,GAGxB,OAFIiS,GAAe1U,KAAOxB,OAAQ6D,EAAGC,EAAErD,EAAQe,EAAK6C,EAAW,EAAGJ,IAC7DxD,EAAOe,GAAOyC,EACZxD,GA2BPkqC,OAxBF,SAASA,OAAO/nC,GACd,OAAOD,EAASC,IAAO+C,EAAe/C,KAAQynC,KAAK1pC,cA6B/C,SAAUrB,EAAQD,EAASF,GAEjC,IAAI8d,EAAU9d,EAAoB,IAC9BkG,EAAYlG,EAAoB,IACpCG,EAAOD,QAAU,SAAUoB,EAAQoX,GAMjC,IALA,IAIIrW,EAJAuC,EAAIsB,EAAU5E,GACdiI,EAAOuU,EAAQlZ,GACfyC,EAASkC,EAAKlC,OACd6B,EAAQ,EAEIA,EAAT7B,GAAgB,GAAIzC,EAAEvC,EAAMkH,EAAKL,QAAcwP,EAAI,OAAOrW,IAM7D,SAAUlC,EAAQD,EAASF,GAEjC,IAAIuE,EAAWvE,EAAoB,GAC/BiB,EAAMjB,EAAoB,IAC9BG,EAAOD,QAAUF,EAAoB,IAAIyrC,YAAc,SAAUhoC,GAC/D,IAAI+M,EAASvP,EAAIwC,GACjB,GAAqB,mBAAV+M,EAAsB,MAAM9M,UAAUD,EAAK,qBACtD,OAAOc,EAASiM,EAAOlQ,KAAKmD,MAMxB,SAAUtD,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3BkC,EAAUlC,EAAoB,GAC9B0rC,EAAU1rC,EAAoB,KAElCkC,EAAQA,EAAQU,EAAIV,EAAQQ,EAAG,CAC7BipC,MAAO,SAASA,MAAMd,GACpB,OAAO,IAAKhpC,EAAK6gB,SAAW9gB,EAAO8gB,SAAS,SAAUW,GACpDhB,WAAWqpB,EAAQprC,KAAK+iB,GAAS,GAAOwnB,SAQxC,SAAU1qC,EAAQD,EAASF,GAEjC,IAAIwtB,EAAOxtB,EAAoB,KAC3BkC,EAAUlC,EAAoB,GAGlCA,EAAoB,IAAIkV,EAAIsY,EAAKtY,EAAIsY,EAAKtY,GAAK,GAE/ChT,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAG,WAAY,CAAEklB,KAAM5nB,EAAoB,QAKjE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CAAEc,SAAUxD,EAAoB,MAKnE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CAAEsI,QAAShL,EAAoB,OAKlE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B2tB,EAAS3tB,EAAoB,KAEjCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CAAEirB,OAAQA,KAK7C,SAAUxtB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B2tB,EAAS3tB,EAAoB,KAC7B8I,EAAS9I,EAAoB,IAEjCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CACvCkpC,KAAM,SAAU76B,EAAO6c,GACrB,OAAOD,EAAO7kB,EAAOiI,GAAQ6c,OAO3B,SAAUztB,EAAQD,EAASF,GAIjCA,EAAoB,GAApBA,CAAwB+xB,OAAQ,SAAU,SAAUvS,GAClDxZ,KAAKykB,IAAMjL,EACXxZ,KAAKyZ,GAAK,GACT,WACD,IAAIrf,EAAI4F,KAAKyZ,KACT/O,IAAStQ,EAAI4F,KAAKykB,IACtB,MAAO,CAAE/Z,KAAMA,EAAM5L,MAAO4L,EAAO7Q,GAAYO,MAM3C,SAAUD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B6rC,EAAM7rC,EAAoB,GAApBA,CAAwB,sBAAuB,QAEzDkC,EAAQA,EAAQgB,EAAG,SAAU,CAAE4oC,OAAQ,SAASA,OAAOroC,GAAM,OAAOooC,EAAIpoC,OAKlE,SAAUtD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6rC,EAAM7rC,EAAoB,GAApBA,CAAwB,WAAY,CAC5C+rC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,WAGPjqC,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAG,SAAU,CAAE0pC,WAAY,SAASA,aAAe,OAAOP,EAAI7lC,UAKpF,SAAU7F,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6rC,EAAM7rC,EAAoB,GAApBA,CAAwB,6BAA8B,CAC9DqsC,QAAS,IACTC,OAAQ,IACRC,OAAQ,IACRC,SAAU,IACVC,SAAU,MAGZvqC,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAG,SAAU,CAAEgqC,aAAc,SAASA,eAAiB,OAAOb,EAAI7lC,YAMzE,oBAAV7F,QAAyBA,OAAOD,QAASC,OAAOD,QAAUP,EAE3C,mBAAVguB,QAAwBA,OAAOgf,IAAKhf,OAAO,WAAc,OAAOhuB,IAE3EC,EAAIiC,KAAOlC,EAp4Rf,CAq4RC,EAAG","file":"core.min.js"} \ No newline at end of file diff --git a/node_modules/core-js/client/library.js b/node_modules/core-js/client/library.js new file mode 100644 index 0000000000000..204aca4f34184 --- /dev/null +++ b/node_modules/core-js/client/library.js @@ -0,0 +1,8168 @@ +/** + * core-js 2.6.12 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2020 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 = 126); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var ctx = __webpack_require__(16); +var hide = __webpack_require__(17); +var has = __webpack_require__(15); +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 IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// 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__(49)('wks'); +var uid = __webpack_require__(41); +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__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(22); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 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__) { + +var anObject = __webpack_require__(1); +var IE8_DOM_DEFINE = __webpack_require__(90); +var toPrimitive = __webpack_require__(27); +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; +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(24); +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__(44); +var defined = __webpack_require__(24); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.6.12' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(15); +var toObject = __webpack_require__(9); +var IE_PROTO = __webpack_require__(65)('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; +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var fails = __webpack_require__(4); +var defined = __webpack_require__(24); +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); +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 16 */ +/***/ (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); + }; +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var createDesc = __webpack_require__(28); +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; +}; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(45); +var createDesc = __webpack_require__(28); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(27); +var has = __webpack_require__(15); +var IE8_DOM_DEFINE = __webpack_require__(90); +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]); +}; + + +/***/ }), +/* 19 */ +/***/ (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); + }); +}; + + +/***/ }), +/* 20 */ +/***/ (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__(16); +var IObject = __webpack_require__(44); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var asc = __webpack_require__(80); +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; + }; +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 22 */ +/***/ (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); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(0); +var core = __webpack_require__(12); +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); +}; + + +/***/ }), +/* 24 */ +/***/ (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; +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +if (__webpack_require__(7)) { + var LIBRARY = __webpack_require__(30); + var global = __webpack_require__(2); + var fails = __webpack_require__(4); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(58); + var $buffer = __webpack_require__(88); + var ctx = __webpack_require__(16); + var anInstance = __webpack_require__(38); + var propertyDesc = __webpack_require__(28); + var hide = __webpack_require__(17); + var redefineAll = __webpack_require__(39); + var toInteger = __webpack_require__(22); + var toLength = __webpack_require__(6); + var toIndex = __webpack_require__(115); + var toAbsoluteIndex = __webpack_require__(35); + var toPrimitive = __webpack_require__(27); + var has = __webpack_require__(15); + var classof = __webpack_require__(37); + var isObject = __webpack_require__(3); + var toObject = __webpack_require__(9); + var isArrayIter = __webpack_require__(77); + var create = __webpack_require__(32); + var getPrototypeOf = __webpack_require__(13); + var gOPN = __webpack_require__(46).f; + var getIterFn = __webpack_require__(48); + var uid = __webpack_require__(41); + var wks = __webpack_require__(5); + var createArrayMethod = __webpack_require__(20); + var createArrayIncludes = __webpack_require__(50); + var speciesConstructor = __webpack_require__(55); + var ArrayIterators = __webpack_require__(82); + var Iterators = __webpack_require__(36); + var $iterDetect = __webpack_require__(79); + var setSpecies = __webpack_require__(43); + var arrayFill = __webpack_require__(81); + var arrayCopyWithin = __webpack_require__(106); + var $DP = __webpack_require__(8); + var $GOPD = __webpack_require__(18); + 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 */ }; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +var Map = __webpack_require__(109); +var $export = __webpack_require__(0); +var shared = __webpack_require__(49)('metadata'); +var store = shared.store || (shared.store = new (__webpack_require__(112))()); + +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 +}; + + +/***/ }), +/* 27 */ +/***/ (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"); +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(41)('meta'); +var isObject = __webpack_require__(3); +var has = __webpack_require__(15); +var setDesc = __webpack_require__(8).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 +}; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(92); +var enumBugKeys = __webpack_require__(66); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 32 */ +/***/ (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__(93); +var enumBugKeys = __webpack_require__(66); +var IE_PROTO = __webpack_require__(65)('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__(62)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(67).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); +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + +module.exports = function () { /* empty */ }; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(16); +var call = __webpack_require__(104); +var isArrayIter = __webpack_require__(77); +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(6); +var getIterFn = __webpack_require__(48); +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, __webpack_require__) { + +var toInteger = __webpack_require__(22); +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); +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(21); +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; +}; + + +/***/ }), +/* 38 */ +/***/ (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; +}; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(17); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + + +/***/ }), +/* 40 */ +/***/ (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; +}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(8).f; +var has = __webpack_require__(15); +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 }); +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var dP = __webpack_require__(8); +var DESCRIPTORS = __webpack_require__(7); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(21); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(92); +var hiddenKeys = __webpack_require__(66).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var defined = __webpack_require__(24); +var fails = __webpack_require__(4); +var spaces = __webpack_require__(71); +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; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(37); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(36); +module.exports = __webpack_require__(12).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(12); +var global = __webpack_require__(2); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(30) ? 'pure' : 'global', + copyright: '© 2020 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(6); +var toAbsoluteIndex = __webpack_require__(35); +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; + }; +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(21); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(30); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(63); +var hide = __webpack_require__(17); +var Iterators = __webpack_require__(36); +var $iterCreate = __webpack_require__(54); +var setToStringTag = __webpack_require__(42); +var getPrototypeOf = __webpack_require__(13); +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 = $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 && typeof IteratorPrototype[ITERATOR] != 'function') 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; +}; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(32); +var descriptor = __webpack_require__(28); +var setToStringTag = __webpack_require__(42); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(17)(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'); +}; + + +/***/ }), +/* 55 */ +/***/ (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); +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var meta = __webpack_require__(29); +var fails = __webpack_require__(4); +var hide = __webpack_require__(17); +var redefineAll = __webpack_require__(39); +var forOf = __webpack_require__(34); +var anInstance = __webpack_require__(38); +var isObject = __webpack_require__(3); +var setToStringTag = __webpack_require__(42); +var dP = __webpack_require__(8).f; +var each = __webpack_require__(20)(0); +var DESCRIPTORS = __webpack_require__(7); + +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 = {}; + if (!DESCRIPTORS || 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 { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(17); +var uid = __webpack_require__(41); +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 +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// Forced replacement prototype accessors methods +module.exports = __webpack_require__(30) || !__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]; +}); + + +/***/ }), +/* 60 */ +/***/ (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); + } }); +}; + + +/***/ }), +/* 61 */ +/***/ (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__(16); +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); + } }); +}; + + +/***/ }), +/* 62 */ +/***/ (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) : {}; +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(17); + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var LIBRARY = __webpack_require__(30); +var wksExt = __webpack_require__(91); +var defineProperty = __webpack_require__(8).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) }); +}; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(49)('keys'); +var uid = __webpack_require__(41); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(2).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(31); +var gOPS = __webpack_require__(51); +var pIE = __webpack_require__(45); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(44); +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) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), +/* 69 */ +/***/ (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); +}; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(22); +var defined = __webpack_require__(24); + +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; +}; + + +/***/ }), +/* 71 */ +/***/ (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'; + + +/***/ }), +/* 72 */ +/***/ (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; +}; + + +/***/ }), +/* 73 */ +/***/ (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; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(22); +var defined = __webpack_require__(24); +// 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; + }; +}; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(103); +var defined = __webpack_require__(24); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), +/* 76 */ +/***/ (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; +}; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(36); +var ITERATOR = __webpack_require__(5)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(8); +var createDesc = __webpack_require__(28); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 79 */ +/***/ (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; +}; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(207); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), +/* 81 */ +/***/ (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__(35); +var toLength = __webpack_require__(6); +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; +}; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(33); +var step = __webpack_require__(83); +var Iterators = __webpack_require__(36); +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__(53)(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'); + + +/***/ }), +/* 83 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(16); +var invoke = __webpack_require__(69); +var html = __webpack_require__(67); +var cel = __webpack_require__(62); +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__(21)(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 +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var macrotask = __webpack_require__(84).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(21)(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) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + 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; + }; +}; + + +/***/ }), +/* 86 */ +/***/ (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); +}; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(46); +var gOPS = __webpack_require__(51); +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; +}; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var DESCRIPTORS = __webpack_require__(7); +var LIBRARY = __webpack_require__(30); +var $typed = __webpack_require__(58); +var hide = __webpack_require__(17); +var redefineAll = __webpack_require__(39); +var fails = __webpack_require__(4); +var anInstance = __webpack_require__(38); +var toInteger = __webpack_require__(22); +var toLength = __webpack_require__(6); +var toIndex = __webpack_require__(115); +var gOPN = __webpack_require__(46).f; +var dP = __webpack_require__(8).f; +var arrayFill = __webpack_require__(81); +var setToStringTag = __webpack_require__(42); +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; + + +/***/ }), +/* 89 */ +/***/ (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); + }; +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(7) && !__webpack_require__(4)(function () { + return Object.defineProperty(__webpack_require__(62)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(5); + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(15); +var toIObject = __webpack_require__(11); +var arrayIndexOf = __webpack_require__(50)(false); +var IE_PROTO = __webpack_require__(65)('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; +}; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var anObject = __webpack_require__(1); +var getKeys = __webpack_require__(31); + +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; +}; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(11); +var gOPN = __webpack_require__(46).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)); +}; + + +/***/ }), +/* 95 */ +/***/ (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__(16)(Function.call, __webpack_require__(18).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 +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(10); +var isObject = __webpack_require__(3); +var invoke = __webpack_require__(69); +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; +}; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +var cof = __webpack_require__(21); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + + +/***/ }), +/* 98 */ +/***/ (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; +}; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(2).parseFloat; +var $trim = __webpack_require__(47).trim; + +module.exports = 1 / $parseFloat(__webpack_require__(71) + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(2).parseInt; +var $trim = __webpack_require__(47).trim; +var ws = __webpack_require__(71); +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; + + +/***/ }), +/* 101 */ +/***/ (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); +}; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__(72); +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; +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(3); +var cof = __webpack_require__(21); +var MATCH = __webpack_require__(5)('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), +/* 104 */ +/***/ (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; + } +}; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(44); +var toLength = __webpack_require__(6); + +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; +}; + + +/***/ }), +/* 106 */ +/***/ (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__(35); +var toLength = __webpack_require__(6); + +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; +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var newPromiseCapability = __webpack_require__(86); + +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; +}; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(110); +var validate = __webpack_require__(40); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__(57)(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); + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(8).f; +var create = __webpack_require__(32); +var redefineAll = __webpack_require__(39); +var ctx = __webpack_require__(16); +var anInstance = __webpack_require__(38); +var forOf = __webpack_require__(34); +var $iterDefine = __webpack_require__(53); +var step = __webpack_require__(83); +var setSpecies = __webpack_require__(43); +var DESCRIPTORS = __webpack_require__(7); +var fastKey = __webpack_require__(29).fastKey; +var validate = __webpack_require__(40); +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); + } +}; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(110); +var validate = __webpack_require__(40); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = __webpack_require__(57)(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); + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var each = __webpack_require__(20)(0); +var redefine = __webpack_require__(63); +var meta = __webpack_require__(29); +var assign = __webpack_require__(68); +var weak = __webpack_require__(113); +var isObject = __webpack_require__(3); +var validate = __webpack_require__(40); +var NATIVE_WEAK_MAP = __webpack_require__(40); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +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__(57)(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + 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); + }); + }); +} + + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(39); +var getWeak = __webpack_require__(29).getWeak; +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var anInstance = __webpack_require__(38); +var forOf = __webpack_require__(34); +var createArrayMethod = __webpack_require__(20); +var $has = __webpack_require__(15); +var validate = __webpack_require__(40); +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 +}; + + +/***/ }), +/* 114 */ +/***/ (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; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(22); +var toLength = __webpack_require__(6); +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; +}; + + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = __webpack_require__(52); +var isObject = __webpack_require__(3); +var toLength = __webpack_require__(6); +var ctx = __webpack_require__(16); +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; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(6); +var repeat = __webpack_require__(70); +var defined = __webpack_require__(24); + +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; +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(31); +var toIObject = __webpack_require__(11); +var isEnum = __webpack_require__(45).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) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(37); +var from = __webpack_require__(120); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + + +/***/ }), +/* 120 */ +/***/ (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; +}; + + +/***/ }), +/* 121 */ +/***/ (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; +}; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(37); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(36); +module.exports = __webpack_require__(12).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)); +}; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var path = __webpack_require__(124); +var invoke = __webpack_require__(69); +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); + }; +}; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(12); + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(18); +var ownKeys = __webpack_require__(87); +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; +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(127); +__webpack_require__(129); +__webpack_require__(130); +__webpack_require__(131); +__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__(145); +__webpack_require__(146); +__webpack_require__(147); +__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__(208); +__webpack_require__(209); +__webpack_require__(210); +__webpack_require__(211); +__webpack_require__(212); +__webpack_require__(213); +__webpack_require__(214); +__webpack_require__(215); +__webpack_require__(216); +__webpack_require__(217); +__webpack_require__(218); +__webpack_require__(219); +__webpack_require__(82); +__webpack_require__(220); +__webpack_require__(221); +__webpack_require__(222); +__webpack_require__(109); +__webpack_require__(111); +__webpack_require__(112); +__webpack_require__(223); +__webpack_require__(224); +__webpack_require__(225); +__webpack_require__(226); +__webpack_require__(227); +__webpack_require__(228); +__webpack_require__(229); +__webpack_require__(230); +__webpack_require__(231); +__webpack_require__(232); +__webpack_require__(233); +__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__(252); +__webpack_require__(253); +__webpack_require__(254); +__webpack_require__(255); +__webpack_require__(256); +__webpack_require__(257); +__webpack_require__(258); +__webpack_require__(259); +__webpack_require__(260); +__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__(48); +__webpack_require__(314); +__webpack_require__(122); +__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); +module.exports = __webpack_require__(324); + + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(2); +var has = __webpack_require__(15); +var DESCRIPTORS = __webpack_require__(7); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(63); +var META = __webpack_require__(29).KEY; +var $fails = __webpack_require__(4); +var shared = __webpack_require__(49); +var setToStringTag = __webpack_require__(42); +var uid = __webpack_require__(41); +var wks = __webpack_require__(5); +var wksExt = __webpack_require__(91); +var wksDefine = __webpack_require__(64); +var enumKeys = __webpack_require__(128); +var isArray = __webpack_require__(52); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var toObject = __webpack_require__(9); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(27); +var createDesc = __webpack_require__(28); +var _create = __webpack_require__(32); +var gOPNExt = __webpack_require__(94); +var $GOPD = __webpack_require__(18); +var $GOPS = __webpack_require__(51); +var $DP = __webpack_require__(8); +var $keys = __webpack_require__(31); +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' && !!$GOPS.f; +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__(46).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(45).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(30)) { + 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 +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 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__(17)($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); + + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(31); +var gOPS = __webpack_require__(51); +var pIE = __webpack_require__(45); +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; +}; + + +/***/ }), +/* 129 */ +/***/ (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__(8).f }); + + +/***/ }), +/* 130 */ +/***/ (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__(93) }); + + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(11); +var $getOwnPropertyDescriptor = __webpack_require__(18).f; + +__webpack_require__(23)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), +/* 132 */ +/***/ (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__(32) }); + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(9); +var $getPrototypeOf = __webpack_require__(13); + +__webpack_require__(23)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(9); +var $keys = __webpack_require__(31); + +__webpack_require__(23)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__(23)('getOwnPropertyNames', function () { + return __webpack_require__(94).f; +}); + + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(29).onFreeze; + +__webpack_require__(23)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(29).onFreeze; + +__webpack_require__(23)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(29).onFreeze; + +__webpack_require__(23)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__(3); + +__webpack_require__(23)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__(3); + +__webpack_require__(23)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__(3); + +__webpack_require__(23)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), +/* 142 */ +/***/ (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__(68) }); + + +/***/ }), +/* 143 */ +/***/ (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__(144) }); + + +/***/ }), +/* 144 */ +/***/ (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; +}; + + +/***/ }), +/* 145 */ +/***/ (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__(95).set }); + + +/***/ }), +/* 146 */ +/***/ (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__(96) }); + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var isObject = __webpack_require__(3); +var getPrototypeOf = __webpack_require__(13); +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__(8).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; +} }); + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toInteger = __webpack_require__(22); +var aNumberValue = __webpack_require__(97); +var repeat = __webpack_require__(70); +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; + } +}); + + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $fails = __webpack_require__(4); +var aNumberValue = __webpack_require__(97); +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); + } +}); + + +/***/ }), +/* 150 */ +/***/ (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) }); + + +/***/ }), +/* 151 */ +/***/ (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); + } +}); + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { isInteger: __webpack_require__(98) }); + + +/***/ }), +/* 153 */ +/***/ (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; + } +}); + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.5 Number.isSafeInteger(number) +var $export = __webpack_require__(0); +var isInteger = __webpack_require__(98); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + + +/***/ }), +/* 155 */ +/***/ (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 }); + + +/***/ }), +/* 156 */ +/***/ (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 }); + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(99); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(100); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(100); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(99); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.3 Math.acosh(x) +var $export = __webpack_require__(0); +var log1p = __webpack_require__(101); +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)); + } +}); + + +/***/ }), +/* 162 */ +/***/ (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 }); + + +/***/ }), +/* 163 */ +/***/ (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; + } +}); + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.9 Math.cbrt(x) +var $export = __webpack_require__(0); +var sign = __webpack_require__(72); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + + +/***/ }), +/* 165 */ +/***/ (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; + } +}); + + +/***/ }), +/* 166 */ +/***/ (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; + } +}); + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.14 Math.expm1(x) +var $export = __webpack_require__(0); +var $expm1 = __webpack_require__(73); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { fround: __webpack_require__(102) }); + + +/***/ }), +/* 169 */ +/***/ (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); + } +}); + + +/***/ }), +/* 170 */ +/***/ (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); + } +}); + + +/***/ }), +/* 171 */ +/***/ (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; + } +}); + + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.20 Math.log1p(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { log1p: __webpack_require__(101) }); + + +/***/ }), +/* 173 */ +/***/ (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; + } +}); + + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { sign: __webpack_require__(72) }); + + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(73); +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); + } +}); + + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.33 Math.tanh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(73); +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)); + } +}); + + +/***/ }), +/* 177 */ +/***/ (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); + } +}); + + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toAbsoluteIndex = __webpack_require__(35); +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(''); + } +}); + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(6); + +$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(''); + } +}); + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__(47)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $at = __webpack_require__(74)(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 182 */ +/***/ (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__(6); +var context = __webpack_require__(75); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(76)(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; + } +}); + + +/***/ }), +/* 183 */ +/***/ (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__(75); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(76)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), +/* 184 */ +/***/ (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__(70) +}); + + +/***/ }), +/* 185 */ +/***/ (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__(6); +var context = __webpack_require__(75); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(76)(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; + } +}); + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(74)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(53)(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 }; +}); + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__(14)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__(14)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__(14)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__(14)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__(14)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__(14)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__(14)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__(14)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__(14)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__(14)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__(14)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__(14)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__(14)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), +/* 200 */ +/***/ (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__(52) }); + + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(16); +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var call = __webpack_require__(104); +var isArrayIter = __webpack_require__(77); +var toLength = __webpack_require__(6); +var createProperty = __webpack_require__(78); +var getIterFn = __webpack_require__(48); + +$export($export.S + $export.F * !__webpack_require__(79)(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; + } +}); + + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var createProperty = __webpack_require__(78); + +// 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; + } +}); + + +/***/ }), +/* 203 */ +/***/ (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__(44) != Object || !__webpack_require__(19)(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var html = __webpack_require__(67); +var cof = __webpack_require__(21); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +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; + } +}); + + +/***/ }), +/* 205 */ +/***/ (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__(19)($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)); + } +}); + + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $forEach = __webpack_require__(20)(0); +var STRICT = __webpack_require__(19)([].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]); + } +}); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var isArray = __webpack_require__(52); +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; +}; + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $map = __webpack_require__(20)(1); + +$export($export.P + $export.F * !__webpack_require__(19)([].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]); + } +}); + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $filter = __webpack_require__(20)(2); + +$export($export.P + $export.F * !__webpack_require__(19)([].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]); + } +}); + + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $some = __webpack_require__(20)(3); + +$export($export.P + $export.F * !__webpack_require__(19)([].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]); + } +}); + + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $every = __webpack_require__(20)(4); + +$export($export.P + $export.F * !__webpack_require__(19)([].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]); + } +}); + + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(105); + +$export($export.P + $export.F * !__webpack_require__(19)([].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); + } +}); + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(105); + +$export($export.P + $export.F * !__webpack_require__(19)([].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); + } +}); + + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $indexOf = __webpack_require__(50)(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(19)($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]); + } +}); + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toInteger = __webpack_require__(22); +var toLength = __webpack_require__(6); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(19)($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; + } +}); + + +/***/ }), +/* 216 */ +/***/ (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__(106) }); + +__webpack_require__(33)('copyWithin'); + + +/***/ }), +/* 217 */ +/***/ (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__(81) }); + +__webpack_require__(33)('fill'); + + +/***/ }), +/* 218 */ +/***/ (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__(20)(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); + + +/***/ }), +/* 219 */ +/***/ (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__(20)(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); + + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(43)('Array'); + + +/***/ }), +/* 221 */ +/***/ (function(module, exports) { + +// empty + + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(30); +var global = __webpack_require__(2); +var ctx = __webpack_require__(16); +var classof = __webpack_require__(37); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(3); +var aFunction = __webpack_require__(10); +var anInstance = __webpack_require__(38); +var forOf = __webpack_require__(34); +var speciesConstructor = __webpack_require__(55); +var task = __webpack_require__(84).set; +var microtask = __webpack_require__(85)(); +var newPromiseCapabilityModule = __webpack_require__(86); +var perform = __webpack_require__(107); +var userAgent = __webpack_require__(56); +var promiseResolve = __webpack_require__(108); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +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 + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } 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, exited; + 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); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + 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) { + if (domain && !exited) domain.exit(); + 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__(39)($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__(42)($Promise, PROMISE); +__webpack_require__(43)(PROMISE); +Wrapper = __webpack_require__(12)[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__(79)(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; + } +}); + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var weak = __webpack_require__(113); +var validate = __webpack_require__(40); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +__webpack_require__(57)(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); + + +/***/ }), +/* 224 */ +/***/ (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); + } +}); + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = __webpack_require__(0); +var create = __webpack_require__(32); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var fails = __webpack_require__(4); +var bind = __webpack_require__(96); +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; + } +}); + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = __webpack_require__(8); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(27); + +// 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; + } + } +}); + + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = __webpack_require__(0); +var gOPD = __webpack_require__(18).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]; + } +}); + + +/***/ }), +/* 228 */ +/***/ (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__(54)(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); + } +}); + + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = __webpack_require__(18); +var getPrototypeOf = __webpack_require__(13); +var has = __webpack_require__(15); +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 }); + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = __webpack_require__(18); +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); + } +}); + + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = __webpack_require__(0); +var getProto = __webpack_require__(13); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + + +/***/ }), +/* 232 */ +/***/ (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; + } +}); + + +/***/ }), +/* 233 */ +/***/ (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; + } +}); + + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__(87) }); + + +/***/ }), +/* 235 */ +/***/ (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; + } + } +}); + + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(18); +var getPrototypeOf = __webpack_require__(13); +var has = __webpack_require__(15); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(28); +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; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = __webpack_require__(0); +var setProto = __webpack_require__(95); + +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; + } + } +}); + + +/***/ }), +/* 238 */ +/***/ (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(); } }); + + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(27); +var toISOString = __webpack_require__(114); +var classof = __webpack_require__(37); + +$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 : + (!('toISOString' in O) && classof(O) == 'Date') ? toISOString.call(O) : O.toISOString(); + } +}); + + +/***/ }), +/* 240 */ +/***/ (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__(114); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $typed = __webpack_require__(58); +var buffer = __webpack_require__(88); +var anObject = __webpack_require__(1); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +var isObject = __webpack_require__(3); +var ArrayBuffer = __webpack_require__(2).ArrayBuffer; +var speciesConstructor = __webpack_require__(55); +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 fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__(43)(ARRAY_BUFFER); + + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +$export($export.G + $export.W + $export.F * !__webpack_require__(58).ABV, { + DataView: __webpack_require__(88).DataView +}); + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__(0); +var $includes = __webpack_require__(50)(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'); + + +/***/ }), +/* 253 */ +/***/ (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__(116); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var aFunction = __webpack_require__(10); +var arraySpeciesCreate = __webpack_require__(80); + +$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'); + + +/***/ }), +/* 254 */ +/***/ (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__(116); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var toInteger = __webpack_require__(22); +var arraySpeciesCreate = __webpack_require__(80); + +$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'); + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/mathiasbynens/String.prototype.at +var $export = __webpack_require__(0); +var $at = __webpack_require__(74)(true); +var $fails = __webpack_require__(4); + +var FORCED = $fails(function () { + return '𠮷'.at(0) !== '𠮷'; +}); + +$export($export.P + $export.F * FORCED, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 256 */ +/***/ (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__(117); +var userAgent = __webpack_require__(56); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + + +/***/ }), +/* 257 */ +/***/ (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__(117); +var userAgent = __webpack_require__(56); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(47)('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(47)('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); + + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/String.prototype.matchAll/ +var $export = __webpack_require__(0); +var defined = __webpack_require__(24); +var toLength = __webpack_require__(6); +var isRegExp = __webpack_require__(103); +var getFlags = __webpack_require__(261); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +__webpack_require__(54)($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); + } +}); + + +/***/ }), +/* 261 */ +/***/ (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; +}; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(64)('asyncIterator'); + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(64)('observable'); + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = __webpack_require__(0); +var ownKeys = __webpack_require__(87); +var toIObject = __webpack_require__(11); +var gOPD = __webpack_require__(18); +var createProperty = __webpack_require__(78); + +$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; + } +}); + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $values = __webpack_require__(118)(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $entries = __webpack_require__(118)(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + + +/***/ }), +/* 267 */ +/***/ (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__(8); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +__webpack_require__(7) && $export($export.P + __webpack_require__(59), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 268 */ +/***/ (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__(8); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +__webpack_require__(7) && $export($export.P + __webpack_require__(59), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(27); +var getPrototypeOf = __webpack_require__(13); +var getOwnPropertyDescriptor = __webpack_require__(18).f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +__webpack_require__(7) && $export($export.P + __webpack_require__(59), '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)); + } +}); + + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(27); +var getPrototypeOf = __webpack_require__(13); +var getOwnPropertyDescriptor = __webpack_require__(18).f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +__webpack_require__(7) && $export($export.P + __webpack_require__(59), '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)); + } +}); + + +/***/ }), +/* 271 */ +/***/ (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__(119)('Map') }); + + +/***/ }), +/* 272 */ +/***/ (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__(119)('Set') }); + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +__webpack_require__(60)('Map'); + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +__webpack_require__(60)('Set'); + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +__webpack_require__(60)('WeakMap'); + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +__webpack_require__(60)('WeakSet'); + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +__webpack_require__(61)('Map'); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +__webpack_require__(61)('Set'); + + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +__webpack_require__(61)('WeakMap'); + + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +__webpack_require__(61)('WeakSet'); + + +/***/ }), +/* 281 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.G, { global: __webpack_require__(2) }); + + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.S, 'System', { global: __webpack_require__(2) }); + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/ljharb/proposal-is-error +var $export = __webpack_require__(0); +var cof = __webpack_require__(21); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + + +/***/ }), +/* 284 */ +/***/ (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)); + } +}); + + +/***/ }), +/* 285 */ +/***/ (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 }); + + +/***/ }), +/* 286 */ +/***/ (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; + } +}); + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var scale = __webpack_require__(121); +var fround = __webpack_require__(102); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + + +/***/ }), +/* 288 */ +/***/ (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; + } +}); + + +/***/ }), +/* 289 */ +/***/ (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; + } +}); + + +/***/ }), +/* 290 */ +/***/ (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); + } +}); + + +/***/ }), +/* 291 */ +/***/ (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 }); + + +/***/ }), +/* 292 */ +/***/ (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; + } +}); + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { scale: __webpack_require__(121) }); + + +/***/ }), +/* 294 */ +/***/ (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); + } +}); + + +/***/ }), +/* 295 */ +/***/ (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; +} }); + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(0); +var core = __webpack_require__(12); +var global = __webpack_require__(2); +var speciesConstructor = __webpack_require__(55); +var promiseResolve = __webpack_require__(108); + +$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 + ); +} }); + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(0); +var newPromiseCapability = __webpack_require__(86); +var perform = __webpack_require__(107); + +$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; +} }); + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +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)); +} }); + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +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); +} }); + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(13); +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])); +} }); + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +var Set = __webpack_require__(111); +var from = __webpack_require__(120); +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(13); +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])); +} }); + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +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])); +} }); + + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +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])); +} }); + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(13); +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])); +} }); + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +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])); +} }); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +var $metadata = __webpack_require__(26); +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) + ); + }; +} }); + + +/***/ }), +/* 307 */ +/***/ (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__(85)(); +var process = __webpack_require__(2).process; +var isNode = __webpack_require__(21)(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + + +/***/ }), +/* 308 */ +/***/ (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__(12); +var microtask = __webpack_require__(85)(); +var OBSERVABLE = __webpack_require__(5)('observable'); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var anInstance = __webpack_require__(38); +var redefineAll = __webpack_require__(39); +var hide = __webpack_require__(17); +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__(43)('Observable'); + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $task = __webpack_require__(84); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(82); +var global = __webpack_require__(2); +var hide = __webpack_require__(17); +var Iterators = __webpack_require__(36); +var TO_STRING_TAG = __webpack_require__(5)('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), +/* 311 */ +/***/ (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__(56); +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) +}); + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(16); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(28); +var assign = __webpack_require__(68); +var create = __webpack_require__(32); +var getPrototypeOf = __webpack_require__(13); +var getKeys = __webpack_require__(31); +var dP = __webpack_require__(8); +var keyOf = __webpack_require__(313); +var aFunction = __webpack_require__(10); +var forOf = __webpack_require__(34); +var isIterable = __webpack_require__(122); +var $iterCreate = __webpack_require__(54); +var step = __webpack_require__(83); +var isObject = __webpack_require__(3); +var toIObject = __webpack_require__(11); +var DESCRIPTORS = __webpack_require__(7); +var has = __webpack_require__(15); + +// 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 +}); + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(31); +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; +}; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var get = __webpack_require__(48); +module.exports = __webpack_require__(12).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var $export = __webpack_require__(0); +var partial = __webpack_require__(123); +// 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); + }); + } +}); + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +var path = __webpack_require__(124); +var $export = __webpack_require__(0); + +// Placeholder +__webpack_require__(12)._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: __webpack_require__(123) }); + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { isObject: __webpack_require__(3) }); + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { classof: __webpack_require__(37) }); + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(125); + +$export($export.S + $export.F, 'Object', { define: define }); + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(125); +var create = __webpack_require__(32); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(53)(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 }; +}); + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/benjamingr/RexExp.escape +var $export = __webpack_require__(0); +var $re = __webpack_require__(89)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(89)(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(89)(/&(?: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/library.min.js b/node_modules/core-js/client/library.min.js new file mode 100644 index 0000000000000..cf8c71f89bf9b --- /dev/null +++ b/node_modules/core-js/client/library.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.6.12 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2020 Denis Pushkarev + */ +!function(e,i,Jt){"use strict";!function(r){var e={};function __webpack_require__(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return r[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=r,__webpack_require__.c=e,__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=126)}([function(t,n,r){var y=r(2),g=r(12),d=r(16),_=r(17),b=r(15),S="prototype",m=function(t,n,r){var e,i,o,u=t&m.F,c=t&m.G,f=t&m.S,a=t&m.P,s=t&m.B,l=t&m.W,h=c?g:g[n]||(g[n]={}),p=h[S],v=c?y:f?y[n]:(y[n]||{})[S];for(e in c&&(r=n),r)(i=!u&&v&&v[e]!==Jt)&&b(h,e)||(o=i?v[e]:r[e],h[e]=c&&"function"!=typeof v[e]?r[e]:s&&i?d(o,y):l&&v[e]==o?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[S]=e[S],t}(o):a&&"function"==typeof o?d(Function.call,o):o,a&&((h.virtual||(h.virtual={}))[e]=o,t&m.R&&p&&!p[e]&&_(p,e,o)))};m.F=1,m.G=2,m.S=4,m.P=8,m.B=16,m.W=32,m.U=64,m.R=128,t.exports=m},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,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof i&&(i=r)},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(49)("wks"),i=r(41),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(22),i=Math.min;t.exports=function(t){return 0"+i+""};t.exports=function(n,t){var r={};r[n]=t(o),e(e.P+e.F*i(function(){var t=""[n]('"');return t!==t.toLowerCase()||3document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s[a][u[r]];return s()};t.exports=Object.create||function create(t,n){var r;return null!==t?(f[a]=i(t),r=new f,f[a]=null,r[c]=t):r=s(),n===Jt?r:o(r,n)}},function(t,n){t.exports=function(){}},function(t,n,r){var h=r(16),p=r(104),v=r(77),y=r(1),g=r(6),d=r(48),_={},b={};(n=t.exports=function(t,n,r,e,i){var o,u,c,f,a=i?function(){return t}:d(t),s=h(r,e,n?2:1),l=0;if("function"!=typeof a)throw TypeError(t+" is not iterable!");if(v(a)){for(o=g(t.length);l>>=1)&&(n+=n))1&e&&(r+=n);return r}},function(t,n){t.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n){t.exports=Math.sign||function sign(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var r=Math.expm1;t.exports=!r||22025.465794806718>1,s=23===n?I(2,-24)-I(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=F(t))!=t||t===M?(i=t!=t?1:0,e=f):(e=k(A(t)/j),t*(o=I(2,-e))<1&&(e--,o*=2),2<=(t+=1<=e+a?s/o:s*I(2,1-a))*o&&(e++,o/=2),f<=e+a?(i=0,e=f):1<=e+a?(i=(t*o-1)*I(2,n),e+=a):(i=t*I(2,a-1)*I(2,n),e=0));8<=n;u[l++]=255&i,i/=256,n-=8);for(e=e<>1,c=i-7,f=r-1,a=t[f--],s=127&a;for(a>>=7;0>=-c,c+=n;0>8&255]}function packI32(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function packF64(t){return packIEEE754(t,52,8)}function packF32(t){return packIEEE754(t,23,4)}function addGetter(t,n,r){y(t[S],n,{get:function(){return this[r]}})}function get(t,n,r,e){var i=p(+r);if(t[D]>24)},setUint8:function setUint8(t,n){B.call(this,t,n<<24>>24)}},!0)}else w=function ArrayBuffer(t){s(this,w,_);var n=p(t);this._b=g.call(new Array(n),0),this[D]=n},x=function DataView(t,n,r){s(this,x,b),s(t,w,b);var e=t[D],i=l(n);if(i<0||e>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var n=get(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function getUint16(t){var n=get(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function getInt32(t){return unpackI32(get(this,4,t,arguments[1]))},getUint32:function getUint32(t){return unpackI32(get(this,4,t,arguments[1]))>>>0},getFloat32:function getFloat32(t){return unpackIEEE754(get(this,4,t,arguments[1]),23,4)},getFloat64:function getFloat64(t){return unpackIEEE754(get(this,8,t,arguments[1]),52,8)},setInt8:function setInt8(t,n){set(this,1,t,packI8,n)},setUint8:function setUint8(t,n){set(this,1,t,packI8,n)},setInt16:function setInt16(t,n){set(this,2,t,packI16,n,arguments[2])},setUint16:function setUint16(t,n){set(this,2,t,packI16,n,arguments[2])},setInt32:function setInt32(t,n){set(this,4,t,packI32,n,arguments[2])},setUint32:function setUint32(t,n){set(this,4,t,packI32,n,arguments[2])},setFloat32:function setFloat32(t,n){set(this,4,t,packF32,n,arguments[2])},setFloat64:function setFloat64(t,n){set(this,8,t,packF64,n,arguments[2])}});d(w,_),d(x,b),c(x[S],u.VIEW,!0),n[_]=w,n[b]=x},function(t,n){t.exports=function(n,r){var e=r===Object(r)?function(t){return r[t]}:r;return function(t){return String(t).replace(n,e)}}},function(t,n,r){t.exports=!r(7)&&!r(4)(function(){return 7!=Object.defineProperty(r(62)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){n.f=r(5)},function(t,n,r){var u=r(15),c=r(11),f=r(50)(!1),a=r(65)("IE_PROTO");t.exports=function(t,n){var r,e=c(t),i=0,o=[];for(r in e)r!=a&&u(e,r)&&o.push(r);for(;i>>0||(u.test(r)?16:10))}:e},function(t,n){t.exports=Math.log1p||function log1p(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){var o=r(72),e=Math.pow,u=e(2,-52),c=e(2,-23),f=e(2,127)*(2-c),a=e(2,-126);t.exports=Math.fround||function fround(t){var n,r,e=Math.abs(t),i=o(t);return e>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(0),i=Math.exp;e(e.S,"Math",{cosh:function cosh(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(0),i=r(73);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(0);e(e.S,"Math",{fround:r(102)})},function(t,n,r){var e=r(0),f=Math.abs;e(e.S,"Math",{hypot:function hypot(t,n){for(var r,e,i=0,o=0,u=arguments.length,c=0;o>>16)*u+o*(r&i>>>16)<<16>>>0)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log10:function log10(t){return Math.log(t)*Math.LOG10E}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log1p:r(101)})},function(t,n,r){var e=r(0);e(e.S,"Math",{log2:function log2(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(0);e(e.S,"Math",{sign:r(72)})},function(t,n,r){var e=r(0),i=r(73),o=Math.exp;e(e.S+e.F*r(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(0),i=r(73),o=Math.exp;e(e.S,"Math",{tanh:function tanh(t){var n=i(t=+t),r=i(-t);return n==Infinity?1:r==Infinity?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(0);e(e.S,"Math",{trunc:function trunc(t){return(0>10),n%1024+56320))}return r.join("")}})},function(t,n,r){var e=r(0),u=r(11),c=r(6);e(e.S,"String",{raw:function raw(t){for(var n=u(t.raw),r=c(n.length),e=arguments.length,i=[],o=0;o>>0,o=r>>>0;return(n>>>0)+(e>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{isubh:function isubh(t,n,r,e){var i=t>>>0,o=r>>>0;return(n>>>0)-(e>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{imulh:function imulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>16,c=e>>16,f=(u*o>>>0)+(i*o>>>16);return u*c+(f>>16)+((i*c>>>0)+(65535&f)>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,n,r){var e=r(0),i=Math.PI/180;e(e.S,"Math",{radians:function radians(t){return t*i}})},function(t,n,r){var e=r(0);e(e.S,"Math",{scale:r(121)})},function(t,n,r){var e=r(0);e(e.S,"Math",{umulh:function umulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>>16,c=e>>>16,f=(u*o>>>0)+(i*o>>>16);return u*c+(f>>>16)+((i*c>>>0)+(65535&f)>>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{signbit:function signbit(t){return(t=+t)!=t?t:0==t?1/t==Infinity:0"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});e(e.P+e.F,"String",{escapeHTML:function escapeHTML(){return i(this)}})},function(t,n,r){var e=r(0),i=r(89)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});e(e.P+e.F,"String",{unescapeHTML:function unescapeHTML(){return i(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):i.core=e}(1,1); +//# sourceMappingURL=library.min.js.map \ No newline at end of file diff --git a/node_modules/core-js/client/library.min.js.map b/node_modules/core-js/client/library.min.js.map new file mode 100644 index 0000000000000..42310f1bad845 --- /dev/null +++ b/node_modules/core-js/client/library.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["library.js"],"names":["__e","__g","undefined","modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","global","core","ctx","hide","has","PROTOTYPE","$export","type","source","key","own","out","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","P","IS_BIND","B","IS_WRAP","W","expProto","target","C","a","b","this","arguments","length","apply","Function","virtual","R","U","isObject","it","TypeError","window","Math","self","exec","e","store","uid","Symbol","USE_SYMBOL","toInteger","min","anObject","IE8_DOM_DEFINE","toPrimitive","dP","f","O","Attributes","value","defined","IObject","version","toObject","IE_PROTO","ObjectProto","getPrototypeOf","constructor","fails","quot","createHTML","string","tag","attribute","String","p1","replace","NAME","test","toLowerCase","split","aFunction","fn","that","createDesc","pIE","toIObject","gOPD","getOwnPropertyDescriptor","method","arg","toLength","asc","TYPE","$create","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","create","$this","callbackfn","val","res","index","result","push","toString","slice","ceil","floor","isNaN","KEY","exp","LIBRARY","$typed","$buffer","anInstance","propertyDesc","redefineAll","toIndex","toAbsoluteIndex","classof","isArrayIter","gOPN","getIterFn","wks","createArrayMethod","createArrayIncludes","speciesConstructor","ArrayIterators","Iterators","$iterDetect","setSpecies","arrayFill","arrayCopyWithin","$DP","$GOPD","RangeError","Uint8Array","ARRAY_BUFFER","SHARED_BUFFER","BYTES_PER_ELEMENT","ArrayProto","Array","$ArrayBuffer","ArrayBuffer","$DataView","DataView","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayFind","arrayFindIndex","arrayIncludes","arrayIndexOf","arrayValues","values","arrayKeys","keys","arrayEntries","entries","arrayLastIndexOf","lastIndexOf","arrayReduce","reduce","arrayReduceRight","reduceRight","arrayJoin","join","arraySort","sort","arraySlice","arrayToString","arrayToLocaleString","toLocaleString","ITERATOR","TAG","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","CONSTR","TYPED_ARRAY","TYPED","VIEW","WRONG_LENGTH","$map","allocate","LITTLE_ENDIAN","Uint16Array","buffer","FORCED_SET","set","toOffset","BYTES","offset","validate","speciesFromList","list","fromList","addGetter","internal","_d","$from","from","step","iterator","aLen","mapfn","mapping","iterFn","next","done","$of","of","TO_LOCALE_BUG","$toLocaleString","proto","copyWithin","start","every","fill","filter","find","predicate","findIndex","forEach","indexOf","searchElement","includes","separator","map","reverse","middle","some","comparefn","subarray","begin","end","$begin","byteOffset","$slice","$set","arrayLike","src","len","$iterators","isTAIndex","$getDesc","$setDesc","desc","writable","$TypedArrayPrototype$","wrapper","CLAMPED","GETTER","SETTER","TypedArray","Base","TAC","TypedArrayPrototype","addElement","data","v","round","ABV","$offset","$length","byteLength","klass","$len","iter","concat","$nativeIterator","CORRECT_ITER_NAME","$iterator","Map","shared","getOrCreateMetadataMap","targetKey","targetMetadata","keyMetadata","MetadataKey","metadataMap","MetadataValue","_","valueOf","bitmap","META","setDesc","id","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","$keys","enumBugKeys","dPs","Empty","createDict","iframeDocument","iframe","style","display","appendChild","contentWindow","document","open","write","lt","close","Properties","BREAK","RETURN","iterable","max","cof","ARG","T","tryGet","callee","Constructor","forbiddenField","safe","_t","px","random","def","stat","DESCRIPTORS","SPECIES","propertyIsEnumerable","hiddenKeys","getOwnPropertyNames","spaces","space","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","trim","getIteratorMethod","SHARED","mode","copyright","IS_INCLUDES","el","fromIndex","getOwnPropertySymbols","isArray","redefine","$iterCreate","setToStringTag","BUGGY","VALUES","returnThis","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","D","navigator","userAgent","forOf","each","common","IS_WEAK","ADDER","_c","IS_ADDER","size","getConstructor","setStrong","Typed","TypedArrayConstructors","K","__defineSetter__","COLLECTION","A","cb","mapFn","nextItem","is","createElement","wksExt","$Symbol","charAt","documentElement","getKeys","gOPS","$assign","assign","k","getSymbols","isEnum","j","args","un","repeat","count","str","Infinity","sign","x","$expm1","expm1","TO_STRING","pos","charCodeAt","isRegExp","searchString","MATCH","re","$defineProperty","SAFE_CLOSING","riter","skipClosing","arr","original","endPos","addToUnscopables","iterated","_i","_k","Arguments","defer","channel","port","invoke","html","cel","process","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","run","listener","event","nextTick","now","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","Promise","isNode","head","last","notify","flush","parent","domain","exit","enter","standalone","resolve","promise","then","toggle","node","createTextNode","observe","characterData","task","PromiseCapability","reject","$$resolve","$$reject","Reflect","ownKeys","DATA_VIEW","WRONG_INDEX","BaseBuffer","abs","pow","log","LN2","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","NaN","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","view","isLittleEndian","intIndex","pack","_b","conversion","ArrayBufferProto","$setInt8","setInt8","getInt8","setUint8","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","regExp","replacer","part","names","defineProperties","windowNames","getWindowNames","check","setPrototypeOf","buggy","__proto__","factories","bind","partArgs","bound","construct","msg","isInteger","isFinite","$parseFloat","parseFloat","$trim","$parseInt","parseInt","ws","hex","radix","log1p","EPSILON","EPSILON32","MAX32","MIN32","fround","$abs","$sign","ret","memo","isRight","to","inc","newPromiseCapability","promiseCapability","strong","entry","getEntry","$iterDefine","SIZE","_f","_l","r","delete","prev","Set","add","InternalMap","weak","NATIVE_WEAK_MAP","IS_IE11","ActiveXObject","WEAK_MAP","uncaughtFrozenStore","ufstore","WeakMap","$WeakMap","$has","UncaughtFrozenStore","findUncaughtFrozen","splice","getTime","Date","$toISOString","toISOString","lz","num","y","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","number","IS_CONCAT_SPREADABLE","flattenIntoArray","sourceLen","depth","mapper","thisArg","element","spreadable","targetIndex","sourceIndex","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","isEntries","toJSON","scale","inLow","inHigh","outLow","outHigh","isIterable","path","pargs","holder","define","mixin","$fails","wksDefine","enumKeys","_create","gOPNExt","$GOPS","$JSON","JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","protoDesc","wrap","sym","isSymbol","$defineProperties","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","es6Symbols","wellKnownSymbols","for","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","$replacer","symbols","$getPrototypeOf","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","HAS_INSTANCE","FunctionProto","aNumberValue","$toFixed","toFixed","ERROR","multiply","c2","divide","numToString","t","acc","fractionDigits","z","x2","$toPrecision","toPrecision","precision","_isFinite","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","Number","sqrt","$acosh","acosh","MAX_VALUE","$asinh","asinh","$atanh","atanh","cbrt","clz32","LOG2E","cosh","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LOG10E","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","code","raw","callSite","tpl","$at","codePointAt","context","ENDS_WITH","$endsWith","endsWith","endPosition","search","INCLUDES","STARTS_WITH","$startsWith","startsWith","point","anchor","big","blink","bold","fixed","fontcolor","color","fontsize","italics","link","url","small","strike","sub","sup","createProperty","upTo","cloned","$sort","$forEach","STRICT","$filter","$some","$every","$reduce","$indexOf","NEGATIVE_ZERO","$find","forced","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","microtask","newPromiseCapabilityModule","perform","promiseResolve","PROMISE","versions","v8","$Promise","empty","FakePromise","PromiseRejectionEvent","isThenable","isReject","_n","chain","_v","ok","_s","reaction","exited","handler","fail","_h","onHandleUnhandled","onUnhandled","console","unhandled","isUnhandled","emit","onunhandledrejection","reason","error","_a","onrejectionhandled","$reject","_w","$resolve","executor","err","onFulfilled","onRejected","catch","capability","all","remaining","$index","alreadyCalled","race","WEAK_SET","WeakSet","rApply","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","instance","propertyKey","attributes","deleteProperty","Enumerate","enumerate","receiver","getProto","V","existingDescriptor","ownDesc","setProto","pv","$isView","isView","first","fin","viewS","viewT","init","Int8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","arraySpeciesCreate","flatMap","flatten","depthArg","at","$pad","WEBKIT_BUG","padStart","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","regexp","_r","match","matchAll","flags","rx","lastIndex","ignoreCase","multiline","unicode","sticky","getOwnPropertyDescriptors","getDesc","$values","__defineGetter__","__lookupGetter__","__lookupSetter__","isError","clamp","lower","upper","DEG_PER_RAD","PI","RAD_PER_DEG","degrees","radians","fscale","iaddh","x0","x1","y0","y1","$x0","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","signbit","finally","onFinally","isFunction","try","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","deleteMetadata","ordinaryHasOwnMetadata","ordinaryGetOwnMetadata","ordinaryGetMetadata","getMetadata","ordinaryOwnMetadataKeys","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","$metadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","DOMIterables","Collection","MSIE","time","boundArgs","setInterval","keyOf","createDictMethod","Dict","findKey","createDictIter","DictIterator","dict","mapPairs","isDict","getIterator","partial","delay","make","$re","escape","&","<",">","\"","'","escapeHTML","&","<",">",""","'","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,IACpB,cACS,SAAUC,GAET,IAAIC,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAJ,EAAQG,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASF,qBAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,oBAAoBO,EAAIT,EAGxBE,oBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAI,SAASP,EAASQ,EAAMC,GAC3CX,oBAAoBY,EAAEV,EAASQ,IAClCG,OAAOC,eAAeZ,EAASQ,EAAM,CACpCK,cAAc,EACdC,YAAY,EACZC,IAAKN,KAMRX,oBAAoBkB,EAAI,SAASf,GAChC,IAAIQ,EAASR,GAAUA,EAAOgB,WAC7B,SAASC,aAAe,OAAOjB,EAAgB,YAC/C,SAASkB,mBAAqB,OAAOlB,GAEtC,OADAH,oBAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,oBAAoBY,EAAI,SAASU,EAAQC,GAAY,OAAOV,OAAOW,UAAUC,eAAenB,KAAKgB,EAAQC,IAGzGvB,oBAAoB0B,EAAI,GAGjB1B,oBAAoBA,oBAAoB2B,EAAI,KA9DpD,CAiEC,CAEJ,SAAUxB,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3B8B,EAAM9B,EAAoB,IAC1B+B,EAAO/B,EAAoB,IAC3BgC,EAAMhC,EAAoB,IAC1BiC,EAAY,YAEZC,EAAU,SAAUC,EAAMzB,EAAM0B,GAClC,IASIC,EAAKC,EAAKC,EATVC,EAAYL,EAAOD,EAAQO,EAC3BC,EAAYP,EAAOD,EAAQS,EAC3BC,EAAYT,EAAOD,EAAQW,EAC3BC,EAAWX,EAAOD,EAAQa,EAC1BC,EAAUb,EAAOD,EAAQe,EACzBC,EAAUf,EAAOD,EAAQiB,EACzBjD,EAAUwC,EAAYb,EAAOA,EAAKnB,KAAUmB,EAAKnB,GAAQ,IACzD0C,EAAWlD,EAAQ+B,GACnBoB,EAASX,EAAYd,EAASgB,EAAYhB,EAAOlB,IAASkB,EAAOlB,IAAS,IAAIuB,GAGlF,IAAKI,KADDK,IAAWN,EAAS1B,GACZ0B,GAEVE,GAAOE,GAAaa,GAAUA,EAAOhB,KAASxC,KACnCmC,EAAI9B,EAASmC,KAExBE,EAAMD,EAAMe,EAAOhB,GAAOD,EAAOC,GAEjCnC,EAAQmC,GAAOK,GAAmC,mBAAfW,EAAOhB,GAAqBD,EAAOC,GAEpEW,GAAWV,EAAMR,EAAIS,EAAKX,GAE1BsB,GAAWG,EAAOhB,IAAQE,EAAM,SAAWe,GAC3C,IAAIb,EAAI,SAAUc,EAAGC,EAAGhD,GACtB,GAAIiD,gBAAgBH,EAAG,CACrB,OAAQI,UAAUC,QAChB,KAAK,EAAG,OAAO,IAAIL,EACnB,KAAK,EAAG,OAAO,IAAIA,EAAEC,GACrB,KAAK,EAAG,OAAO,IAAID,EAAEC,EAAGC,GACxB,OAAO,IAAIF,EAAEC,EAAGC,EAAGhD,GACrB,OAAO8C,EAAEM,MAAMH,KAAMC,YAGzB,OADAjB,EAAER,GAAaqB,EAAErB,GACVQ,EAXyB,CAa/BF,GAAOO,GAA0B,mBAAPP,EAAoBT,EAAI+B,SAASvD,KAAMiC,GAAOA,EAEvEO,KACD5C,EAAQ4D,UAAY5D,EAAQ4D,QAAU,KAAKzB,GAAOE,EAE/CJ,EAAOD,EAAQ6B,GAAKX,IAAaA,EAASf,IAAMN,EAAKqB,EAAUf,EAAKE,MAK9EL,EAAQO,EAAI,EACZP,EAAQS,EAAI,EACZT,EAAQW,EAAI,EACZX,EAAQa,EAAI,EACZb,EAAQe,EAAI,GACZf,EAAQiB,EAAI,GACZjB,EAAQ8B,EAAI,GACZ9B,EAAQ6B,EAAI,IACZ5D,EAAOD,QAAUgC,GAKX,SAAU/B,EAAQD,EAASF,GAEjC,IAAIiE,EAAWjE,EAAoB,GACnCG,EAAOD,QAAU,SAAUgE,GACzB,IAAKD,EAASC,GAAK,MAAMC,UAAUD,EAAK,sBACxC,OAAOA,IAMH,SAAU/D,EAAQD,GAGxB,IAAI0B,EAASzB,EAAOD,QAA2B,oBAAVkE,QAAyBA,OAAOC,MAAQA,KACzED,OAAwB,oBAARE,MAAuBA,KAAKD,MAAQA,KAAOC,KAE3DT,SAAS,cAATA,GACc,iBAAPjE,IAAiBA,EAAMgC,IAK5B,SAAUzB,EAAQD,GAExBC,EAAOD,QAAU,SAAUgE,GACzB,MAAqB,iBAAPA,EAAyB,OAAPA,EAA4B,mBAAPA,IAMjD,SAAU/D,EAAQD,GAExBC,EAAOD,QAAU,SAAUqE,GACzB,IACE,QAASA,IACT,MAAOC,GACP,OAAO,KAOL,SAAUrE,EAAQD,EAASF,GAEjC,IAAIyE,EAAQzE,EAAoB,GAApBA,CAAwB,OAChC0E,EAAM1E,EAAoB,IAC1B2E,EAAS3E,EAAoB,GAAG2E,OAChCC,EAA8B,mBAAVD,GAETxE,EAAOD,QAAU,SAAUQ,GACxC,OAAO+D,EAAM/D,KAAU+D,EAAM/D,GAC3BkE,GAAcD,EAAOjE,KAAUkE,EAAaD,EAASD,GAAK,UAAYhE,MAGjE+D,MAAQA,GAKX,SAAUtE,EAAQD,EAASF,GAGjC,IAAI6E,EAAY7E,EAAoB,IAChC8E,EAAMT,KAAKS,IACf3E,EAAOD,QAAU,SAAUgE,GACzB,OAAY,EAALA,EAASY,EAAID,EAAUX,GAAK,kBAAoB,IAMnD,SAAU/D,EAAQD,EAASF,GAGjCG,EAAOD,SAAWF,EAAoB,EAApBA,CAAuB,WACvC,OAA+E,GAAxEa,OAAOC,eAAe,GAAI,IAAK,CAAEG,IAAK,WAAc,OAAO,KAAQsC,KAMtE,SAAUpD,EAAQD,EAASF,GAEjC,IAAI+E,EAAW/E,EAAoB,GAC/BgF,EAAiBhF,EAAoB,IACrCiF,EAAcjF,EAAoB,IAClCkF,EAAKrE,OAAOC,eAEhBZ,EAAQiF,EAAInF,EAAoB,GAAKa,OAAOC,eAAiB,SAASA,eAAesE,EAAGrC,EAAGsC,GAIzF,GAHAN,EAASK,GACTrC,EAAIkC,EAAYlC,GAAG,GACnBgC,EAASM,GACLL,EAAgB,IAClB,OAAOE,EAAGE,EAAGrC,EAAGsC,GAChB,MAAOb,IACT,GAAI,QAASa,GAAc,QAASA,EAAY,MAAMlB,UAAU,4BAEhE,MADI,UAAWkB,IAAYD,EAAErC,GAAKsC,EAAWC,OACtCF,IAMH,SAAUjF,EAAQD,EAASF,GAGjC,IAAIuF,EAAUvF,EAAoB,IAClCG,EAAOD,QAAU,SAAUgE,GACzB,OAAOrD,OAAO0E,EAAQrB,MAMlB,SAAU/D,EAAQD,GAExBC,EAAOD,QAAU,SAAUgE,GACzB,GAAiB,mBAANA,EAAkB,MAAMC,UAAUD,EAAK,uBAClD,OAAOA,IAMH,SAAU/D,EAAQD,EAASF,GAGjC,IAAIwF,EAAUxF,EAAoB,IAC9BuF,EAAUvF,EAAoB,IAClCG,EAAOD,QAAU,SAAUgE,GACzB,OAAOsB,EAAQD,EAAQrB,MAMnB,SAAU/D,EAAQD,GAExB,IAAI2B,EAAO1B,EAAOD,QAAU,CAAEuF,QAAS,UACrB,iBAAP9F,IAAiBA,EAAMkC,IAK5B,SAAU1B,EAAQD,EAASF,GAGjC,IAAIgC,EAAMhC,EAAoB,IAC1B0F,EAAW1F,EAAoB,GAC/B2F,EAAW3F,EAAoB,GAApBA,CAAwB,YACnC4F,EAAc/E,OAAOW,UAEzBrB,EAAOD,QAAUW,OAAOgF,gBAAkB,SAAUT,GAElD,OADAA,EAAIM,EAASN,GACTpD,EAAIoD,EAAGO,GAAkBP,EAAEO,GACH,mBAAjBP,EAAEU,aAA6BV,aAAaA,EAAEU,YAChDV,EAAEU,YAAYtE,UACd4D,aAAavE,OAAS+E,EAAc,OAMzC,SAAUzF,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B+F,EAAQ/F,EAAoB,GAC5BuF,EAAUvF,EAAoB,IAC9BgG,EAAO,KAEPC,EAAa,SAAUC,EAAQC,EAAKC,EAAWd,GACjD,IAAIzC,EAAIwD,OAAOd,EAAQW,IACnBI,EAAK,IAAMH,EAEf,MADkB,KAAdC,IAAkBE,GAAM,IAAMF,EAAY,KAAOC,OAAOf,GAAOiB,QAAQP,EAAM,UAAY,KACtFM,EAAK,IAAMzD,EAAI,KAAOsD,EAAM,KAErChG,EAAOD,QAAU,SAAUsG,EAAMjC,GAC/B,IAAIa,EAAI,GACRA,EAAEoB,GAAQjC,EAAK0B,GACf/D,EAAQA,EAAQa,EAAIb,EAAQO,EAAIsD,EAAM,WACpC,IAAIU,EAAO,GAAGD,GAAM,KACpB,OAAOC,IAASA,EAAKC,eAA0C,EAAzBD,EAAKE,MAAM,KAAKhD,SACpD,SAAUyB,KAMV,SAAUjF,EAAQD,GAExB,IAAIuB,EAAiB,GAAGA,eACxBtB,EAAOD,QAAU,SAAUgE,EAAI7B,GAC7B,OAAOZ,EAAenB,KAAK4D,EAAI7B,KAM3B,SAAUlC,EAAQD,EAASF,GAGjC,IAAI4G,EAAY5G,EAAoB,IACpCG,EAAOD,QAAU,SAAU2G,EAAIC,EAAMnD,GAEnC,GADAiD,EAAUC,GACNC,IAASjH,GAAW,OAAOgH,EAC/B,OAAQlD,GACN,KAAK,EAAG,OAAO,SAAUJ,GACvB,OAAOsD,EAAGvG,KAAKwG,EAAMvD,IAEvB,KAAK,EAAG,OAAO,SAAUA,EAAGC,GAC1B,OAAOqD,EAAGvG,KAAKwG,EAAMvD,EAAGC,IAE1B,KAAK,EAAG,OAAO,SAAUD,EAAGC,EAAGhD,GAC7B,OAAOqG,EAAGvG,KAAKwG,EAAMvD,EAAGC,EAAGhD,IAG/B,OAAO,WACL,OAAOqG,EAAGjD,MAAMkD,EAAMpD,cAOpB,SAAUvD,EAAQD,EAASF,GAEjC,IAAIkF,EAAKlF,EAAoB,GACzB+G,EAAa/G,EAAoB,IACrCG,EAAOD,QAAUF,EAAoB,GAAK,SAAUsB,EAAQe,EAAKiD,GAC/D,OAAOJ,EAAGC,EAAE7D,EAAQe,EAAK0E,EAAW,EAAGzB,KACrC,SAAUhE,EAAQe,EAAKiD,GAEzB,OADAhE,EAAOe,GAAOiD,EACPhE,IAMH,SAAUnB,EAAQD,EAASF,GAEjC,IAAIgH,EAAMhH,EAAoB,IAC1B+G,EAAa/G,EAAoB,IACjCiH,EAAYjH,EAAoB,IAChCiF,EAAcjF,EAAoB,IAClCgC,EAAMhC,EAAoB,IAC1BgF,EAAiBhF,EAAoB,IACrCkH,EAAOrG,OAAOsG,yBAElBjH,EAAQiF,EAAInF,EAAoB,GAAKkH,EAAO,SAASC,yBAAyB/B,EAAGrC,GAG/E,GAFAqC,EAAI6B,EAAU7B,GACdrC,EAAIkC,EAAYlC,GAAG,GACfiC,EAAgB,IAClB,OAAOkC,EAAK9B,EAAGrC,GACf,MAAOyB,IACT,GAAIxC,EAAIoD,EAAGrC,GAAI,OAAOgE,GAAYC,EAAI7B,EAAE7E,KAAK8E,EAAGrC,GAAIqC,EAAErC,MAMlD,SAAU5C,EAAQD,EAASF,GAIjC,IAAI+F,EAAQ/F,EAAoB,GAEhCG,EAAOD,QAAU,SAAUkH,EAAQC,GACjC,QAASD,GAAUrB,EAAM,WAEvBsB,EAAMD,EAAO9G,KAAK,KAAM,aAA6B,GAAK8G,EAAO9G,KAAK,UAOpE,SAAUH,EAAQD,EAASF,GASjC,IAAI8B,EAAM9B,EAAoB,IAC1BwF,EAAUxF,EAAoB,IAC9B0F,EAAW1F,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/BuH,EAAMvH,EAAoB,IAC9BG,EAAOD,QAAU,SAAUsH,EAAMC,GAC/B,IAAIC,EAAiB,GAARF,EACTG,EAAoB,GAARH,EACZI,EAAkB,GAARJ,EACVK,EAAmB,GAARL,EACXM,EAAwB,GAARN,EAChBO,EAAmB,GAARP,GAAaM,EACxBE,EAASP,GAAWF,EACxB,OAAO,SAAUU,EAAOC,EAAYpB,GAQlC,IAPA,IAMIqB,EAAKC,EANLhD,EAAIM,EAASuC,GACb3D,EAAOkB,EAAQJ,GACfD,EAAIrD,EAAIoG,EAAYpB,EAAM,GAC1BnD,EAAS2D,EAAShD,EAAKX,QACvB0E,EAAQ,EACRC,EAASZ,EAASM,EAAOC,EAAOtE,GAAUgE,EAAYK,EAAOC,EAAO,GAAKpI,GAE9DwI,EAAT1E,EAAgB0E,IAAS,IAAIN,GAAYM,KAAS/D,KAEtD8D,EAAMjD,EADNgD,EAAM7D,EAAK+D,GACEA,EAAOjD,GAChBoC,GACF,GAAIE,EAAQY,EAAOD,GAASD,OACvB,GAAIA,EAAK,OAAQZ,GACpB,KAAK,EAAG,OAAO,EACf,KAAK,EAAG,OAAOW,EACf,KAAK,EAAG,OAAOE,EACf,KAAK,EAAGC,EAAOC,KAAKJ,QACf,GAAIN,EAAU,OAAO,EAGhC,OAAOC,GAAiB,EAAIF,GAAWC,EAAWA,EAAWS,KAO3D,SAAUnI,EAAQD,GAExB,IAAIsI,EAAW,GAAGA,SAElBrI,EAAOD,QAAU,SAAUgE,GACzB,OAAOsE,EAASlI,KAAK4D,GAAIuE,MAAM,GAAI,KAM/B,SAAUtI,EAAQD,GAGxB,IAAIwI,EAAOrE,KAAKqE,KACZC,EAAQtE,KAAKsE,MACjBxI,EAAOD,QAAU,SAAUgE,GACzB,OAAO0E,MAAM1E,GAAMA,GAAM,GAAU,EAALA,EAASyE,EAAQD,GAAMxE,KAMjD,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B6B,EAAO7B,EAAoB,IAC3B+F,EAAQ/F,EAAoB,GAChCG,EAAOD,QAAU,SAAU2I,EAAKtE,GAC9B,IAAIsC,GAAMhF,EAAKhB,QAAU,IAAIgI,IAAQhI,OAAOgI,GACxCC,EAAM,GACVA,EAAID,GAAOtE,EAAKsC,GAChB3E,EAAQA,EAAQW,EAAIX,EAAQO,EAAIsD,EAAM,WAAcc,EAAG,KAAQ,SAAUiC,KAMrE,SAAU3I,EAAQD,GAGxBC,EAAOD,QAAU,SAAUgE,GACzB,GAAIA,GAAMrE,GAAW,MAAMsE,UAAU,yBAA2BD,GAChE,OAAOA,IAMH,SAAU/D,EAAQD,EAASF,GAIjC,GAAIA,EAAoB,GAAI,CAC1B,IAAI+I,EAAU/I,EAAoB,IAC9B4B,EAAS5B,EAAoB,GAC7B+F,EAAQ/F,EAAoB,GAC5BkC,EAAUlC,EAAoB,GAC9BgJ,EAAShJ,EAAoB,IAC7BiJ,EAAUjJ,EAAoB,IAC9B8B,EAAM9B,EAAoB,IAC1BkJ,EAAalJ,EAAoB,IACjCmJ,EAAenJ,EAAoB,IACnC+B,EAAO/B,EAAoB,IAC3BoJ,EAAcpJ,EAAoB,IAClC6E,EAAY7E,EAAoB,IAChCsH,EAAWtH,EAAoB,GAC/BqJ,EAAUrJ,EAAoB,KAC9BsJ,EAAkBtJ,EAAoB,IACtCiF,EAAcjF,EAAoB,IAClCgC,EAAMhC,EAAoB,IAC1BuJ,EAAUvJ,EAAoB,IAC9BiE,EAAWjE,EAAoB,GAC/B0F,EAAW1F,EAAoB,GAC/BwJ,EAAcxJ,EAAoB,IAClCgI,EAAShI,EAAoB,IAC7B6F,EAAiB7F,EAAoB,IACrCyJ,EAAOzJ,EAAoB,IAAImF,EAC/BuE,EAAY1J,EAAoB,IAChC0E,EAAM1E,EAAoB,IAC1B2J,EAAM3J,EAAoB,GAC1B4J,EAAoB5J,EAAoB,IACxC6J,EAAsB7J,EAAoB,IAC1C8J,EAAqB9J,EAAoB,IACzC+J,EAAiB/J,EAAoB,IACrCgK,EAAYhK,EAAoB,IAChCiK,EAAcjK,EAAoB,IAClCkK,EAAalK,EAAoB,IACjCmK,EAAYnK,EAAoB,IAChCoK,EAAkBpK,EAAoB,KACtCqK,EAAMrK,EAAoB,GAC1BsK,EAAQtK,EAAoB,IAC5BkF,EAAKmF,EAAIlF,EACT+B,EAAOoD,EAAMnF,EACboF,EAAa3I,EAAO2I,WACpBpG,EAAYvC,EAAOuC,UACnBqG,EAAa5I,EAAO4I,WACpBC,EAAe,cACfC,EAAgB,SAAWD,EAC3BE,EAAoB,oBACpB1I,EAAY,YACZ2I,EAAaC,MAAM5I,GACnB6I,EAAe7B,EAAQ8B,YACvBC,EAAY/B,EAAQgC,SACpBC,EAAetB,EAAkB,GACjCuB,GAAcvB,EAAkB,GAChCwB,GAAYxB,EAAkB,GAC9ByB,GAAazB,EAAkB,GAC/B0B,GAAY1B,EAAkB,GAC9B2B,GAAiB3B,EAAkB,GACnC4B,GAAgB3B,GAAoB,GACpC4B,GAAe5B,GAAoB,GACnC6B,GAAc3B,EAAe4B,OAC7BC,GAAY7B,EAAe8B,KAC3BC,GAAe/B,EAAegC,QAC9BC,GAAmBpB,EAAWqB,YAC9BC,GAActB,EAAWuB,OACzBC,GAAmBxB,EAAWyB,YAC9BC,GAAY1B,EAAW2B,KACvBC,GAAY5B,EAAW6B,KACvBC,GAAa9B,EAAWnC,MACxBkE,GAAgB/B,EAAWpC,SAC3BoE,GAAsBhC,EAAWiC,eACjCC,GAAWnD,EAAI,YACfoD,GAAMpD,EAAI,eACVqD,GAAoBtI,EAAI,qBACxBuI,GAAkBvI,EAAI,mBACtBwI,GAAmBlE,EAAOmE,OAC1BC,GAAcpE,EAAOqE,MACrBC,GAAOtE,EAAOsE,KACdC,GAAe,gBAEfC,GAAO5D,EAAkB,EAAG,SAAUxE,EAAGzB,GAC3C,OAAO8J,GAAS3D,EAAmB1E,EAAGA,EAAE6H,KAAmBtJ,KAGzD+J,GAAgB3H,EAAM,WAExB,OAA0D,IAAnD,IAAIyE,EAAW,IAAImD,YAAY,CAAC,IAAIC,QAAQ,KAGjDC,KAAerD,KAAgBA,EAAWvI,GAAW6L,KAAO/H,EAAM,WACpE,IAAIyE,EAAW,GAAGsD,IAAI,MAGpBC,GAAW,SAAU7J,EAAI8J,GAC3B,IAAIC,EAASpJ,EAAUX,GACvB,GAAI+J,EAAS,GAAKA,EAASD,EAAO,MAAMzD,EAAW,iBACnD,OAAO0D,GAGLC,GAAW,SAAUhK,GACvB,GAAID,EAASC,IAAOkJ,MAAelJ,EAAI,OAAOA,EAC9C,MAAMC,EAAUD,EAAK,2BAGnBuJ,GAAW,SAAUnK,EAAGK,GAC1B,KAAMM,EAASX,IAAM0J,MAAqB1J,GACxC,MAAMa,EAAU,wCAChB,OAAO,IAAIb,EAAEK,IAGbwK,GAAkB,SAAU/I,EAAGgJ,GACjC,OAAOC,GAASvE,EAAmB1E,EAAGA,EAAE6H,KAAmBmB,IAGzDC,GAAW,SAAU/K,EAAG8K,GAI1B,IAHA,IAAI/F,EAAQ,EACR1E,EAASyK,EAAKzK,OACd2E,EAASmF,GAASnK,EAAGK,GACT0E,EAAT1E,GAAgB2E,EAAOD,GAAS+F,EAAK/F,KAC5C,OAAOC,GAGLgG,GAAY,SAAUpK,EAAI7B,EAAKkM,GACjCrJ,EAAGhB,EAAI7B,EAAK,CAAEpB,IAAK,WAAc,OAAOwC,KAAK+K,GAAGD,OAG9CE,GAAQ,SAASC,KAAKtM,GACxB,IAKIhC,EAAGuD,EAAQgI,EAAQrD,EAAQqG,EAAMC,EALjCxJ,EAAIM,EAAStD,GACbyM,EAAOnL,UAAUC,OACjBmL,EAAe,EAAPD,EAAWnL,UAAU,GAAK7D,GAClCkP,EAAUD,IAAUjP,GACpBmP,EAAStF,EAAUtE,GAEvB,GAAI4J,GAAUnP,KAAc2J,EAAYwF,GAAS,CAC/C,IAAKJ,EAAWI,EAAO1O,KAAK8E,GAAIuG,EAAS,GAAIvL,EAAI,IAAKuO,EAAOC,EAASK,QAAQC,KAAM9O,IAClFuL,EAAOpD,KAAKoG,EAAKrJ,OACjBF,EAAIuG,EAGR,IADIoD,GAAkB,EAAPF,IAAUC,EAAQhN,EAAIgN,EAAOpL,UAAU,GAAI,IACrDtD,EAAI,EAAGuD,EAAS2D,EAASlC,EAAEzB,QAAS2E,EAASmF,GAAShK,KAAME,GAAkBvD,EAATuD,EAAYvD,IACpFkI,EAAOlI,GAAK2O,EAAUD,EAAM1J,EAAEhF,GAAIA,GAAKgF,EAAEhF,GAE3C,OAAOkI,GAGL6G,GAAM,SAASC,KAIjB,IAHA,IAAI/G,EAAQ,EACR1E,EAASD,UAAUC,OACnB2E,EAASmF,GAAShK,KAAME,GACZ0E,EAAT1E,GAAgB2E,EAAOD,GAAS3E,UAAU2E,KACjD,OAAOC,GAIL+G,KAAkB7E,GAAczE,EAAM,WAAc6G,GAAoBtM,KAAK,IAAIkK,EAAW,MAE5F8E,GAAkB,SAASzC,iBAC7B,OAAOD,GAAoBhJ,MAAMyL,GAAgB3C,GAAWpM,KAAK4N,GAASzK,OAASyK,GAASzK,MAAOC,YAGjG6L,GAAQ,CACVC,WAAY,SAASA,WAAWnM,EAAQoM,GACtC,OAAOrF,EAAgB9J,KAAK4N,GAASzK,MAAOJ,EAAQoM,EAA0B,EAAnB/L,UAAUC,OAAaD,UAAU,GAAK7D,KAEnG6P,MAAO,SAASA,MAAMxH,GACpB,OAAOmD,GAAW6C,GAASzK,MAAOyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,KAEtF8P,KAAM,SAASA,KAAKrK,GAClB,OAAO6E,EAAUvG,MAAMsK,GAASzK,MAAOC,YAEzCkM,OAAQ,SAASA,OAAO1H,GACtB,OAAOiG,GAAgB1K,KAAM0H,GAAY+C,GAASzK,MAAOyE,EACpC,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,MAE1CgQ,KAAM,SAASA,KAAKC,GAClB,OAAOxE,GAAU4C,GAASzK,MAAOqM,EAA8B,EAAnBpM,UAAUC,OAAaD,UAAU,GAAK7D,KAEpFkQ,UAAW,SAASA,UAAUD,GAC5B,OAAOvE,GAAe2C,GAASzK,MAAOqM,EAA8B,EAAnBpM,UAAUC,OAAaD,UAAU,GAAK7D,KAEzFmQ,QAAS,SAASA,QAAQ9H,GACxBgD,EAAagD,GAASzK,MAAOyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,KAEjFoQ,QAAS,SAASA,QAAQC,GACxB,OAAOzE,GAAayC,GAASzK,MAAOyM,EAAkC,EAAnBxM,UAAUC,OAAaD,UAAU,GAAK7D,KAE3FsQ,SAAU,SAASA,SAASD,GAC1B,OAAO1E,GAAc0C,GAASzK,MAAOyM,EAAkC,EAAnBxM,UAAUC,OAAaD,UAAU,GAAK7D,KAE5F0M,KAAM,SAASA,KAAK6D,GAClB,OAAO9D,GAAU1I,MAAMsK,GAASzK,MAAOC,YAEzCuI,YAAa,SAASA,YAAYiE,GAChC,OAAOlE,GAAiBpI,MAAMsK,GAASzK,MAAOC,YAEhD2M,IAAK,SAASA,IAAIvB,GAChB,OAAOtB,GAAKU,GAASzK,MAAOqL,EAA0B,EAAnBpL,UAAUC,OAAaD,UAAU,GAAK7D,KAE3EsM,OAAQ,SAASA,OAAOjE,GACtB,OAAOgE,GAAYtI,MAAMsK,GAASzK,MAAOC,YAE3C2I,YAAa,SAASA,YAAYnE,GAChC,OAAOkE,GAAiBxI,MAAMsK,GAASzK,MAAOC,YAEhD4M,QAAS,SAASA,UAMhB,IALA,IAIIhL,EAJAwB,EAAOrD,KACPE,EAASuK,GAASpH,GAAMnD,OACxB4M,EAASlM,KAAKsE,MAAMhF,EAAS,GAC7B0E,EAAQ,EAELA,EAAQkI,GACbjL,EAAQwB,EAAKuB,GACbvB,EAAKuB,KAAWvB,IAAOnD,GACvBmD,EAAKnD,GAAU2B,EACf,OAAOwB,GAEX0J,KAAM,SAASA,KAAKtI,GAClB,OAAOkD,GAAU8C,GAASzK,MAAOyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,KAErF4M,KAAM,SAASA,KAAKgE,GAClB,OAAOjE,GAAUlM,KAAK4N,GAASzK,MAAOgN,IAExCC,SAAU,SAASA,SAASC,EAAOC,GACjC,IAAIxL,EAAI8I,GAASzK,MACbE,EAASyB,EAAEzB,OACXkN,EAASvH,EAAgBqH,EAAOhN,GACpC,OAAO,IAAKmG,EAAmB1E,EAAGA,EAAE6H,KAA7B,CACL7H,EAAEwI,OACFxI,EAAE0L,WAAaD,EAASzL,EAAEuF,kBAC1BrD,GAAUsJ,IAAQ/Q,GAAY8D,EAAS2F,EAAgBsH,EAAKjN,IAAWkN,MAKzEE,GAAS,SAAStI,MAAMgH,EAAOmB,GACjC,OAAOzC,GAAgB1K,KAAMiJ,GAAWpM,KAAK4N,GAASzK,MAAOgM,EAAOmB,KAGlEI,GAAO,SAASlD,IAAImD,GACtB/C,GAASzK,MACT,IAAIwK,EAASF,GAASrK,UAAU,GAAI,GAChCC,EAASF,KAAKE,OACduN,EAAMxL,EAASuL,GACfE,EAAM7J,EAAS4J,EAAIvN,QACnB0E,EAAQ,EACZ,GAAmB1E,EAAfwN,EAAMlD,EAAiB,MAAM1D,EAAWgD,IAC5C,KAAOlF,EAAQ8I,GAAK1N,KAAKwK,EAAS5F,GAAS6I,EAAI7I,MAG7C+I,GAAa,CACfrF,QAAS,SAASA,UAChB,OAAOD,GAAaxL,KAAK4N,GAASzK,QAEpCoI,KAAM,SAASA,OACb,OAAOD,GAAUtL,KAAK4N,GAASzK,QAEjCkI,OAAQ,SAASA,SACf,OAAOD,GAAYpL,KAAK4N,GAASzK,SAIjC4N,GAAY,SAAUhO,EAAQhB,GAChC,OAAO4B,EAASZ,IACXA,EAAO+J,KACO,iBAAP/K,GACPA,KAAOgB,GACPgD,QAAQhE,IAAQgE,OAAOhE,IAE1BiP,GAAW,SAASnK,yBAAyB9D,EAAQhB,GACvD,OAAOgP,GAAUhO,EAAQhB,EAAM4C,EAAY5C,GAAK,IAC5C8G,EAAa,EAAG9F,EAAOhB,IACvB6E,EAAK7D,EAAQhB,IAEfkP,GAAW,SAASzQ,eAAeuC,EAAQhB,EAAKmP,GAClD,QAAIH,GAAUhO,EAAQhB,EAAM4C,EAAY5C,GAAK,KACxC4B,EAASuN,IACTxP,EAAIwP,EAAM,WACTxP,EAAIwP,EAAM,QACVxP,EAAIwP,EAAM,QAEVA,EAAKzQ,cACJiB,EAAIwP,EAAM,cAAeA,EAAKC,UAC9BzP,EAAIwP,EAAM,gBAAiBA,EAAKxQ,WAI9BkE,EAAG7B,EAAQhB,EAAKmP,IAFvBnO,EAAOhB,GAAOmP,EAAKlM,MACZjC,IAIN6J,KACH5C,EAAMnF,EAAImM,GACVjH,EAAIlF,EAAIoM,IAGVrP,EAAQA,EAAQW,EAAIX,EAAQO,GAAKyK,GAAkB,SAAU,CAC3D/F,yBAA0BmK,GAC1BxQ,eAAgByQ,KAGdxL,EAAM,WAAc4G,GAAcrM,KAAK,QACzCqM,GAAgBC,GAAsB,SAASpE,WAC7C,OAAO8D,GAAUhM,KAAKmD,QAI1B,IAAIiO,GAAwBtI,EAAY,GAAImG,IAC5CnG,EAAYsI,GAAuBN,IACnCrP,EAAK2P,GAAuB5E,GAAUsE,GAAWzF,QACjDvC,EAAYsI,GAAuB,CACjCjJ,MAAOsI,GACPjD,IAAKkD,GACLlL,YAAa,aACb0C,SAAUmE,GACVE,eAAgByC,KAElBhB,GAAUoD,GAAuB,SAAU,KAC3CpD,GAAUoD,GAAuB,aAAc,KAC/CpD,GAAUoD,GAAuB,aAAc,KAC/CpD,GAAUoD,GAAuB,SAAU,KAC3CxM,EAAGwM,GAAuB3E,GAAK,CAC7B9L,IAAK,WAAc,OAAOwC,KAAK2J,OAIjCjN,EAAOD,QAAU,SAAU2I,EAAKmF,EAAO2D,EAASC,GAE9C,IAAIpL,EAAOqC,IADX+I,IAAYA,GACgB,UAAY,IAAM,QAC1CC,EAAS,MAAQhJ,EACjBiJ,EAAS,MAAQjJ,EACjBkJ,EAAanQ,EAAO4E,GACpBwL,EAAOD,GAAc,GACrBE,EAAMF,GAAclM,EAAekM,GAEnC3M,EAAI,GACJ8M,EAAsBH,GAAcA,EAAW9P,GAU/CkQ,EAAa,SAAUrL,EAAMuB,GAC/BnD,EAAG4B,EAAMuB,EAAO,CACdpH,IAAK,WACH,OAXAmR,EAWc3O,KAXF+K,IACJ6D,EAAER,GAUUxJ,EAVM2F,EAAQoE,EAAKxR,EAAG8M,IAFnC,IACP0E,GAaFtE,IAAK,SAAUxI,GACb,OAXuB+C,EAWHA,EAXU/C,EAWHA,EAV3B8M,EAUc3O,KAVF+K,GACZoD,IAAStM,GAASA,EAAQjB,KAAKiO,MAAMhN,IAAU,EAAI,EAAY,IAARA,EAAe,IAAe,IAARA,QACjF8M,EAAKC,EAAEP,GAAQzJ,EAAQ2F,EAAQoE,EAAKxR,EAAG0E,EAAOoI,IAHnC,IAAgBrF,EAAO/C,EAC9B8M,GAYFpR,YAAY,MApBF+Q,IAAe/I,EAAOuJ,KAwBlCR,EAAaJ,EAAQ,SAAU7K,EAAMsL,EAAMI,EAASC,GAClDvJ,EAAWpC,EAAMiL,EAAYvL,EAAM,MACnC,IAEIoH,EAAQ8E,EAAY/O,EAAQgP,EAF5BtK,EAAQ,EACR4F,EAAS,EAEb,GAAKhK,EAASmO,GAIP,CAAA,KAAIA,aAAgBtH,IAAiB6H,EAAQpJ,EAAQ6I,KAAU3H,GAAgBkI,GAASjI,GAaxF,OAAI0C,MAAegF,EACjB/D,GAAS0D,EAAYK,GAErB3D,GAAMnO,KAAKyR,EAAYK,GAf9BxE,EAASwE,EACTnE,EAASF,GAASyE,EAASxE,GAC3B,IAAI4E,EAAOR,EAAKM,WAChB,GAAID,IAAY5S,GAAW,CACzB,GAAI+S,EAAO5E,EAAO,MAAMzD,EAAWgD,IAEnC,IADAmF,EAAaE,EAAO3E,GACH,EAAG,MAAM1D,EAAWgD,SAGrC,GAA0BqF,GAD1BF,EAAapL,EAASmL,GAAWzE,GAChBC,EAAe,MAAM1D,EAAWgD,IAEnD5J,EAAS+O,EAAa1E,OAftBrK,EAAS0F,EAAQ+I,GAEjBxE,EAAS,IAAI9C,EADb4H,EAAa/O,EAASqK,GA2BxB,IAPAjM,EAAK+E,EAAM,KAAM,CACftD,EAAGoK,EACHhN,EAAGqN,EACH5N,EAAGqS,EACHlO,EAAGb,EACH0O,EAAG,IAAIrH,EAAU4C,KAEZvF,EAAQ1E,GAAQwO,EAAWrL,EAAMuB,OAE1C6J,EAAsBH,EAAW9P,GAAa+F,EAAO0J,IACrD3P,EAAKmQ,EAAqB,cAAeH,IAC/BhM,EAAM,WAChBgM,EAAW,MACNhM,EAAM,WACX,IAAIgM,GAAY,MACX9H,EAAY,SAAU4I,GAC3B,IAAId,EACJ,IAAIA,EAAW,MACf,IAAIA,EAAW,KACf,IAAIA,EAAWc,KACd,KACDd,EAAaJ,EAAQ,SAAU7K,EAAMsL,EAAMI,EAASC,GAElD,IAAIE,EAGJ,OAJAzJ,EAAWpC,EAAMiL,EAAYvL,GAIxBvC,EAASmO,GACVA,aAAgBtH,IAAiB6H,EAAQpJ,EAAQ6I,KAAU3H,GAAgBkI,GAASjI,EAC/E+H,IAAY5S,GACf,IAAImS,EAAKI,EAAMrE,GAASyE,EAASxE,GAAQyE,GACzCD,IAAY3S,GACV,IAAImS,EAAKI,EAAMrE,GAASyE,EAASxE,IACjC,IAAIgE,EAAKI,GAEbhF,MAAegF,EAAa/D,GAAS0D,EAAYK,GAC9C3D,GAAMnO,KAAKyR,EAAYK,GATF,IAAIJ,EAAK3I,EAAQ+I,MAW/ClH,EAAa+G,IAAQpO,SAASrC,UAAYiI,EAAKuI,GAAMc,OAAOrJ,EAAKwI,IAAQxI,EAAKuI,GAAO,SAAU3P,GACvFA,KAAO0P,GAAahQ,EAAKgQ,EAAY1P,EAAK2P,EAAK3P,MAEvD0P,EAAW9P,GAAaiQ,EACnBnJ,IAASmJ,EAAoBpM,YAAciM,IAElD,IAAIgB,EAAkBb,EAAoBpF,IACtCkG,IAAsBD,IACI,UAAxBA,EAAgBrS,MAAoBqS,EAAgBrS,MAAQb,IAC9DoT,EAAY7B,GAAWzF,OAC3B5J,EAAKgQ,EAAY/E,IAAmB,GACpCjL,EAAKmQ,EAAqB9E,GAAa5G,GACvCzE,EAAKmQ,EAAqB5E,IAAM,GAChCvL,EAAKmQ,EAAqBjF,GAAiB8E,IAEvCH,EAAU,IAAIG,EAAW,GAAGhF,KAAQvG,EAASuG,MAAOmF,IACtDhN,EAAGgN,EAAqBnF,GAAK,CAC3B9L,IAAK,WAAc,OAAOuF,KAM9BtE,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,IAFxC2C,EAAEoB,GAAQuL,IAEiDC,GAAO5M,GAElElD,EAAQA,EAAQW,EAAG2D,EAAM,CACvBmE,kBAAmBqD,IAGrB9L,EAAQA,EAAQW,EAAIX,EAAQO,EAAIsD,EAAM,WAAciM,EAAK5C,GAAG9O,KAAKyR,EAAY,KAAQvL,EAAM,CACzFkI,KAAMD,GACNW,GAAID,KAGAxE,KAAqBuH,GAAsBnQ,EAAKmQ,EAAqBvH,EAAmBqD,GAE9F9L,EAAQA,EAAQa,EAAGyD,EAAM+I,IAEzBrF,EAAW1D,GAEXtE,EAAQA,EAAQa,EAAIb,EAAQO,EAAIoL,GAAYrH,EAAM,CAAEsH,IAAKkD,KAEzD9O,EAAQA,EAAQa,EAAIb,EAAQO,GAAKuQ,EAAmBxM,EAAM4K,IAErDrI,GAAWmJ,EAAoB1J,UAAYmE,KAAeuF,EAAoB1J,SAAWmE,IAE9FzK,EAAQA,EAAQa,EAAIb,EAAQO,EAAIsD,EAAM,WACpC,IAAIgM,EAAW,GAAGtJ,UAChBjC,EAAM,CAAEiC,MAAOsI,KAEnB7O,EAAQA,EAAQa,EAAIb,EAAQO,GAAKsD,EAAM,WACrC,MAAO,CAAC,EAAG,GAAG8G,kBAAoB,IAAIkF,EAAW,CAAC,EAAG,IAAIlF,qBACpD9G,EAAM,WACXmM,EAAoBrF,eAAevM,KAAK,CAAC,EAAG,OACzCkG,EAAM,CAAEqG,eAAgByC,KAE7BtF,EAAUxD,GAAQwM,EAAoBD,EAAkBE,EACnDlK,GAAYiK,GAAmBjR,EAAKmQ,EAAqBpF,GAAUmG,SAErE9S,EAAOD,QAAU,cAKlB,SAAUC,EAAQD,EAASF,GAEjC,IAAIkT,EAAMlT,EAAoB,KAC1BkC,EAAUlC,EAAoB,GAC9BmT,EAASnT,EAAoB,GAApBA,CAAwB,YACjCyE,EAAQ0O,EAAO1O,QAAU0O,EAAO1O,MAAQ,IAAKzE,EAAoB,OAEjEoT,EAAyB,SAAU/P,EAAQgQ,EAAWrL,GACxD,IAAIsL,EAAiB7O,EAAMxD,IAAIoC,GAC/B,IAAKiQ,EAAgB,CACnB,IAAKtL,EAAQ,OAAOnI,GACpB4E,EAAMqJ,IAAIzK,EAAQiQ,EAAiB,IAAIJ,GAEzC,IAAIK,EAAcD,EAAerS,IAAIoS,GACrC,IAAKE,EAAa,CAChB,IAAKvL,EAAQ,OAAOnI,GACpByT,EAAexF,IAAIuF,EAAWE,EAAc,IAAIL,GAChD,OAAOK,GA0BXpT,EAAOD,QAAU,CACfuE,MAAOA,EACP4L,IAAK+C,EACLpR,IA3B2B,SAAUwR,EAAapO,EAAGrC,GACrD,IAAI0Q,EAAcL,EAAuBhO,EAAGrC,GAAG,GAC/C,OAAO0Q,IAAgB5T,IAAoB4T,EAAYzR,IAAIwR,IA0B3DvS,IAxB2B,SAAUuS,EAAapO,EAAGrC,GACrD,IAAI0Q,EAAcL,EAAuBhO,EAAGrC,GAAG,GAC/C,OAAO0Q,IAAgB5T,GAAYA,GAAY4T,EAAYxS,IAAIuS,IAuB/D1F,IArB8B,SAAU0F,EAAaE,EAAetO,EAAGrC,GACvEqQ,EAAuBhO,EAAGrC,GAAG,GAAM+K,IAAI0F,EAAaE,IAqBpD7H,KAnB4B,SAAUxI,EAAQgQ,GAC9C,IAAII,EAAcL,EAAuB/P,EAAQgQ,GAAW,GACxDxH,EAAO,GAEX,OADI4H,GAAaA,EAAYzD,QAAQ,SAAU2D,EAAGtR,GAAOwJ,EAAKtD,KAAKlG,KAC5DwJ,GAgBPxJ,IAdc,SAAU6B,GACxB,OAAOA,IAAOrE,IAA0B,iBAANqE,EAAiBA,EAAKmC,OAAOnC,IAc/D4E,IAZQ,SAAU1D,GAClBlD,EAAQA,EAAQW,EAAG,UAAWuC,MAiB1B,SAAUjF,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAGnCG,EAAOD,QAAU,SAAUgE,EAAIrB,GAC7B,IAAKoB,EAASC,GAAK,OAAOA,EAC1B,IAAI2C,EAAIsB,EACR,GAAItF,GAAkC,mBAArBgE,EAAK3C,EAAGsE,YAA4BvE,EAASkE,EAAMtB,EAAGvG,KAAK4D,IAAM,OAAOiE,EACzF,GAAgC,mBAApBtB,EAAK3C,EAAG0P,WAA2B3P,EAASkE,EAAMtB,EAAGvG,KAAK4D,IAAM,OAAOiE,EACnF,IAAKtF,GAAkC,mBAArBgE,EAAK3C,EAAGsE,YAA4BvE,EAASkE,EAAMtB,EAAGvG,KAAK4D,IAAM,OAAOiE,EAC1F,MAAMhE,UAAU,6CAMZ,SAAUhE,EAAQD,GAExBC,EAAOD,QAAU,SAAU2T,EAAQvO,GACjC,MAAO,CACLtE,aAAuB,EAAT6S,GACd9S,eAAyB,EAAT8S,GAChBpC,WAAqB,EAAToC,GACZvO,MAAOA,KAOL,SAAUnF,EAAQD,EAASF,GAEjC,IAAI8T,EAAO9T,EAAoB,GAApBA,CAAwB,QAC/BiE,EAAWjE,EAAoB,GAC/BgC,EAAMhC,EAAoB,IAC1B+T,EAAU/T,EAAoB,GAAGmF,EACjC6O,EAAK,EACLC,EAAepT,OAAOoT,cAAgB,WACxC,OAAO,GAELC,GAAUlU,EAAoB,EAApBA,CAAuB,WACnC,OAAOiU,EAAapT,OAAOsT,kBAAkB,OAE3CC,EAAU,SAAUlQ,GACtB6P,EAAQ7P,EAAI4P,EAAM,CAAExO,MAAO,CACzBlF,EAAG,OAAQ4T,EACXK,EAAG,OAgCHC,EAAOnU,EAAOD,QAAU,CAC1B2I,IAAKiL,EACLS,MAAM,EACNC,QAhCY,SAAUtQ,EAAI8D,GAE1B,IAAK/D,EAASC,GAAK,MAAoB,iBAANA,EAAiBA,GAAmB,iBAANA,EAAiB,IAAM,KAAOA,EAC7F,IAAKlC,EAAIkC,EAAI4P,GAAO,CAElB,IAAKG,EAAa/P,GAAK,MAAO,IAE9B,IAAK8D,EAAQ,MAAO,IAEpBoM,EAAQlQ,GAER,OAAOA,EAAG4P,GAAM1T,GAsBlBqU,QApBY,SAAUvQ,EAAI8D,GAC1B,IAAKhG,EAAIkC,EAAI4P,GAAO,CAElB,IAAKG,EAAa/P,GAAK,OAAO,EAE9B,IAAK8D,EAAQ,OAAO,EAEpBoM,EAAQlQ,GAER,OAAOA,EAAG4P,GAAMO,GAYlBK,SATa,SAAUxQ,GAEvB,OADIgQ,GAAUI,EAAKC,MAAQN,EAAa/P,KAAQlC,EAAIkC,EAAI4P,IAAOM,EAAQlQ,GAChEA,KAaH,SAAU/D,EAAQD,GAExBC,EAAOD,SAAU,GAKX,SAAUC,EAAQD,EAASF,GAGjC,IAAI2U,EAAQ3U,EAAoB,IAC5B4U,EAAc5U,EAAoB,IAEtCG,EAAOD,QAAUW,OAAOgL,MAAQ,SAASA,KAAKzG,GAC5C,OAAOuP,EAAMvP,EAAGwP,KAMZ,SAAUzU,EAAQD,EAASF,GAGjC,IAAI+E,EAAW/E,EAAoB,GAC/B6U,EAAM7U,EAAoB,IAC1B4U,EAAc5U,EAAoB,IAClC2F,EAAW3F,EAAoB,GAApBA,CAAwB,YACnC8U,EAAQ,aACR7S,EAAY,YAGZ8S,EAAa,WAEf,IAIIC,EAJAC,EAASjV,EAAoB,GAApBA,CAAwB,UACjCI,EAAIwU,EAAYjR,OAcpB,IAVAsR,EAAOC,MAAMC,QAAU,OACvBnV,EAAoB,IAAIoV,YAAYH,GACpCA,EAAO/D,IAAM,eAGb8D,EAAiBC,EAAOI,cAAcC,UACvBC,OACfP,EAAeQ,MAAMC,uCACrBT,EAAeU,QACfX,EAAaC,EAAevS,EACrBrC,YAAY2U,EAAW9S,GAAW2S,EAAYxU,IACrD,OAAO2U,KAGT5U,EAAOD,QAAUW,OAAOmH,QAAU,SAASA,OAAO5C,EAAGuQ,GACnD,IAAIrN,EAQJ,OAPU,OAANlD,GACF0P,EAAM7S,GAAa8C,EAASK,GAC5BkD,EAAS,IAAIwM,EACbA,EAAM7S,GAAa,KAEnBqG,EAAO3C,GAAYP,GACdkD,EAASyM,IACTY,IAAe9V,GAAYyI,EAASuM,EAAIvM,EAAQqN,KAMnD,SAAUxV,EAAQD,GAExBC,EAAOD,QAAU,cAKX,SAAUC,EAAQD,EAASF,GAEjC,IAAI8B,EAAM9B,EAAoB,IAC1BM,EAAON,EAAoB,KAC3BwJ,EAAcxJ,EAAoB,IAClC+E,EAAW/E,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/B0J,EAAY1J,EAAoB,IAChC4V,EAAQ,GACRC,EAAS,IACT3V,EAAUC,EAAOD,QAAU,SAAU4V,EAAU/J,EAASlF,EAAIC,EAAMgG,GACpE,IAGInJ,EAAQgL,EAAMC,EAAUtG,EAHxB0G,EAASlC,EAAW,WAAc,OAAOgJ,GAAcpM,EAAUoM,GACjE3Q,EAAIrD,EAAI+E,EAAIC,EAAMiF,EAAU,EAAI,GAChC1D,EAAQ,EAEZ,GAAqB,mBAAV2G,EAAsB,MAAM7K,UAAU2R,EAAW,qBAE5D,GAAItM,EAAYwF,IAAS,IAAKrL,EAAS2D,EAASwO,EAASnS,QAAkB0E,EAAT1E,EAAgB0E,IAEhF,IADAC,EAASyD,EAAU5G,EAAEJ,EAAS4J,EAAOmH,EAASzN,IAAQ,GAAIsG,EAAK,IAAMxJ,EAAE2Q,EAASzN,OACjEuN,GAAStN,IAAWuN,EAAQ,OAAOvN,OAC7C,IAAKsG,EAAWI,EAAO1O,KAAKwV,KAAanH,EAAOC,EAASK,QAAQC,MAEtE,IADA5G,EAAShI,EAAKsO,EAAUzJ,EAAGwJ,EAAKrJ,MAAOyG,MACxB6J,GAAStN,IAAWuN,EAAQ,OAAOvN,IAG9CsN,MAAQA,EAChB1V,EAAQ2V,OAASA,GAKX,SAAU1V,EAAQD,EAASF,GAEjC,IAAI6E,EAAY7E,EAAoB,IAChC+V,EAAM1R,KAAK0R,IACXjR,EAAMT,KAAKS,IACf3E,EAAOD,QAAU,SAAUmI,EAAO1E,GAEhC,OADA0E,EAAQxD,EAAUwD,IACH,EAAI0N,EAAI1N,EAAQ1E,EAAQ,GAAKmB,EAAIuD,EAAO1E,KAMnD,SAAUxD,EAAQD,GAExBC,EAAOD,QAAU,IAKX,SAAUC,EAAQD,EAASF,GAGjC,IAAIgW,EAAMhW,EAAoB,IAC1B+M,EAAM/M,EAAoB,EAApBA,CAAuB,eAE7BiW,EAAkD,aAA5CD,EAAI,WAAc,OAAOtS,UAArB,IASdvD,EAAOD,QAAU,SAAUgE,GACzB,IAAIkB,EAAG8Q,EAAGjT,EACV,OAAOiB,IAAOrE,GAAY,YAAqB,OAAPqE,EAAc,OAEN,iBAApCgS,EAVD,SAAUhS,EAAI7B,GACzB,IACE,OAAO6B,EAAG7B,GACV,MAAOmC,KAOO2R,CAAO/Q,EAAIvE,OAAOqD,GAAK6I,IAAoBmJ,EAEvDD,EAAMD,EAAI5Q,GAEM,WAAfnC,EAAI+S,EAAI5Q,KAAsC,mBAAZA,EAAEgR,OAAuB,YAAcnT,IAM1E,SAAU9C,EAAQD,GAExBC,EAAOD,QAAU,SAAUgE,EAAImS,EAAa3V,EAAM4V,GAChD,KAAMpS,aAAcmS,IAAiBC,IAAmBzW,IAAayW,KAAkBpS,EACrF,MAAMC,UAAUzD,EAAO,2BACvB,OAAOwD,IAML,SAAU/D,EAAQD,EAASF,GAEjC,IAAI+B,EAAO/B,EAAoB,IAC/BG,EAAOD,QAAU,SAAUmD,EAAQ6N,EAAKqF,GACtC,IAAK,IAAIlU,KAAO6O,EACVqF,GAAQlT,EAAOhB,GAAMgB,EAAOhB,GAAO6O,EAAI7O,GACtCN,EAAKsB,EAAQhB,EAAK6O,EAAI7O,IAC3B,OAAOgB,IAML,SAAUlD,EAAQD,EAASF,GAEjC,IAAIiE,EAAWjE,EAAoB,GACnCG,EAAOD,QAAU,SAAUgE,EAAIsD,GAC7B,IAAKvD,EAASC,IAAOA,EAAGsS,KAAOhP,EAAM,MAAMrD,UAAU,0BAA4BqD,EAAO,cACxF,OAAOtD,IAMH,SAAU/D,EAAQD,GAExB,IAAI8T,EAAK,EACLyC,EAAKpS,KAAKqS,SACdvW,EAAOD,QAAU,SAAUmC,GACzB,MAAO,UAAUyQ,OAAOzQ,IAAQxC,GAAY,GAAKwC,EAAK,QAAS2R,EAAKyC,GAAIjO,SAAS,OAM7E,SAAUrI,EAAQD,EAASF,GAEjC,IAAI2W,EAAM3W,EAAoB,GAAGmF,EAC7BnD,EAAMhC,EAAoB,IAC1B+M,EAAM/M,EAAoB,EAApBA,CAAuB,eAEjCG,EAAOD,QAAU,SAAUgE,EAAIiC,EAAKyQ,GAC9B1S,IAAOlC,EAAIkC,EAAK0S,EAAO1S,EAAKA,EAAG1C,UAAWuL,IAAM4J,EAAIzS,EAAI6I,EAAK,CAAEhM,cAAc,EAAMuE,MAAOa,MAM1F,SAAUhG,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3BkF,EAAKlF,EAAoB,GACzB6W,EAAc7W,EAAoB,GAClC8W,EAAU9W,EAAoB,EAApBA,CAAuB,WAErCG,EAAOD,QAAU,SAAU2I,GACzB,IAAIvF,EAAwB,mBAAbzB,EAAKgH,GAAqBhH,EAAKgH,GAAOjH,EAAOiH,GACxDgO,GAAevT,IAAMA,EAAEwT,IAAU5R,EAAGC,EAAE7B,EAAGwT,EAAS,CACpD/V,cAAc,EACdE,IAAK,WAAc,OAAOwC,UAOxB,SAAUtD,EAAQD,EAASF,GAGjC,IAAIgW,EAAMhW,EAAoB,IAE9BG,EAAOD,QAAUW,OAAO,KAAKkW,qBAAqB,GAAKlW,OAAS,SAAUqD,GACxE,MAAkB,UAAX8R,EAAI9R,GAAkBA,EAAGyC,MAAM,IAAM9F,OAAOqD,KAM/C,SAAU/D,EAAQD,GAExBA,EAAQiF,EAAI,GAAG4R,sBAKT,SAAU5W,EAAQD,EAASF,GAGjC,IAAI2U,EAAQ3U,EAAoB,IAC5BgX,EAAahX,EAAoB,IAAI8S,OAAO,SAAU,aAE1D5S,EAAQiF,EAAItE,OAAOoW,qBAAuB,SAASA,oBAAoB7R,GACrE,OAAOuP,EAAMvP,EAAG4R,KAMZ,SAAU7W,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BuF,EAAUvF,EAAoB,IAC9B+F,EAAQ/F,EAAoB,GAC5BkX,EAASlX,EAAoB,IAC7BmX,EAAQ,IAAMD,EAAS,IAEvBE,EAAQC,OAAO,IAAMF,EAAQA,EAAQ,KACrCG,EAAQD,OAAOF,EAAQA,EAAQ,MAE/BI,EAAW,SAAU1O,EAAKtE,EAAMiT,GAClC,IAAI1O,EAAM,GACN2O,EAAQ1R,EAAM,WAChB,QAASmR,EAAOrO,MAPV,MAAA,KAOwBA,OAE5BhC,EAAKiC,EAAID,GAAO4O,EAAQlT,EAAKmT,GAAQR,EAAOrO,GAC5C2O,IAAO1O,EAAI0O,GAAS3Q,GACxB3E,EAAQA,EAAQa,EAAIb,EAAQO,EAAIgV,EAAO,SAAU3O,IAM/C4O,EAAOH,EAASG,KAAO,SAAUxR,EAAQsB,GAI3C,OAHAtB,EAASG,OAAOd,EAAQW,IACb,EAAPsB,IAAUtB,EAASA,EAAOK,QAAQ6Q,EAAO,KAClC,EAAP5P,IAAUtB,EAASA,EAAOK,QAAQ+Q,EAAO,KACtCpR,GAGT/F,EAAOD,QAAUqX,GAKX,SAAUpX,EAAQD,EAASF,GAEjC,IAAIuJ,EAAUvJ,EAAoB,IAC9B8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClCgK,EAAYhK,EAAoB,IACpCG,EAAOD,QAAUF,EAAoB,IAAI2X,kBAAoB,SAAUzT,GACrE,GAAIA,GAAMrE,GAAW,OAAOqE,EAAG4I,IAC1B5I,EAAG,eACH8F,EAAUT,EAAQrF,MAMnB,SAAU/D,EAAQD,EAASF,GAEjC,IAAI6B,EAAO7B,EAAoB,IAC3B4B,EAAS5B,EAAoB,GAC7B4X,EAAS,qBACTnT,EAAQ7C,EAAOgW,KAAYhW,EAAOgW,GAAU,KAE/CzX,EAAOD,QAAU,SAAUmC,EAAKiD,GAC/B,OAAOb,EAAMpC,KAASoC,EAAMpC,GAAOiD,IAAUzF,GAAYyF,EAAQ,MAChE,WAAY,IAAIiD,KAAK,CACtB9C,QAAS5D,EAAK4D,QACdoS,KAAM7X,EAAoB,IAAM,OAAS,SACzC8X,UAAW,0CAMP,SAAU3X,EAAQD,EAASF,GAIjC,IAAIiH,EAAYjH,EAAoB,IAChCsH,EAAWtH,EAAoB,GAC/BsJ,EAAkBtJ,EAAoB,IAC1CG,EAAOD,QAAU,SAAU6X,GACzB,OAAO,SAAU9P,EAAO+P,EAAIC,GAC1B,IAGI3S,EAHAF,EAAI6B,EAAUgB,GACdtE,EAAS2D,EAASlC,EAAEzB,QACpB0E,EAAQiB,EAAgB2O,EAAWtU,GAIvC,GAAIoU,GAAeC,GAAMA,GAAI,KAAgB3P,EAAT1E,GAGlC,IAFA2B,EAAQF,EAAEiD,OAEG/C,EAAO,OAAO,OAEtB,KAAe+C,EAAT1E,EAAgB0E,IAAS,IAAI0P,GAAe1P,KAASjD,IAC5DA,EAAEiD,KAAW2P,EAAI,OAAOD,GAAe1P,GAAS,EACpD,OAAQ0P,IAAgB,KAOxB,SAAU5X,EAAQD,GAExBA,EAAQiF,EAAItE,OAAOqX,uBAKb,SAAU/X,EAAQD,EAASF,GAGjC,IAAIgW,EAAMhW,EAAoB,IAC9BG,EAAOD,QAAU2K,MAAMsN,SAAW,SAASA,QAAQ9Q,GACjD,MAAmB,SAAZ2O,EAAI3O,KAMP,SAAUlH,EAAQD,EAASF,GAIjC,IAAI+I,EAAU/I,EAAoB,IAC9BkC,EAAUlC,EAAoB,GAC9BoY,EAAWpY,EAAoB,IAC/B+B,EAAO/B,EAAoB,IAC3BgK,EAAYhK,EAAoB,IAChCqY,EAAcrY,EAAoB,IAClCsY,EAAiBtY,EAAoB,IACrC6F,EAAiB7F,EAAoB,IACrC8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClCuY,IAAU,GAAG1M,MAAQ,QAAU,GAAGA,QAGlC2M,EAAS,SAETC,EAAa,WAAc,OAAOhV,MAEtCtD,EAAOD,QAAU,SAAU8R,EAAMxL,EAAM6P,EAAapH,EAAMyJ,EAASC,EAAQC,GACzEP,EAAYhC,EAAa7P,EAAMyI,GAC/B,IAeI4J,EAASxW,EAAKyW,EAfdC,EAAY,SAAUC,GACxB,IAAKT,GAASS,KAAQzJ,EAAO,OAAOA,EAAMyJ,GAC1C,OAAQA,GACN,IAVK,OAUM,OAAO,SAASnN,OAAS,OAAO,IAAIwK,EAAY5S,KAAMuV,IACjE,KAAKR,EAAQ,OAAO,SAAS7M,SAAW,OAAO,IAAI0K,EAAY5S,KAAMuV,IACrE,OAAO,SAASjN,UAAY,OAAO,IAAIsK,EAAY5S,KAAMuV,KAEzDjM,EAAMvG,EAAO,YACbyS,EAAaP,GAAWF,EACxBU,GAAa,EACb3J,EAAQyC,EAAKxQ,UACb2X,EAAU5J,EAAMzC,IAAayC,EAnBjB,eAmBuCmJ,GAAWnJ,EAAMmJ,GACpEU,EAAWD,GAAWJ,EAAUL,GAChCW,EAAWX,EAAWO,EAAwBF,EAAU,WAArBK,EAAkCvZ,GACrEyZ,EAAqB,SAAR9S,GAAkB+I,EAAMxD,SAAqBoN,EAwB9D,GArBIG,IACFR,EAAoBjT,EAAeyT,EAAWhZ,KAAK,IAAI0R,OAC7BnR,OAAOW,WAAasX,EAAkB7J,OAE9DqJ,EAAeQ,EAAmB/L,GAAK,GAElChE,GAAiD,mBAA/B+P,EAAkBhM,IAAyB/K,EAAK+W,EAAmBhM,EAAU2L,IAIpGQ,GAAcE,GAAWA,EAAQzY,OAAS8X,IAC5CU,GAAa,EACbE,EAAW,SAASzN,SAAW,OAAOwN,EAAQ7Y,KAAKmD,QAG/CsF,IAAW6P,IAAYL,IAASW,GAAe3J,EAAMzC,IACzD/K,EAAKwN,EAAOzC,EAAUsM,GAGxBpP,EAAUxD,GAAQ4S,EAClBpP,EAAU+C,GAAO0L,EACbC,EAMF,GALAG,EAAU,CACRlN,OAAQsN,EAAaG,EAAWL,EAAUP,GAC1C3M,KAAM8M,EAASS,EAAWL,EAhDrB,QAiDLhN,QAASsN,GAEPT,EAAQ,IAAKvW,KAAOwW,EAChBxW,KAAOkN,GAAQ6I,EAAS7I,EAAOlN,EAAKwW,EAAQxW,SAC7CH,EAAQA,EAAQa,EAAIb,EAAQO,GAAK8V,GAASW,GAAa1S,EAAMqS,GAEtE,OAAOA,IAMH,SAAU1Y,EAAQD,EAASF,GAIjC,IAAIgI,EAAShI,EAAoB,IAC7BuZ,EAAavZ,EAAoB,IACjCsY,EAAiBtY,EAAoB,IACrC8Y,EAAoB,GAGxB9Y,EAAoB,GAApBA,CAAwB8Y,EAAmB9Y,EAAoB,EAApBA,CAAuB,YAAa,WAAc,OAAOyD,OAEpGtD,EAAOD,QAAU,SAAUmW,EAAa7P,EAAMyI,GAC5CoH,EAAY7U,UAAYwG,EAAO8Q,EAAmB,CAAE7J,KAAMsK,EAAW,EAAGtK,KACxEqJ,EAAejC,EAAa7P,EAAO,eAM/B,SAAUrG,EAAQD,EAASF,GAGjC,IAAI+E,EAAW/E,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChC8W,EAAU9W,EAAoB,EAApBA,CAAuB,WACrCG,EAAOD,QAAU,SAAUkF,EAAGoU,GAC5B,IACI3W,EADAS,EAAIyB,EAASK,GAAGU,YAEpB,OAAOxC,IAAMzD,KAAcgD,EAAIkC,EAASzB,GAAGwT,KAAajX,GAAY2Z,EAAI5S,EAAU/D,KAM9E,SAAU1C,EAAQD,EAASF,GAEjC,IACIyZ,EADSzZ,EAAoB,GACVyZ,UAEvBtZ,EAAOD,QAAUuZ,GAAaA,EAAUC,WAAa,IAK/C,SAAUvZ,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7BkC,EAAUlC,EAAoB,GAC9BsU,EAAOtU,EAAoB,IAC3B+F,EAAQ/F,EAAoB,GAC5B+B,EAAO/B,EAAoB,IAC3BoJ,EAAcpJ,EAAoB,IAClC2Z,EAAQ3Z,EAAoB,IAC5BkJ,EAAalJ,EAAoB,IACjCiE,EAAWjE,EAAoB,GAC/BsY,EAAiBtY,EAAoB,IACrCkF,EAAKlF,EAAoB,GAAGmF,EAC5ByU,EAAO5Z,EAAoB,GAApBA,CAAwB,GAC/B6W,EAAc7W,EAAoB,GAEtCG,EAAOD,QAAU,SAAUsG,EAAMmL,EAASkH,EAASgB,EAAQnS,EAAQoS,GACjE,IAAI9H,EAAOpQ,EAAO4E,GACdlD,EAAI0O,EACJ+H,EAAQrS,EAAS,MAAQ,MACzB6H,EAAQjM,GAAKA,EAAE9B,UACf4D,EAAI,GAqCR,OApCKyR,GAA2B,mBAALvT,IAAqBwW,GAAWvK,EAAMS,UAAYjK,EAAM,YACjF,IAAIzC,GAAIyI,UAAUkD,WAOlB3L,EAAIqO,EAAQ,SAAUtO,EAAQyS,GAC5B5M,EAAW7F,EAAQC,EAAGkD,EAAM,MAC5BnD,EAAO2W,GAAK,IAAIhI,EACZ8D,GAAYjW,IAAW8Z,EAAM7D,EAAUpO,EAAQrE,EAAO0W,GAAQ1W,KAEpEuW,EAAK,kEAAkEjT,MAAM,KAAM,SAAUkC,GAC3F,IAAIoR,EAAkB,OAAPpR,GAAuB,OAAPA,EAC3BA,KAAO0G,KAAWuK,GAAkB,SAAPjR,IAAiB9G,EAAKuB,EAAE9B,UAAWqH,EAAK,SAAUtF,EAAGC,GAEpF,GADA0F,EAAWzF,KAAMH,EAAGuF,IACfoR,GAAYH,IAAY7V,EAASV,GAAI,MAAc,OAAPsF,GAAehJ,GAChE,IAAIyI,EAAS7E,KAAKuW,GAAGnR,GAAW,IAANtF,EAAU,EAAIA,EAAGC,GAC3C,OAAOyW,EAAWxW,KAAO6E,MAG7BwR,GAAW5U,EAAG5B,EAAE9B,UAAW,OAAQ,CACjCP,IAAK,WACH,OAAOwC,KAAKuW,GAAGE,UApBnB5W,EAAIuW,EAAOM,eAAexI,EAASnL,EAAMkB,EAAQqS,GACjD3Q,EAAY9F,EAAE9B,UAAWqX,GACzBvE,EAAKC,MAAO,GAuBd+D,EAAehV,EAAGkD,GAElBpB,EAAEoB,GAAQlD,EACVpB,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,EAAG2C,GAEtC0U,GAASD,EAAOO,UAAU9W,EAAGkD,EAAMkB,GAEjCpE,IAMH,SAAUnD,EAAQD,EAASF,GAiBjC,IAfA,IASIqa,EATAzY,EAAS5B,EAAoB,GAC7B+B,EAAO/B,EAAoB,IAC3B0E,EAAM1E,EAAoB,IAC1BqN,EAAQ3I,EAAI,eACZ4I,EAAO5I,EAAI,QACX6N,KAAS3Q,EAAOmJ,cAAenJ,EAAOqJ,UACtCkC,EAASoF,EACTnS,EAAI,EAIJka,EAAyB,iHAE3B3T,MAAM,KAEDvG,EAPC,IAQFia,EAAQzY,EAAO0Y,EAAuBla,QACxC2B,EAAKsY,EAAM7Y,UAAW6L,GAAO,GAC7BtL,EAAKsY,EAAM7Y,UAAW8L,GAAM,IACvBH,GAAS,EAGlBhN,EAAOD,QAAU,CACfqS,IAAKA,EACLpF,OAAQA,EACRE,MAAOA,EACPC,KAAMA,IAMF,SAAUnN,EAAQD,EAASF,GAKjCG,EAAOD,QAAUF,EAAoB,MAAQA,EAAoB,EAApBA,CAAuB,WAClE,IAAIua,EAAIlW,KAAKqS,SAGb8D,iBAAiBla,KAAK,KAAMia,EAAG,qBACxBva,EAAoB,GAAGua,MAM1B,SAAUpa,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAElCG,EAAOD,QAAU,SAAUua,GACzBvY,EAAQA,EAAQW,EAAG4X,EAAY,CAAErL,GAAI,SAASA,KAG5C,IAFA,IAAIzL,EAASD,UAAUC,OACnB+W,EAAI,IAAI7P,MAAMlH,GACXA,KAAU+W,EAAE/W,GAAUD,UAAUC,GACvC,OAAO,IAAIF,KAAKiX,QAOd,SAAUva,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4G,EAAY5G,EAAoB,IAChC8B,EAAM9B,EAAoB,IAC1B2Z,EAAQ3Z,EAAoB,IAEhCG,EAAOD,QAAU,SAAUua,GACzBvY,EAAQA,EAAQW,EAAG4X,EAAY,CAAE/L,KAAM,SAASA,KAAKtM,GACnD,IACI2M,EAAS2L,EAAGxZ,EAAGyZ,EADfC,EAAQlX,UAAU,GAKtB,OAHAkD,EAAUnD,OACVsL,EAAU6L,IAAU/a,KACP+G,EAAUgU,GACnBxY,GAAUvC,GAAkB,IAAI4D,MACpCiX,EAAI,GACA3L,GACF7N,EAAI,EACJyZ,EAAK7Y,EAAI8Y,EAAOlX,UAAU,GAAI,GAC9BiW,EAAMvX,GAAQ,EAAO,SAAUyY,GAC7BH,EAAEnS,KAAKoS,EAAGE,EAAU3Z,SAGtByY,EAAMvX,GAAQ,EAAOsY,EAAEnS,KAAMmS,GAExB,IAAIjX,KAAKiX,SAOd,SAAUva,EAAQD,EAASF,GAEjC,IAAIiE,EAAWjE,EAAoB,GAC/BsV,EAAWtV,EAAoB,GAAGsV,SAElCwF,EAAK7W,EAASqR,IAAarR,EAASqR,EAASyF,eACjD5a,EAAOD,QAAU,SAAUgE,GACzB,OAAO4W,EAAKxF,EAASyF,cAAc7W,GAAM,KAMrC,SAAU/D,EAAQD,EAASF,GAEjCG,EAAOD,QAAUF,EAAoB,KAK/B,SAAUG,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3B+I,EAAU/I,EAAoB,IAC9Bgb,EAAShb,EAAoB,IAC7Bc,EAAiBd,EAAoB,GAAGmF,EAC5ChF,EAAOD,QAAU,SAAUQ,GACzB,IAAIua,EAAUpZ,EAAK8C,SAAW9C,EAAK8C,OAASoE,EAAU,GAAKnH,EAAO+C,QAAU,IACtD,KAAlBjE,EAAKwa,OAAO,IAAexa,KAAQua,GAAUna,EAAema,EAASva,EAAM,CAAE4E,MAAO0V,EAAO7V,EAAEzE,OAM7F,SAAUP,EAAQD,EAASF,GAEjC,IAAImT,EAASnT,EAAoB,GAApBA,CAAwB,QACjC0E,EAAM1E,EAAoB,IAC9BG,EAAOD,QAAU,SAAUmC,GACzB,OAAO8Q,EAAO9Q,KAAS8Q,EAAO9Q,GAAOqC,EAAIrC,MAMrC,SAAUlC,EAAQD,GAGxBC,EAAOD,QAAU,gGAEfyG,MAAM,MAKF,SAAUxG,EAAQD,EAASF,GAEjC,IAAIsV,EAAWtV,EAAoB,GAAGsV,SACtCnV,EAAOD,QAAUoV,GAAYA,EAAS6F,iBAKhC,SAAUhb,EAAQD,EAASF,GAKjC,IAAI6W,EAAc7W,EAAoB,GAClCob,EAAUpb,EAAoB,IAC9Bqb,EAAOrb,EAAoB,IAC3BgH,EAAMhH,EAAoB,IAC1B0F,EAAW1F,EAAoB,GAC/BwF,EAAUxF,EAAoB,IAC9Bsb,EAAUza,OAAO0a,OAGrBpb,EAAOD,SAAWob,GAAWtb,EAAoB,EAApBA,CAAuB,WAClD,IAAI0a,EAAI,GACJzX,EAAI,GAEJJ,EAAI8B,SACJ4V,EAAI,uBAGR,OAFAG,EAAE7X,GAAK,EACP0X,EAAE5T,MAAM,IAAIqJ,QAAQ,SAAUwL,GAAKvY,EAAEuY,GAAKA,IACd,GAArBF,EAAQ,GAAIZ,GAAG7X,IAAWhC,OAAOgL,KAAKyP,EAAQ,GAAIrY,IAAIsJ,KAAK,KAAOgO,IACtE,SAASgB,OAAOlY,EAAQjB,GAM3B,IALA,IAAI8T,EAAIxQ,EAASrC,GACbwL,EAAOnL,UAAUC,OACjB0E,EAAQ,EACRoT,EAAaJ,EAAKlW,EAClBuW,EAAS1U,EAAI7B,EACHkD,EAAPwG,GAML,IALA,IAIIxM,EAJAQ,EAAI2C,EAAQ9B,UAAU2E,MACtBwD,EAAO4P,EAAaL,EAAQvY,GAAGiQ,OAAO2I,EAAW5Y,IAAMuY,EAAQvY,GAC/Dc,EAASkI,EAAKlI,OACdgY,EAAI,EAEQA,EAAThY,GACLtB,EAAMwJ,EAAK8P,KACN9E,IAAe6E,EAAOpb,KAAKuC,EAAGR,KAAM6T,EAAE7T,GAAOQ,EAAER,IAEtD,OAAO6T,GACPoF,GAKE,SAAUnb,EAAQD,GAGxBC,EAAOD,QAAU,SAAU2G,EAAI+U,EAAM9U,GACnC,IAAI+U,EAAK/U,IAASjH,GAClB,OAAQ+b,EAAKjY,QACX,KAAK,EAAG,OAAOkY,EAAKhV,IACAA,EAAGvG,KAAKwG,GAC5B,KAAK,EAAG,OAAO+U,EAAKhV,EAAG+U,EAAK,IACR/U,EAAGvG,KAAKwG,EAAM8U,EAAK,IACvC,KAAK,EAAG,OAAOC,EAAKhV,EAAG+U,EAAK,GAAIA,EAAK,IACjB/U,EAAGvG,KAAKwG,EAAM8U,EAAK,GAAIA,EAAK,IAChD,KAAK,EAAG,OAAOC,EAAKhV,EAAG+U,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAC1B/U,EAAGvG,KAAKwG,EAAM8U,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACzD,KAAK,EAAG,OAAOC,EAAKhV,EAAG+U,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACnC/U,EAAGvG,KAAKwG,EAAM8U,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAClE,OAAO/U,EAAGjD,MAAMkD,EAAM8U,KAMpB,SAAUzb,EAAQD,EAASF,GAIjC,IAAI6E,EAAY7E,EAAoB,IAChCuF,EAAUvF,EAAoB,IAElCG,EAAOD,QAAU,SAAS4b,OAAOC,GAC/B,IAAIC,EAAM3V,OAAOd,EAAQ9B,OACrB2E,EAAM,GACNlH,EAAI2D,EAAUkX,GAClB,GAAI7a,EAAI,GAAKA,GAAK+a,SAAU,MAAM1R,WAAW,2BAC7C,KAAU,EAAJrJ,GAAQA,KAAO,KAAO8a,GAAOA,GAAc,EAAJ9a,IAAOkH,GAAO4T,GAC3D,OAAO5T,IAMH,SAAUjI,EAAQD,GAExBC,EAAOD,QAAU,oDAMX,SAAUC,EAAQD,GAGxBC,EAAOD,QAAUmE,KAAK6X,MAAQ,SAASA,KAAKC,GAE1C,OAAmB,IAAXA,GAAKA,IAAWA,GAAKA,EAAIA,EAAIA,EAAI,GAAK,EAAI,IAM9C,SAAUhc,EAAQD,GAGxB,IAAIkc,EAAS/X,KAAKgY,MAClBlc,EAAOD,SAAYkc,GAED,mBAAbA,EAAO,KAA4BA,EAAO,IAAM,qBAE7B,OAAnBA,GAAQ,OACT,SAASC,MAAMF,GACjB,OAAmB,IAAXA,GAAKA,GAAUA,GAAS,KAALA,GAAaA,EAAI,KAAOA,EAAIA,EAAIA,EAAI,EAAI9X,KAAKyE,IAAIqT,GAAK,GAC/EC,GAKE,SAAUjc,EAAQD,EAASF,GAEjC,IAAI6E,EAAY7E,EAAoB,IAChCuF,EAAUvF,EAAoB,IAGlCG,EAAOD,QAAU,SAAUoc,GACzB,OAAO,SAAUxV,EAAMyV,GACrB,IAGIhZ,EAAGC,EAHH7B,EAAI0E,OAAOd,EAAQuB,IACnB1G,EAAIyE,EAAU0X,GACdlc,EAAIsB,EAAEgC,OAEV,OAAIvD,EAAI,GAAUC,GAALD,EAAekc,EAAY,GAAKzc,IAC7C0D,EAAI5B,EAAE6a,WAAWpc,IACN,OAAc,MAAJmD,GAAcnD,EAAI,IAAMC,IAAMmD,EAAI7B,EAAE6a,WAAWpc,EAAI,IAAM,OAAc,MAAJoD,EACpF8Y,EAAY3a,EAAEuZ,OAAO9a,GAAKmD,EAC1B+Y,EAAY3a,EAAE8G,MAAMrI,EAAGA,EAAI,GAA2BoD,EAAI,OAAzBD,EAAI,OAAU,IAAqB,SAOtE,SAAUpD,EAAQD,EAASF,GAGjC,IAAIyc,EAAWzc,EAAoB,KAC/BuF,EAAUvF,EAAoB,IAElCG,EAAOD,QAAU,SAAU4G,EAAM4V,EAAclW,GAC7C,GAAIiW,EAASC,GAAe,MAAMvY,UAAU,UAAYqC,EAAO,0BAC/D,OAAOH,OAAOd,EAAQuB,MAMlB,SAAU3G,EAAQD,EAASF,GAEjC,IAAI2c,EAAQ3c,EAAoB,EAApBA,CAAuB,SACnCG,EAAOD,QAAU,SAAU2I,GACzB,IAAI+T,EAAK,IACT,IACE,MAAM/T,GAAK+T,GACX,MAAOpY,GACP,IAEE,OADAoY,EAAGD,IAAS,GACJ,MAAM9T,GAAK+T,GACnB,MAAOzX,KACT,OAAO,IAML,SAAUhF,EAAQD,EAASF,GAGjC,IAAIgK,EAAYhK,EAAoB,IAChC8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClC4K,EAAaC,MAAMrJ,UAEvBrB,EAAOD,QAAU,SAAUgE,GACzB,OAAOA,IAAOrE,KAAcmK,EAAUa,QAAU3G,GAAM0G,EAAWkC,KAAc5I,KAM3E,SAAU/D,EAAQD,EAASF,GAIjC,IAAI6c,EAAkB7c,EAAoB,GACtC+G,EAAa/G,EAAoB,IAErCG,EAAOD,QAAU,SAAUoB,EAAQ+G,EAAO/C,GACpC+C,KAAS/G,EAAQub,EAAgB1X,EAAE7D,EAAQ+G,EAAOtB,EAAW,EAAGzB,IAC/DhE,EAAO+G,GAAS/C,IAMjB,SAAUnF,EAAQD,EAASF,GAEjC,IAAI8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClC8c,GAAe,EAEnB,IACE,IAAIC,EAAQ,CAAC,GAAGjQ,KAChBiQ,EAAc,UAAI,WAAcD,GAAe,GAE/CjS,MAAM6D,KAAKqO,EAAO,WAAc,MAAM,IACtC,MAAOvY,IAETrE,EAAOD,QAAU,SAAUqE,EAAMyY,GAC/B,IAAKA,IAAgBF,EAAc,OAAO,EAC1C,IAAIvG,GAAO,EACX,IACE,IAAI0G,EAAM,CAAC,GACPpK,EAAOoK,EAAInQ,KACf+F,EAAK5D,KAAO,WAAc,MAAO,CAAEC,KAAMqH,GAAO,IAChD0G,EAAInQ,GAAY,WAAc,OAAO+F,GACrCtO,EAAK0Y,GACL,MAAOzY,IACT,OAAO+R,IAMH,SAAUpW,EAAQD,EAASF,GAGjC,IAAI8J,EAAqB9J,EAAoB,KAE7CG,EAAOD,QAAU,SAAUgd,EAAUvZ,GACnC,OAAO,IAAKmG,EAAmBoT,GAAxB,CAAmCvZ,KAMtC,SAAUxD,EAAQD,EAASF,GAKjC,IAAI0F,EAAW1F,EAAoB,GAC/BsJ,EAAkBtJ,EAAoB,IACtCsH,EAAWtH,EAAoB,GACnCG,EAAOD,QAAU,SAASyP,KAAKrK,GAO7B,IANA,IAAIF,EAAIM,EAASjC,MACbE,EAAS2D,EAASlC,EAAEzB,QACpBkL,EAAOnL,UAAUC,OACjB0E,EAAQiB,EAAuB,EAAPuF,EAAWnL,UAAU,GAAK7D,GAAW8D,GAC7DiN,EAAa,EAAP/B,EAAWnL,UAAU,GAAK7D,GAChCsd,EAASvM,IAAQ/Q,GAAY8D,EAAS2F,EAAgBsH,EAAKjN,GAC/C0E,EAAT8U,GAAgB/X,EAAEiD,KAAW/C,EACpC,OAAOF,IAMH,SAAUjF,EAAQD,EAASF,GAIjC,IAAIod,EAAmBpd,EAAoB,IACvC2O,EAAO3O,EAAoB,IAC3BgK,EAAYhK,EAAoB,IAChCiH,EAAYjH,EAAoB,IAMpCG,EAAOD,QAAUF,EAAoB,GAApBA,CAAwB6K,MAAO,QAAS,SAAUwS,EAAUrE,GAC3EvV,KAAK+S,GAAKvP,EAAUoW,GACpB5Z,KAAK6Z,GAAK,EACV7Z,KAAK8Z,GAAKvE,GAET,WACD,IAAI5T,EAAI3B,KAAK+S,GACTwC,EAAOvV,KAAK8Z,GACZlV,EAAQ5E,KAAK6Z,KACjB,OAAKlY,GAAcA,EAAEzB,QAAX0E,GACR5E,KAAK+S,GAAK3W,GACH8O,EAAK,IAEaA,EAAK,EAApB,QAARqK,EAA+B3Q,EACvB,UAAR2Q,EAAiC5T,EAAEiD,GACxB,CAACA,EAAOjD,EAAEiD,MACxB,UAGH2B,EAAUwT,UAAYxT,EAAUa,MAEhCuS,EAAiB,QACjBA,EAAiB,UACjBA,EAAiB,YAKX,SAAUjd,EAAQD,GAExBC,EAAOD,QAAU,SAAUgP,EAAM5J,GAC/B,MAAO,CAAEA,MAAOA,EAAO4J,OAAQA,KAM3B,SAAU/O,EAAQD,EAASF,GAEjC,IAaIyd,EAAOC,EAASC,EAbhB7b,EAAM9B,EAAoB,IAC1B4d,EAAS5d,EAAoB,IAC7B6d,EAAO7d,EAAoB,IAC3B8d,EAAM9d,EAAoB,IAC1B4B,EAAS5B,EAAoB,GAC7B+d,EAAUnc,EAAOmc,QACjBC,EAAUpc,EAAOqc,aACjBC,EAAYtc,EAAOuc,eACnBC,EAAiBxc,EAAOwc,eACxBC,EAAWzc,EAAOyc,SAClBC,EAAU,EACVC,EAAQ,GACRC,EAAqB,qBAErBC,EAAM,WACR,IAAIzK,GAAMvQ,KAEV,GAAI8a,EAAM9c,eAAeuS,GAAK,CAC5B,IAAInN,EAAK0X,EAAMvK,UACRuK,EAAMvK,GACbnN,MAGA6X,EAAW,SAAUC,GACvBF,EAAIne,KAAKqe,EAAMvM,OAGZ4L,GAAYE,IACfF,EAAU,SAASC,aAAapX,GAG9B,IAFA,IAAI+U,EAAO,GACPxb,EAAI,EACkBA,EAAnBsD,UAAUC,QAAYiY,EAAKrT,KAAK7E,UAAUtD,MAMjD,OALAme,IAAQD,GAAW,WAEjBV,EAAoB,mBAAN/W,EAAmBA,EAAKhD,SAASgD,GAAK+U,IAEtD6B,EAAMa,GACCA,GAETJ,EAAY,SAASC,eAAenK,UAC3BuK,EAAMvK,IAGyB,WAApChU,EAAoB,GAApBA,CAAwB+d,GAC1BN,EAAQ,SAAUzJ,GAChB+J,EAAQa,SAAS9c,EAAI2c,EAAKzK,EAAI,KAGvBqK,GAAYA,EAASQ,IAC9BpB,EAAQ,SAAUzJ,GAChBqK,EAASQ,IAAI/c,EAAI2c,EAAKzK,EAAI,KAGnBoK,GAETT,GADAD,EAAU,IAAIU,GACCU,MACfpB,EAAQqB,MAAMC,UAAYN,EAC1BjB,EAAQ3b,EAAI6b,EAAKsB,YAAatB,EAAM,IAG3B/b,EAAOsd,kBAA0C,mBAAfD,cAA8Brd,EAAOud,eAChF1B,EAAQ,SAAUzJ,GAChBpS,EAAOqd,YAAYjL,EAAK,GAAI,MAE9BpS,EAAOsd,iBAAiB,UAAWR,GAAU,IAG7CjB,EADSe,KAAsBV,EAAI,UAC3B,SAAU9J,GAChB6J,EAAKzI,YAAY0I,EAAI,WAAWU,GAAsB,WACpDX,EAAKuB,YAAY3b,MACjBgb,EAAIne,KAAK0T,KAKL,SAAUA,GAChBqL,WAAWvd,EAAI2c,EAAKzK,EAAI,GAAI,KAIlC7T,EAAOD,QAAU,CACf4N,IAAKkQ,EACLsB,MAAOpB,IAMH,SAAU/d,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7Buf,EAAYvf,EAAoB,IAAI8N,IACpC0R,EAAW5d,EAAO6d,kBAAoB7d,EAAO8d,uBAC7C3B,EAAUnc,EAAOmc,QACjB4B,EAAU/d,EAAO+d,QACjBC,EAA6C,WAApC5f,EAAoB,GAApBA,CAAwB+d,GAErC5d,EAAOD,QAAU,WACf,IAAI2f,EAAMC,EAAMC,EAEZC,EAAQ,WACV,IAAIC,EAAQpZ,EAEZ,IADI+Y,IAAWK,EAASlC,EAAQmC,SAASD,EAAOE,OACzCN,GAAM,CACXhZ,EAAKgZ,EAAKhZ,GACVgZ,EAAOA,EAAK5Q,KACZ,IACEpI,IACA,MAAOrC,GAGP,MAFIqb,EAAME,IACLD,EAAOjgB,GACN2E,GAERsb,EAAOjgB,GACLogB,GAAQA,EAAOG,SAIrB,GAAIR,EACFG,EAAS,WACPhC,EAAQa,SAASoB,SAGd,IAAIR,GAAc5d,EAAO6X,WAAa7X,EAAO6X,UAAU4G,WAQvD,GAAIV,GAAWA,EAAQW,QAAS,CAErC,IAAIC,EAAUZ,EAAQW,QAAQzgB,IAC9BkgB,EAAS,WACPQ,EAAQC,KAAKR,SASfD,EAAS,WAEPR,EAAUjf,KAAKsB,EAAQoe,QAvBgD,CACzE,IAAIS,GAAS,EACTC,EAAOpL,SAASqL,eAAe,IACnC,IAAInB,EAASQ,GAAOY,QAAQF,EAAM,CAAEG,eAAe,IACnDd,EAAS,WACPW,EAAKtO,KAAOqO,GAAUA,GAsB1B,OAAO,SAAU5Z,GACf,IAAIia,EAAO,CAAEja,GAAIA,EAAIoI,KAAMpP,IACvBigB,IAAMA,EAAK7Q,KAAO6R,GACjBjB,IACHA,EAAOiB,EACPf,KACAD,EAAOgB,KAOP,SAAU3gB,EAAQD,EAASF,GAKjC,IAAI4G,EAAY5G,EAAoB,IAEpC,SAAS+gB,kBAAkBzd,GACzB,IAAIgd,EAASU,EACbvd,KAAK8c,QAAU,IAAIjd,EAAE,SAAU2d,EAAWC,GACxC,GAAIZ,IAAYzgB,IAAamhB,IAAWnhB,GAAW,MAAMsE,UAAU,2BACnEmc,EAAUW,EACVD,EAASE,IAEXzd,KAAK6c,QAAU1Z,EAAU0Z,GACzB7c,KAAKud,OAASpa,EAAUoa,GAG1B7gB,EAAOD,QAAQiF,EAAI,SAAU7B,GAC3B,OAAO,IAAIyd,kBAAkBzd,KAMzB,SAAUnD,EAAQD,EAASF,GAGjC,IAAIyJ,EAAOzJ,EAAoB,IAC3Bqb,EAAOrb,EAAoB,IAC3B+E,EAAW/E,EAAoB,GAC/BmhB,EAAUnhB,EAAoB,GAAGmhB,QACrChhB,EAAOD,QAAUihB,GAAWA,EAAQC,SAAW,SAASA,QAAQld,GAC9D,IAAI2H,EAAOpC,EAAKtE,EAAEJ,EAASb,IACvBuX,EAAaJ,EAAKlW,EACtB,OAAOsW,EAAa5P,EAAKiH,OAAO2I,EAAWvX,IAAO2H,IAM9C,SAAU1L,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7B6W,EAAc7W,EAAoB,GAClC+I,EAAU/I,EAAoB,IAC9BgJ,EAAShJ,EAAoB,IAC7B+B,EAAO/B,EAAoB,IAC3BoJ,EAAcpJ,EAAoB,IAClC+F,EAAQ/F,EAAoB,GAC5BkJ,EAAalJ,EAAoB,IACjC6E,EAAY7E,EAAoB,IAChCsH,EAAWtH,EAAoB,GAC/BqJ,EAAUrJ,EAAoB,KAC9ByJ,EAAOzJ,EAAoB,IAAImF,EAC/BD,EAAKlF,EAAoB,GAAGmF,EAC5BgF,EAAYnK,EAAoB,IAChCsY,EAAiBtY,EAAoB,IACrCyK,EAAe,cACf4W,EAAY,WACZpf,EAAY,YAEZqf,EAAc,eACdxW,EAAelJ,EAAO6I,GACtBO,EAAYpJ,EAAOyf,GACnBhd,EAAOzC,EAAOyC,KACdkG,EAAa3I,EAAO2I,WAEpB0R,EAAWra,EAAOqa,SAClBsF,EAAazW,EACb0W,EAAMnd,EAAKmd,IACXC,EAAMpd,EAAKod,IACX9Y,EAAQtE,EAAKsE,MACb+Y,EAAMrd,EAAKqd,IACXC,EAAMtd,EAAKsd,IAEXC,EAAc,aACdC,EAAc,aACdC,EAAUjL,EAAc,KAHf,SAITkL,EAAUlL,EAAc,KAAO+K,EAC/BI,EAAUnL,EAAc,KAAOgL,EAGnC,SAASI,YAAY3c,EAAO4c,EAAMC,GAChC,IAOI3d,EAAGjE,EAAGC,EAPNoN,EAAS,IAAI/C,MAAMsX,GACnBC,EAAgB,EAATD,EAAaD,EAAO,EAC3BG,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBE,EAAc,KAATL,EAAcT,EAAI,GAAI,IAAMA,EAAI,GAAI,IAAM,EAC/CrhB,EAAI,EACJuB,EAAI2D,EAAQ,GAAe,IAAVA,GAAe,EAAIA,EAAQ,EAAI,EAAI,EAkCxD,KAhCAA,EAAQkc,EAAIlc,KAECA,GAASA,IAAU2W,GAE9B1b,EAAI+E,GAASA,EAAQ,EAAI,EACzBd,EAAI6d,IAEJ7d,EAAImE,EAAM+Y,EAAIpc,GAASqc,GACnBrc,GAAS9E,EAAIihB,EAAI,GAAIjd,IAAM,IAC7BA,IACAhE,GAAK,GAOU,IAJf8E,GADe,GAAbd,EAAI8d,EACGC,EAAK/hB,EAEL+hB,EAAKd,EAAI,EAAG,EAAIa,IAEf9hB,IACVgE,IACAhE,GAAK,GAEU6hB,GAAb7d,EAAI8d,GACN/hB,EAAI,EACJiE,EAAI6d,GACkB,GAAb7d,EAAI8d,GACb/hB,GAAK+E,EAAQ9E,EAAI,GAAKihB,EAAI,EAAGS,GAC7B1d,GAAQ8d,IAER/hB,EAAI+E,EAAQmc,EAAI,EAAGa,EAAQ,GAAKb,EAAI,EAAGS,GACvC1d,EAAI,IAGO,GAAR0d,EAAWtU,EAAOxN,KAAW,IAAJG,EAASA,GAAK,IAAK2hB,GAAQ,GAG3D,IAFA1d,EAAIA,GAAK0d,EAAO3hB,EAChB6hB,GAAQF,EACM,EAAPE,EAAUxU,EAAOxN,KAAW,IAAJoE,EAASA,GAAK,IAAK4d,GAAQ,GAE1D,OADAxU,IAASxN,IAAU,IAAJuB,EACRiM,EAET,SAAS4U,cAAc5U,EAAQsU,EAAMC,GACnC,IAOI5hB,EAPA6hB,EAAgB,EAATD,EAAaD,EAAO,EAC3BG,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBI,EAAQL,EAAO,EACfhiB,EAAI+hB,EAAS,EACbxgB,EAAIiM,EAAOxN,KACXoE,EAAQ,IAAJ7C,EAGR,IADAA,IAAM,EACS,EAAR8gB,EAAWje,EAAQ,IAAJA,EAAUoJ,EAAOxN,GAAIA,IAAKqiB,GAAS,GAIzD,IAHAliB,EAAIiE,GAAK,IAAMie,GAAS,EACxBje,KAAOie,EACPA,GAASP,EACM,EAARO,EAAWliB,EAAQ,IAAJA,EAAUqN,EAAOxN,GAAIA,IAAKqiB,GAAS,GACzD,GAAU,IAANje,EACFA,EAAI,EAAI8d,MACH,CAAA,GAAI9d,IAAM6d,EACf,OAAO9hB,EAAImiB,IAAM/gB,GAAKsa,EAAWA,EAEjC1b,GAAQkhB,EAAI,EAAGS,GACf1d,GAAQ8d,EACR,OAAQ3gB,GAAK,EAAI,GAAKpB,EAAIkhB,EAAI,EAAGjd,EAAI0d,GAGzC,SAASS,UAAUC,GACjB,OAAOA,EAAM,IAAM,GAAKA,EAAM,IAAM,GAAKA,EAAM,IAAM,EAAIA,EAAM,GAEjE,SAASC,OAAO3e,GACd,MAAO,CAAM,IAALA,GAEV,SAAS4e,QAAQ5e,GACf,MAAO,CAAM,IAALA,EAAWA,GAAM,EAAI,KAE/B,SAAS6e,QAAQ7e,GACf,MAAO,CAAM,IAALA,EAAWA,GAAM,EAAI,IAAMA,GAAM,GAAK,IAAMA,GAAM,GAAK,KAEjE,SAAS8e,QAAQ9e,GACf,OAAO+d,YAAY/d,EAAI,GAAI,GAE7B,SAAS+e,QAAQ/e,GACf,OAAO+d,YAAY/d,EAAI,GAAI,GAG7B,SAASoK,UAAUhL,EAAGjB,EAAKkM,GACzBrJ,EAAG5B,EAAErB,GAAYI,EAAK,CAAEpB,IAAK,WAAc,OAAOwC,KAAK8K,MAGzD,SAAStN,IAAIiiB,EAAMN,EAAOva,EAAO8a,GAC/B,IACIC,EAAW/Z,GADChB,GAEhB,GAAuB6a,EAAKnB,GAAxBqB,EAAWR,EAAuB,MAAMrY,EAAW+W,GACvD,IACI7R,EAAQ2T,EAAWF,EAAKlB,GACxBqB,EAFQH,EAAKpB,GAASwB,GAET7a,MAAMgH,EAAOA,EAAQmT,GACtC,OAAOO,EAAiBE,EAAOA,EAAK/S,UAEtC,SAASxC,IAAIoV,EAAMN,EAAOva,EAAOkb,EAAYje,EAAO6d,GAClD,IACIC,EAAW/Z,GADChB,GAEhB,GAAuB6a,EAAKnB,GAAxBqB,EAAWR,EAAuB,MAAMrY,EAAW+W,GAIvD,IAHA,IAAI7c,EAAQye,EAAKpB,GAASwB,GACtB7T,EAAQ2T,EAAWF,EAAKlB,GACxBqB,EAAOE,GAAYje,GACdlF,EAAI,EAAGA,EAAIwiB,EAAOxiB,IAAKqE,EAAMgL,EAAQrP,GAAKijB,EAAKF,EAAiB/iB,EAAIwiB,EAAQxiB,EAAI,GAG3F,GAAK4I,EAAOuJ,IAgFL,CACL,IAAKxM,EAAM,WACT+E,EAAa,OACR/E,EAAM,WACX,IAAI+E,GAAc,MACd/E,EAAM,WAIV,OAHA,IAAI+E,EACJ,IAAIA,EAAa,KACjB,IAAIA,EAAa4X,KACV5X,EAAapK,MAAQ+J,IAC1B,CAMF,IADA,IACyCpI,EADrCmhB,GAJJ1Y,EAAe,SAASC,YAAYpH,GAElC,OADAuF,EAAWzF,KAAMqH,GACV,IAAIyW,EAAWlY,EAAQ1F,MAEI1B,GAAasf,EAAWtf,GACnD4J,EAAOpC,EAAK8X,GAAa5F,EAAI,EAAsBA,EAAd9P,EAAKlI,SAC1CtB,EAAMwJ,EAAK8P,QAAS7Q,GAAe/I,EAAK+I,EAAczI,EAAKkf,EAAWlf,IAE1E0G,IAASya,EAAiB1d,YAAcgF,GAG/C,IAAIoY,EAAO,IAAIlY,EAAU,IAAIF,EAAa,IACtC2Y,EAAWzY,EAAU/I,GAAWyhB,QACpCR,EAAKQ,QAAQ,EAAG,YAChBR,EAAKQ,QAAQ,EAAG,aACZR,EAAKS,QAAQ,IAAOT,EAAKS,QAAQ,IAAIva,EAAY4B,EAAU/I,GAAY,CACzEyhB,QAAS,SAASA,QAAQ5S,EAAYxL,GACpCme,EAASnjB,KAAKmD,KAAMqN,EAAYxL,GAAS,IAAM,KAEjDse,SAAU,SAASA,SAAS9S,EAAYxL,GACtCme,EAASnjB,KAAKmD,KAAMqN,EAAYxL,GAAS,IAAM,OAEhD,QAhHHwF,EAAe,SAASC,YAAYpH,GAClCuF,EAAWzF,KAAMqH,EAAcL,GAC/B,IAAIiI,EAAarJ,EAAQ1F,GACzBF,KAAK6f,GAAKnZ,EAAU7J,KAAK,IAAIuK,MAAM6H,GAAa,GAChDjP,KAAKse,GAAWrP,GAGlB1H,EAAY,SAASC,SAAS2C,EAAQkD,EAAY4B,GAChDxJ,EAAWzF,KAAMuH,EAAWqW,GAC5BnY,EAAW0E,EAAQ9C,EAAcuW,GACjC,IAAIwC,EAAejW,EAAOmU,GACtB9T,EAASpJ,EAAUiM,GACvB,GAAI7C,EAAS,GAAc4V,EAAT5V,EAAuB,MAAM1D,EAAW,iBAE1D,GAA0BsZ,EAAtB5V,GADJyE,EAAaA,IAAe7S,GAAYgkB,EAAe5V,EAAS3G,EAASoL,IACjC,MAAMnI,EAxJ/B,iBAyJf9G,KAAKqe,GAAWlU,EAChBnK,KAAKue,GAAW/T,EAChBxK,KAAKse,GAAWrP,GAGdmE,IACFvI,UAAUxD,EAAc8W,EAAa,MACrCtT,UAAUtD,EAlJD,SAkJoB,MAC7BsD,UAAUtD,EAAW4W,EAAa,MAClCtT,UAAUtD,EAAW6W,EAAa,OAGpCzY,EAAY4B,EAAU/I,GAAY,CAChC0hB,QAAS,SAASA,QAAQ7S,GACxB,OAAO7P,IAAIwC,KAAM,EAAGqN,GAAY,IAAM,IAAM,IAE9CgT,SAAU,SAASA,SAAShT,GAC1B,OAAO7P,IAAIwC,KAAM,EAAGqN,GAAY,IAElCiT,SAAU,SAASA,SAASjT,GAC1B,IAAI8R,EAAQ3hB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,IAC/C,OAAQkf,EAAM,IAAM,EAAIA,EAAM,KAAO,IAAM,IAE7CoB,UAAW,SAASA,UAAUlT,GAC5B,IAAI8R,EAAQ3hB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,IAC/C,OAAOkf,EAAM,IAAM,EAAIA,EAAM,IAE/BqB,SAAU,SAASA,SAASnT,GAC1B,OAAO6R,UAAU1hB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,MAEtDwgB,UAAW,SAASA,UAAUpT,GAC5B,OAAO6R,UAAU1hB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,OAAS,GAE/DygB,WAAY,SAASA,WAAWrT,GAC9B,OAAO0R,cAAcvhB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,IAAK,GAAI,IAEnE0gB,WAAY,SAASA,WAAWtT,GAC9B,OAAO0R,cAAcvhB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,IAAK,GAAI,IAEnEggB,QAAS,SAASA,QAAQ5S,EAAYxL,GACpCwI,IAAIrK,KAAM,EAAGqN,EAAY+R,OAAQvd,IAEnCse,SAAU,SAASA,SAAS9S,EAAYxL,GACtCwI,IAAIrK,KAAM,EAAGqN,EAAY+R,OAAQvd,IAEnC+e,SAAU,SAASA,SAASvT,EAAYxL,GACtCwI,IAAIrK,KAAM,EAAGqN,EAAYgS,QAASxd,EAAO5B,UAAU,KAErD4gB,UAAW,SAASA,UAAUxT,EAAYxL,GACxCwI,IAAIrK,KAAM,EAAGqN,EAAYgS,QAASxd,EAAO5B,UAAU,KAErD6gB,SAAU,SAASA,SAASzT,EAAYxL,GACtCwI,IAAIrK,KAAM,EAAGqN,EAAYiS,QAASzd,EAAO5B,UAAU,KAErD8gB,UAAW,SAASA,UAAU1T,EAAYxL,GACxCwI,IAAIrK,KAAM,EAAGqN,EAAYiS,QAASzd,EAAO5B,UAAU,KAErD+gB,WAAY,SAASA,WAAW3T,EAAYxL,GAC1CwI,IAAIrK,KAAM,EAAGqN,EAAYmS,QAAS3d,EAAO5B,UAAU,KAErDghB,WAAY,SAASA,WAAW5T,EAAYxL,GAC1CwI,IAAIrK,KAAM,EAAGqN,EAAYkS,QAAS1d,EAAO5B,UAAU,OAsCzD4U,EAAexN,EAAcL,GAC7B6N,EAAetN,EAAWqW,GAC1Btf,EAAKiJ,EAAU/I,GAAY+G,EAAOsE,MAAM,GACxCpN,EAAQuK,GAAgBK,EACxB5K,EAAQmhB,GAAarW,GAKf,SAAU7K,EAAQD,GAExBC,EAAOD,QAAU,SAAUykB,EAAQpe,GACjC,IAAIqe,EAAWre,IAAY1F,OAAO0F,GAAW,SAAUse,GACrD,OAAOte,EAAQse,IACbte,EACJ,OAAO,SAAUrC,GACf,OAAOmC,OAAOnC,GAAIqC,QAAQoe,EAAQC,MAOhC,SAAUzkB,EAAQD,EAASF,GAEjCG,EAAOD,SAAWF,EAAoB,KAAOA,EAAoB,EAApBA,CAAuB,WAClE,OAA2G,GAApGa,OAAOC,eAAed,EAAoB,GAApBA,CAAwB,OAAQ,IAAK,CAAEiB,IAAK,WAAc,OAAO,KAAQsC,KAMlG,SAAUpD,EAAQD,EAASF,GAEjCE,EAAQiF,EAAInF,EAAoB,IAK1B,SAAUG,EAAQD,EAASF,GAEjC,IAAIgC,EAAMhC,EAAoB,IAC1BiH,EAAYjH,EAAoB,IAChCyL,EAAezL,EAAoB,GAApBA,EAAwB,GACvC2F,EAAW3F,EAAoB,GAApBA,CAAwB,YAEvCG,EAAOD,QAAU,SAAUoB,EAAQwjB,GACjC,IAGIziB,EAHA+C,EAAI6B,EAAU3F,GACdlB,EAAI,EACJkI,EAAS,GAEb,IAAKjG,KAAO+C,EAAO/C,GAAOsD,GAAU3D,EAAIoD,EAAG/C,IAAQiG,EAAOC,KAAKlG,GAE/D,KAAsBjC,EAAf0kB,EAAMnhB,QAAgB3B,EAAIoD,EAAG/C,EAAMyiB,EAAM1kB,SAC7CqL,EAAanD,EAAQjG,IAAQiG,EAAOC,KAAKlG,IAE5C,OAAOiG,IAMH,SAAUnI,EAAQD,EAASF,GAEjC,IAAIkF,EAAKlF,EAAoB,GACzB+E,EAAW/E,EAAoB,GAC/Bob,EAAUpb,EAAoB,IAElCG,EAAOD,QAAUF,EAAoB,GAAKa,OAAOkkB,iBAAmB,SAASA,iBAAiB3f,EAAGuQ,GAC/F5Q,EAASK,GAKT,IAJA,IAGIrC,EAHA8I,EAAOuP,EAAQzF,GACfhS,EAASkI,EAAKlI,OACdvD,EAAI,EAEQA,EAATuD,GAAYuB,EAAGC,EAAEC,EAAGrC,EAAI8I,EAAKzL,KAAMuV,EAAW5S,IACrD,OAAOqC,IAMH,SAAUjF,EAAQD,EAASF,GAGjC,IAAIiH,EAAYjH,EAAoB,IAChCyJ,EAAOzJ,EAAoB,IAAImF,EAC/BqD,EAAW,GAAGA,SAEdwc,EAA+B,iBAAV5gB,QAAsBA,QAAUvD,OAAOoW,oBAC5DpW,OAAOoW,oBAAoB7S,QAAU,GAUzCjE,EAAOD,QAAQiF,EAAI,SAAS8R,oBAAoB/S,GAC9C,OAAO8gB,GAAoC,mBAArBxc,EAASlI,KAAK4D,GATjB,SAAUA,GAC7B,IACE,OAAOuF,EAAKvF,GACZ,MAAOM,GACP,OAAOwgB,EAAYvc,SAK0Cwc,CAAe/gB,GAAMuF,EAAKxC,EAAU/C,MAM/F,SAAU/D,EAAQD,EAASF,GAIjC,IAAIiE,EAAWjE,EAAoB,GAC/B+E,EAAW/E,EAAoB,GAC/BklB,EAAQ,SAAU9f,EAAGmK,GAEvB,GADAxK,EAASK,IACJnB,EAASsL,IAAoB,OAAVA,EAAgB,MAAMpL,UAAUoL,EAAQ,8BAElEpP,EAAOD,QAAU,CACf4N,IAAKjN,OAAOskB,iBAAmB,aAAe,GAC5C,SAAU1e,EAAM2e,EAAOtX,GACrB,KACEA,EAAM9N,EAAoB,GAApBA,CAAwB6D,SAASvD,KAAMN,EAAoB,IAAImF,EAAEtE,OAAOW,UAAW,aAAasM,IAAK,IACvGrH,EAAM,IACV2e,IAAU3e,aAAgBoE,OAC1B,MAAOrG,GAAK4gB,GAAQ,EACtB,OAAO,SAASD,eAAe/f,EAAGmK,GAIhC,OAHA2V,EAAM9f,EAAGmK,GACL6V,EAAOhgB,EAAEigB,UAAY9V,EACpBzB,EAAI1I,EAAGmK,GACLnK,GAVX,CAYE,IAAI,GAASvF,IACjBqlB,MAAOA,IAMH,SAAU/kB,EAAQD,EAASF,GAIjC,IAAI4G,EAAY5G,EAAoB,IAChCiE,EAAWjE,EAAoB,GAC/B4d,EAAS5d,EAAoB,IAC7B0M,EAAa,GAAGjE,MAChB6c,EAAY,GAUhBnlB,EAAOD,QAAU2D,SAAS0hB,MAAQ,SAASA,KAAKze,GAC9C,IAAID,EAAKD,EAAUnD,MACf+hB,EAAW9Y,EAAWpM,KAAKoD,UAAW,GACtC+hB,EAAQ,WACV,IAAI7J,EAAO4J,EAAS1S,OAAOpG,EAAWpM,KAAKoD,YAC3C,OAAOD,gBAAgBgiB,EAbX,SAAUhjB,EAAG0O,EAAKyK,GAChC,KAAMzK,KAAOmU,GAAY,CACvB,IAAK,IAAIpkB,EAAI,GAAId,EAAI,EAAGA,EAAI+Q,EAAK/Q,IAAKc,EAAEd,GAAK,KAAOA,EAAI,IAExDklB,EAAUnU,GAAOtN,SAAS,MAAO,gBAAkB3C,EAAEqL,KAAK,KAAO,KACjE,OAAO+Y,EAAUnU,GAAK1O,EAAGmZ,GAQM8J,CAAU7e,EAAI+U,EAAKjY,OAAQiY,GAAQgC,EAAO/W,EAAI+U,EAAM9U,IAGrF,OADI7C,EAAS4C,EAAGrF,aAAYikB,EAAMjkB,UAAYqF,EAAGrF,WAC1CikB,IAMH,SAAUtlB,EAAQD,EAASF,GAEjC,IAAIgW,EAAMhW,EAAoB,IAC9BG,EAAOD,QAAU,SAAUgE,EAAIyhB,GAC7B,GAAiB,iBAANzhB,GAA6B,UAAX8R,EAAI9R,GAAiB,MAAMC,UAAUwhB,GAClE,OAAQzhB,IAMJ,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/B2I,EAAQtE,KAAKsE,MACjBxI,EAAOD,QAAU,SAAS0lB,UAAU1hB,GAClC,OAAQD,EAASC,IAAO2hB,SAAS3hB,IAAOyE,EAAMzE,KAAQA,IAMlD,SAAU/D,EAAQD,EAASF,GAEjC,IAAI8lB,EAAc9lB,EAAoB,GAAG+lB,WACrCC,EAAQhmB,EAAoB,IAAI0X,KAEpCvX,EAAOD,QAAU,EAAI4lB,EAAY9lB,EAAoB,IAAM;IAAWic,SAAW,SAAS8J,WAAW/J,GACnG,IAAI9V,EAAS8f,EAAM3f,OAAO2V,GAAM,GAC5B1T,EAASwd,EAAY5f,GACzB,OAAkB,IAAXoC,GAAoC,KAApBpC,EAAOgV,OAAO,IAAa,EAAI5S,GACpDwd,GAKE,SAAU3lB,EAAQD,EAASF,GAEjC,IAAIimB,EAAYjmB,EAAoB,GAAGkmB,SACnCF,EAAQhmB,EAAoB,IAAI0X,KAChCyO,EAAKnmB,EAAoB,IACzBomB,EAAM,cAEVjmB,EAAOD,QAAmC,IAAzB+lB,EAAUE,EAAK,OAA0C,KAA3BF,EAAUE,EAAK,QAAiB,SAASD,SAASlK,EAAKqK,GACpG,IAAIngB,EAAS8f,EAAM3f,OAAO2V,GAAM,GAChC,OAAOiK,EAAU/f,EAASmgB,IAAU,IAAOD,EAAI3f,KAAKP,GAAU,GAAK,MACjE+f,GAKE,SAAU9lB,EAAQD,GAGxBC,EAAOD,QAAUmE,KAAKiiB,OAAS,SAASA,MAAMnK,GAC5C,OAAmB,MAAXA,GAAKA,IAAcA,EAAI,KAAOA,EAAIA,EAAIA,EAAI,EAAI9X,KAAKqd,IAAI,EAAIvF,KAM/D,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkc,EAAOlc,EAAoB,IAC3ByhB,EAAMpd,KAAKod,IACX8E,EAAU9E,EAAI,GAAI,IAClB+E,EAAY/E,EAAI,GAAI,IACpBgF,EAAQhF,EAAI,EAAG,MAAQ,EAAI+E,GAC3BE,EAAQjF,EAAI,GAAI,KAMpBthB,EAAOD,QAAUmE,KAAKsiB,QAAU,SAASA,OAAOxK,GAC9C,IAEI5Y,EAAG+E,EAFHse,EAAOviB,KAAKmd,IAAIrF,GAChB0K,EAAQ3K,EAAKC,GAEjB,OAAIyK,EAAOF,EAAcG,GAAwBD,EAAOF,EAAQF,EAPrD,EAAID,EAAU,EAAIA,GAOgDG,EAAQF,EAIxEC,GAFbne,GADA/E,GAAK,EAAIijB,EAAYD,GAAWK,IAClBrjB,EAAIqjB,KAEIte,GAAUA,EAAeue,EAAQ5K,SAChD4K,EAAQve,IAMX,SAAUnI,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/BgW,EAAMhW,EAAoB,IAC1B2c,EAAQ3c,EAAoB,EAApBA,CAAuB,SACnCG,EAAOD,QAAU,SAAUgE,GACzB,IAAIuY,EACJ,OAAOxY,EAASC,MAASuY,EAAWvY,EAAGyY,MAAY9c,KAAc4c,EAAsB,UAAXzG,EAAI9R,MAM5E,SAAU/D,EAAQD,EAASF,GAGjC,IAAI+E,EAAW/E,EAAoB,GACnCG,EAAOD,QAAU,SAAU0O,EAAU/H,EAAIvB,EAAOyG,GAC9C,IACE,OAAOA,EAAUlF,EAAG9B,EAASO,GAAO,GAAIA,EAAM,IAAMuB,EAAGvB,GAEvD,MAAOd,GACP,IAAIsiB,EAAMlY,EAAiB,UAE3B,MADIkY,IAAQjnB,IAAWkF,EAAS+hB,EAAIxmB,KAAKsO,IACnCpK,KAOJ,SAAUrE,EAAQD,EAASF,GAEjC,IAAI4G,EAAY5G,EAAoB,IAChC0F,EAAW1F,EAAoB,GAC/BwF,EAAUxF,EAAoB,IAC9BsH,EAAWtH,EAAoB,GAEnCG,EAAOD,QAAU,SAAU4G,EAAMoB,EAAY2G,EAAMkY,EAAMC,GACvDpgB,EAAUsB,GACV,IAAI9C,EAAIM,EAASoB,GACbxC,EAAOkB,EAAQJ,GACfzB,EAAS2D,EAASlC,EAAEzB,QACpB0E,EAAQ2e,EAAUrjB,EAAS,EAAI,EAC/BvD,EAAI4mB,GAAW,EAAI,EACvB,GAAInY,EAAO,EAAG,OAAS,CACrB,GAAIxG,KAAS/D,EAAM,CACjByiB,EAAOziB,EAAK+D,GACZA,GAASjI,EACT,MAGF,GADAiI,GAASjI,EACL4mB,EAAU3e,EAAQ,EAAI1E,GAAU0E,EAClC,MAAMlE,UAAU,+CAGpB,KAAM6iB,EAAmB,GAAT3e,EAAsBA,EAAT1E,EAAgB0E,GAASjI,EAAOiI,KAAS/D,IACpEyiB,EAAO7e,EAAW6e,EAAMziB,EAAK+D,GAAQA,EAAOjD,IAE9C,OAAO2hB,IAMH,SAAU5mB,EAAQD,EAASF,GAKjC,IAAI0F,EAAW1F,EAAoB,GAC/BsJ,EAAkBtJ,EAAoB,IACtCsH,EAAWtH,EAAoB,GAEnCG,EAAOD,QAAU,GAAGsP,YAAc,SAASA,WAAWnM,EAAkBoM,GACtE,IAAIrK,EAAIM,EAASjC,MACb0N,EAAM7J,EAASlC,EAAEzB,QACjBsjB,EAAK3d,EAAgBjG,EAAQ8N,GAC7BzC,EAAOpF,EAAgBmG,EAAO0B,GAC9BP,EAAyB,EAAnBlN,UAAUC,OAAaD,UAAU,GAAK7D,GAC5Ckc,EAAQ1X,KAAKS,KAAK8L,IAAQ/Q,GAAYsR,EAAM7H,EAAgBsH,EAAKO,IAAQzC,EAAMyC,EAAM8V,GACrFC,EAAM,EAMV,IALIxY,EAAOuY,GAAMA,EAAKvY,EAAOqN,IAC3BmL,GAAO,EACPxY,GAAQqN,EAAQ,EAChBkL,GAAMlL,EAAQ,GAEC,EAAVA,KACDrN,KAAQtJ,EAAGA,EAAE6hB,GAAM7hB,EAAEsJ,UACbtJ,EAAE6hB,GACdA,GAAMC,EACNxY,GAAQwY,EACR,OAAO9hB,IAML,SAAUjF,EAAQD,GAExBC,EAAOD,QAAU,SAAUqE,GACzB,IACE,MAAO,CAAEC,GAAG,EAAO6N,EAAG9N,KACtB,MAAOC,GACP,MAAO,CAAEA,GAAG,EAAM6N,EAAG7N,MAOnB,SAAUrE,EAAQD,EAASF,GAEjC,IAAI+E,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/BmnB,EAAuBnnB,EAAoB,IAE/CG,EAAOD,QAAU,SAAUoD,EAAG6Y,GAE5B,GADApX,EAASzB,GACLW,EAASkY,IAAMA,EAAErW,cAAgBxC,EAAG,OAAO6Y,EAC/C,IAAIiL,EAAoBD,EAAqBhiB,EAAE7B,GAG/C,OADAgd,EADc8G,EAAkB9G,SACxBnE,GACDiL,EAAkB7G,UAMrB,SAAUpgB,EAAQD,EAASF,GAIjC,IAAIqnB,EAASrnB,EAAoB,KAC7BkO,EAAWlO,EAAoB,IAInCG,EAAOD,QAAUF,EAAoB,GAApBA,CAHP,MAGoC,SAAUiB,GACtD,OAAO,SAASiS,MAAQ,OAAOjS,EAAIwC,KAAyB,EAAnBC,UAAUC,OAAaD,UAAU,GAAK7D,MAC9E,CAEDoB,IAAK,SAASA,IAAIoB,GAChB,IAAIilB,EAAQD,EAAOE,SAASrZ,EAASzK,KAR/B,OAQ2CpB,GACjD,OAAOilB,GAASA,EAAMjV,GAGxBvE,IAAK,SAASA,IAAIzL,EAAKiD,GACrB,OAAO+hB,EAAO1Q,IAAIzI,EAASzK,KAbrB,OAayC,IAARpB,EAAY,EAAIA,EAAKiD,KAE7D+hB,GAAQ,IAKL,SAAUlnB,EAAQD,EAASF,GAIjC,IAAIkF,EAAKlF,EAAoB,GAAGmF,EAC5B6C,EAAShI,EAAoB,IAC7BoJ,EAAcpJ,EAAoB,IAClC8B,EAAM9B,EAAoB,IAC1BkJ,EAAalJ,EAAoB,IACjC2Z,EAAQ3Z,EAAoB,IAC5BwnB,EAAcxnB,EAAoB,IAClC2O,EAAO3O,EAAoB,IAC3BkK,EAAalK,EAAoB,IACjC6W,EAAc7W,EAAoB,GAClCwU,EAAUxU,EAAoB,IAAIwU,QAClCtG,EAAWlO,EAAoB,IAC/BynB,EAAO5Q,EAAc,KAAO,OAE5B0Q,EAAW,SAAUzgB,EAAMzE,GAE7B,IACIilB,EADAjf,EAAQmM,EAAQnS,GAEpB,GAAc,MAAVgG,EAAe,OAAOvB,EAAKwW,GAAGjV,GAElC,IAAKif,EAAQxgB,EAAK4gB,GAAIJ,EAAOA,EAAQA,EAAMpmB,EACzC,GAAIomB,EAAM9L,GAAKnZ,EAAK,OAAOilB,GAI/BnnB,EAAOD,QAAU,CACfia,eAAgB,SAAUxI,EAASnL,EAAMkB,EAAQqS,GAC/C,IAAIzW,EAAIqO,EAAQ,SAAU7K,EAAMgP,GAC9B5M,EAAWpC,EAAMxD,EAAGkD,EAAM,MAC1BM,EAAK0P,GAAKhQ,EACVM,EAAKwW,GAAKtV,EAAO,MACjBlB,EAAK4gB,GAAK7nB,GACViH,EAAK6gB,GAAK9nB,GACViH,EAAK2gB,GAAQ,EACT3R,GAAYjW,IAAW8Z,EAAM7D,EAAUpO,EAAQZ,EAAKiT,GAAQjT,KAsDlE,OApDAsC,EAAY9F,EAAE9B,UAAW,CAGvB8d,MAAO,SAASA,QACd,IAAK,IAAIxY,EAAOoH,EAASzK,KAAM+C,GAAO4L,EAAOtL,EAAKwW,GAAIgK,EAAQxgB,EAAK4gB,GAAIJ,EAAOA,EAAQA,EAAMpmB,EAC1FomB,EAAMM,GAAI,EACNN,EAAM5lB,IAAG4lB,EAAM5lB,EAAI4lB,EAAM5lB,EAAER,EAAIrB,WAC5BuS,EAAKkV,EAAMlnB,GAEpB0G,EAAK4gB,GAAK5gB,EAAK6gB,GAAK9nB,GACpBiH,EAAK2gB,GAAQ,GAIfI,SAAU,SAAUxlB,GAClB,IAAIyE,EAAOoH,EAASzK,KAAM+C,GACtB8gB,EAAQC,EAASzgB,EAAMzE,GAC3B,GAAIilB,EAAO,CACT,IAAIrY,EAAOqY,EAAMpmB,EACb4mB,EAAOR,EAAM5lB,SACVoF,EAAKwW,GAAGgK,EAAMlnB,GACrBknB,EAAMM,GAAI,EACNE,IAAMA,EAAK5mB,EAAI+N,GACfA,IAAMA,EAAKvN,EAAIomB,GACfhhB,EAAK4gB,IAAMJ,IAAOxgB,EAAK4gB,GAAKzY,GAC5BnI,EAAK6gB,IAAML,IAAOxgB,EAAK6gB,GAAKG,GAChChhB,EAAK2gB,KACL,QAASH,GAIbtX,QAAS,SAASA,QAAQ9H,GACxBgG,EAASzK,KAAM+C,GAGf,IAFA,IACI8gB,EADAniB,EAAIrD,EAAIoG,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,GAAW,GAElEynB,EAAQA,EAAQA,EAAMpmB,EAAIuC,KAAKikB,IAGpC,IAFAviB,EAAEmiB,EAAMjV,EAAGiV,EAAM9L,EAAG/X,MAEb6jB,GAASA,EAAMM,GAAGN,EAAQA,EAAM5lB,GAK3CM,IAAK,SAASA,IAAIK,GAChB,QAASklB,EAASrZ,EAASzK,KAAM+C,GAAOnE,MAGxCwU,GAAa3R,EAAG5B,EAAE9B,UAAW,OAAQ,CACvCP,IAAK,WACH,OAAOiN,EAASzK,KAAM+C,GAAMihB,MAGzBnkB,GAETqT,IAAK,SAAU7P,EAAMzE,EAAKiD,GACxB,IACIwiB,EAAMzf,EADNif,EAAQC,EAASzgB,EAAMzE,GAoBzB,OAjBEilB,EACFA,EAAMjV,EAAI/M,GAGVwB,EAAK6gB,GAAKL,EAAQ,CAChBlnB,EAAGiI,EAAQmM,EAAQnS,GAAK,GACxBmZ,EAAGnZ,EACHgQ,EAAG/M,EACH5D,EAAGomB,EAAOhhB,EAAK6gB,GACfzmB,EAAGrB,GACH+nB,GAAG,GAEA9gB,EAAK4gB,KAAI5gB,EAAK4gB,GAAKJ,GACpBQ,IAAMA,EAAK5mB,EAAIomB,GACnBxgB,EAAK2gB,KAES,MAAVpf,IAAevB,EAAKwW,GAAGjV,GAASif,IAC7BxgB,GAEXygB,SAAUA,EACVnN,UAAW,SAAU9W,EAAGkD,EAAMkB,GAG5B8f,EAAYlkB,EAAGkD,EAAM,SAAU6W,EAAUrE,GACvCvV,KAAK+S,GAAKtI,EAASmP,EAAU7W,GAC7B/C,KAAK8Z,GAAKvE,EACVvV,KAAKkkB,GAAK9nB,IACT,WAKD,IAJA,IAAIiH,EAAOrD,KACPuV,EAAOlS,EAAKyW,GACZ+J,EAAQxgB,EAAK6gB,GAEVL,GAASA,EAAMM,GAAGN,EAAQA,EAAM5lB,EAEvC,OAAKoF,EAAK0P,KAAQ1P,EAAK6gB,GAAKL,EAAQA,EAAQA,EAAMpmB,EAAI4F,EAAK0P,GAAGkR,IAMnC/Y,EAAK,EAApB,QAARqK,EAA+BsO,EAAM9L,EAC7B,UAARxC,EAAiCsO,EAAMjV,EAC5B,CAACiV,EAAM9L,EAAG8L,EAAMjV,KAN7BvL,EAAK0P,GAAK3W,GACH8O,EAAK,KAMbjH,EAAS,UAAY,UAAWA,GAAQ,GAG3CwC,EAAW1D,MAOT,SAAUrG,EAAQD,EAASF,GAIjC,IAAIqnB,EAASrnB,EAAoB,KAC7BkO,EAAWlO,EAAoB,IAInCG,EAAOD,QAAUF,EAAoB,GAApBA,CAHP,MAGoC,SAAUiB,GACtD,OAAO,SAAS8mB,MAAQ,OAAO9mB,EAAIwC,KAAyB,EAAnBC,UAAUC,OAAaD,UAAU,GAAK7D,MAC9E,CAEDmoB,IAAK,SAASA,IAAI1iB,GAChB,OAAO+hB,EAAO1Q,IAAIzI,EAASzK,KARrB,OAQiC6B,EAAkB,IAAVA,EAAc,EAAIA,EAAOA,KAEzE+hB,IAKG,SAAUlnB,EAAQD,EAASF,GAIjC,IAcIioB,EAdArmB,EAAS5B,EAAoB,GAC7B4Z,EAAO5Z,EAAoB,GAApBA,CAAwB,GAC/BoY,EAAWpY,EAAoB,IAC/BsU,EAAOtU,EAAoB,IAC3Bub,EAASvb,EAAoB,IAC7BkoB,EAAOloB,EAAoB,KAC3BiE,EAAWjE,EAAoB,GAC/BkO,EAAWlO,EAAoB,IAC/BmoB,EAAkBnoB,EAAoB,IACtCooB,GAAWxmB,EAAOymB,eAAiB,kBAAmBzmB,EACtD0mB,EAAW,UACX7T,EAAUH,EAAKG,QACfR,EAAepT,OAAOoT,aACtBsU,EAAsBL,EAAKM,QAG3B7W,EAAU,SAAU1Q,GACtB,OAAO,SAASwnB,UACd,OAAOxnB,EAAIwC,KAAyB,EAAnBC,UAAUC,OAAaD,UAAU,GAAK7D,MAIvDgZ,EAAU,CAEZ5X,IAAK,SAASA,IAAIoB,GAChB,GAAI4B,EAAS5B,GAAM,CACjB,IAAI+P,EAAOqC,EAAQpS,GACnB,OAAa,IAAT+P,EAAsBmW,EAAoBra,EAASzK,KAAM6kB,IAAWrnB,IAAIoB,GACrE+P,EAAOA,EAAK3O,KAAK6Z,IAAMzd,KAIlCiO,IAAK,SAASA,IAAIzL,EAAKiD,GACrB,OAAO4iB,EAAKvR,IAAIzI,EAASzK,KAAM6kB,GAAWjmB,EAAKiD,KAK/CojB,EAAWvoB,EAAOD,QAAUF,EAAoB,GAApBA,CAAwBsoB,EAAU3W,EAASkH,EAASqP,GAAM,GAAM,GAG5FC,GAAmBC,IAErB7M,GADA0M,EAAcC,EAAK/N,eAAexI,EAAS2W,IACxB9mB,UAAWqX,GAC9BvE,EAAKC,MAAO,EACZqF,EAAK,CAAC,SAAU,MAAO,MAAO,OAAQ,SAAUvX,GAC9C,IAAIkN,EAAQmZ,EAASlnB,UACjB4F,EAASmI,EAAMlN,GACnB+V,EAAS7I,EAAOlN,EAAK,SAAUkB,EAAGC,GAEhC,GAAIS,EAASV,KAAO0Q,EAAa1Q,GAAI,CAC9BE,KAAKikB,KAAIjkB,KAAKikB,GAAK,IAAIO,GAC5B,IAAI3f,EAAS7E,KAAKikB,GAAGrlB,GAAKkB,EAAGC,GAC7B,MAAc,OAAPnB,EAAeoB,KAAO6E,EAE7B,OAAOlB,EAAO9G,KAAKmD,KAAMF,EAAGC,SAQ9B,SAAUrD,EAAQD,EAASF,GAIjC,IAAIoJ,EAAcpJ,EAAoB,IAClCyU,EAAUzU,EAAoB,IAAIyU,QAClC1P,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/BkJ,EAAalJ,EAAoB,IACjC2Z,EAAQ3Z,EAAoB,IAC5B4J,EAAoB5J,EAAoB,IACxC2oB,EAAO3oB,EAAoB,IAC3BkO,EAAWlO,EAAoB,IAC/BsL,EAAY1B,EAAkB,GAC9B2B,EAAiB3B,EAAkB,GACnCoK,EAAK,EAGLuU,EAAsB,SAAUzhB,GAClC,OAAOA,EAAK6gB,KAAO7gB,EAAK6gB,GAAK,IAAIiB,IAE/BA,EAAsB,WACxBnlB,KAAKF,EAAI,IAEPslB,EAAqB,SAAUpkB,EAAOpC,GACxC,OAAOiJ,EAAU7G,EAAMlB,EAAG,SAAUW,GAClC,OAAOA,EAAG,KAAO7B,KAGrBumB,EAAoBpnB,UAAY,CAC9BP,IAAK,SAAUoB,GACb,IAAIilB,EAAQuB,EAAmBplB,KAAMpB,GACrC,GAAIilB,EAAO,OAAOA,EAAM,IAE1BtlB,IAAK,SAAUK,GACb,QAASwmB,EAAmBplB,KAAMpB,IAEpCyL,IAAK,SAAUzL,EAAKiD,GAClB,IAAIgiB,EAAQuB,EAAmBplB,KAAMpB,GACjCilB,EAAOA,EAAM,GAAKhiB,EACjB7B,KAAKF,EAAEgF,KAAK,CAAClG,EAAKiD,KAEzBuiB,SAAU,SAAUxlB,GAClB,IAAIgG,EAAQkD,EAAe9H,KAAKF,EAAG,SAAUW,GAC3C,OAAOA,EAAG,KAAO7B,IAGnB,OADKgG,GAAO5E,KAAKF,EAAEulB,OAAOzgB,EAAO,MACvBA,IAIdlI,EAAOD,QAAU,CACfia,eAAgB,SAAUxI,EAASnL,EAAMkB,EAAQqS,GAC/C,IAAIzW,EAAIqO,EAAQ,SAAU7K,EAAMgP,GAC9B5M,EAAWpC,EAAMxD,EAAGkD,EAAM,MAC1BM,EAAK0P,GAAKhQ,EACVM,EAAKwW,GAAKtJ,IAEN8B,IADJhP,EAAK6gB,GAAK9nB,KACiB8Z,EAAM7D,EAAUpO,EAAQZ,EAAKiT,GAAQjT,KAoBlE,OAlBAsC,EAAY9F,EAAE9B,UAAW,CAGvBqmB,SAAU,SAAUxlB,GAClB,IAAK4B,EAAS5B,GAAM,OAAO,EAC3B,IAAI+P,EAAOqC,EAAQpS,GACnB,OAAa,IAAT+P,EAAsBmW,EAAoBra,EAASzK,KAAM+C,IAAe,UAAEnE,GACvE+P,GAAQuW,EAAKvW,EAAM3O,KAAK6Z,YAAclL,EAAK3O,KAAK6Z,KAIzDtb,IAAK,SAASA,IAAIK,GAChB,IAAK4B,EAAS5B,GAAM,OAAO,EAC3B,IAAI+P,EAAOqC,EAAQpS,GACnB,OAAa,IAAT+P,EAAsBmW,EAAoBra,EAASzK,KAAM+C,IAAOxE,IAAIK,GACjE+P,GAAQuW,EAAKvW,EAAM3O,KAAK6Z,OAG5Bha,GAETqT,IAAK,SAAU7P,EAAMzE,EAAKiD,GACxB,IAAI8M,EAAOqC,EAAQ1P,EAAS1C,IAAM,GAGlC,OAFa,IAAT+P,EAAemW,EAAoBzhB,GAAMgH,IAAIzL,EAAKiD,GACjD8M,EAAKtL,EAAKwW,IAAMhY,EACdwB,GAET0hB,QAASD,IAML,SAAUpoB,EAAQD,EAASF,GAKjC,IAAI+F,EAAQ/F,EAAoB,GAC5B+oB,EAAUC,KAAKxnB,UAAUunB,QACzBE,EAAeD,KAAKxnB,UAAU0nB,YAE9BC,EAAK,SAAUC,GACjB,OAAa,EAANA,EAAUA,EAAM,IAAMA,GAI/BjpB,EAAOD,QAAW6F,EAAM,WACtB,MAAiD,4BAA1CkjB,EAAa3oB,KAAK,IAAI0oB,MAAM,KAAO,QACrCjjB,EAAM,WACXkjB,EAAa3oB,KAAK,IAAI0oB,KAAKtG,QACvB,SAASwG,cACb,IAAKrD,SAASkD,EAAQzoB,KAAKmD,OAAQ,MAAM8G,WAAW,sBACpD,IAAI9J,EAAIgD,KACJ4lB,EAAI5oB,EAAE6oB,iBACN/oB,EAAIE,EAAE8oB,qBACN5nB,EAAI0nB,EAAI,EAAI,IAAU,KAAJA,EAAW,IAAM,GACvC,OAAO1nB,GAAK,QAAU0C,KAAKmd,IAAI6H,IAAI5gB,MAAM9G,GAAK,GAAK,GACjD,IAAMwnB,EAAG1oB,EAAE+oB,cAAgB,GAAK,IAAML,EAAG1oB,EAAEgpB,cAC3C,IAAMN,EAAG1oB,EAAEipB,eAAiB,IAAMP,EAAG1oB,EAAEkpB,iBACvC,IAAMR,EAAG1oB,EAAEmpB,iBAAmB,KAAW,GAAJrpB,EAASA,EAAI,IAAM4oB,EAAG5oB,IAAM,KACjE0oB,GAKE,SAAU9oB,EAAQD,EAASF,GAGjC,IAAI6E,EAAY7E,EAAoB,IAChCsH,EAAWtH,EAAoB,GACnCG,EAAOD,QAAU,SAAUgE,GACzB,GAAIA,IAAOrE,GAAW,OAAO,EAC7B,IAAIgqB,EAAShlB,EAAUX,GACnBP,EAAS2D,EAASuiB,GACtB,GAAIA,IAAWlmB,EAAQ,MAAM4G,WAAW,iBACxC,OAAO5G,IAMH,SAAUxD,EAAQD,EAASF,GAKjC,IAAImY,EAAUnY,EAAoB,IAC9BiE,EAAWjE,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/B8B,EAAM9B,EAAoB,IAC1B8pB,EAAuB9pB,EAAoB,EAApBA,CAAuB,sBAgClDG,EAAOD,QA9BP,SAAS6pB,iBAAiB1mB,EAAQ6Z,EAAU9a,EAAQ4nB,EAAWva,EAAOwa,EAAOC,EAAQC,GAMnF,IALA,IAGIC,EAASC,EAHTC,EAAc7a,EACd8a,EAAc,EACd3P,IAAQsP,GAASpoB,EAAIooB,EAAQC,EAAS,GAGnCI,EAAcP,GAAW,CAC9B,GAAIO,KAAenoB,EAAQ,CASzB,GARAgoB,EAAUxP,EAAQA,EAAMxY,EAAOmoB,GAAcA,EAAarN,GAAY9a,EAAOmoB,GAE7EF,GAAa,EACTpmB,EAASmmB,KAEXC,GADAA,EAAaD,EAAQN,MACOjqB,KAAcwqB,EAAalS,EAAQiS,IAG7DC,GAAsB,EAARJ,EAChBK,EAAcP,iBAAiB1mB,EAAQ6Z,EAAUkN,EAAS9iB,EAAS8iB,EAAQzmB,QAAS2mB,EAAaL,EAAQ,GAAK,MACzG,CACL,GAAmB,kBAAfK,EAAiC,MAAMnmB,YAC3Cd,EAAOinB,GAAeF,EAGxBE,IAEFC,IAEF,OAAOD,IAQH,SAAUnqB,EAAQD,EAASF,GAGjC,IAAIsH,EAAWtH,EAAoB,GAC/B8b,EAAS9b,EAAoB,IAC7BuF,EAAUvF,EAAoB,IAElCG,EAAOD,QAAU,SAAU4G,EAAM0jB,EAAWC,EAAYC,GACtD,IAAI7nB,EAAIwD,OAAOd,EAAQuB,IACnB6jB,EAAe9nB,EAAEc,OACjBinB,EAAUH,IAAe5qB,GAAY,IAAMwG,OAAOokB,GAClDI,EAAevjB,EAASkjB,GAC5B,GAAIK,GAAgBF,GAA2B,IAAXC,EAAe,OAAO/nB,EAC1D,IAAIioB,EAAUD,EAAeF,EACzBI,EAAejP,EAAOxb,KAAKsqB,EAASvmB,KAAKqE,KAAKoiB,EAAUF,EAAQjnB,SAEpE,OAD0BmnB,EAAtBC,EAAapnB,SAAkBonB,EAAeA,EAAatiB,MAAM,EAAGqiB,IACjEJ,EAAOK,EAAeloB,EAAIA,EAAIkoB,IAMjC,SAAU5qB,EAAQD,EAASF,GAEjC,IAAI6W,EAAc7W,EAAoB,GAClCob,EAAUpb,EAAoB,IAC9BiH,EAAYjH,EAAoB,IAChC0b,EAAS1b,EAAoB,IAAImF,EACrChF,EAAOD,QAAU,SAAU8qB,GACzB,OAAO,SAAU9mB,GAOf,IANA,IAKI7B,EALA+C,EAAI6B,EAAU/C,GACd2H,EAAOuP,EAAQhW,GACfzB,EAASkI,EAAKlI,OACdvD,EAAI,EACJkI,EAAS,GAEGlI,EAATuD,GACLtB,EAAMwJ,EAAKzL,KACNyW,IAAe6E,EAAOpb,KAAK8E,EAAG/C,IACjCiG,EAAOC,KAAKyiB,EAAY,CAAC3oB,EAAK+C,EAAE/C,IAAQ+C,EAAE/C,IAG9C,OAAOiG,KAOL,SAAUnI,EAAQD,EAASF,GAGjC,IAAIuJ,EAAUvJ,EAAoB,IAC9B0O,EAAO1O,EAAoB,KAC/BG,EAAOD,QAAU,SAAUsG,GACzB,OAAO,SAASykB,SACd,GAAI1hB,EAAQ9F,OAAS+C,EAAM,MAAMrC,UAAUqC,EAAO,yBAClD,OAAOkI,EAAKjL,SAOV,SAAUtD,EAAQD,EAASF,GAEjC,IAAI2Z,EAAQ3Z,EAAoB,IAEhCG,EAAOD,QAAU,SAAU2S,EAAM/F,GAC/B,IAAIxE,EAAS,GAEb,OADAqR,EAAM9G,GAAM,EAAOvK,EAAOC,KAAMD,EAAQwE,GACjCxE,IAMH,SAAUnI,EAAQD,GAGxBC,EAAOD,QAAUmE,KAAK6mB,OAAS,SAASA,MAAM/O,EAAGgP,EAAOC,EAAQC,EAAQC,GACtE,OACuB,IAArB5nB,UAAUC,QAELwY,GAAKA,GAELgP,GAASA,GAETC,GAAUA,GAEVC,GAAUA,GAEVC,GAAWA,EACT5I,IACLvG,IAAMF,UAAYE,KAAOF,SAAiBE,GACtCA,EAAIgP,IAAUG,EAAUD,IAAWD,EAASD,GAASE,IAMzD,SAAUlrB,EAAQD,EAASF,GAEjC,IAAIuJ,EAAUvJ,EAAoB,IAC9B8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClCgK,EAAYhK,EAAoB,IACpCG,EAAOD,QAAUF,EAAoB,IAAIurB,WAAa,SAAUrnB,GAC9D,IAAIkB,EAAIvE,OAAOqD,GACf,OAAOkB,EAAE0H,KAAcjN,IAClB,eAAgBuF,GAEhB4E,EAAUvI,eAAe8H,EAAQnE,MAMlC,SAAUjF,EAAQD,EAASF,GAIjC,IAAIwrB,EAAOxrB,EAAoB,KAC3B4d,EAAS5d,EAAoB,IAC7B4G,EAAY5G,EAAoB,IACpCG,EAAOD,QAAU,WAOf,IANA,IAAI2G,EAAKD,EAAUnD,MACfE,EAASD,UAAUC,OACnB8nB,EAAQ,IAAI5gB,MAAMlH,GAClBvD,EAAI,EACJuT,EAAI6X,EAAK7X,EACT+X,GAAS,EACGtrB,EAATuD,IAAiB8nB,EAAMrrB,GAAKsD,UAAUtD,QAAUuT,IAAG+X,GAAS,GACnE,OAAO,WACL,IAII9P,EAHA/M,EAAOnL,UAAUC,OACjBgY,EAAI,EACJH,EAAI,EAER,IAAKkQ,IAAW7c,EAAM,OAAO+O,EAAO/W,EAAI4kB,EAL7BhoB,MAOX,GADAmY,EAAO6P,EAAMhjB,QACTijB,EAAQ,KAAe/P,EAAThY,EAAYgY,IAASC,EAAKD,KAAOhI,IAAGiI,EAAKD,GAAKjY,UAAU8X,MAC1E,KAAcA,EAAP3M,GAAU+M,EAAKrT,KAAK7E,UAAU8X,MACrC,OAAOoC,EAAO/W,EAAI+U,EATPnY,SAgBT,SAAUtD,EAAQD,EAASF,GAEjCG,EAAOD,QAAUF,EAAoB,KAK/B,SAAUG,EAAQD,EAASF,GAEjC,IAAIkF,EAAKlF,EAAoB,GACzBkH,EAAOlH,EAAoB,IAC3BohB,EAAUphB,EAAoB,IAC9BiH,EAAYjH,EAAoB,IAEpCG,EAAOD,QAAU,SAASyrB,OAAOtoB,EAAQuoB,GAKvC,IAJA,IAGIvpB,EAHAwJ,EAAOuV,EAAQna,EAAU2kB,IACzBjoB,EAASkI,EAAKlI,OACdvD,EAAI,EAEQA,EAATuD,GAAYuB,EAAGC,EAAE9B,EAAQhB,EAAMwJ,EAAKzL,KAAM8G,EAAK/B,EAAEymB,EAAOvpB,IAC/D,OAAOgB,IAMH,SAAUlD,EAAQD,EAASF,GAEjCA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBG,EAAOD,QAAUF,EAAoB,MAK/B,SAAUG,EAAQD,EAASF,GAKjC,IAAI4B,EAAS5B,EAAoB,GAC7BgC,EAAMhC,EAAoB,IAC1B6W,EAAc7W,EAAoB,GAClCkC,EAAUlC,EAAoB,GAC9BoY,EAAWpY,EAAoB,IAC/B8T,EAAO9T,EAAoB,IAAI6I,IAC/BgjB,EAAS7rB,EAAoB,GAC7BmT,EAASnT,EAAoB,IAC7BsY,EAAiBtY,EAAoB,IACrC0E,EAAM1E,EAAoB,IAC1B2J,EAAM3J,EAAoB,GAC1Bgb,EAAShb,EAAoB,IAC7B8rB,EAAY9rB,EAAoB,IAChC+rB,EAAW/rB,EAAoB,KAC/BmY,EAAUnY,EAAoB,IAC9B+E,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/B0F,EAAW1F,EAAoB,GAC/BiH,EAAYjH,EAAoB,IAChCiF,EAAcjF,EAAoB,IAClC+G,EAAa/G,EAAoB,IACjCgsB,EAAUhsB,EAAoB,IAC9BisB,EAAUjsB,EAAoB,IAC9BsK,EAAQtK,EAAoB,IAC5BksB,EAAQlsB,EAAoB,IAC5BqK,EAAMrK,EAAoB,GAC1B2U,EAAQ3U,EAAoB,IAC5BkH,EAAOoD,EAAMnF,EACbD,EAAKmF,EAAIlF,EACTsE,EAAOwiB,EAAQ9mB,EACf8V,EAAUrZ,EAAO+C,OACjBwnB,EAAQvqB,EAAOwqB,KACfC,EAAaF,GAASA,EAAMG,UAC5BrqB,EAAY,YACZsqB,EAAS5iB,EAAI,WACb6iB,EAAe7iB,EAAI,eACnB+R,EAAS,GAAG3E,qBACZ0V,EAAiBtZ,EAAO,mBACxBuZ,EAAavZ,EAAO,WACpBwZ,EAAYxZ,EAAO,cACnBvN,EAAc/E,OAAOoB,GACrB2qB,EAA+B,mBAAX3R,KAA2BiR,EAAM/mB,EACrD0nB,EAAUjrB,EAAOirB,QAEjBC,GAAUD,IAAYA,EAAQ5qB,KAAe4qB,EAAQ5qB,GAAW8qB,UAGhEC,EAAgBnW,GAAegV,EAAO,WACxC,OAES,GAFFG,EAAQ9mB,EAAG,GAAI,IAAK,CACzBjE,IAAK,WAAc,OAAOiE,EAAGzB,KAAM,IAAK,CAAE6B,MAAO,IAAK/B,MACpDA,IACD,SAAUW,EAAI7B,EAAKmX,GACtB,IAAIyT,EAAY/lB,EAAKtB,EAAavD,GAC9B4qB,UAAkBrnB,EAAYvD,GAClC6C,EAAGhB,EAAI7B,EAAKmX,GACRyT,GAAa/oB,IAAO0B,GAAaV,EAAGU,EAAavD,EAAK4qB,IACxD/nB,EAEAgoB,EAAO,SAAU/mB,GACnB,IAAIgnB,EAAMT,EAAWvmB,GAAO6lB,EAAQ/Q,EAAQhZ,IAE5C,OADAkrB,EAAI5P,GAAKpX,EACFgnB,GAGLC,EAAWR,GAAyC,iBAApB3R,EAAQrM,SAAuB,SAAU1K,GAC3E,MAAoB,iBAANA,GACZ,SAAUA,GACZ,OAAOA,aAAc+W,GAGnB4B,EAAkB,SAAS/b,eAAeoD,EAAI7B,EAAKmX,GAKrD,OAJItV,IAAO0B,GAAaiX,EAAgB8P,EAAWtqB,EAAKmX,GACxDzU,EAASb,GACT7B,EAAM4C,EAAY5C,GAAK,GACvB0C,EAASyU,GACLxX,EAAI0qB,EAAYrqB,IACbmX,EAAExY,YAIDgB,EAAIkC,EAAIqoB,IAAWroB,EAAGqoB,GAAQlqB,KAAM6B,EAAGqoB,GAAQlqB,IAAO,GAC1DmX,EAAIwS,EAAQxS,EAAG,CAAExY,WAAY+F,EAAW,GAAG,OAJtC/E,EAAIkC,EAAIqoB,IAASrnB,EAAGhB,EAAIqoB,EAAQxlB,EAAW,EAAG,KACnD7C,EAAGqoB,GAAQlqB,IAAO,GAIX2qB,EAAc9oB,EAAI7B,EAAKmX,IACzBtU,EAAGhB,EAAI7B,EAAKmX,IAEnB6T,EAAoB,SAAStI,iBAAiB7gB,EAAInB,GACpDgC,EAASb,GAKT,IAJA,IAGI7B,EAHAwJ,EAAOkgB,EAAShpB,EAAIkE,EAAUlE,IAC9B3C,EAAI,EACJC,EAAIwL,EAAKlI,OAEFvD,EAAJC,GAAOwc,EAAgB3Y,EAAI7B,EAAMwJ,EAAKzL,KAAM2C,EAAEV,IACrD,OAAO6B,GAKLopB,EAAwB,SAASvW,qBAAqB1U,GACxD,IAAIkrB,EAAI7R,EAAOpb,KAAKmD,KAAMpB,EAAM4C,EAAY5C,GAAK,IACjD,QAAIoB,OAASmC,GAAe5D,EAAI0qB,EAAYrqB,KAASL,EAAI2qB,EAAWtqB,QAC7DkrB,IAAMvrB,EAAIyB,KAAMpB,KAASL,EAAI0qB,EAAYrqB,IAAQL,EAAIyB,KAAM8oB,IAAW9oB,KAAK8oB,GAAQlqB,KAAOkrB,IAE/FC,EAA4B,SAASrmB,yBAAyBjD,EAAI7B,GAGpE,GAFA6B,EAAK+C,EAAU/C,GACf7B,EAAM4C,EAAY5C,GAAK,GACnB6B,IAAO0B,IAAe5D,EAAI0qB,EAAYrqB,IAASL,EAAI2qB,EAAWtqB,GAAlE,CACA,IAAImX,EAAItS,EAAKhD,EAAI7B,GAEjB,OADImX,IAAKxX,EAAI0qB,EAAYrqB,IAAUL,EAAIkC,EAAIqoB,IAAWroB,EAAGqoB,GAAQlqB,KAAOmX,EAAExY,YAAa,GAChFwY,IAELiU,GAAuB,SAASxW,oBAAoB/S,GAKtD,IAJA,IAGI7B,EAHAyiB,EAAQrb,EAAKxC,EAAU/C,IACvBoE,EAAS,GACTlI,EAAI,EAEcA,EAAf0kB,EAAMnhB,QACN3B,EAAI0qB,EAAYrqB,EAAMyiB,EAAM1kB,OAASiC,GAAOkqB,GAAUlqB,GAAOyR,GAAMxL,EAAOC,KAAKlG,GACpF,OAAOiG,GAEPolB,GAAyB,SAASxV,sBAAsBhU,GAM1D,IALA,IAII7B,EAJAsrB,EAAQzpB,IAAO0B,EACfkf,EAAQrb,EAAKkkB,EAAQhB,EAAY1lB,EAAU/C,IAC3CoE,EAAS,GACTlI,EAAI,EAEcA,EAAf0kB,EAAMnhB,SACP3B,EAAI0qB,EAAYrqB,EAAMyiB,EAAM1kB,OAAUutB,IAAQ3rB,EAAI4D,EAAavD,IAAciG,EAAOC,KAAKmkB,EAAWrqB,IACxG,OAAOiG,GAINskB,IAYHxU,GAXA6C,EAAU,SAAStW,SACjB,GAAIlB,gBAAgBwX,EAAS,MAAM9W,UAAU,gCAC7C,IAAIgC,EAAMzB,EAAuB,EAAnBhB,UAAUC,OAAaD,UAAU,GAAK7D,IAChDmR,EAAO,SAAU1L,GACf7B,OAASmC,GAAaoL,EAAK1Q,KAAKqsB,EAAWrnB,GAC3CtD,EAAIyB,KAAM8oB,IAAWvqB,EAAIyB,KAAK8oB,GAASpmB,KAAM1C,KAAK8oB,GAAQpmB,IAAO,GACrE6mB,EAAcvpB,KAAM0C,EAAKY,EAAW,EAAGzB,KAGzC,OADIuR,GAAeiW,GAAQE,EAAcpnB,EAAaO,EAAK,CAAEpF,cAAc,EAAM+M,IAAKkD,IAC/Ekc,EAAK/mB,KAEGlE,GAAY,WAAY,SAASuG,WAChD,OAAO/E,KAAK8Z,KAGdjT,EAAMnF,EAAIqoB,EACVnjB,EAAIlF,EAAI0X,EACR7c,EAAoB,IAAImF,EAAI8mB,EAAQ9mB,EAAIsoB,GACxCztB,EAAoB,IAAImF,EAAImoB,EAC5BpB,EAAM/mB,EAAIuoB,GAEN7W,IAAgB7W,EAAoB,KACtCoY,EAASxS,EAAa,uBAAwB0nB,GAAuB,GAGvEtS,EAAO7V,EAAI,SAAUzE,GACnB,OAAOwsB,EAAKvjB,EAAIjJ,MAIpBwB,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,GAAKmqB,EAAY,CAAEjoB,OAAQsW,IAEnE,IAAK,IAAI2S,GAAa,iHAGpBjnB,MAAM,KAAMgV,GAAI,EAAuBA,GAApBiS,GAAWjqB,QAAYgG,EAAIikB,GAAWjS,OAE3D,IAAK,IAAIkS,GAAmBlZ,EAAMhL,EAAIlF,OAAQ+W,GAAI,EAA6BA,GAA1BqS,GAAiBlqB,QAAamoB,EAAU+B,GAAiBrS,OAE9GtZ,EAAQA,EAAQW,EAAIX,EAAQO,GAAKmqB,EAAY,SAAU,CAErDkB,MAAO,SAAUzrB,GACf,OAAOL,EAAIyqB,EAAgBpqB,GAAO,IAC9BoqB,EAAepqB,GACfoqB,EAAepqB,GAAO4Y,EAAQ5Y,IAGpC0rB,OAAQ,SAASA,OAAOZ,GACtB,IAAKC,EAASD,GAAM,MAAMhpB,UAAUgpB,EAAM,qBAC1C,IAAK,IAAI9qB,KAAOoqB,EAAgB,GAAIA,EAAepqB,KAAS8qB,EAAK,OAAO9qB,GAE1E2rB,UAAW,WAAclB,GAAS,GAClCmB,UAAW,WAAcnB,GAAS,KAGpC5qB,EAAQA,EAAQW,EAAIX,EAAQO,GAAKmqB,EAAY,SAAU,CAErD5kB,OA/FY,SAASA,OAAO9D,EAAInB,GAChC,OAAOA,IAAMlD,GAAYmsB,EAAQ9nB,GAAMmpB,EAAkBrB,EAAQ9nB,GAAKnB,IAgGtEjC,eAAgB+b,EAEhBkI,iBAAkBsI,EAElBlmB,yBAA0BqmB,EAE1BvW,oBAAqBwW,GAErBvV,sBAAuBwV,KAKzB,IAAIQ,GAAsBrC,EAAO,WAAcK,EAAM/mB,EAAE,KAEvDjD,EAAQA,EAAQW,EAAIX,EAAQO,EAAIyrB,GAAqB,SAAU,CAC7DhW,sBAAuB,SAASA,sBAAsBhU,GACpD,OAAOgoB,EAAM/mB,EAAEO,EAASxB,OAK5BioB,GAASjqB,EAAQA,EAAQW,EAAIX,EAAQO,IAAMmqB,GAAcf,EAAO,WAC9D,IAAIhpB,EAAIoY,IAIR,MAA0B,UAAnBoR,EAAW,CAACxpB,KAA2C,MAAxBwpB,EAAW,CAAE9oB,EAAGV,KAAyC,MAAzBwpB,EAAWxrB,OAAOgC,OACrF,OAAQ,CACXypB,UAAW,SAASA,UAAUpoB,GAI5B,IAHA,IAEI0gB,EAAUuJ,EAFVvS,EAAO,CAAC1X,GACR9D,EAAI,EAEkBA,EAAnBsD,UAAUC,QAAYiY,EAAKrT,KAAK7E,UAAUtD,MAEjD,GADA+tB,EAAYvJ,EAAWhJ,EAAK,IACvB3X,EAAS2gB,IAAa1gB,IAAOrE,MAAautB,EAASlpB,GAMxD,OALKiU,EAAQyM,KAAWA,EAAW,SAAUviB,EAAKiD,GAEhD,GADwB,mBAAb6oB,IAAyB7oB,EAAQ6oB,EAAU7tB,KAAKmD,KAAMpB,EAAKiD,KACjE8nB,EAAS9nB,GAAQ,OAAOA,IAE/BsW,EAAK,GAAKgJ,EACHyH,EAAWzoB,MAAMuoB,EAAOvQ,MAKnCX,EAAQhZ,GAAWuqB,IAAiBxsB,EAAoB,GAApBA,CAAwBib,EAAQhZ,GAAYuqB,EAAcvR,EAAQhZ,GAAW2R,SAEjH0E,EAAe2C,EAAS,UAExB3C,EAAejU,KAAM,QAAQ,GAE7BiU,EAAe1W,EAAOwqB,KAAM,QAAQ,IAK9B,SAAUjsB,EAAQD,EAASF,GAGjC,IAAIob,EAAUpb,EAAoB,IAC9Bqb,EAAOrb,EAAoB,IAC3BgH,EAAMhH,EAAoB,IAC9BG,EAAOD,QAAU,SAAUgE,GACzB,IAAIoE,EAAS8S,EAAQlX,GACjBuX,EAAaJ,EAAKlW,EACtB,GAAIsW,EAKF,IAJA,IAGIpZ,EAHA+rB,EAAU3S,EAAWvX,GACrBwX,EAAS1U,EAAI7B,EACb/E,EAAI,EAEgBA,EAAjBguB,EAAQzqB,QAAgB+X,EAAOpb,KAAK4D,EAAI7B,EAAM+rB,EAAQhuB,OAAOkI,EAAOC,KAAKlG,GAChF,OAAOiG,IAML,SAAUnI,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAKzC,EAAoB,GAAI,SAAU,CAAEc,eAAgBd,EAAoB,GAAGmF,KAKtG,SAAUhF,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAKzC,EAAoB,GAAI,SAAU,CAAE+kB,iBAAkB/kB,EAAoB,OAKrG,SAAUG,EAAQD,EAASF,GAGjC,IAAIiH,EAAYjH,EAAoB,IAChCwtB,EAA4BxtB,EAAoB,IAAImF,EAExDnF,EAAoB,GAApBA,CAAwB,2BAA4B,WAClD,OAAO,SAASmH,yBAAyBjD,EAAI7B,GAC3C,OAAOmrB,EAA0BvmB,EAAU/C,GAAK7B,OAO9C,SAAUlC,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEmF,OAAQhI,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAGjC,IAAI0F,EAAW1F,EAAoB,GAC/BquB,EAAkBruB,EAAoB,IAE1CA,EAAoB,GAApBA,CAAwB,iBAAkB,WACxC,OAAO,SAAS6F,eAAe3B,GAC7B,OAAOmqB,EAAgB3oB,EAASxB,QAO9B,SAAU/D,EAAQD,EAASF,GAGjC,IAAI0F,EAAW1F,EAAoB,GAC/B2U,EAAQ3U,EAAoB,IAEhCA,EAAoB,GAApBA,CAAwB,OAAQ,WAC9B,OAAO,SAAS6L,KAAK3H,GACnB,OAAOyQ,EAAMjP,EAASxB,QAOpB,SAAU/D,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,sBAAuB,WAC7C,OAAOA,EAAoB,IAAImF,KAM3B,SAAUhF,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/BsU,EAAOtU,EAAoB,IAAI0U,SAEnC1U,EAAoB,GAApBA,CAAwB,SAAU,SAAUsuB,GAC1C,OAAO,SAASC,OAAOrqB,GACrB,OAAOoqB,GAAWrqB,EAASC,GAAMoqB,EAAQha,EAAKpQ,IAAOA,MAOnD,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/BsU,EAAOtU,EAAoB,IAAI0U,SAEnC1U,EAAoB,GAApBA,CAAwB,OAAQ,SAAUwuB,GACxC,OAAO,SAASC,KAAKvqB,GACnB,OAAOsqB,GAASvqB,EAASC,GAAMsqB,EAAMla,EAAKpQ,IAAOA,MAO/C,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/BsU,EAAOtU,EAAoB,IAAI0U,SAEnC1U,EAAoB,GAApBA,CAAwB,oBAAqB,SAAU0uB,GACrD,OAAO,SAASva,kBAAkBjQ,GAChC,OAAOwqB,GAAsBzqB,EAASC,GAAMwqB,EAAmBpa,EAAKpQ,IAAOA,MAOzE,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU2uB,GAC5C,OAAO,SAASC,SAAS1qB,GACvB,OAAOD,EAASC,MAAMyqB,GAAYA,EAAUzqB,OAO1C,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU6uB,GAC5C,OAAO,SAASC,SAAS5qB,GACvB,OAAOD,EAASC,MAAM2qB,GAAYA,EAAU3qB,OAO1C,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,eAAgB,SAAU+uB,GAChD,OAAO,SAAS9a,aAAa/P,GAC3B,QAAOD,EAASC,MAAM6qB,GAAgBA,EAAc7qB,QAOlD,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CAAE8Y,OAAQvb,EAAoB,OAKjE,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEiY,GAAI9a,EAAoB,QAKjD,SAAUG,EAAQD,GAGxBC,EAAOD,QAAUW,OAAOia,IAAM,SAASA,GAAGqB,EAAGkN,GAE3C,OAAOlN,IAAMkN,EAAU,IAANlN,GAAW,EAAIA,GAAM,EAAIkN,EAAIlN,GAAKA,GAAKkN,GAAKA,IAMzD,SAAUlpB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEsiB,eAAgBnlB,EAAoB,IAAI8N,OAKjE,SAAU3N,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAG,WAAY,CAAEwiB,KAAMvlB,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAIjC,IAAIiE,EAAWjE,EAAoB,GAC/B6F,EAAiB7F,EAAoB,IACrCgvB,EAAehvB,EAAoB,EAApBA,CAAuB,eACtCivB,EAAgBprB,SAASrC,UAEvBwtB,KAAgBC,GAAgBjvB,EAAoB,GAAGmF,EAAE8pB,EAAeD,EAAc,CAAE1pB,MAAO,SAAUF,GAC7G,GAAmB,mBAAR3B,OAAuBQ,EAASmB,GAAI,OAAO,EACtD,IAAKnB,EAASR,KAAKjC,WAAY,OAAO4D,aAAa3B,KAEnD,KAAO2B,EAAIS,EAAeT,IAAI,GAAI3B,KAAKjC,YAAc4D,EAAG,OAAO,EAC/D,OAAO,MAMH,SAAUjF,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6E,EAAY7E,EAAoB,IAChCkvB,EAAelvB,EAAoB,IACnC8b,EAAS9b,EAAoB,IAC7BmvB,EAAW,GAAIC,QACfzmB,EAAQtE,KAAKsE,MACbyJ,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GACvBid,EAAQ,wCAGRC,EAAW,SAAUpuB,EAAGV,GAG1B,IAFA,IAAIJ,GAAK,EACLmvB,EAAK/uB,IACAJ,EAAI,GAEXgS,EAAKhS,IADLmvB,GAAMruB,EAAIkR,EAAKhS,IACA,IACfmvB,EAAK5mB,EAAM4mB,EAAK,MAGhBC,EAAS,SAAUtuB,GAGrB,IAFA,IAAId,EAAI,EACJI,EAAI,EACM,KAALJ,GAEPgS,EAAKhS,GAAKuI,GADVnI,GAAK4R,EAAKhS,IACUc,GACpBV,EAAKA,EAAIU,EAAK,KAGduuB,EAAc,WAGhB,IAFA,IAAIrvB,EAAI,EACJuB,EAAI,GACM,KAALvB,GACP,GAAU,KAANuB,GAAkB,IAANvB,GAAuB,IAAZgS,EAAKhS,GAAU,CACxC,IAAIsvB,EAAIrpB,OAAO+L,EAAKhS,IACpBuB,EAAU,KAANA,EAAW+tB,EAAI/tB,EAAIma,EAAOxb,KA1BzB,IA0BoC,EAAIovB,EAAE/rB,QAAU+rB,EAE3D,OAAO/tB,GAEP8f,EAAM,SAAUtF,EAAGjb,EAAGyuB,GACxB,OAAa,IAANzuB,EAAUyuB,EAAMzuB,EAAI,GAAM,EAAIugB,EAAItF,EAAGjb,EAAI,EAAGyuB,EAAMxT,GAAKsF,EAAItF,EAAIA,EAAGjb,EAAI,EAAGyuB,IAelFztB,EAAQA,EAAQa,EAAIb,EAAQO,KAAO0sB,IACV,UAAvB,KAAQC,QAAQ,IACG,MAAnB,GAAIA,QAAQ,IACS,SAArB,MAAMA,QAAQ,IACuB,yBAArC,mBAAsBA,QAAQ,MAC1BpvB,EAAoB,EAApBA,CAAuB,WAE3BmvB,EAAS7uB,KAAK,OACX,SAAU,CACb8uB,QAAS,SAASA,QAAQQ,GACxB,IAIIprB,EAAGqrB,EAAGlU,EAAGH,EAJTW,EAAI+S,EAAazrB,KAAM4rB,GACvBlqB,EAAIN,EAAU+qB,GACdjuB,EAAI,GACJpB,EA3DG,IA6DP,GAAI4E,EAAI,GAAS,GAAJA,EAAQ,MAAMoF,WAAW8kB,GAEtC,GAAIlT,GAAKA,EAAG,MAAO,MACnB,GAAIA,IAAM,MAAa,MAALA,EAAW,OAAO9V,OAAO8V,GAK3C,GAJIA,EAAI,IACNxa,EAAI,IACJwa,GAAKA,GAEC,MAAJA,EAKF,GAHA0T,GADArrB,EArCI,SAAU2X,GAGlB,IAFA,IAAIjb,EAAI,EACJ4uB,EAAK3T,EACI,MAAN2T,GACL5uB,GAAK,GACL4uB,GAAM,KAER,KAAa,GAANA,GACL5uB,GAAK,EACL4uB,GAAM,EACN,OAAO5uB,EA2BDwgB,CAAIvF,EAAIsF,EAAI,EAAG,GAAI,IAAM,IACrB,EAAItF,EAAIsF,EAAI,GAAIjd,EAAG,GAAK2X,EAAIsF,EAAI,EAAGjd,EAAG,GAC9CqrB,GAAK,iBAEG,GADRrrB,EAAI,GAAKA,GACE,CAGT,IAFA8qB,EAAS,EAAGO,GACZlU,EAAIxW,EACQ,GAALwW,GACL2T,EAAS,IAAK,GACd3T,GAAK,EAIP,IAFA2T,EAAS7N,EAAI,GAAI9F,EAAG,GAAI,GACxBA,EAAInX,EAAI,EACI,IAALmX,GACL6T,EAAO,GAAK,IACZ7T,GAAK,GAEP6T,EAAO,GAAK7T,GACZ2T,EAAS,EAAG,GACZE,EAAO,GACPjvB,EAAIkvB,SAEJH,EAAS,EAAGO,GACZP,EAAS,IAAM9qB,EAAG,GAClBjE,EAAIkvB,IAAgB3T,EAAOxb,KA9FxB,IA8FmC6E,GAQxC,OAHA5E,EAFM,EAAJ4E,EAEExD,IADJ6Z,EAAIjb,EAAEoD,SACQwB,EAAI,KAAO2W,EAAOxb,KAnG3B,IAmGsC6E,EAAIqW,GAAKjb,EAAIA,EAAEkI,MAAM,EAAG+S,EAAIrW,GAAK,IAAM5E,EAAEkI,MAAM+S,EAAIrW,IAE1FxD,EAAIpB,MAQR,SAAUJ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6rB,EAAS7rB,EAAoB,GAC7BkvB,EAAelvB,EAAoB,IACnC+vB,EAAe,GAAIC,YAEvB9tB,EAAQA,EAAQa,EAAIb,EAAQO,GAAKopB,EAAO,WAEtC,MAA2C,MAApCkE,EAAazvB,KAAK,EAAGT,QACvBgsB,EAAO,WAEZkE,EAAazvB,KAAK,OACf,SAAU,CACb0vB,YAAa,SAASA,YAAYC,GAChC,IAAInpB,EAAOooB,EAAazrB,KAAM,6CAC9B,OAAOwsB,IAAcpwB,GAAYkwB,EAAazvB,KAAKwG,GAAQipB,EAAazvB,KAAKwG,EAAMmpB,OAOjF,SAAU9vB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAE0jB,QAASliB,KAAKod,IAAI,GAAI,OAK/C,SAAUthB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkwB,EAAYlwB,EAAoB,GAAG6lB,SAEvC3jB,EAAQA,EAAQW,EAAG,SAAU,CAC3BgjB,SAAU,SAASA,SAAS3hB,GAC1B,MAAoB,iBAANA,GAAkBgsB,EAAUhsB,OAOxC,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAE+iB,UAAW5lB,EAAoB,OAKxD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAC3B+F,MAAO,SAASA,MAAMihB,GAEpB,OAAOA,GAAUA,MAOf,SAAU1pB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B4lB,EAAY5lB,EAAoB,IAChCwhB,EAAMnd,KAAKmd,IAEftf,EAAQA,EAAQW,EAAG,SAAU,CAC3BstB,cAAe,SAASA,cAActG,GACpC,OAAOjE,EAAUiE,IAAWrI,EAAIqI,IAAW,qBAOzC,SAAU1pB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEutB,iBAAkB,oBAK3C,SAAUjwB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEwtB,kBAAmB,oBAK5C,SAAUlwB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B8lB,EAAc9lB,EAAoB,IAEtCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAK6tB,OAAOvK,YAAcD,GAAc,SAAU,CAAEC,WAAYD,KAKtF,SAAU3lB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BimB,EAAYjmB,EAAoB,KAEpCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAK6tB,OAAOpK,UAAYD,GAAY,SAAU,CAAEC,SAAUD,KAKhF,SAAU9lB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BimB,EAAYjmB,EAAoB,KAEpCkC,EAAQA,EAAQS,EAAIT,EAAQO,GAAKyjB,UAAYD,GAAY,CAAEC,SAAUD,KAK/D,SAAU9lB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B8lB,EAAc9lB,EAAoB,IAEtCkC,EAAQA,EAAQS,EAAIT,EAAQO,GAAKsjB,YAAcD,GAAc,CAAEC,WAAYD,KAKrE,SAAU3lB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BsmB,EAAQtmB,EAAoB,KAC5BuwB,EAAOlsB,KAAKksB,KACZC,EAASnsB,KAAKosB,MAElBvuB,EAAQA,EAAQW,EAAIX,EAAQO,IAAM+tB,GAEW,KAAxCnsB,KAAKsE,MAAM6nB,EAAOF,OAAOI,aAEzBF,EAAOvU,WAAaA,UACtB,OAAQ,CACTwU,MAAO,SAASA,MAAMtU,GACpB,OAAQA,GAAKA,GAAK,EAAIuG,IAAU,kBAAJvG,EACxB9X,KAAKqd,IAAIvF,GAAK9X,KAAKsd,IACnB2E,EAAMnK,EAAI,EAAIoU,EAAKpU,EAAI,GAAKoU,EAAKpU,EAAI,QAOvC,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B2wB,EAAStsB,KAAKusB,MAOlB1uB,EAAQA,EAAQW,EAAIX,EAAQO,IAAMkuB,GAA0B,EAAhB,EAAIA,EAAO,IAAS,OAAQ,CAAEC,MAL1E,SAASA,MAAMzU,GACb,OAAQ0J,SAAS1J,GAAKA,IAAW,GAALA,EAAaA,EAAI,GAAKyU,OAAOzU,GAAK9X,KAAKqd,IAAIvF,EAAI9X,KAAKksB,KAAKpU,EAAIA,EAAI,IAAxDA,MASjC,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B6wB,EAASxsB,KAAKysB,MAGlB5uB,EAAQA,EAAQW,EAAIX,EAAQO,IAAMouB,GAAU,EAAIA,GAAQ,GAAK,GAAI,OAAQ,CACvEC,MAAO,SAASA,MAAM3U,GACpB,OAAmB,IAAXA,GAAKA,GAAUA,EAAI9X,KAAKqd,KAAK,EAAIvF,IAAM,EAAIA,IAAM,MAOvD,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bkc,EAAOlc,EAAoB,IAE/BkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBkuB,KAAM,SAASA,KAAK5U,GAClB,OAAOD,EAAKC,GAAKA,GAAK9X,KAAKod,IAAIpd,KAAKmd,IAAIrF,GAAI,EAAI,OAO9C,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBmuB,MAAO,SAASA,MAAM7U,GACpB,OAAQA,KAAO,GAAK,GAAK9X,KAAKsE,MAAMtE,KAAKqd,IAAIvF,EAAI,IAAO9X,KAAK4sB,OAAS,OAOpE,SAAU9wB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B8I,EAAMzE,KAAKyE,IAEf5G,EAAQA,EAAQW,EAAG,OAAQ,CACzBquB,KAAM,SAASA,KAAK/U,GAClB,OAAQrT,EAAIqT,GAAKA,GAAKrT,GAAKqT,IAAM,MAO/B,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Boc,EAASpc,EAAoB,IAEjCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAK2Z,GAAU/X,KAAKgY,OAAQ,OAAQ,CAAEA,MAAOD,KAKnE,SAAUjc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAE8jB,OAAQ3mB,EAAoB,QAKnD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwhB,EAAMnd,KAAKmd,IAEftf,EAAQA,EAAQW,EAAG,OAAQ,CACzBsuB,MAAO,SAASA,MAAMC,EAAQC,GAM5B,IALA,IAIIhqB,EAAKiqB,EAJLC,EAAM,EACNnxB,EAAI,EACJyO,EAAOnL,UAAUC,OACjB6tB,EAAO,EAEJpxB,EAAIyO,GAEL2iB,GADJnqB,EAAMma,EAAI9d,UAAUtD,QAGlBmxB,EAAMA,GADND,EAAME,EAAOnqB,GACKiqB,EAAM,EACxBE,EAAOnqB,GAGPkqB,GAFe,EAANlqB,GACTiqB,EAAMjqB,EAAMmqB,GACCF,EACDjqB,EAEhB,OAAOmqB,IAASvV,SAAWA,SAAWuV,EAAOntB,KAAKksB,KAAKgB,OAOrD,SAAUpxB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9ByxB,EAAQptB,KAAKqtB,KAGjBxvB,EAAQA,EAAQW,EAAIX,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACrD,OAAgC,GAAzByxB,EAAM,WAAY,IAA4B,GAAhBA,EAAM9tB,SACzC,OAAQ,CACV+tB,KAAM,SAASA,KAAKvV,EAAGkN,GACrB,IAAIsI,EAAS,MACTC,GAAMzV,EACN0V,GAAMxI,EACNyI,EAAKH,EAASC,EACdG,EAAKJ,EAASE,EAClB,OAAO,EAAIC,EAAKC,IAAOJ,EAASC,IAAO,IAAMG,EAAKD,GAAMH,EAASE,IAAO,KAAO,KAAO,OAOpF,SAAU1xB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBmvB,MAAO,SAASA,MAAM7V,GACpB,OAAO9X,KAAKqd,IAAIvF,GAAK9X,KAAK4tB,WAOxB,SAAU9xB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEyjB,MAAOtmB,EAAoB,QAKlD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBqvB,KAAM,SAASA,KAAK/V,GAClB,OAAO9X,KAAKqd,IAAIvF,GAAK9X,KAAKsd,QAOxB,SAAUxhB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEqZ,KAAMlc,EAAoB,OAKjD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bqc,EAAQrc,EAAoB,IAC5B8I,EAAMzE,KAAKyE,IAGf5G,EAAQA,EAAQW,EAAIX,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACrD,OAA8B,QAAtBqE,KAAK8tB,MAAM,SACjB,OAAQ,CACVA,KAAM,SAASA,KAAKhW,GAClB,OAAO9X,KAAKmd,IAAIrF,GAAKA,GAAK,GACrBE,EAAMF,GAAKE,GAAOF,IAAM,GACxBrT,EAAIqT,EAAI,GAAKrT,GAAKqT,EAAI,KAAO9X,KAAKkpB,EAAI,OAOzC,SAAUptB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bqc,EAAQrc,EAAoB,IAC5B8I,EAAMzE,KAAKyE,IAEf5G,EAAQA,EAAQW,EAAG,OAAQ,CACzBuvB,KAAM,SAASA,KAAKjW,GAClB,IAAI5Y,EAAI8Y,EAAMF,GAAKA,GACf3Y,EAAI6Y,GAAOF,GACf,OAAO5Y,GAAK0Y,SAAW,EAAIzY,GAAKyY,UAAY,GAAK1Y,EAAIC,IAAMsF,EAAIqT,GAAKrT,GAAKqT,QAOvE,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBwvB,MAAO,SAASA,MAAMnuB,GACpB,OAAa,EAALA,EAASG,KAAKsE,MAAQtE,KAAKqE,MAAMxE,OAOvC,SAAU/D,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BsJ,EAAkBtJ,EAAoB,IACtCsyB,EAAejsB,OAAOisB,aACtBC,EAAiBlsB,OAAOmsB,cAG5BtwB,EAAQA,EAAQW,EAAIX,EAAQO,KAAO8vB,GAA2C,GAAzBA,EAAe5uB,QAAc,SAAU,CAE1F6uB,cAAe,SAASA,cAAcrW,GAKpC,IAJA,IAGIsW,EAHArqB,EAAM,GACNyG,EAAOnL,UAAUC,OACjBvD,EAAI,EAEMA,EAAPyO,GAAU,CAEf,GADA4jB,GAAQ/uB,UAAUtD,KACdkJ,EAAgBmpB,EAAM,WAAcA,EAAM,MAAMloB,WAAWkoB,EAAO,8BACtErqB,EAAIG,KAAKkqB,EAAO,MACZH,EAAaG,GACbH,EAAyC,QAA1BG,GAAQ,QAAY,IAAcA,EAAO,KAAQ,QAEpE,OAAOrqB,EAAImE,KAAK,QAOhB,SAAUpM,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BiH,EAAYjH,EAAoB,IAChCsH,EAAWtH,EAAoB,GAEnCkC,EAAQA,EAAQW,EAAG,SAAU,CAE3B6vB,IAAK,SAASA,IAAIC,GAMhB,IALA,IAAIC,EAAM3rB,EAAU0rB,EAASD,KACzBvhB,EAAM7J,EAASsrB,EAAIjvB,QACnBkL,EAAOnL,UAAUC,OACjByE,EAAM,GACNhI,EAAI,EACKA,EAAN+Q,GACL/I,EAAIG,KAAKlC,OAAOusB,EAAIxyB,OAChBA,EAAIyO,GAAMzG,EAAIG,KAAKlC,OAAO3C,UAAUtD,KACxC,OAAOgI,EAAImE,KAAK,QAOhB,SAAUpM,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAUgmB,GACxC,OAAO,SAAStO,OACd,OAAOsO,EAAMviB,KAAM,OAOjB,SAAUtD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6yB,EAAM7yB,EAAoB,GAApBA,EAAwB,GAClCkC,EAAQA,EAAQa,EAAG,SAAU,CAE3B+vB,YAAa,SAASA,YAAYvW,GAChC,OAAOsW,EAAIpvB,KAAM8Y,OAOf,SAAUpc,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAWtH,EAAoB,GAC/B+yB,EAAU/yB,EAAoB,IAC9BgzB,EAAY,WACZC,EAAY,GAAGD,GAEnB9wB,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,GAApBA,CAAwBgzB,GAAY,SAAU,CAC5EE,SAAU,SAASA,SAASxW,GAC1B,IAAI5V,EAAOisB,EAAQtvB,KAAMiZ,EAAcsW,GACnCG,EAAiC,EAAnBzvB,UAAUC,OAAaD,UAAU,GAAK7D,GACpDsR,EAAM7J,EAASR,EAAKnD,QACpBiN,EAAMuiB,IAAgBtzB,GAAYsR,EAAM9M,KAAKS,IAAIwC,EAAS6rB,GAAchiB,GACxEiiB,EAAS/sB,OAAOqW,GACpB,OAAOuW,EACHA,EAAU3yB,KAAKwG,EAAMssB,EAAQxiB,GAC7B9J,EAAK2B,MAAMmI,EAAMwiB,EAAOzvB,OAAQiN,KAASwiB,MAO3C,SAAUjzB,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+yB,EAAU/yB,EAAoB,IAC9BqzB,EAAW,WAEfnxB,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,GAApBA,CAAwBqzB,GAAW,SAAU,CAC3EljB,SAAU,SAASA,SAASuM,GAC1B,SAAUqW,EAAQtvB,KAAMiZ,EAAc2W,GACnCpjB,QAAQyM,EAAiC,EAAnBhZ,UAAUC,OAAaD,UAAU,GAAK7D,QAO7D,SAAUM,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAG,SAAU,CAE3B+Y,OAAQ9b,EAAoB,OAMxB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAWtH,EAAoB,GAC/B+yB,EAAU/yB,EAAoB,IAC9BszB,EAAc,aACdC,EAAc,GAAGD,GAErBpxB,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,GAApBA,CAAwBszB,GAAc,SAAU,CAC9EE,WAAY,SAASA,WAAW9W,GAC9B,IAAI5V,EAAOisB,EAAQtvB,KAAMiZ,EAAc4W,GACnCjrB,EAAQf,EAASjD,KAAKS,IAAuB,EAAnBpB,UAAUC,OAAaD,UAAU,GAAK7D,GAAWiH,EAAKnD,SAChFyvB,EAAS/sB,OAAOqW,GACpB,OAAO6W,EACHA,EAAYjzB,KAAKwG,EAAMssB,EAAQ/qB,GAC/BvB,EAAK2B,MAAMJ,EAAOA,EAAQ+qB,EAAOzvB,UAAYyvB,MAO/C,SAAUjzB,EAAQD,EAASF,GAIjC,IAAI6yB,EAAM7yB,EAAoB,GAApBA,EAAwB,GAGlCA,EAAoB,GAApBA,CAAwBqG,OAAQ,SAAU,SAAUgX,GAClD5Z,KAAK+S,GAAKnQ,OAAOgX,GACjB5Z,KAAK6Z,GAAK,GAET,WACD,IAEImW,EAFAruB,EAAI3B,KAAK+S,GACTnO,EAAQ5E,KAAK6Z,GAEjB,OAAalY,EAAEzB,QAAX0E,EAA0B,CAAE/C,MAAOzF,GAAWqP,MAAM,IACxDukB,EAAQZ,EAAIztB,EAAGiD,GACf5E,KAAK6Z,IAAMmW,EAAM9vB,OACV,CAAE2B,MAAOmuB,EAAOvkB,MAAM,OAMzB,SAAU/O,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,SAAU,SAAUiG,GAC1C,OAAO,SAASytB,OAAOhzB,GACrB,OAAOuF,EAAWxC,KAAM,IAAK,OAAQ/C,OAOnC,SAAUP,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAUiG,GACvC,OAAO,SAAS0tB,MACd,OAAO1tB,EAAWxC,KAAM,MAAO,GAAI,QAOjC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAUiG,GACzC,OAAO,SAAS2tB,QACd,OAAO3tB,EAAWxC,KAAM,QAAS,GAAI,QAOnC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAUiG,GACxC,OAAO,SAAS4tB,OACd,OAAO5tB,EAAWxC,KAAM,IAAK,GAAI,QAO/B,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAUiG,GACzC,OAAO,SAAS6tB,QACd,OAAO7tB,EAAWxC,KAAM,KAAM,GAAI,QAOhC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,YAAa,SAAUiG,GAC7C,OAAO,SAAS8tB,UAAUC,GACxB,OAAO/tB,EAAWxC,KAAM,OAAQ,QAASuwB,OAOvC,SAAU7zB,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,WAAY,SAAUiG,GAC5C,OAAO,SAASguB,SAAS/Z,GACvB,OAAOjU,EAAWxC,KAAM,OAAQ,OAAQyW,OAOtC,SAAU/Z,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,UAAW,SAAUiG,GAC3C,OAAO,SAASiuB,UACd,OAAOjuB,EAAWxC,KAAM,IAAK,GAAI,QAO/B,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAUiG,GACxC,OAAO,SAASkuB,KAAKC,GACnB,OAAOnuB,EAAWxC,KAAM,IAAK,OAAQ2wB,OAOnC,SAAUj0B,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAUiG,GACzC,OAAO,SAASouB,QACd,OAAOpuB,EAAWxC,KAAM,QAAS,GAAI,QAOnC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,SAAU,SAAUiG,GAC1C,OAAO,SAASquB,SACd,OAAOruB,EAAWxC,KAAM,SAAU,GAAI,QAOpC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAUiG,GACvC,OAAO,SAASsuB,MACd,OAAOtuB,EAAWxC,KAAM,MAAO,GAAI,QAOjC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAUiG,GACvC,OAAO,SAASuuB,MACd,OAAOvuB,EAAWxC,KAAM,MAAO,GAAI,QAOjC,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,QAAS,CAAEsV,QAASnY,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAIjC,IAAI8B,EAAM9B,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/BM,EAAON,EAAoB,KAC3BwJ,EAAcxJ,EAAoB,IAClCsH,EAAWtH,EAAoB,GAC/By0B,EAAiBz0B,EAAoB,IACrC0J,EAAY1J,EAAoB,IAEpCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,SAAU6S,GAAQhI,MAAM6D,KAAKmE,KAAW,QAAS,CAExGnE,KAAM,SAASA,KAAKuC,GAClB,IAOItN,EAAQ2E,EAAQqG,EAAMC,EAPtBxJ,EAAIM,EAASuL,GACb3N,EAAmB,mBAARG,KAAqBA,KAAOoH,MACvCgE,EAAOnL,UAAUC,OACjBmL,EAAe,EAAPD,EAAWnL,UAAU,GAAK7D,GAClCkP,EAAUD,IAAUjP,GACpBwI,EAAQ,EACR2G,EAAStF,EAAUtE,GAIvB,GAFI2J,IAASD,EAAQhN,EAAIgN,EAAc,EAAPD,EAAWnL,UAAU,GAAK7D,GAAW,IAEjEmP,GAAUnP,IAAeyD,GAAKuH,OAASrB,EAAYwF,GAMrD,IAAK1G,EAAS,IAAIhF,EADlBK,EAAS2D,EAASlC,EAAEzB,SACkB0E,EAAT1E,EAAgB0E,IAC3CosB,EAAensB,EAAQD,EAAO0G,EAAUD,EAAM1J,EAAEiD,GAAQA,GAASjD,EAAEiD,SANrE,IAAKuG,EAAWI,EAAO1O,KAAK8E,GAAIkD,EAAS,IAAIhF,IAAOqL,EAAOC,EAASK,QAAQC,KAAM7G,IAChFosB,EAAensB,EAAQD,EAAO0G,EAAUzO,EAAKsO,EAAUE,EAAO,CAACH,EAAKrJ,MAAO+C,IAAQ,GAAQsG,EAAKrJ,OASpG,OADAgD,EAAO3E,OAAS0E,EACTC,MAOL,SAAUnI,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9By0B,EAAiBz0B,EAAoB,IAGzCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACrD,SAASyC,KACT,QAASoI,MAAMuE,GAAG9O,KAAKmC,aAAcA,KACnC,QAAS,CAEX2M,GAAI,SAASA,KAIX,IAHA,IAAI/G,EAAQ,EACRwG,EAAOnL,UAAUC,OACjB2E,EAAS,IAAoB,mBAAR7E,KAAqBA,KAAOoH,OAAOgE,GAC9CxG,EAAPwG,GAAc4lB,EAAensB,EAAQD,EAAO3E,UAAU2E,MAE7D,OADAC,EAAO3E,OAASkL,EACTvG,MAOL,SAAUnI,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BiH,EAAYjH,EAAoB,IAChCsM,EAAY,GAAGC,KAGnBrK,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,KAAOa,SAAWb,EAAoB,GAApBA,CAAwBsM,IAAa,QAAS,CACnHC,KAAM,SAASA,KAAK6D,GAClB,OAAO9D,EAAUhM,KAAK2G,EAAUxD,MAAO2M,IAAcvQ,GAAY,IAAMuQ,OAOrE,SAAUjQ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6d,EAAO7d,EAAoB,IAC3BgW,EAAMhW,EAAoB,IAC1BsJ,EAAkBtJ,EAAoB,IACtCsH,EAAWtH,EAAoB,GAC/B0M,EAAa,GAAGjE,MAGpBvG,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACjD6d,GAAMnR,EAAWpM,KAAKud,KACxB,QAAS,CACXpV,MAAO,SAASA,MAAMkI,EAAOC,GAC3B,IAAIO,EAAM7J,EAAS7D,KAAKE,QACpBgP,EAAQqD,EAAIvS,MAEhB,GADAmN,EAAMA,IAAQ/Q,GAAYsR,EAAMP,EACnB,SAAT+B,EAAkB,OAAOjG,EAAWpM,KAAKmD,KAAMkN,EAAOC,GAM1D,IALA,IAAInB,EAAQnG,EAAgBqH,EAAOQ,GAC/BujB,EAAOprB,EAAgBsH,EAAKO,GAC5B+I,EAAO5S,EAASotB,EAAOjlB,GACvBklB,EAAS,IAAI9pB,MAAMqP,GACnB9Z,EAAI,EACDA,EAAI8Z,EAAM9Z,IAAKu0B,EAAOv0B,GAAc,UAATuS,EAC9BlP,KAAKyX,OAAOzL,EAAQrP,GACpBqD,KAAKgM,EAAQrP,GACjB,OAAOu0B,MAOL,SAAUx0B,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B4G,EAAY5G,EAAoB,IAChC0F,EAAW1F,EAAoB,GAC/B+F,EAAQ/F,EAAoB,GAC5B40B,EAAQ,GAAGnoB,KACXhG,EAAO,CAAC,EAAG,EAAG,GAElBvE,EAAQA,EAAQa,EAAIb,EAAQO,GAAKsD,EAAM,WAErCU,EAAKgG,KAAK5M,QACLkG,EAAM,WAEXU,EAAKgG,KAAK,UAELzM,EAAoB,GAApBA,CAAwB40B,IAAS,QAAS,CAE/CnoB,KAAM,SAASA,KAAKgE,GAClB,OAAOA,IAAc5Q,GACjB+0B,EAAMt0B,KAAKoF,EAASjC,OACpBmxB,EAAMt0B,KAAKoF,EAASjC,MAAOmD,EAAU6J,QAOvC,SAAUtQ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B60B,EAAW70B,EAAoB,GAApBA,CAAwB,GACnC80B,EAAS90B,EAAoB,GAApBA,CAAwB,GAAGgQ,SAAS,GAEjD9N,EAAQA,EAAQa,EAAIb,EAAQO,GAAKqyB,EAAQ,QAAS,CAEhD9kB,QAAS,SAASA,QAAQ9H,GACxB,OAAO2sB,EAASpxB,KAAMyE,EAAYxE,UAAU,QAO1C,SAAUvD,EAAQD,EAASF,GAEjC,IAAIiE,EAAWjE,EAAoB,GAC/BmY,EAAUnY,EAAoB,IAC9B8W,EAAU9W,EAAoB,EAApBA,CAAuB,WAErCG,EAAOD,QAAU,SAAUgd,GACzB,IAAI5Z,EASF,OARE6U,EAAQ+E,KAGM,mBAFhB5Z,EAAI4Z,EAASpX,cAEkBxC,IAAMuH,QAASsN,EAAQ7U,EAAE9B,aAAa8B,EAAIzD,IACrEoE,EAASX,IAED,QADVA,EAAIA,EAAEwT,MACUxT,EAAIzD,KAEfyD,IAAMzD,GAAYgL,MAAQvH,IAM/B,SAAUnD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BwN,EAAOxN,EAAoB,GAApBA,CAAwB,GAEnCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAGqQ,KAAK,GAAO,QAAS,CAE/EA,IAAK,SAASA,IAAInI,GAChB,OAAOsF,EAAK/J,KAAMyE,EAAYxE,UAAU,QAOtC,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B+0B,EAAU/0B,EAAoB,GAApBA,CAAwB,GAEtCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAG4P,QAAQ,GAAO,QAAS,CAElFA,OAAQ,SAASA,OAAO1H,GACtB,OAAO6sB,EAAQtxB,KAAMyE,EAAYxE,UAAU,QAOzC,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bg1B,EAAQh1B,EAAoB,GAApBA,CAAwB,GAEpCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAGwQ,MAAM,GAAO,QAAS,CAEhFA,KAAM,SAASA,KAAKtI,GAClB,OAAO8sB,EAAMvxB,KAAMyE,EAAYxE,UAAU,QAOvC,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bi1B,EAASj1B,EAAoB,GAApBA,CAAwB,GAErCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAG0P,OAAO,GAAO,QAAS,CAEjFA,MAAO,SAASA,MAAMxH,GACpB,OAAO+sB,EAAOxxB,KAAMyE,EAAYxE,UAAU,QAOxC,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bk1B,EAAUl1B,EAAoB,KAElCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAGmM,QAAQ,GAAO,QAAS,CAElFA,OAAQ,SAASA,OAAOjE,GACtB,OAAOgtB,EAAQzxB,KAAMyE,EAAYxE,UAAUC,OAAQD,UAAU,IAAI,OAO/D,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bk1B,EAAUl1B,EAAoB,KAElCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAGqM,aAAa,GAAO,QAAS,CAEvFA,YAAa,SAASA,YAAYnE,GAChC,OAAOgtB,EAAQzxB,KAAMyE,EAAYxE,UAAUC,OAAQD,UAAU,IAAI,OAO/D,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bm1B,EAAWn1B,EAAoB,GAApBA,EAAwB,GACnCmZ,EAAU,GAAGlJ,QACbmlB,IAAkBjc,GAAW,EAAI,CAAC,GAAGlJ,QAAQ,GAAI,GAAK,EAE1D/N,EAAQA,EAAQa,EAAIb,EAAQO,GAAK2yB,IAAkBp1B,EAAoB,GAApBA,CAAwBmZ,IAAW,QAAS,CAE7FlJ,QAAS,SAASA,QAAQC,GACxB,OAAOklB,EAEHjc,EAAQvV,MAAMH,KAAMC,YAAc,EAClCyxB,EAAS1xB,KAAMyM,EAAexM,UAAU,QAO1C,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BiH,EAAYjH,EAAoB,IAChC6E,EAAY7E,EAAoB,IAChCsH,EAAWtH,EAAoB,GAC/BmZ,EAAU,GAAGlN,YACbmpB,IAAkBjc,GAAW,EAAI,CAAC,GAAGlN,YAAY,GAAI,GAAK,EAE9D/J,EAAQA,EAAQa,EAAIb,EAAQO,GAAK2yB,IAAkBp1B,EAAoB,GAApBA,CAAwBmZ,IAAW,QAAS,CAE7FlN,YAAa,SAASA,YAAYiE,GAEhC,GAAIklB,EAAe,OAAOjc,EAAQvV,MAAMH,KAAMC,YAAc,EAC5D,IAAI0B,EAAI6B,EAAUxD,MACdE,EAAS2D,EAASlC,EAAEzB,QACpB0E,EAAQ1E,EAAS,EAGrB,IAFuB,EAAnBD,UAAUC,SAAY0E,EAAQhE,KAAKS,IAAIuD,EAAOxD,EAAUnB,UAAU,MAClE2E,EAAQ,IAAGA,EAAQ1E,EAAS0E,GACjB,GAATA,EAAYA,IAAS,GAAIA,KAASjD,GAAOA,EAAEiD,KAAW6H,EAAe,OAAO7H,GAAS,EAC3F,OAAQ,MAON,SAAUlI,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAG,QAAS,CAAEyM,WAAYxP,EAAoB,OAE9DA,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAG,QAAS,CAAE4M,KAAM3P,EAAoB,MAExDA,EAAoB,GAApBA,CAAwB,SAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bq1B,EAAQr1B,EAAoB,GAApBA,CAAwB,GAChC6I,EAAM,OACNysB,GAAS,EAETzsB,IAAO,IAAIgC,MAAM,GAAGhC,GAAK,WAAcysB,GAAS,IACpDpzB,EAAQA,EAAQa,EAAIb,EAAQO,EAAI6yB,EAAQ,QAAS,CAC/CzlB,KAAM,SAASA,KAAK3H,GAClB,OAAOmtB,EAAM5xB,KAAMyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,OAGzEG,EAAoB,GAApBA,CAAwB6I,IAKlB,SAAU1I,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bq1B,EAAQr1B,EAAoB,GAApBA,CAAwB,GAChC6I,EAAM,YACNysB,GAAS,EAETzsB,IAAO,IAAIgC,MAAM,GAAGhC,GAAK,WAAcysB,GAAS,IACpDpzB,EAAQA,EAAQa,EAAIb,EAAQO,EAAI6yB,EAAQ,QAAS,CAC/CvlB,UAAW,SAASA,UAAU7H,GAC5B,OAAOmtB,EAAM5xB,KAAMyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,OAGzEG,EAAoB,GAApBA,CAAwB6I,IAKlB,SAAU1I,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAKlB,SAAUG,EAAQD,KAOlB,SAAUC,EAAQD,EAASF,GAIjC,IAwBIu1B,EAAUC,EAA6BC,EAAsBC,EAxB7D3sB,EAAU/I,EAAoB,IAC9B4B,EAAS5B,EAAoB,GAC7B8B,EAAM9B,EAAoB,IAC1BuJ,EAAUvJ,EAAoB,IAC9BkC,EAAUlC,EAAoB,GAC9BiE,EAAWjE,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChCkJ,EAAalJ,EAAoB,IACjC2Z,EAAQ3Z,EAAoB,IAC5B8J,EAAqB9J,EAAoB,IACzC8gB,EAAO9gB,EAAoB,IAAI8N,IAC/B6nB,EAAY31B,EAAoB,GAApBA,GACZ41B,EAA6B51B,EAAoB,IACjD61B,EAAU71B,EAAoB,KAC9B0Z,EAAY1Z,EAAoB,IAChC81B,EAAiB91B,EAAoB,KACrC+1B,EAAU,UACV5xB,EAAYvC,EAAOuC,UACnB4Z,EAAUnc,EAAOmc,QACjBiY,EAAWjY,GAAWA,EAAQiY,SAC9BC,EAAKD,GAAYA,EAASC,IAAM,GAChCC,EAAWt0B,EAAOm0B,GAClBnW,EAA6B,WAApBrW,EAAQwU,GACjBoY,EAAQ,aAERhP,EAAuBqO,EAA8BI,EAA2BzwB,EAEhFynB,IAAe,WACjB,IAEE,IAAIrM,EAAU2V,EAAS5V,QAAQ,GAC3B8V,GAAe7V,EAAQza,YAAc,IAAI9F,EAAoB,EAApBA,CAAuB,YAAc,SAAUuE,GAC1FA,EAAK4xB,EAAOA,IAGd,OAAQvW,GAA0C,mBAAzByW,wBACpB9V,EAAQC,KAAK2V,aAAkBC,GAIT,IAAtBH,EAAGhmB,QAAQ,SACyB,IAApCyJ,EAAUzJ,QAAQ,aACvB,MAAOzL,KAfQ,GAmBf8xB,EAAa,SAAUpyB,GACzB,IAAIsc,EACJ,SAAOvc,EAASC,IAAkC,mBAAnBsc,EAAOtc,EAAGsc,QAAsBA,GAE7DT,EAAS,SAAUQ,EAASgW,GAC9B,IAAIhW,EAAQiW,GAAZ,CACAjW,EAAQiW,IAAK,EACb,IAAIC,EAAQlW,EAAQvG,GACpB2b,EAAU,WAoCR,IAnCA,IAAIrwB,EAAQib,EAAQmW,GAChBC,EAAmB,GAAdpW,EAAQqW,GACbx2B,EAAI,EACJqe,EAAM,SAAUoY,GAClB,IAIIvuB,EAAQkY,EAAMsW,EAJdC,EAAUJ,EAAKE,EAASF,GAAKE,EAASG,KACtC1W,EAAUuW,EAASvW,QACnBU,EAAS6V,EAAS7V,OAClBd,EAAS2W,EAAS3W,OAEtB,IACM6W,GACGJ,IACe,GAAdpW,EAAQ0W,IAASC,EAAkB3W,GACvCA,EAAQ0W,GAAK,IAEC,IAAZF,EAAkBzuB,EAAShD,GAEzB4a,GAAQA,EAAOE,QACnB9X,EAASyuB,EAAQzxB,GACb4a,IACFA,EAAOC,OACP2W,GAAS,IAGTxuB,IAAWuuB,EAAStW,QACtBS,EAAO7c,EAAU,yBACRqc,EAAO8V,EAAWhuB,IAC3BkY,EAAKlgB,KAAKgI,EAAQgY,EAASU,GACtBV,EAAQhY,IACV0Y,EAAO1b,GACd,MAAOd,GACH0b,IAAW4W,GAAQ5W,EAAOC,OAC9Ba,EAAOxc,KAGWpE,EAAfq2B,EAAM9yB,QAAY8a,EAAIgY,EAAMr2B,MACnCmgB,EAAQvG,GAAK,GACbuG,EAAQiW,IAAK,EACTD,IAAahW,EAAQ0W,IAAIE,EAAY5W,OAGzC4W,EAAc,SAAU5W,GAC1BO,EAAKxgB,KAAKsB,EAAQ,WAChB,IAEI0G,EAAQyuB,EAASK,EAFjB9xB,EAAQib,EAAQmW,GAChBW,EAAYC,EAAY/W,GAe5B,GAbI8W,IACF/uB,EAASutB,EAAQ,WACXjW,EACF7B,EAAQwZ,KAAK,qBAAsBjyB,EAAOib,IACjCwW,EAAUn1B,EAAO41B,sBAC1BT,EAAQ,CAAExW,QAASA,EAASkX,OAAQnyB,KAC1B8xB,EAAUx1B,EAAOw1B,UAAYA,EAAQM,OAC/CN,EAAQM,MAAM,8BAA+BpyB,KAIjDib,EAAQ0W,GAAKrX,GAAU0X,EAAY/W,GAAW,EAAI,GAClDA,EAAQoX,GAAK93B,GACXw3B,GAAa/uB,EAAO9D,EAAG,MAAM8D,EAAO+J,KAGxCilB,EAAc,SAAU/W,GAC1B,OAAsB,IAAfA,EAAQ0W,IAAkD,KAArC1W,EAAQoX,IAAMpX,EAAQvG,IAAIrW,QAEpDuzB,EAAoB,SAAU3W,GAChCO,EAAKxgB,KAAKsB,EAAQ,WAChB,IAAIm1B,EACAnX,EACF7B,EAAQwZ,KAAK,mBAAoBhX,IACxBwW,EAAUn1B,EAAOg2B,qBAC1Bb,EAAQ,CAAExW,QAASA,EAASkX,OAAQlX,EAAQmW,QAI9CmB,EAAU,SAAUvyB,GACtB,IAAIib,EAAU9c,KACV8c,EAAQ/R,KACZ+R,EAAQ/R,IAAK,GACb+R,EAAUA,EAAQuX,IAAMvX,GAChBmW,GAAKpxB,EACbib,EAAQqW,GAAK,EACRrW,EAAQoX,KAAIpX,EAAQoX,GAAKpX,EAAQvG,GAAGvR,SACzCsX,EAAOQ,GAAS,KAEdwX,EAAW,SAAUzyB,GACvB,IACIkb,EADAD,EAAU9c,KAEd,IAAI8c,EAAQ/R,GAAZ,CACA+R,EAAQ/R,IAAK,EACb+R,EAAUA,EAAQuX,IAAMvX,EACxB,IACE,GAAIA,IAAYjb,EAAO,MAAMnB,EAAU,qCACnCqc,EAAO8V,EAAWhxB,IACpBqwB,EAAU,WACR,IAAIhkB,EAAU,CAAEmmB,GAAIvX,EAAS/R,IAAI,GACjC,IACEgS,EAAKlgB,KAAKgF,EAAOxD,EAAIi2B,EAAUpmB,EAAS,GAAI7P,EAAI+1B,EAASlmB,EAAS,IAClE,MAAOnN,GACPqzB,EAAQv3B,KAAKqR,EAASnN,OAI1B+b,EAAQmW,GAAKpxB,EACbib,EAAQqW,GAAK,EACb7W,EAAOQ,GAAS,IAElB,MAAO/b,GACPqzB,EAAQv3B,KAAK,CAAEw3B,GAAIvX,EAAS/R,IAAI,GAAShK,MAKxCooB,IAEHsJ,EAAW,SAASvW,QAAQqY,GAC1B9uB,EAAWzF,KAAMyyB,EAAUH,EAAS,MACpCnvB,EAAUoxB,GACVzC,EAASj1B,KAAKmD,MACd,IACEu0B,EAASl2B,EAAIi2B,EAAUt0B,KAAM,GAAI3B,EAAI+1B,EAASp0B,KAAM,IACpD,MAAOw0B,GACPJ,EAAQv3B,KAAKmD,KAAMw0B,MAIvB1C,EAAW,SAAS5V,QAAQqY,GAC1Bv0B,KAAKuW,GAAK,GACVvW,KAAKk0B,GAAK93B,GACV4D,KAAKmzB,GAAK,EACVnzB,KAAK+K,IAAK,EACV/K,KAAKizB,GAAK72B,GACV4D,KAAKwzB,GAAK,EACVxzB,KAAK+yB,IAAK,IAEHh1B,UAAYxB,EAAoB,GAApBA,CAAwBk2B,EAAS10B,UAAW,CAE/Dgf,KAAM,SAASA,KAAK0X,EAAaC,GAC/B,IAAItB,EAAW1P,EAAqBrd,EAAmBrG,KAAMyyB,IAO7D,OANAW,EAASF,GAA2B,mBAAfuB,GAA4BA,EACjDrB,EAASG,KAA4B,mBAAdmB,GAA4BA,EACnDtB,EAAS3W,OAASN,EAAS7B,EAAQmC,OAASrgB,GAC5C4D,KAAKuW,GAAGzR,KAAKsuB,GACTpzB,KAAKk0B,IAAIl0B,KAAKk0B,GAAGpvB,KAAKsuB,GACtBpzB,KAAKmzB,IAAI7W,EAAOtc,MAAM,GACnBozB,EAAStW,SAGlB6X,QAAS,SAAUD,GACjB,OAAO10B,KAAK+c,KAAK3gB,GAAWs4B,MAGhC1C,EAAuB,WACrB,IAAIlV,EAAU,IAAIgV,EAClB9xB,KAAK8c,QAAUA,EACf9c,KAAK6c,QAAUxe,EAAIi2B,EAAUxX,EAAS,GACtC9c,KAAKud,OAASlf,EAAI+1B,EAAStX,EAAS,IAEtCqV,EAA2BzwB,EAAIgiB,EAAuB,SAAU7jB,GAC9D,OAAOA,IAAM4yB,GAAY5yB,IAAMoyB,EAC3B,IAAID,EAAqBnyB,GACzBkyB,EAA4BlyB,KAIpCpB,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,GAAKmqB,EAAY,CAAEjN,QAASuW,IACpEl2B,EAAoB,GAApBA,CAAwBk2B,EAAUH,GAClC/1B,EAAoB,GAApBA,CAAwB+1B,GACxBL,EAAU11B,EAAoB,IAAI+1B,GAGlC7zB,EAAQA,EAAQW,EAAIX,EAAQO,GAAKmqB,EAAYmJ,EAAS,CAEpD/U,OAAQ,SAASA,OAAO4G,GACtB,IAAIyQ,EAAalR,EAAqB1jB,MAGtC,OADAyd,EADemX,EAAWrX,QACjB4G,GACFyQ,EAAW9X,WAGtBre,EAAQA,EAAQW,EAAIX,EAAQO,GAAKsG,IAAY6jB,GAAamJ,EAAS,CAEjEzV,QAAS,SAASA,QAAQnE,GACxB,OAAO2Z,EAAe/sB,GAAWtF,OAASiyB,EAAUQ,EAAWzyB,KAAM0Y,MAGzEja,EAAQA,EAAQW,EAAIX,EAAQO,IAAMmqB,GAAc5sB,EAAoB,GAApBA,CAAwB,SAAU6S,GAChFqjB,EAASoC,IAAIzlB,GAAa,SAAEsjB,MACzBJ,EAAS,CAEZuC,IAAK,SAASA,IAAIxiB,GAChB,IAAIxS,EAAIG,KACJ40B,EAAalR,EAAqB7jB,GAClCgd,EAAU+X,EAAW/X,QACrBU,EAASqX,EAAWrX,OACpB1Y,EAASutB,EAAQ,WACnB,IAAIlqB,EAAS,GACTtD,EAAQ,EACRkwB,EAAY,EAChB5e,EAAM7D,GAAU,EAAO,SAAUyK,GAC/B,IAAIiY,EAASnwB,IACTowB,GAAgB,EACpB9sB,EAAOpD,KAAK1I,IACZ04B,IACAj1B,EAAEgd,QAAQC,GAASC,KAAK,SAAUlb,GAC5BmzB,IACJA,GAAgB,EAChB9sB,EAAO6sB,GAAUlzB,IACfizB,GAAajY,EAAQ3U,KACtBqV,OAEHuX,GAAajY,EAAQ3U,KAGzB,OADIrD,EAAO9D,GAAGwc,EAAO1Y,EAAO+J,GACrBgmB,EAAW9X,SAGpBmY,KAAM,SAASA,KAAK5iB,GAClB,IAAIxS,EAAIG,KACJ40B,EAAalR,EAAqB7jB,GAClC0d,EAASqX,EAAWrX,OACpB1Y,EAASutB,EAAQ,WACnBlc,EAAM7D,GAAU,EAAO,SAAUyK,GAC/Bjd,EAAEgd,QAAQC,GAASC,KAAK6X,EAAW/X,QAASU,OAIhD,OADI1Y,EAAO9D,GAAGwc,EAAO1Y,EAAO+J,GACrBgmB,EAAW9X,YAOhB,SAAUpgB,EAAQD,EAASF,GAIjC,IAAIkoB,EAAOloB,EAAoB,KAC3BkO,EAAWlO,EAAoB,IAC/B24B,EAAW,UAGf34B,EAAoB,GAApBA,CAAwB24B,EAAU,SAAU13B,GAC1C,OAAO,SAAS23B,UAAY,OAAO33B,EAAIwC,KAAyB,EAAnBC,UAAUC,OAAaD,UAAU,GAAK7D,MAClF,CAEDmoB,IAAK,SAASA,IAAI1iB,GAChB,OAAO4iB,EAAKvR,IAAIzI,EAASzK,KAAMk1B,GAAWrzB,GAAO,KAElD4iB,GAAM,GAAO,IAKV,SAAU/nB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B4G,EAAY5G,EAAoB,IAChC+E,EAAW/E,EAAoB,GAC/B64B,GAAU74B,EAAoB,GAAGmhB,SAAW,IAAIvd,MAChDk1B,EAASj1B,SAASD,MAEtB1B,EAAQA,EAAQW,EAAIX,EAAQO,GAAKzC,EAAoB,EAApBA,CAAuB,WACtD64B,EAAO,gBACL,UAAW,CACbj1B,MAAO,SAASA,MAAMP,EAAQ01B,EAAcC,GAC1C,IAAI9iB,EAAItP,EAAUvD,GACd41B,EAAIl0B,EAASi0B,GACjB,OAAOH,EAASA,EAAO3iB,EAAG6iB,EAAcE,GAAKH,EAAOx4B,KAAK4V,EAAG6iB,EAAcE,OAOxE,SAAU94B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BgI,EAAShI,EAAoB,IAC7B4G,EAAY5G,EAAoB,IAChC+E,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/B+F,EAAQ/F,EAAoB,GAC5BulB,EAAOvlB,EAAoB,IAC3Bk5B,GAAcl5B,EAAoB,GAAGmhB,SAAW,IAAIuE,UAIpDyT,EAAiBpzB,EAAM,WACzB,SAAStD,KACT,QAASy2B,EAAW,aAA6B,GAAIz2B,aAAcA,KAEjE22B,GAAYrzB,EAAM,WACpBmzB,EAAW,gBAGbh3B,EAAQA,EAAQW,EAAIX,EAAQO,GAAK02B,GAAkBC,GAAW,UAAW,CACvE1T,UAAW,SAASA,UAAU2T,EAAQzd,GACpChV,EAAUyyB,GACVt0B,EAAS6W,GACT,IAAI0d,EAAY51B,UAAUC,OAAS,EAAI01B,EAASzyB,EAAUlD,UAAU,IACpE,GAAI01B,IAAaD,EAAgB,OAAOD,EAAWG,EAAQzd,EAAM0d,GACjE,GAAID,GAAUC,EAAW,CAEvB,OAAQ1d,EAAKjY,QACX,KAAK,EAAG,OAAO,IAAI01B,EACnB,KAAK,EAAG,OAAO,IAAIA,EAAOzd,EAAK,IAC/B,KAAK,EAAG,OAAO,IAAIyd,EAAOzd,EAAK,GAAIA,EAAK,IACxC,KAAK,EAAG,OAAO,IAAIyd,EAAOzd,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACjD,KAAK,EAAG,OAAO,IAAIyd,EAAOzd,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAG5D,IAAI2d,EAAQ,CAAC,MAEb,OADAA,EAAMhxB,KAAK3E,MAAM21B,EAAO3d,GACjB,IAAK2J,EAAK3hB,MAAMy1B,EAAQE,IAGjC,IAAIhqB,EAAQ+pB,EAAU93B,UAClBg4B,EAAWxxB,EAAO/D,EAASsL,GAASA,EAAQ1O,OAAOW,WACnD8G,EAASzE,SAASD,MAAMtD,KAAK+4B,EAAQG,EAAU5d,GACnD,OAAO3X,EAASqE,GAAUA,EAASkxB,MAOjC,SAAUr5B,EAAQD,EAASF,GAGjC,IAAIkF,EAAKlF,EAAoB,GACzBkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAC/BiF,EAAcjF,EAAoB,IAGtCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WAErDmhB,QAAQrgB,eAAeoE,EAAGC,EAAE,GAAI,EAAG,CAAEG,MAAO,IAAM,EAAG,CAAEA,MAAO,MAC5D,UAAW,CACbxE,eAAgB,SAASA,eAAeuC,EAAQo2B,EAAaC,GAC3D30B,EAAS1B,GACTo2B,EAAcx0B,EAAYw0B,GAAa,GACvC10B,EAAS20B,GACT,IAEE,OADAx0B,EAAGC,EAAE9B,EAAQo2B,EAAaC,IACnB,EACP,MAAOl1B,GACP,OAAO,OAQP,SAAUrE,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkH,EAAOlH,EAAoB,IAAImF,EAC/BJ,EAAW/E,EAAoB,GAEnCkC,EAAQA,EAAQW,EAAG,UAAW,CAC5B82B,eAAgB,SAASA,eAAet2B,EAAQo2B,GAC9C,IAAIjoB,EAAOtK,EAAKnC,EAAS1B,GAASo2B,GAClC,QAAOjoB,IAASA,EAAKzQ,sBAA8BsC,EAAOo2B,OAOxD,SAAUt5B,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAC/B45B,EAAY,SAAUvc,GACxB5Z,KAAK+S,GAAKzR,EAASsY,GACnB5Z,KAAK6Z,GAAK,EACV,IACIjb,EADAwJ,EAAOpI,KAAK8Z,GAAK,GAErB,IAAKlb,KAAOgb,EAAUxR,EAAKtD,KAAKlG,IAElCrC,EAAoB,GAApBA,CAAwB45B,EAAW,SAAU,WAC3C,IAEIv3B,EADAwJ,EADOpI,KACK8Z,GAEhB,GACE,GAAe1R,EAAKlI,QAJXF,KAIA6Z,GAAmB,MAAO,CAAEhY,MAAOzF,GAAWqP,MAAM,YACnD7M,EAAMwJ,EALPpI,KAKiB6Z,SALjB7Z,KAKgC+S,KAC3C,MAAO;AAAElR,MAAOjD,EAAK6M,MAAM,KAG7BhN,EAAQA,EAAQW,EAAG,UAAW,CAC5Bg3B,UAAW,SAASA,UAAUx2B,GAC5B,OAAO,IAAIu2B,EAAUv2B,OAOnB,SAAUlD,EAAQD,EAASF,GAGjC,IAAIkH,EAAOlH,EAAoB,IAC3B6F,EAAiB7F,EAAoB,IACrCgC,EAAMhC,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BiE,EAAWjE,EAAoB,GAC/B+E,EAAW/E,EAAoB,GAcnCkC,EAAQA,EAAQW,EAAG,UAAW,CAAE5B,IAZhC,SAASA,IAAIoC,EAAQo2B,GACnB,IACIjoB,EAAMjC,EADNuqB,EAAWp2B,UAAUC,OAAS,EAAIN,EAASK,UAAU,GAEzD,OAAIqB,EAAS1B,KAAYy2B,EAAiBz2B,EAAOo2B,IAC7CjoB,EAAOtK,EAAK/B,EAAE9B,EAAQo2B,IAAqBz3B,EAAIwP,EAAM,SACrDA,EAAKlM,MACLkM,EAAKvQ,MAAQpB,GACX2R,EAAKvQ,IAAIX,KAAKw5B,GACdj6B,GACFoE,EAASsL,EAAQ1J,EAAexC,IAAiBpC,IAAIsO,EAAOkqB,EAAaK,QAA7E,MAQI,SAAU35B,EAAQD,EAASF,GAGjC,IAAIkH,EAAOlH,EAAoB,IAC3BkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAEnCkC,EAAQA,EAAQW,EAAG,UAAW,CAC5BsE,yBAA0B,SAASA,yBAAyB9D,EAAQo2B,GAClE,OAAOvyB,EAAK/B,EAAEJ,EAAS1B,GAASo2B,OAO9B,SAAUt5B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+5B,EAAW/5B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAEnCkC,EAAQA,EAAQW,EAAG,UAAW,CAC5BgD,eAAgB,SAASA,eAAexC,GACtC,OAAO02B,EAASh1B,EAAS1B,QAOvB,SAAUlD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,UAAW,CAC5Bb,IAAK,SAASA,IAAIqB,EAAQo2B,GACxB,OAAOA,KAAep2B,MAOpB,SAAUlD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAC/B+uB,EAAgBluB,OAAOoT,aAE3B/R,EAAQA,EAAQW,EAAG,UAAW,CAC5BoR,aAAc,SAASA,aAAa5Q,GAElC,OADA0B,EAAS1B,IACF0rB,GAAgBA,EAAc1rB,OAOnC,SAAUlD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,UAAW,CAAEue,QAASphB,EAAoB,OAKvD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAC/B0uB,EAAqB7tB,OAAOsT,kBAEhCjS,EAAQA,EAAQW,EAAG,UAAW,CAC5BsR,kBAAmB,SAASA,kBAAkB9Q,GAC5C0B,EAAS1B,GACT,IAEE,OADIqrB,GAAoBA,EAAmBrrB,IACpC,EACP,MAAOmB,GACP,OAAO,OAQP,SAAUrE,EAAQD,EAASF,GAGjC,IAAIkF,EAAKlF,EAAoB,GACzBkH,EAAOlH,EAAoB,IAC3B6F,EAAiB7F,EAAoB,IACrCgC,EAAMhC,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9B+G,EAAa/G,EAAoB,IACjC+E,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAwBnCkC,EAAQA,EAAQW,EAAG,UAAW,CAAEiL,IAtBhC,SAASA,IAAIzK,EAAQo2B,EAAaO,GAChC,IAEIC,EAAoB1qB,EAFpBuqB,EAAWp2B,UAAUC,OAAS,EAAIN,EAASK,UAAU,GACrDw2B,EAAUhzB,EAAK/B,EAAEJ,EAAS1B,GAASo2B,GAEvC,IAAKS,EAAS,CACZ,GAAIj2B,EAASsL,EAAQ1J,EAAexC,IAClC,OAAOyK,IAAIyB,EAAOkqB,EAAaO,EAAGF,GAEpCI,EAAUnzB,EAAW,GAEvB,GAAI/E,EAAIk4B,EAAS,SAAU,CACzB,IAAyB,IAArBA,EAAQzoB,WAAuBxN,EAAS61B,GAAW,OAAO,EAC9D,GAAIG,EAAqB/yB,EAAK/B,EAAE20B,EAAUL,GAAc,CACtD,GAAIQ,EAAmBh5B,KAAOg5B,EAAmBnsB,MAAuC,IAAhCmsB,EAAmBxoB,SAAoB,OAAO,EACtGwoB,EAAmB30B,MAAQ00B,EAC3B90B,EAAGC,EAAE20B,EAAUL,EAAaQ,QACvB/0B,EAAGC,EAAE20B,EAAUL,EAAa1yB,EAAW,EAAGizB,IACjD,OAAO,EAET,OAAOE,EAAQpsB,MAAQjO,KAAqBq6B,EAAQpsB,IAAIxN,KAAKw5B,EAAUE,IAAI,OAQvE,SAAU75B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bm6B,EAAWn6B,EAAoB,IAE/Bm6B,GAAUj4B,EAAQA,EAAQW,EAAG,UAAW,CAC1CsiB,eAAgB,SAASA,eAAe9hB,EAAQkM,GAC9C4qB,EAASjV,MAAM7hB,EAAQkM,GACvB,IAEE,OADA4qB,EAASrsB,IAAIzK,EAAQkM,IACd,EACP,MAAO/K,GACP,OAAO,OAQP,SAAUrE,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEgc,IAAK,WAAc,OAAO,IAAImK,MAAOD,cAK5D,SAAU5oB,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/BiF,EAAcjF,EAAoB,IAClCkpB,EAAclpB,EAAoB,KAClCuJ,EAAUvJ,EAAoB,IAElCkC,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACrD,OAAkC,OAA3B,IAAIgpB,KAAKtG,KAAKuI,UAC2D,IAA3EjC,KAAKxnB,UAAUypB,OAAO3qB,KAAK,CAAE4oB,YAAa,WAAc,OAAO,OAClE,OAAQ,CAEV+B,OAAQ,SAASA,OAAO5oB,GACtB,IAAI+C,EAAIM,EAASjC,MACb22B,EAAKn1B,EAAYG,GACrB,MAAoB,iBAANg1B,GAAmBvU,SAASuU,GACrC,gBAAiBh1B,GAAoB,QAAdmE,EAAQnE,GAAsCA,EAAE8jB,cAAxBA,EAAY5oB,KAAK8E,GADrB,SAQ9C,SAAUjF,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkpB,EAAclpB,EAAoB,KAGtCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKumB,KAAKxnB,UAAU0nB,cAAgBA,GAAc,OAAQ,CACpFA,YAAaA,KAMT,SAAU/oB,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BgJ,EAAShJ,EAAoB,IAC7B4N,EAAS5N,EAAoB,IAC7B+E,EAAW/E,EAAoB,GAC/BsJ,EAAkBtJ,EAAoB,IACtCsH,EAAWtH,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/B+K,EAAc/K,EAAoB,GAAG+K,YACrCjB,EAAqB9J,EAAoB,IACzC8K,EAAe8C,EAAO7C,YACtBC,EAAY4C,EAAO3C,SACnBovB,EAAUrxB,EAAOuJ,KAAOxH,EAAYuvB,OACpCvpB,EAASjG,EAAatJ,UAAUiH,MAChC6E,EAAOtE,EAAOsE,KACd7C,EAAe,cAEnBvI,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,GAAKsI,IAAgBD,GAAe,CAAEC,YAAaD,IAE3F5I,EAAQA,EAAQW,EAAIX,EAAQO,GAAKuG,EAAOmE,OAAQ1C,EAAc,CAE5D6vB,OAAQ,SAASA,OAAOp2B,GACtB,OAAOm2B,GAAWA,EAAQn2B,IAAOD,EAASC,IAAOoJ,KAAQpJ,KAI7DhC,EAAQA,EAAQa,EAAIb,EAAQ8B,EAAI9B,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACjE,OAAQ,IAAI8K,EAAa,GAAGrC,MAAM,EAAG5I,IAAW6S,aAC9CjI,EAAc,CAEhBhC,MAAO,SAASA,MAAMgH,EAAOmB,GAC3B,GAAIG,IAAWlR,IAAa+Q,IAAQ/Q,GAAW,OAAOkR,EAAOzQ,KAAKyE,EAAStB,MAAOgM,GAQlF,IAPA,IAAI0B,EAAMpM,EAAStB,MAAMiP,WACrB6nB,EAAQjxB,EAAgBmG,EAAO0B,GAC/BqpB,EAAMlxB,EAAgBsH,IAAQ/Q,GAAYsR,EAAMP,EAAKO,GACrD7I,EAAS,IAAKwB,EAAmBrG,KAAMqH,GAA9B,CAA6CxD,EAASkzB,EAAMD,IACrEE,EAAQ,IAAIzvB,EAAUvH,MACtBi3B,EAAQ,IAAI1vB,EAAU1C,GACtBD,EAAQ,EACLkyB,EAAQC,GACbE,EAAM9W,SAASvb,IAASoyB,EAAM3W,SAASyW,MACvC,OAAOjyB,KAIbtI,EAAoB,GAApBA,CAAwByK,IAKlB,SAAUtK,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,GAAKzC,EAAoB,IAAIuS,IAAK,CACxEtH,SAAUjL,EAAoB,IAAIiL,YAM9B,SAAU9K,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,OAAQ,EAAG,SAAU26B,GAC3C,OAAO,SAASC,UAAUxoB,EAAMtB,EAAYnN,GAC1C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU26B,GAC5C,OAAO,SAASnwB,WAAW4H,EAAMtB,EAAYnN,GAC3C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU26B,GAC5C,OAAO,SAASE,kBAAkBzoB,EAAMtB,EAAYnN,GAClD,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,MAErC,IAKG,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU26B,GAC5C,OAAO,SAASG,WAAW1oB,EAAMtB,EAAYnN,GAC3C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU26B,GAC7C,OAAO,SAAShtB,YAAYyE,EAAMtB,EAAYnN,GAC5C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU26B,GAC5C,OAAO,SAASI,WAAW3oB,EAAMtB,EAAYnN,GAC3C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU26B,GAC7C,OAAO,SAASK,YAAY5oB,EAAMtB,EAAYnN,GAC5C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU26B,GAC9C,OAAO,SAASM,aAAa7oB,EAAMtB,EAAYnN,GAC7C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU26B,GAC9C,OAAO,SAASO,aAAa9oB,EAAMtB,EAAYnN,GAC7C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bm7B,EAAYn7B,EAAoB,GAApBA,EAAwB,GAExCkC,EAAQA,EAAQa,EAAG,QAAS,CAC1BoN,SAAU,SAASA,SAAS6H,GAC1B,OAAOmjB,EAAU13B,KAAMuU,EAAuB,EAAnBtU,UAAUC,OAAaD,UAAU,GAAK7D,OAIrEG,EAAoB,GAApBA,CAAwB,aAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+pB,EAAmB/pB,EAAoB,KACvC0F,EAAW1F,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChCo7B,EAAqBp7B,EAAoB,IAE7CkC,EAAQA,EAAQa,EAAG,QAAS,CAC1Bs4B,QAAS,SAASA,QAAQnzB,GACxB,IACI8hB,EAAWtP,EADXtV,EAAIM,EAASjC,MAMjB,OAJAmD,EAAUsB,GACV8hB,EAAY1iB,EAASlC,EAAEzB,QACvB+W,EAAI0gB,EAAmBh2B,EAAG,GAC1B2kB,EAAiBrP,EAAGtV,EAAGA,EAAG4kB,EAAW,EAAG,EAAG9hB,EAAYxE,UAAU,IAC1DgX,KAIX1a,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+pB,EAAmB/pB,EAAoB,KACvC0F,EAAW1F,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/B6E,EAAY7E,EAAoB,IAChCo7B,EAAqBp7B,EAAoB,IAE7CkC,EAAQA,EAAQa,EAAG,QAAS,CAC1Bu4B,QAAS,SAASA,UAChB,IAAIC,EAAW73B,UAAU,GACrB0B,EAAIM,EAASjC,MACbumB,EAAY1iB,EAASlC,EAAEzB,QACvB+W,EAAI0gB,EAAmBh2B,EAAG,GAE9B,OADA2kB,EAAiBrP,EAAGtV,EAAGA,EAAG4kB,EAAW,EAAGuR,IAAa17B,GAAY,EAAIgF,EAAU02B,IACxE7gB,KAIX1a,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B6yB,EAAM7yB,EAAoB,GAApBA,EAAwB,GAG9B4Y,EAFS5Y,EAAoB,EAEpB6rB,CAAO,WAClB,MAAsB,OAAf,KAAK2P,GAAG,KAGjBt5B,EAAQA,EAAQa,EAAIb,EAAQO,EAAImW,EAAQ,SAAU,CAChD4iB,GAAI,SAASA,GAAGjf,GACd,OAAOsW,EAAIpvB,KAAM8Y,OAOf,SAAUpc,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9By7B,EAAOz7B,EAAoB,KAC3B0Z,EAAY1Z,EAAoB,IAGhC07B,EAAa,mDAAmDj1B,KAAKiT,GAEzExX,EAAQA,EAAQa,EAAIb,EAAQO,EAAIi5B,EAAY,SAAU,CACpDC,SAAU,SAASA,SAASnR,GAC1B,OAAOiR,EAAKh4B,KAAM+mB,EAA8B,EAAnB9mB,UAAUC,OAAaD,UAAU,GAAK7D,IAAW,OAO5E,SAAUM,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9By7B,EAAOz7B,EAAoB,KAC3B0Z,EAAY1Z,EAAoB,IAGhC07B,EAAa,mDAAmDj1B,KAAKiT,GAEzExX,EAAQA,EAAQa,EAAIb,EAAQO,EAAIi5B,EAAY,SAAU,CACpDE,OAAQ,SAASA,OAAOpR,GACtB,OAAOiR,EAAKh4B,KAAM+mB,EAA8B,EAAnB9mB,UAAUC,OAAaD,UAAU,GAAK7D,IAAW,OAO5E,SAAUM,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,WAAY,SAAUgmB,GAC5C,OAAO,SAAS6V,WACd,OAAO7V,EAAMviB,KAAM,KAEpB,cAKG,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,YAAa,SAAUgmB,GAC7C,OAAO,SAAS8V,YACd,OAAO9V,EAAMviB,KAAM,KAEpB,YAKG,SAAUtD,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BuF,EAAUvF,EAAoB,IAC9BsH,EAAWtH,EAAoB,GAC/Byc,EAAWzc,EAAoB,KAC/B+7B,EAAW/7B,EAAoB,KAC/Bg8B,EAAc3kB,OAAO7V,UAErBy6B,EAAwB,SAAUC,EAAQh2B,GAC5CzC,KAAK04B,GAAKD,EACVz4B,KAAKmzB,GAAK1wB,GAGZlG,EAAoB,GAApBA,CAAwBi8B,EAAuB,gBAAiB,SAAShtB,OACvE,IAAImtB,EAAQ34B,KAAK04B,GAAG53B,KAAKd,KAAKmzB,IAC9B,MAAO,CAAEtxB,MAAO82B,EAAOltB,KAAgB,OAAVktB,KAG/Bl6B,EAAQA,EAAQa,EAAG,SAAU,CAC3Bs5B,SAAU,SAASA,SAASH,GAE1B,GADA32B,EAAQ9B,OACHgZ,EAASyf,GAAS,MAAM/3B,UAAU+3B,EAAS,qBAChD,IAAIr5B,EAAIwD,OAAO5C,MACX64B,EAAQ,UAAWN,EAAc31B,OAAO61B,EAAOI,OAASP,EAASz7B,KAAK47B,GACtEK,EAAK,IAAIllB,OAAO6kB,EAAO95B,QAASk6B,EAAMrsB,QAAQ,KAAOqsB,EAAQ,IAAMA,GAEvE,OADAC,EAAGC,UAAYl1B,EAAS40B,EAAOM,WACxB,IAAIP,EAAsBM,EAAI15B,OAOnC,SAAU1C,EAAQD,EAASF,GAKjC,IAAI+E,EAAW/E,EAAoB,GACnCG,EAAOD,QAAU,WACf,IAAI4G,EAAO/B,EAAStB,MAChB6E,EAAS,GAMb,OALIxB,EAAKlF,SAAQ0G,GAAU,KACvBxB,EAAK21B,aAAYn0B,GAAU,KAC3BxB,EAAK41B,YAAWp0B,GAAU,KAC1BxB,EAAK61B,UAASr0B,GAAU,KACxBxB,EAAK81B,SAAQt0B,GAAU,KACpBA,IAMH,SAAUnI,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,kBAKlB,SAAUG,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BohB,EAAUphB,EAAoB,IAC9BiH,EAAYjH,EAAoB,IAChCkH,EAAOlH,EAAoB,IAC3By0B,EAAiBz0B,EAAoB,IAEzCkC,EAAQA,EAAQW,EAAG,SAAU,CAC3Bg6B,0BAA2B,SAASA,0BAA0Bv7B,GAO5D,IANA,IAKIe,EAAKmP,EALLpM,EAAI6B,EAAU3F,GACdw7B,EAAU51B,EAAK/B,EACf0G,EAAOuV,EAAQhc,GACfkD,EAAS,GACTlI,EAAI,EAEaA,EAAdyL,EAAKlI,SACV6N,EAAOsrB,EAAQ13B,EAAG/C,EAAMwJ,EAAKzL,SAChBP,IAAW40B,EAAensB,EAAQjG,EAAKmP,GAEtD,OAAOlJ,MAOL,SAAUnI,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+8B,EAAU/8B,EAAoB,IAApBA,EAAyB,GAEvCkC,EAAQA,EAAQW,EAAG,SAAU,CAC3B8I,OAAQ,SAASA,OAAOzH,GACtB,OAAO64B,EAAQ74B,OAOb,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BqZ,EAAWrZ,EAAoB,IAApBA,EAAyB,GAExCkC,EAAQA,EAAQW,EAAG,SAAU,CAC3BkJ,QAAS,SAASA,QAAQ7H,GACxB,OAAOmV,EAASnV,OAOd,SAAU/D,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChC6c,EAAkB7c,EAAoB,GAG1CA,EAAoB,IAAMkC,EAAQA,EAAQa,EAAI/C,EAAoB,IAAK,SAAU,CAC/Eg9B,iBAAkB,SAASA,iBAAiBj6B,EAAGpC,GAC7Ckc,EAAgB1X,EAAEO,EAASjC,MAAOV,EAAG,CAAE9B,IAAK2F,EAAUjG,GAASK,YAAY,EAAMD,cAAc,QAO7F,SAAUZ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChC6c,EAAkB7c,EAAoB,GAG1CA,EAAoB,IAAMkC,EAAQA,EAAQa,EAAI/C,EAAoB,IAAK,SAAU,CAC/Ewa,iBAAkB,SAASA,iBAAiBzX,EAAG+pB,GAC7CjQ,EAAgB1X,EAAEO,EAASjC,MAAOV,EAAG,CAAE+K,IAAKlH,EAAUkmB,GAAS9rB,YAAY,EAAMD,cAAc,QAO7F,SAAUZ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/BiF,EAAcjF,EAAoB,IAClC6F,EAAiB7F,EAAoB,IACrCmH,EAA2BnH,EAAoB,IAAImF,EAGvDnF,EAAoB,IAAMkC,EAAQA,EAAQa,EAAI/C,EAAoB,IAAK,SAAU,CAC/Ei9B,iBAAkB,SAASA,iBAAiBl6B,GAC1C,IAEIyW,EAFApU,EAAIM,EAASjC,MACb8W,EAAItV,EAAYlC,GAAG,GAEvB,GACE,GAAIyW,EAAIrS,EAAyB/B,EAAGmV,GAAI,OAAOf,EAAEvY,UAC1CmE,EAAIS,EAAeT,QAO1B,SAAUjF,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/BiF,EAAcjF,EAAoB,IAClC6F,EAAiB7F,EAAoB,IACrCmH,EAA2BnH,EAAoB,IAAImF,EAGvDnF,EAAoB,IAAMkC,EAAQA,EAAQa,EAAI/C,EAAoB,IAAK,SAAU,CAC/Ek9B,iBAAkB,SAASA,iBAAiBn6B,GAC1C,IAEIyW,EAFApU,EAAIM,EAASjC,MACb8W,EAAItV,EAAYlC,GAAG,GAEvB,GACE,GAAIyW,EAAIrS,EAAyB/B,EAAGmV,GAAI,OAAOf,EAAE1L,UAC1C1I,EAAIS,EAAeT,QAO1B,SAAUjF,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAIb,EAAQ6B,EAAG,MAAO,CAAEknB,OAAQjrB,EAAoB,IAApBA,CAAyB,UAKnE,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAIb,EAAQ6B,EAAG,MAAO,CAAEknB,OAAQjrB,EAAoB,IAApBA,CAAyB,UAKnE,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQS,EAAG,CAAEf,OAAQ5B,EAAoB,MAK3C,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEjB,OAAQ5B,EAAoB,MAKrD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BgW,EAAMhW,EAAoB,IAE9BkC,EAAQA,EAAQW,EAAG,QAAS,CAC1Bs6B,QAAS,SAASA,QAAQj5B,GACxB,MAAmB,UAAZ8R,EAAI9R,OAOT,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBu6B,MAAO,SAASA,MAAMjhB,EAAGkhB,EAAOC,GAC9B,OAAOj5B,KAAKS,IAAIw4B,EAAOj5B,KAAK0R,IAAIsnB,EAAOlhB,QAOrC,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAE06B,YAAal5B,KAAKm5B,GAAK,OAK9C,SAAUr9B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9By9B,EAAc,IAAMp5B,KAAKm5B,GAE7Bt7B,EAAQA,EAAQW,EAAG,OAAQ,CACzB66B,QAAS,SAASA,QAAQC,GACxB,OAAOA,EAAUF,MAOf,SAAUt9B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkrB,EAAQlrB,EAAoB,KAC5B2mB,EAAS3mB,EAAoB,KAEjCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzB+6B,OAAQ,SAASA,OAAOzhB,EAAGgP,EAAOC,EAAQC,EAAQC,GAChD,OAAO3E,EAAOuE,EAAM/O,EAAGgP,EAAOC,EAAQC,EAAQC,QAO5C,SAAUnrB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBg7B,MAAO,SAASA,MAAMC,EAAIC,EAAIC,EAAIC,GAChC,IAAIC,EAAMJ,IAAO,EAEbK,EAAMH,IAAO,EACjB,OAFUD,IAAO,IAEHE,IAAO,KAAOC,EAAMC,GAAOD,EAAMC,KAASD,EAAMC,IAAQ,MAAQ,IAAM,MAOlF,SAAUh+B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBu7B,MAAO,SAASA,MAAMN,EAAIC,EAAIC,EAAIC,GAChC,IAAIC,EAAMJ,IAAO,EAEbK,EAAMH,IAAO,EACjB,OAFUD,IAAO,IAEHE,IAAO,MAAQC,EAAMC,IAAQD,EAAMC,GAAOD,EAAMC,IAAQ,KAAO,IAAM,MAOjF,SAAUh+B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBw7B,MAAO,SAASA,MAAMC,EAAGjsB,GACvB,IACIksB,GAAMD,EACNE,GAAMnsB,EACNosB,EAHS,MAGJF,EACLG,EAJS,MAIJF,EACLG,EAAKJ,GAAM,GACXK,EAAKJ,GAAM,GACX9O,GAAKiP,EAAKD,IAAO,IAAMD,EAAKC,IAAO,IACvC,OAAOC,EAAKC,GAAMlP,GAAK,MAAQ+O,EAAKG,IAAO,IAR9B,MAQoClP,IAAe,QAO9D,SAAUvvB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAE46B,YAAa,IAAMp5B,KAAKm5B,MAK/C,SAAUr9B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bu9B,EAAcl5B,KAAKm5B,GAAK,IAE5Bt7B,EAAQA,EAAQW,EAAG,OAAQ,CACzB86B,QAAS,SAASA,QAAQD,GACxB,OAAOA,EAAUH,MAOf,SAAUp9B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEqoB,MAAOlrB,EAAoB,QAKlD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBg8B,MAAO,SAASA,MAAMP,EAAGjsB,GACvB,IACIksB,GAAMD,EACNE,GAAMnsB,EACNosB,EAHS,MAGJF,EACLG,EAJS,MAIJF,EACLG,EAAKJ,IAAO,GACZK,EAAKJ,IAAO,GACZ9O,GAAKiP,EAAKD,IAAO,IAAMD,EAAKC,IAAO,IACvC,OAAOC,EAAKC,GAAMlP,IAAM,MAAQ+O,EAAKG,IAAO,IAR/B,MAQqClP,KAAgB,QAOhE,SAAUvvB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEi8B,QAAS,SAASA,QAAQ3iB,GAErD,OAAQA,GAAKA,IAAMA,EAAIA,EAAS,GAALA,EAAS,EAAIA,GAAKF,SAAe,EAAJE,MAMpD,SAAUhc,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B6B,EAAO7B,EAAoB,IAC3B4B,EAAS5B,EAAoB,GAC7B8J,EAAqB9J,EAAoB,IACzC81B,EAAiB91B,EAAoB,KAEzCkC,EAAQA,EAAQa,EAAIb,EAAQ6B,EAAG,UAAW,CAAEg7B,UAAW,SAAUC,GAC/D,IAAI17B,EAAIwG,EAAmBrG,KAAM5B,EAAK8d,SAAW/d,EAAO+d,SACpDsf,EAAiC,mBAAbD,EACxB,OAAOv7B,KAAK+c,KACVye,EAAa,SAAU9iB,GACrB,OAAO2Z,EAAexyB,EAAG07B,KAAaxe,KAAK,WAAc,OAAOrE,KAC9D6iB,EACJC,EAAa,SAAUz6B,GACrB,OAAOsxB,EAAexyB,EAAG07B,KAAaxe,KAAK,WAAc,MAAMhc,KAC7Dw6B,OAOF,SAAU7+B,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BmnB,EAAuBnnB,EAAoB,IAC3C61B,EAAU71B,EAAoB,KAElCkC,EAAQA,EAAQW,EAAG,UAAW,CAAEq8B,MAAO,SAAUh3B,GAC/C,IAAIkf,EAAoBD,EAAqBhiB,EAAE1B,MAC3C6E,EAASutB,EAAQ3tB,GAErB,OADCI,EAAO9D,EAAI4iB,EAAkBpG,OAASoG,EAAkB9G,SAAShY,EAAO+J,GAClE+U,EAAkB7G,YAMrB,SAAUpgB,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/Bo/B,EAAYD,EAAS98B,IACrBg9B,EAA4BF,EAASrxB,IAEzCqxB,EAASr2B,IAAI,CAAEw2B,eAAgB,SAASA,eAAeC,EAAaC,EAAen8B,EAAQgQ,GACzFgsB,EAA0BE,EAAaC,EAAez6B,EAAS1B,GAAS+7B,EAAU/rB,QAM9E,SAAUlT,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/Bo/B,EAAYD,EAAS98B,IACrB+Q,EAAyB+rB,EAAS9uB,IAClC5L,EAAQ06B,EAAS16B,MAErB06B,EAASr2B,IAAI,CAAE22B,eAAgB,SAASA,eAAeF,EAAal8B,GAClE,IAAIgQ,EAAY3P,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,IACnE+P,EAAcL,EAAuBrO,EAAS1B,GAASgQ,GAAW,GACtE,GAAII,IAAgB5T,KAAc4T,EAAoB,UAAE8rB,GAAc,OAAO,EAC7E,GAAI9rB,EAAYyG,KAAM,OAAO,EAC7B,IAAI5G,EAAiB7O,EAAMxD,IAAIoC,GAE/B,OADAiQ,EAAuB,UAAED,KAChBC,EAAe4G,MAAQzV,EAAc,UAAEpB,OAM5C,SAAUlD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B6F,EAAiB7F,EAAoB,IACrC0/B,EAAyBP,EAASn9B,IAClC29B,EAAyBR,EAASl+B,IAClCm+B,EAAYD,EAAS98B,IAErBu9B,EAAsB,SAAUpsB,EAAapO,EAAGrC,GAElD,GADa28B,EAAuBlsB,EAAapO,EAAGrC,GACxC,OAAO48B,EAAuBnsB,EAAapO,EAAGrC,GAC1D,IAAIkd,EAASpa,EAAeT,GAC5B,OAAkB,OAAX6a,EAAkB2f,EAAoBpsB,EAAayM,EAAQld,GAAKlD,IAGzEs/B,EAASr2B,IAAI,CAAE+2B,YAAa,SAASA,YAAYN,EAAal8B,GAC5D,OAAOu8B,EAAoBL,EAAax6B,EAAS1B,GAASK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAM7G,SAAUvD,EAAQD,EAASF,GAEjC,IAAI+nB,EAAM/nB,EAAoB,KAC1B0O,EAAO1O,EAAoB,KAC3Bm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B6F,EAAiB7F,EAAoB,IACrC8/B,EAA0BX,EAAStzB,KACnCuzB,EAAYD,EAAS98B,IAErB09B,EAAuB,SAAU36B,EAAGrC,GACtC,IAAIi9B,EAAQF,EAAwB16B,EAAGrC,GACnCkd,EAASpa,EAAeT,GAC5B,GAAe,OAAX6a,EAAiB,OAAO+f,EAC5B,IAAIC,EAAQF,EAAqB9f,EAAQld,GACzC,OAAOk9B,EAAMt8B,OAASq8B,EAAMr8B,OAAS+K,EAAK,IAAIqZ,EAAIiY,EAAMltB,OAAOmtB,KAAWA,EAAQD,GAGpFb,EAASr2B,IAAI,CAAEo3B,gBAAiB,SAASA,gBAAgB78B,GACvD,OAAO08B,EAAqBh7B,EAAS1B,GAASK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAMjG,SAAUvD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B2/B,EAAyBR,EAASl+B,IAClCm+B,EAAYD,EAAS98B,IAEzB88B,EAASr2B,IAAI,CAAEq3B,eAAgB,SAASA,eAAeZ,EAAal8B,GAClE,OAAOs8B,EAAuBJ,EAAax6B,EAAS1B,GAChDK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAMvD,SAAUvD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B8/B,EAA0BX,EAAStzB,KACnCuzB,EAAYD,EAAS98B,IAEzB88B,EAASr2B,IAAI,CAAEs3B,mBAAoB,SAASA,mBAAmB/8B,GAC7D,OAAOy8B,EAAwB/6B,EAAS1B,GAASK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAMpG,SAAUvD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B6F,EAAiB7F,EAAoB,IACrC0/B,EAAyBP,EAASn9B,IAClCo9B,EAAYD,EAAS98B,IAErBg+B,EAAsB,SAAU7sB,EAAapO,EAAGrC,GAElD,GADa28B,EAAuBlsB,EAAapO,EAAGrC,GACxC,OAAO,EACnB,IAAIkd,EAASpa,EAAeT,GAC5B,OAAkB,OAAX6a,GAAkBogB,EAAoB7sB,EAAayM,EAAQld,IAGpEo8B,EAASr2B,IAAI,CAAEw3B,YAAa,SAASA,YAAYf,EAAal8B,GAC5D,OAAOg9B,EAAoBd,EAAax6B,EAAS1B,GAASK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAM7G,SAAUvD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B0/B,EAAyBP,EAASn9B,IAClCo9B,EAAYD,EAAS98B,IAEzB88B,EAASr2B,IAAI,CAAEy3B,eAAgB,SAASA,eAAehB,EAAal8B,GAClE,OAAOq8B,EAAuBH,EAAax6B,EAAS1B,GAChDK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAMvD,SAAUvD,EAAQD,EAASF,GAEjC,IAAIwgC,EAAYxgC,EAAoB,IAChC+E,EAAW/E,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChCo/B,EAAYoB,EAAUn+B,IACtBg9B,EAA4BmB,EAAU1yB,IAE1C0yB,EAAU13B,IAAI,CAAEq2B,SAAU,SAASA,SAASI,EAAaC,GACvD,OAAO,SAASiB,UAAUp9B,EAAQgQ,GAChCgsB,EACEE,EAAaC,GACZnsB,IAAcxT,GAAYkF,EAAW6B,GAAWvD,GACjD+7B,EAAU/rB,SAQV,SAAUlT,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B21B,EAAY31B,EAAoB,GAApBA,GACZ+d,EAAU/d,EAAoB,GAAG+d,QACjC6B,EAA6C,WAApC5f,EAAoB,GAApBA,CAAwB+d,GAErC7b,EAAQA,EAAQS,EAAG,CACjB+9B,KAAM,SAASA,KAAK75B,GAClB,IAAIqZ,EAASN,GAAU7B,EAAQmC,OAC/ByV,EAAUzV,EAASA,EAAOqF,KAAK1e,GAAMA,OAOnC,SAAU1G,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3B21B,EAAY31B,EAAoB,GAApBA,GACZ2gC,EAAa3gC,EAAoB,EAApBA,CAAuB,cACpC4G,EAAY5G,EAAoB,IAChC+E,EAAW/E,EAAoB,GAC/BkJ,EAAalJ,EAAoB,IACjCoJ,EAAcpJ,EAAoB,IAClC+B,EAAO/B,EAAoB,IAC3B2Z,EAAQ3Z,EAAoB,IAC5B6V,EAAS8D,EAAM9D,OAEfkD,EAAY,SAAUlS,GACxB,OAAa,MAANA,EAAahH,GAAY+G,EAAUC,IAGxC+5B,EAAsB,SAAUC,GAClC,IAAIC,EAAUD,EAAa7mB,GACvB8mB,IACFD,EAAa7mB,GAAKna,GAClBihC,MAIAC,EAAqB,SAAUF,GACjC,OAAOA,EAAaG,KAAOnhC,IAGzBohC,EAAoB,SAAUJ,GAC3BE,EAAmBF,KACtBA,EAAaG,GAAKnhC,GAClB+gC,EAAoBC,KAIpBK,EAAe,SAAUC,EAAUC,GACrCr8B,EAASo8B,GACT19B,KAAKuW,GAAKna,GACV4D,KAAKu9B,GAAKG,EACVA,EAAW,IAAIE,EAAqB59B,MACpC,IACE,IAAIq9B,EAAUM,EAAWD,GACrBN,EAAeC,EACJ,MAAXA,IACiC,mBAAxBA,EAAQQ,YAA4BR,EAAU,WAAcD,EAAaS,eAC/E16B,EAAUk6B,GACfr9B,KAAKuW,GAAK8mB,GAEZ,MAAOt8B,GAEP,YADA28B,EAASzJ,MAAMlzB,GAEXu8B,EAAmBt9B,OAAOm9B,EAAoBn9B,OAGtDy9B,EAAa1/B,UAAY4H,EAAY,GAAI,CACvCk4B,YAAa,SAASA,cAAgBL,EAAkBx9B,SAG1D,IAAI49B,EAAuB,SAAUR,GACnCp9B,KAAKmzB,GAAKiK,GAGZQ,EAAqB7/B,UAAY4H,EAAY,GAAI,CAC/C6F,KAAM,SAASA,KAAK3J,GAClB,IAAIu7B,EAAep9B,KAAKmzB,GACxB,IAAKmK,EAAmBF,GAAe,CACrC,IAAIM,EAAWN,EAAaG,GAC5B,IACE,IAAIzgC,EAAIwY,EAAUooB,EAASlyB,MAC3B,GAAI1O,EAAG,OAAOA,EAAED,KAAK6gC,EAAU77B,GAC/B,MAAOd,GACP,IACEy8B,EAAkBJ,GAClB,QACA,MAAMr8B,MAKdkzB,MAAO,SAASA,MAAMpyB,GACpB,IAAIu7B,EAAep9B,KAAKmzB,GACxB,GAAImK,EAAmBF,GAAe,MAAMv7B,EAC5C,IAAI67B,EAAWN,EAAaG,GAC5BH,EAAaG,GAAKnhC,GAClB,IACE,IAAIU,EAAIwY,EAAUooB,EAASzJ,OAC3B,IAAKn3B,EAAG,MAAM+E,EACdA,EAAQ/E,EAAED,KAAK6gC,EAAU77B,GACzB,MAAOd,GACP,IACEo8B,EAAoBC,GACpB,QACA,MAAMr8B,GAGV,OADEo8B,EAAoBC,GACfv7B,GAETi8B,SAAU,SAASA,SAASj8B,GAC1B,IAAIu7B,EAAep9B,KAAKmzB,GACxB,IAAKmK,EAAmBF,GAAe,CACrC,IAAIM,EAAWN,EAAaG,GAC5BH,EAAaG,GAAKnhC,GAClB,IACE,IAAIU,EAAIwY,EAAUooB,EAASI,UAC3Bj8B,EAAQ/E,EAAIA,EAAED,KAAK6gC,EAAU77B,GAASzF,GACtC,MAAO2E,GACP,IACEo8B,EAAoBC,GACpB,QACA,MAAMr8B,GAGV,OADEo8B,EAAoBC,GACfv7B,MAKb,IAAIk8B,EAAc,SAASC,WAAWL,GACpCl4B,EAAWzF,KAAM+9B,EAAa,aAAc,MAAM9Z,GAAK9gB,EAAUw6B,IAGnEh4B,EAAYo4B,EAAYhgC,UAAW,CACjCkgC,UAAW,SAASA,UAAUP,GAC5B,OAAO,IAAID,EAAaC,EAAU19B,KAAKikB,KAEzC1X,QAAS,SAASA,QAAQnJ,GACxB,IAAIC,EAAOrD,KACX,OAAO,IAAK5B,EAAK8d,SAAW/d,EAAO+d,SAAS,SAAUW,EAASU,GAC7Dpa,EAAUC,GACV,IAAIg6B,EAAe/5B,EAAK46B,UAAU,CAChCzyB,KAAM,SAAU3J,GACd,IACE,OAAOuB,EAAGvB,GACV,MAAOd,GACPwc,EAAOxc,GACPq8B,EAAaS,gBAGjB5J,MAAO1W,EACPugB,SAAUjhB,SAMlBlX,EAAYo4B,EAAa,CACvB9yB,KAAM,SAASA,KAAKyN,GAClB,IAAI7Y,EAAoB,mBAATG,KAAsBA,KAAO+9B,EACxCp6B,EAAS2R,EAAUhU,EAASoX,GAAGwkB,IACnC,GAAIv5B,EAAQ,CACV,IAAIu6B,EAAa58B,EAASqC,EAAO9G,KAAK6b,IACtC,OAAOwlB,EAAW77B,cAAgBxC,EAAIq+B,EAAa,IAAIr+B,EAAE,SAAU69B,GACjE,OAAOQ,EAAWD,UAAUP,KAGhC,OAAO,IAAI79B,EAAE,SAAU69B,GACrB,IAAIjyB,GAAO,EAeX,OAdAymB,EAAU,WACR,IAAKzmB,EAAM,CACT,IACE,GAAIyK,EAAMwC,GAAG,EAAO,SAAUjY,GAE5B,GADAi9B,EAASlyB,KAAK/K,GACVgL,EAAM,OAAO2G,MACZA,EAAQ,OACf,MAAOrR,GACP,GAAI0K,EAAM,MAAM1K,EAEhB,YADA28B,EAASzJ,MAAMlzB,GAEf28B,EAASI,cAGR,WAAcryB,GAAO,MAGhCE,GAAI,SAASA,KACX,IAAK,IAAIhP,EAAI,EAAGC,EAAIqD,UAAUC,OAAQi+B,EAAQ,IAAI/2B,MAAMxK,GAAID,EAAIC,GAAIuhC,EAAMxhC,GAAKsD,UAAUtD,KACzF,OAAO,IAAqB,mBAATqD,KAAsBA,KAAO+9B,GAAa,SAAUL,GACrE,IAAIjyB,GAAO,EASX,OARAymB,EAAU,WACR,IAAKzmB,EAAM,CACT,IAAK,IAAIyM,EAAI,EAAGA,EAAIimB,EAAMj+B,SAAUgY,EAElC,GADAwlB,EAASlyB,KAAK2yB,EAAMjmB,IAChBzM,EAAM,OACViyB,EAASI,cAGR,WAAcryB,GAAO,QAKlCnN,EAAKy/B,EAAYhgC,UAAWm/B,EAAY,WAAc,OAAOl9B,OAE7DvB,EAAQA,EAAQS,EAAG,CAAE8+B,WAAYD,IAEjCxhC,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B6hC,EAAQ7hC,EAAoB,IAChCkC,EAAQA,EAAQS,EAAIT,EAAQe,EAAG,CAC7Bgb,aAAc4jB,EAAM/zB,IACpBqQ,eAAgB0jB,EAAMviB,SAMlB,SAAUnf,EAAQD,EAASF,GAEjCA,EAAoB,IAYpB,IAXA,IAAI4B,EAAS5B,EAAoB,GAC7B+B,EAAO/B,EAAoB,IAC3BgK,EAAYhK,EAAoB,IAChC8hC,EAAgB9hC,EAAoB,EAApBA,CAAuB,eAEvC+hC,EAAe,wbAIUp7B,MAAM,KAE1BvG,EAAI,EAAGA,EAAI2hC,EAAap+B,OAAQvD,IAAK,CAC5C,IAAIoG,EAAOu7B,EAAa3hC,GACpB4hC,EAAapgC,EAAO4E,GACpB+I,EAAQyyB,GAAcA,EAAWxgC,UACjC+N,IAAUA,EAAMuyB,IAAgB//B,EAAKwN,EAAOuyB,EAAet7B,GAC/DwD,EAAUxD,GAAQwD,EAAUa,QAMxB,SAAU1K,EAAQD,EAASF,GAGjC,IAAI4B,EAAS5B,EAAoB,GAC7BkC,EAAUlC,EAAoB,GAC9B0Z,EAAY1Z,EAAoB,IAChCyI,EAAQ,GAAGA,MACXw5B,EAAO,WAAWx7B,KAAKiT,GACvBwT,EAAO,SAAUpf,GACnB,OAAO,SAAUjH,EAAIq7B,GACnB,IAAIC,EAA+B,EAAnBz+B,UAAUC,OACtBiY,IAAOumB,GAAY15B,EAAMnI,KAAKoD,UAAW,GAC7C,OAAOoK,EAAIq0B,EAAY,YAEP,mBAANt7B,EAAmBA,EAAKhD,SAASgD,IAAKjD,MAAMH,KAAMmY,IACxD/U,EAAIq7B,KAGZhgC,EAAQA,EAAQS,EAAIT,EAAQe,EAAIf,EAAQO,EAAIw/B,EAAM,CAChD5iB,WAAY6N,EAAKtrB,EAAOyd,YACxB+iB,YAAalV,EAAKtrB,EAAOwgC,gBAMrB,SAAUjiC,EAAQD,EAASF,GAIjC,IAAI8B,EAAM9B,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9B+G,EAAa/G,EAAoB,IACjCub,EAASvb,EAAoB,IAC7BgI,EAAShI,EAAoB,IAC7B6F,EAAiB7F,EAAoB,IACrCob,EAAUpb,EAAoB,IAC9BkF,EAAKlF,EAAoB,GACzBqiC,EAAQriC,EAAoB,KAC5B4G,EAAY5G,EAAoB,IAChC2Z,EAAQ3Z,EAAoB,IAC5BurB,EAAavrB,EAAoB,KACjCqY,EAAcrY,EAAoB,IAClC2O,EAAO3O,EAAoB,IAC3BiE,EAAWjE,EAAoB,GAC/BiH,EAAYjH,EAAoB,IAChC6W,EAAc7W,EAAoB,GAClCgC,EAAMhC,EAAoB,IAU1BsiC,EAAmB,SAAU96B,GAC/B,IAAIE,EAAiB,GAARF,EACTK,EAAmB,GAARL,EACf,OAAO,SAAUlG,EAAQ4G,EAAYpB,GACnC,IAIIzE,EAAK8F,EAAKC,EAJVjD,EAAIrD,EAAIoG,EAAYpB,EAAM,GAC1B1B,EAAI6B,EAAU3F,GACdgH,EAASZ,GAAkB,GAARF,GAAqB,GAARA,EAC5B,IAAoB,mBAAR/D,KAAqBA,KAAO8+B,MAAU1iC,GAE1D,IAAKwC,KAAO+C,EAAG,GAAIpD,EAAIoD,EAAG/C,KAExB+F,EAAMjD,EADNgD,EAAM/C,EAAE/C,GACKA,EAAKf,GACdkG,GACF,GAAIE,EAAQY,EAAOjG,GAAO+F,OACrB,GAAIA,EAAK,OAAQZ,GACpB,KAAK,EAAGc,EAAOjG,GAAO8F,EAAK,MAC3B,KAAK,EAAG,OAAO,EACf,KAAK,EAAG,OAAOA,EACf,KAAK,EAAG,OAAO9F,EACf,KAAK,EAAGiG,EAAOF,EAAI,IAAMA,EAAI,QACxB,GAAIP,EAAU,OAAO,EAGhC,OAAe,GAARL,GAAaK,EAAWA,EAAWS,IAG1Ck6B,EAAUF,EAAiB,GAE3BG,EAAiB,SAAUzpB,GAC7B,OAAO,SAAU9U,GACf,OAAO,IAAIw+B,EAAax+B,EAAI8U,KAG5B0pB,EAAe,SAAUrlB,EAAUrE,GACrCvV,KAAK+S,GAAKvP,EAAUoW,GACpB5Z,KAAKk0B,GAAKvc,EAAQiC,GAClB5Z,KAAK6Z,GAAK,EACV7Z,KAAK8Z,GAAKvE,GAmBZ,SAASupB,KAAKzsB,GACZ,IAAI6sB,EAAO36B,EAAO,MAQlB,OAPI8N,GAAYjW,KACV0rB,EAAWzV,GACb6D,EAAM7D,GAAU,EAAM,SAAUzT,EAAKiD,GACnCq9B,EAAKtgC,GAAOiD,IAETiW,EAAOonB,EAAM7sB,IAEf6sB,EA1BTtqB,EAAYqqB,EAAc,OAAQ,WAChC,IAIIrgC,EAJAyE,EAAOrD,KACP2B,EAAI0B,EAAK0P,GACT3K,EAAO/E,EAAK6wB,GACZ3e,EAAOlS,EAAKyW,GAEhB,GACE,GAAe1R,EAAKlI,QAAhBmD,EAAKwW,GAEP,OADAxW,EAAK0P,GAAK3W,GACH8O,EAAK,UAEN3M,EAAIoD,EAAG/C,EAAMwJ,EAAK/E,EAAKwW,QACjC,OAA2B3O,EAAK,EAApB,QAARqK,EAA+B3W,EACvB,UAAR2W,EAAiC5T,EAAE/C,GACxB,CAACA,EAAK+C,EAAE/C,OAczBkgC,KAAK/gC,UAAY,KAwCjBU,EAAQA,EAAQS,EAAIT,EAAQO,EAAG,CAAE8/B,KAAMA,OAEvCrgC,EAAQA,EAAQW,EAAG,OAAQ,CACzBgJ,KAAM42B,EAAe,QACrB92B,OAAQ82B,EAAe,UACvB12B,QAAS02B,EAAe,WACxBzyB,QAASsyB,EAAiB,GAC1BjyB,IAAKiyB,EAAiB,GACtB1yB,OAAQ0yB,EAAiB,GACzB9xB,KAAM8xB,EAAiB,GACvB5yB,MAAO4yB,EAAiB,GACxBzyB,KAAMyyB,EAAiB,GACvBE,QAASA,EACTI,SAAUN,EAAiB,GAC3Bn2B,OApDF,SAASA,OAAO7K,EAAQwN,EAAO6rB,GAC7B/zB,EAAUkI,GACV,IAIIiY,EAAM1kB,EAJN+C,EAAI6B,EAAU3F,GACduK,EAAOuP,EAAQhW,GACfzB,EAASkI,EAAKlI,OACdvD,EAAI,EAER,GAAIsD,UAAUC,OAAS,EAAG,CACxB,IAAKA,EAAQ,MAAMQ,UAAU,gDAC7B4iB,EAAO3hB,EAAEyG,EAAKzL,WACT2mB,EAAOlmB,OAAO85B,GACrB,KAAgBv6B,EAATuD,GAAgB3B,EAAIoD,EAAG/C,EAAMwJ,EAAKzL,QACvC2mB,EAAOjY,EAAMiY,EAAM3hB,EAAE/C,GAAMA,EAAKf,IAElC,OAAOylB,GAuCPsb,MAAOA,EACPlyB,SArCF,SAASA,SAAS7O,EAAQ0W,GAExB,OAAQA,GAAMA,EAAKqqB,EAAM/gC,EAAQ0W,GAAMwqB,EAAQlhC,EAAQ,SAAU4C,GAE/D,OAAOA,GAAMA,OACPrE,IAiCRmC,IAAKA,EACLf,IA/BF,SAASA,IAAIK,EAAQe,GACnB,GAAIL,EAAIV,EAAQe,GAAM,OAAOf,EAAOe,IA+BpCyL,IA7BF,SAASA,IAAIxM,EAAQe,EAAKiD,GAGxB,OAFIuR,GAAexU,KAAOxB,OAAQqE,EAAGC,EAAE7D,EAAQe,EAAK0E,EAAW,EAAGzB,IAC7DhE,EAAOe,GAAOiD,EACZhE,GA2BPuhC,OAxBF,SAASA,OAAO3+B,GACd,OAAOD,EAASC,IAAO2B,EAAe3B,KAAQq+B,KAAK/gC,cA6B/C,SAAUrB,EAAQD,EAASF,GAEjC,IAAIob,EAAUpb,EAAoB,IAC9BiH,EAAYjH,EAAoB,IACpCG,EAAOD,QAAU,SAAUoB,EAAQ0W,GAMjC,IALA,IAII3V,EAJA+C,EAAI6B,EAAU3F,GACduK,EAAOuP,EAAQhW,GACfzB,EAASkI,EAAKlI,OACd0E,EAAQ,EAEIA,EAAT1E,GAAgB,GAAIyB,EAAE/C,EAAMwJ,EAAKxD,QAAc2P,EAAI,OAAO3V,IAM7D,SAAUlC,EAAQD,EAASF,GAEjC,IAAI+E,EAAW/E,EAAoB,GAC/BiB,EAAMjB,EAAoB,IAC9BG,EAAOD,QAAUF,EAAoB,IAAI8iC,YAAc,SAAU5+B,GAC/D,IAAI8K,EAAS/N,EAAIiD,GACjB,GAAqB,mBAAV8K,EAAsB,MAAM7K,UAAUD,EAAK,qBACtD,OAAOa,EAASiK,EAAO1O,KAAK4D,MAMxB,SAAU/D,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3BkC,EAAUlC,EAAoB,GAC9B+iC,EAAU/iC,EAAoB,KAElCkC,EAAQA,EAAQS,EAAIT,EAAQO,EAAG,CAC7BugC,MAAO,SAASA,MAAMd,GACpB,OAAO,IAAKrgC,EAAK8d,SAAW/d,EAAO+d,SAAS,SAAUW,GACpDjB,WAAW0jB,EAAQziC,KAAKggB,GAAS,GAAO4hB,SAQxC,SAAU/hC,EAAQD,EAASF,GAEjC,IAAIwrB,EAAOxrB,EAAoB,KAC3BkC,EAAUlC,EAAoB,GAGlCA,EAAoB,IAAI2T,EAAI6X,EAAK7X,EAAI6X,EAAK7X,GAAK,GAE/CzR,EAAQA,EAAQa,EAAIb,EAAQO,EAAG,WAAY,CAAEoiB,KAAM7kB,EAAoB,QAKjE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CAAEwB,SAAUjE,EAAoB,MAKnE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CAAE8G,QAASvJ,EAAoB,OAKlE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B2rB,EAAS3rB,EAAoB,KAEjCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CAAEkpB,OAAQA,KAK7C,SAAUxrB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B2rB,EAAS3rB,EAAoB,KAC7BgI,EAAShI,EAAoB,IAEjCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CACvCwgC,KAAM,SAAU1zB,EAAOqc,GACrB,OAAOD,EAAO3jB,EAAOuH,GAAQqc,OAO3B,SAAUzrB,EAAQD,EAASF,GAIjCA,EAAoB,GAApBA,CAAwBswB,OAAQ,SAAU,SAAUjT,GAClD5Z,KAAKkkB,IAAMtK,EACX5Z,KAAK6Z,GAAK,GACT,WACD,IAAIld,EAAIqD,KAAK6Z,KACTpO,IAAS9O,EAAIqD,KAAKkkB,IACtB,MAAO,CAAEzY,KAAMA,EAAM5J,MAAO4J,EAAOrP,GAAYO,MAM3C,SAAUD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkjC,EAAMljC,EAAoB,GAApBA,CAAwB,sBAAuB,QAEzDkC,EAAQA,EAAQW,EAAG,SAAU,CAAEsgC,OAAQ,SAASA,OAAOj/B,GAAM,OAAOg/B,EAAIh/B,OAKlE,SAAU/D,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BkjC,EAAMljC,EAAoB,GAApBA,CAAwB,WAAY,CAC5CojC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,WAGPthC,EAAQA,EAAQa,EAAIb,EAAQO,EAAG,SAAU,CAAEghC,WAAY,SAASA,aAAe,OAAOP,EAAIz/B,UAKpF,SAAUtD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BkjC,EAAMljC,EAAoB,GAApBA,CAAwB,6BAA8B,CAC9D0jC,QAAS,IACTC,OAAQ,IACRC,OAAQ,IACRC,SAAU,IACVC,SAAU,MAGZ5hC,EAAQA,EAAQa,EAAIb,EAAQO,EAAG,SAAU,CAAEshC,aAAc,SAASA,eAAiB,OAAOb,EAAIz/B,YAMzE,oBAAVtD,QAAyBA,OAAOD,QAASC,OAAOD,QAAUP,EAE3C,mBAAVgsB,QAAwBA,OAAOqY,IAAKrY,OAAO,WAAc,OAAOhsB,IAE3EC,EAAIiC,KAAOlC,EAh+Pf,CAi+PC,EAAG","file":"library.min.js"} \ No newline at end of file diff --git a/node_modules/core-js/client/shim.js b/node_modules/core-js/client/shim.js new file mode 100644 index 0000000000000..3cf7b20d57e04 --- /dev/null +++ b/node_modules/core-js/client/shim.js @@ -0,0 +1,8663 @@ +/** + * core-js 2.6.11 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 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__(26); +var hide = __webpack_require__(11); +var redefine = __webpack_require__(12); +var ctx = __webpack_require__(18); +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__(4); +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 (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(47)('wks'); +var uid = __webpack_require__(33); +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__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(20); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(3)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var IE8_DOM_DEFINE = __webpack_require__(93); +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; +}; + + +/***/ }), +/* 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__) { + +var dP = __webpack_require__(8); +var createDesc = __webpack_require__(32); +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; +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(11); +var has = __webpack_require__(14); +var SRC = __webpack_require__(33)('src'); +var $toString = __webpack_require__(131); +var TO_STRING = 'toString'; +var TPL = ('' + $toString).split(TO_STRING); + +__webpack_require__(26).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); +}); + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var fails = __webpack_require__(3); +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); +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(48); +var defined = __webpack_require__(23); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(49); +var createDesc = __webpack_require__(32); +var toIObject = __webpack_require__(15); +var toPrimitive = __webpack_require__(22); +var has = __webpack_require__(14); +var IE8_DOM_DEFINE = __webpack_require__(93); +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]); +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(14); +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; +}; + + +/***/ }), +/* 18 */ +/***/ (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); + }; +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 20 */ +/***/ (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); +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(3); + +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__(4); +// 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, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(0); +var core = __webpack_require__(26); +var fails = __webpack_require__(3); +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); +}; + + +/***/ }), +/* 25 */ +/***/ (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__(18); +var IObject = __webpack_require__(48); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +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; + }; +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.6.11' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +if (__webpack_require__(7)) { + var LIBRARY = __webpack_require__(29); + var global = __webpack_require__(2); + var fails = __webpack_require__(3); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(62); + var $buffer = __webpack_require__(92); + var ctx = __webpack_require__(18); + var anInstance = __webpack_require__(39); + var propertyDesc = __webpack_require__(32); + var hide = __webpack_require__(11); + var redefineAll = __webpack_require__(41); + var toInteger = __webpack_require__(20); + var toLength = __webpack_require__(6); + var toIndex = __webpack_require__(122); + var toAbsoluteIndex = __webpack_require__(35); + var toPrimitive = __webpack_require__(22); + var has = __webpack_require__(14); + var classof = __webpack_require__(44); + var isObject = __webpack_require__(4); + var toObject = __webpack_require__(9); + var isArrayIter = __webpack_require__(81); + var create = __webpack_require__(36); + var getPrototypeOf = __webpack_require__(17); + var gOPN = __webpack_require__(37).f; + var getIterFn = __webpack_require__(83); + var uid = __webpack_require__(33); + var wks = __webpack_require__(5); + var createArrayMethod = __webpack_require__(25); + var createArrayIncludes = __webpack_require__(52); + var speciesConstructor = __webpack_require__(51); + var ArrayIterators = __webpack_require__(86); + var Iterators = __webpack_require__(46); + var $iterDetect = __webpack_require__(57); + var setSpecies = __webpack_require__(38); + var arrayFill = __webpack_require__(85); + var arrayCopyWithin = __webpack_require__(110); + var $DP = __webpack_require__(8); + var $GOPD = __webpack_require__(16); + 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 */ }; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +var Map = __webpack_require__(116); +var $export = __webpack_require__(0); +var shared = __webpack_require__(47)('metadata'); +var store = shared.store || (shared.store = new (__webpack_require__(119))()); + +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 +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +module.exports = false; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(33)('meta'); +var isObject = __webpack_require__(4); +var has = __webpack_require__(14); +var setDesc = __webpack_require__(8).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(3)(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 +}; + + +/***/ }), +/* 31 */ +/***/ (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__(11)(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(95); +var enumBugKeys = __webpack_require__(69); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(20); +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); +}; + + +/***/ }), +/* 36 */ +/***/ (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__(96); +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); +}; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(95); +var hiddenKeys = __webpack_require__(69).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var dP = __webpack_require__(8); +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; } + }); +}; + + +/***/ }), +/* 39 */ +/***/ (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; +}; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(18); +var call = __webpack_require__(108); +var isArrayIter = __webpack_require__(81); +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(6); +var getIterFn = __webpack_require__(83); +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; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +var redefine = __webpack_require__(12); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(8).f; +var has = __webpack_require__(14); +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 }); +}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(19); +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; +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var defined = __webpack_require__(23); +var fails = __webpack_require__(3); +var spaces = __webpack_require__(73); +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) { + +module.exports = {}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(26); +var global = __webpack_require__(2); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(29) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(19); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 50 */ +/***/ (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; +}; + + +/***/ }), +/* 51 */ +/***/ (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); +}; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(15); +var toLength = __webpack_require__(6); +var toAbsoluteIndex = __webpack_require__(35); +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; + }; +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(19); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(20); +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; + }; +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(4); +var cof = __webpack_require__(19); +var MATCH = __webpack_require__(5)('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), +/* 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"; + + +var classof = __webpack_require__(44); +var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(112); +var redefine = __webpack_require__(12); +var hide = __webpack_require__(11); +var fails = __webpack_require__(3); +var defined = __webpack_require__(23); +var wks = __webpack_require__(5); +var regexpExec = __webpack_require__(87); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + 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__) { + +var global = __webpack_require__(2); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(12); +var redefineAll = __webpack_require__(41); +var meta = __webpack_require__(30); +var forOf = __webpack_require__(40); +var anInstance = __webpack_require__(39); +var isObject = __webpack_require__(4); +var fails = __webpack_require__(3); +var $iterDetect = __webpack_require__(57); +var setToStringTag = __webpack_require__(43); +var inheritIfRequired = __webpack_require__(72); + +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__(11); +var uid = __webpack_require__(33); +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__(29) || !__webpack_require__(3)(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__(18); +var forOf = __webpack_require__(40); + +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__(4); +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__(26); +var LIBRARY = __webpack_require__(29); +var wksExt = __webpack_require__(94); +var defineProperty = __webpack_require__(8).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__(47)('keys'); +var uid = __webpack_require__(33); +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__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(4); +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__(18)(Function.call, __webpack_require__(16).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 +}; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +var setPrototypeOf = __webpack_require__(71).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; +}; + + +/***/ }), +/* 73 */ +/***/ (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'; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(20); +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; +}; + + +/***/ }), +/* 75 */ +/***/ (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; +}; + + +/***/ }), +/* 76 */ +/***/ (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; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(56); +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)); +}; + + +/***/ }), +/* 78 */ +/***/ (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; +}; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(29); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(12); +var hide = __webpack_require__(11); +var Iterators = __webpack_require__(46); +var $iterCreate = __webpack_require__(80); +var setToStringTag = __webpack_require__(43); +var getPrototypeOf = __webpack_require__(17); +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 = $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 && typeof IteratorPrototype[ITERATOR] != 'function') 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; +}; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(36); +var descriptor = __webpack_require__(32); +var setToStringTag = __webpack_require__(43); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(11)(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'); +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(46); +var ITERATOR = __webpack_require__(5)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(8); +var createDesc = __webpack_require__(32); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(44); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(46); +module.exports = __webpack_require__(26).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 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__(35); +var toLength = __webpack_require__(6); +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__(31); +var step = __webpack_require__(111); +var Iterators = __webpack_require__(46); +var toIObject = __webpack_require__(15); + +// 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__(79)(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, __webpack_require__) { + +"use strict"; + + +var regexpFlags = __webpack_require__(50); + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +module.exports = patchedExec; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var at = __webpack_require__(55)(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(18); +var invoke = __webpack_require__(101); +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__(19)(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 +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var macrotask = __webpack_require__(89).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(19)(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) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + 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; + }; +}; + + +/***/ }), +/* 91 */ +/***/ (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); +}; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var DESCRIPTORS = __webpack_require__(7); +var LIBRARY = __webpack_require__(29); +var $typed = __webpack_require__(62); +var hide = __webpack_require__(11); +var redefineAll = __webpack_require__(41); +var fails = __webpack_require__(3); +var anInstance = __webpack_require__(39); +var toInteger = __webpack_require__(20); +var toLength = __webpack_require__(6); +var toIndex = __webpack_require__(122); +var gOPN = __webpack_require__(37).f; +var dP = __webpack_require__(8).f; +var arrayFill = __webpack_require__(85); +var setToStringTag = __webpack_require__(43); +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__) { + +module.exports = !__webpack_require__(7) && !__webpack_require__(3)(function () { + return Object.defineProperty(__webpack_require__(66)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(5); + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(14); +var toIObject = __webpack_require__(15); +var arrayIndexOf = __webpack_require__(52)(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; +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var anObject = __webpack_require__(1); +var getKeys = __webpack_require__(34); + +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; +}; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(15); +var gOPN = __webpack_require__(37).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)); +}; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(34); +var gOPS = __webpack_require__(53); +var pIE = __webpack_require__(49); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(48); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(3)(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) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), +/* 99 */ +/***/ (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; +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(10); +var isObject = __webpack_require__(4); +var invoke = __webpack_require__(101); +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) { + +// 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); +}; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +var cof = __webpack_require__(19); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__(4); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(2).parseFloat; +var $trim = __webpack_require__(45).trim; + +module.exports = 1 / $parseFloat(__webpack_require__(73) + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(2).parseInt; +var $trim = __webpack_require__(45).trim; +var ws = __webpack_require__(73); +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; + + +/***/ }), +/* 106 */ +/***/ (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); +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__(75); +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; +}; + + +/***/ }), +/* 108 */ +/***/ (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; + } +}; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(48); +var toLength = __webpack_require__(6); + +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; +}; + + +/***/ }), +/* 110 */ +/***/ (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__(35); +var toLength = __webpack_require__(6); + +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; +}; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var regexpExec = __webpack_require__(87); +__webpack_require__(0)({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); + + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +// 21.2.5.3 get RegExp.prototype.flags() +if (__webpack_require__(7) && /./g.flags != 'g') __webpack_require__(8).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(50) +}); + + +/***/ }), +/* 114 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var newPromiseCapability = __webpack_require__(91); + +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; +}; + + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(117); +var validate = __webpack_require__(42); +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); + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(8).f; +var create = __webpack_require__(36); +var redefineAll = __webpack_require__(41); +var ctx = __webpack_require__(18); +var anInstance = __webpack_require__(39); +var forOf = __webpack_require__(40); +var $iterDefine = __webpack_require__(79); +var step = __webpack_require__(111); +var setSpecies = __webpack_require__(38); +var DESCRIPTORS = __webpack_require__(7); +var fastKey = __webpack_require__(30).fastKey; +var validate = __webpack_require__(42); +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); + } +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(117); +var validate = __webpack_require__(42); +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); + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var each = __webpack_require__(25)(0); +var redefine = __webpack_require__(12); +var meta = __webpack_require__(30); +var assign = __webpack_require__(98); +var weak = __webpack_require__(120); +var isObject = __webpack_require__(4); +var validate = __webpack_require__(42); +var NATIVE_WEAK_MAP = __webpack_require__(42); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +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 (NATIVE_WEAK_MAP && IS_IE11) { + 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); + }); + }); +} + + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(41); +var getWeak = __webpack_require__(30).getWeak; +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var anInstance = __webpack_require__(39); +var forOf = __webpack_require__(40); +var createArrayMethod = __webpack_require__(25); +var $has = __webpack_require__(14); +var validate = __webpack_require__(42); +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 +}; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(37); +var gOPS = __webpack_require__(53); +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; +}; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(20); +var toLength = __webpack_require__(6); +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; +}; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = __webpack_require__(54); +var isObject = __webpack_require__(4); +var toLength = __webpack_require__(6); +var ctx = __webpack_require__(18); +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; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(6); +var repeat = __webpack_require__(74); +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; +}; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(34); +var toIObject = __webpack_require__(15); +var isEnum = __webpack_require__(49).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) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(44); +var from = __webpack_require__(127); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +var forOf = __webpack_require__(40); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + + +/***/ }), +/* 128 */ +/***/ (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; +}; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(130); +__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__(147); +__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__(112); +__webpack_require__(228); +__webpack_require__(113); +__webpack_require__(229); +__webpack_require__(230); +__webpack_require__(231); +__webpack_require__(232); +__webpack_require__(233); +__webpack_require__(116); +__webpack_require__(118); +__webpack_require__(119); +__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); +module.exports = __webpack_require__(325); + + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(2); +var has = __webpack_require__(14); +var DESCRIPTORS = __webpack_require__(7); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(12); +var META = __webpack_require__(30).KEY; +var $fails = __webpack_require__(3); +var shared = __webpack_require__(47); +var setToStringTag = __webpack_require__(43); +var uid = __webpack_require__(33); +var wks = __webpack_require__(5); +var wksExt = __webpack_require__(94); +var wksDefine = __webpack_require__(67); +var enumKeys = __webpack_require__(132); +var isArray = __webpack_require__(54); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var toObject = __webpack_require__(9); +var toIObject = __webpack_require__(15); +var toPrimitive = __webpack_require__(22); +var createDesc = __webpack_require__(32); +var _create = __webpack_require__(36); +var gOPNExt = __webpack_require__(97); +var $GOPD = __webpack_require__(16); +var $GOPS = __webpack_require__(53); +var $DP = __webpack_require__(8); +var $keys = __webpack_require__(34); +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' && !!$GOPS.f; +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__(37).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(49).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(29)) { + 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 +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 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__(11)($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__) { + +module.exports = __webpack_require__(47)('native-function-to-string', Function.toString); + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(34); +var gOPS = __webpack_require__(53); +var pIE = __webpack_require__(49); +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; +}; + + +/***/ }), +/* 133 */ +/***/ (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__(8).f }); + + +/***/ }), +/* 134 */ +/***/ (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__(96) }); + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(15); +var $getOwnPropertyDescriptor = __webpack_require__(16).f; + +__webpack_require__(24)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), +/* 136 */ +/***/ (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__(36) }); + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(9); +var $getPrototypeOf = __webpack_require__(17); + +__webpack_require__(24)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(9); +var $keys = __webpack_require__(34); + +__webpack_require__(24)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__(24)('getOwnPropertyNames', function () { + return __webpack_require__(97).f; +}); + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(30).onFreeze; + +__webpack_require__(24)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(30).onFreeze; + +__webpack_require__(24)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(30).onFreeze; + +__webpack_require__(24)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__(4); + +__webpack_require__(24)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__(4); + +__webpack_require__(24)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__(4); + +__webpack_require__(24)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), +/* 146 */ +/***/ (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__(98) }); + + +/***/ }), +/* 147 */ +/***/ (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__(99) }); + + +/***/ }), +/* 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__(71).set }); + + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.3.6 Object.prototype.toString() +var classof = __webpack_require__(44); +var test = {}; +test[__webpack_require__(5)('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + __webpack_require__(12)(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__(8).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__(4); +var getPrototypeOf = __webpack_require__(17); +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__(8).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__(14); +var cof = __webpack_require__(19); +var inheritIfRequired = __webpack_require__(72); +var toPrimitive = __webpack_require__(22); +var fails = __webpack_require__(3); +var gOPN = __webpack_require__(37).f; +var gOPD = __webpack_require__(16).f; +var dP = __webpack_require__(8).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__(36)(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__(12)(global, NUMBER, $Number); +} + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toInteger = __webpack_require__(20); +var aNumberValue = __webpack_require__(102); +var repeat = __webpack_require__(74); +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__(3)(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__(3); +var aNumberValue = __webpack_require__(102); +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__(103) }); + + +/***/ }), +/* 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__(103); +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__(104); +// 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__(105); +// 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__(105); +// 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__(104); +// 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__(106); +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__(75); + +$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__(76); + +$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__(107) }); + + +/***/ }), +/* 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__(3)(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__(106) }); + + +/***/ }), +/* 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__(75) }); + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(76); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * __webpack_require__(3)(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__(76); +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__(35); +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__(15); +var toLength = __webpack_require__(6); + +$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__(55)(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__(6); +var context = __webpack_require__(77); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(78)(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__(77); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(78)(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__(74) +}); + + +/***/ }), +/* 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__(6); +var context = __webpack_require__(77); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(78)(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__(55)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(79)(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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(13)('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__(54) }); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(18); +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var call = __webpack_require__(108); +var isArrayIter = __webpack_require__(81); +var toLength = __webpack_require__(6); +var createProperty = __webpack_require__(82); +var getIterFn = __webpack_require__(83); + +$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__(82); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * __webpack_require__(3)(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__(15); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (__webpack_require__(48) != 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__(19); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * __webpack_require__(3)(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__(3); +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__(25)(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__(4); +var isArray = __webpack_require__(54); +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__(25)(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__(25)(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__(25)(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__(25)(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__(109); + +$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__(109); + +$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__(52)(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__(15); +var toInteger = __webpack_require__(20); +var toLength = __webpack_require__(6); +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__(110) }); + +__webpack_require__(31)('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__(31)('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__(25)(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__(31)(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__(25)(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__(31)(KEY); + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(38)('Array'); + + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var inheritIfRequired = __webpack_require__(72); +var dP = __webpack_require__(8).f; +var gOPN = __webpack_require__(37).f; +var isRegExp = __webpack_require__(56); +var $flags = __webpack_require__(50); +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__(3)(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__(12)(global, 'RegExp', $RegExp); +} + +__webpack_require__(38)('RegExp'); + + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(113); +var anObject = __webpack_require__(1); +var $flags = __webpack_require__(50); +var DESCRIPTORS = __webpack_require__(7); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + __webpack_require__(12)(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (__webpack_require__(3)(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__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(6); +var advanceStringIndex = __webpack_require__(88); +var regExpExec = __webpack_require__(58); + +// @@match logic +__webpack_require__(59)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var toInteger = __webpack_require__(20); +var advanceStringIndex = __webpack_require__(88); +var regExpExec = __webpack_require__(58); +var max = Math.max; +var min = Math.min; +var floor = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +__webpack_require__(59)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + 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); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } +}); + + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var sameValue = __webpack_require__(99); +var regExpExec = __webpack_require__(58); + +// @@search logic +__webpack_require__(59)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; +}); + + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isRegExp = __webpack_require__(56); +var anObject = __webpack_require__(1); +var speciesConstructor = __webpack_require__(51); +var advanceStringIndex = __webpack_require__(88); +var toLength = __webpack_require__(6); +var callRegExpExec = __webpack_require__(58); +var regexpExec = __webpack_require__(87); +var fails = __webpack_require__(3); +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +__webpack_require__(59)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = 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 ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + 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]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}); + + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(29); +var global = __webpack_require__(2); +var ctx = __webpack_require__(18); +var classof = __webpack_require__(44); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(4); +var aFunction = __webpack_require__(10); +var anInstance = __webpack_require__(39); +var forOf = __webpack_require__(40); +var speciesConstructor = __webpack_require__(51); +var task = __webpack_require__(89).set; +var microtask = __webpack_require__(90)(); +var newPromiseCapabilityModule = __webpack_require__(91); +var perform = __webpack_require__(114); +var userAgent = __webpack_require__(60); +var promiseResolve = __webpack_require__(115); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +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 + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } 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, exited; + 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); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + 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) { + if (domain && !exited) domain.exit(); + 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__(41)($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__(43)($Promise, PROMISE); +__webpack_require__(38)(PROMISE); +Wrapper = __webpack_require__(26)[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__(120); +var validate = __webpack_require__(42); +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__(3)(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__(36); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var fails = __webpack_require__(3); +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__(8); +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__(3)(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__(16).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__(80)(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__(16); +var getPrototypeOf = __webpack_require__(17); +var has = __webpack_require__(14); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(4); +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__(16); +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__(17); +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__(121) }); + + +/***/ }), +/* 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__(8); +var gOPD = __webpack_require__(16); +var getPrototypeOf = __webpack_require__(17); +var has = __webpack_require__(14); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(32); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); + +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; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + 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__(71); + +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__(3)(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__(3); +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__(12)(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__(11)(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__(35); +var toLength = __webpack_require__(6); +var isObject = __webpack_require__(4); +var ArrayBuffer = __webpack_require__(2).ArrayBuffer; +var speciesConstructor = __webpack_require__(51); +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__(3)(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 fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__(38)(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__(27)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('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__(27)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('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__(52)(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +__webpack_require__(31)('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__(123); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +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__(31)('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__(123); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var toInteger = __webpack_require__(20); +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__(31)('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__(55)(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__(124); +var userAgent = __webpack_require__(60); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, '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__(124); +var userAgent = __webpack_require__(60); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, '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__(6); +var isRegExp = __webpack_require__(56); +var getFlags = __webpack_require__(50); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +__webpack_require__(80)($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__(121); +var toIObject = __webpack_require__(15); +var gOPD = __webpack_require__(16); +var createProperty = __webpack_require__(82); + +$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__(125)(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__(125)(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__(8); + +// 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__(8); + +// 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__(17); +var getOwnPropertyDescriptor = __webpack_require__(16).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__(17); +var getOwnPropertyDescriptor = __webpack_require__(16).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__(126)('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__(126)('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__(19); + +$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__(128); +var fround = __webpack_require__(107); + +$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__(128) }); + + +/***/ }), +/* 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__(26); +var global = __webpack_require__(2); +var speciesConstructor = __webpack_require__(51); +var promiseResolve = __webpack_require__(115); + +$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__(91); +var perform = __webpack_require__(114); + +$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__(28); +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__(28); +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__(28); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +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__(118); +var from = __webpack_require__(127); +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +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__(28); +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__(28); +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__(28); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +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__(28); +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__(28); +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__(90)(); +var process = __webpack_require__(2).process; +var isNode = __webpack_require__(19)(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__(26); +var microtask = __webpack_require__(90)(); +var OBSERVABLE = __webpack_require__(5)('observable'); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var anInstance = __webpack_require__(39); +var redefineAll = __webpack_require__(41); +var hide = __webpack_require__(11); +var forOf = __webpack_require__(40); +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__(38)('Observable'); + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $task = __webpack_require__(89); +$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__(34); +var redefine = __webpack_require__(12); +var global = __webpack_require__(2); +var hide = __webpack_require__(11); +var Iterators = __webpack_require__(46); +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__(60); +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) +}); + + +/***/ }) +/******/ ]); +// 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/shim.min.js b/node_modules/core-js/client/shim.min.js new file mode 100644 index 0000000000000..3f0d5f55d2ad3 --- /dev/null +++ b/node_modules/core-js/client/shim.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.6.11 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev + */ +!function(e,i,Jt){"use strict";!function(r){var e={};function __webpack_require__(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return r[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=r,__webpack_require__.c=e,__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,r){var v=r(2),g=r(26),y=r(11),d=r(12),b=r(18),S="prototype",_=function(t,n,r){var e,i,o,u,c=t&_.F,a=t&_.G,f=t&_.P,s=t&_.B,l=a?v:t&_.S?v[n]||(v[n]={}):(v[n]||{})[S],h=a?g:g[n]||(g[n]={}),p=h[S]||(h[S]={});for(e in a&&(r=n),r)o=((i=!c&&l&&l[e]!==Jt)?l:r)[e],u=s&&i?b(o,v):f&&"function"==typeof o?b(Function.call,o):o,l&&d(l,e,o,t&_.U),h[e]!=o&&y(h,e,u),f&&p[e]!=o&&(p[e]=o)};v.core=g,_.F=1,_.G=2,_.S=4,_.P=8,_.B=16,_.W=32,_.U=64,_.R=128,t.exports=_},function(t,n,r){var e=r(4);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof i&&(i=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(47)("wks"),i=r(33),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(20),i=Math.min;t.exports=function(t){return 0"+i+""};t.exports=function(n,t){var r={};r[n]=t(o),e(e.P+e.F*i(function(){var t=""[n]('"');return t!==t.toLowerCase()||3document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s[f][u[r]];return s()};t.exports=Object.create||function create(t,n){var r;return null!==t?(a[f]=i(t),r=new a,a[f]=null,r[c]=t):r=s(),n===Jt?r:o(r,n)}},function(t,n,r){var e=r(95),i=r(69).concat("length","prototype");n.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return e(t,i)}},function(t,n,r){var e=r(2),i=r(8),o=r(7),u=r(5)("species");t.exports=function(t){var n=e[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,r,e){if(!(t instanceof n)||e!==Jt&&e in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,n,r){var h=r(18),p=r(108),v=r(81),g=r(1),y=r(6),d=r(83),b={},S={};(n=t.exports=function(t,n,r,e,i){var o,u,c,a,f=i?function(){return t}:d(t),s=h(r,e,n?2:1),l=0;if("function"!=typeof f)throw TypeError(t+" is not iterable!");if(v(f)){for(o=y(t.length);l")}),d=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(r,t,n){var e=p(r),o=!l(function(){var t={};return t[e]=function(){return 7},7!=""[r](t)}),i=o?!l(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===r&&(n.constructor={},n.constructor[g]=function(){return n}),n[e](""),!t}):Jt;if(!o||!i||"replace"===r&&!y||"split"===r&&!d){var u=/./[e],c=n(h,e,""[r],function maybeCallNative(t,n,r,e,i){return n.exec===v?o&&!i?{done:!0,value:u.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}}),a=c[1];f(String.prototype,r,c[0]),s(RegExp.prototype,e,2==t?function(t,n){return a.call(t,this,n)}:function(t){return a.call(t,this)})}}},function(t,n,r){var e=r(2).navigator;t.exports=e&&e.userAgent||""},function(t,n,r){var d=r(2),b=r(0),S=r(12),_=r(41),x=r(30),m=r(40),w=r(39),E=r(4),O=r(3),M=r(57),I=r(43),P=r(72);t.exports=function(e,t,n,r,i,o){var u=d[e],c=u,a=i?"set":"add",f=c&&c.prototype,s={},l=function(t){var r=f[t];S(f,t,"delete"==t?function(t){return!(o&&!E(t))&&r.call(this,0===t?0:t)}:"has"==t?function has(t){return!(o&&!E(t))&&r.call(this,0===t?0:t)}:"get"==t?function get(t){return o&&!E(t)?Jt:r.call(this,0===t?0:t)}:"add"==t?function add(t){return r.call(this,0===t?0:t),this}:function set(t,n){return r.call(this,0===t?0:t,n),this})};if("function"==typeof c&&(o||f.forEach&&!O(function(){(new c).entries().next()}))){var h=new c,p=h[a](o?{}:-0,1)!=h,v=O(function(){h.has(1)}),g=M(function(t){new c(t)}),y=!o&&O(function(){for(var t=new c,n=5;n--;)t[a](n,n);return!t.has(-0)});g||(((c=t(function(t,n){w(t,c,e);var r=P(new u,t,c);return n!=Jt&&m(n,i,r[a],r),r})).prototype=f).constructor=c),(v||y)&&(l("delete"),l("has"),i&&l("get")),(y||p)&&l(a),o&&f.clear&&delete f.clear}else c=r.getConstructor(t,e,i,a),_(c.prototype,n),x.NEED=!0;return I(c,e),b(b.G+b.W+b.F*((s[e]=c)!=u),s),o||r.setStrong(c,e,i),c}},function(t,n,r){for(var e,i=r(2),o=r(11),u=r(33),c=u("typed_array"),a=u("view"),f=!(!i.ArrayBuffer||!i.DataView),s=f,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(e=i[h[l++]])?(o(e.prototype,c,!0),o(e.prototype,a,!0)):s=!1;t.exports={ABV:f,CONSTR:s,TYPED:c,VIEW:a}},function(t,n,r){t.exports=r(29)||!r(3)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(2)[t]})},function(t,n,r){var e=r(0);t.exports=function(t){e(e.S,t,{of:function of(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}})}},function(t,n,r){var e=r(0),u=r(10),c=r(18),a=r(40);t.exports=function(t){e(e.S,t,{from:function from(t){var n,r,e,i,o=arguments[1];return u(this),(n=o!==Jt)&&u(o),t==Jt?new this:(r=[],n?(e=0,i=c(o,arguments[2],2),a(t,!1,function(t){r.push(i(t,e++))})):a(t,!1,r.push,r),new this(r))}})}},function(t,n,r){var e=r(4),i=r(2).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){var e=r(2),i=r(26),o=r(29),u=r(94),c=r(8).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){var e=r(47)("keys"),i=r(33);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(2).document;t.exports=e&&e.documentElement},function(t,n,i){var r=i(4),e=i(1),o=function(t,n){if(e(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,e){try{(e=i(18)(Function.call,i(16).f(Object.prototype,"__proto__").set,2))(t,[]),r=!(t instanceof Array)}catch(n){r=!0}return function setPrototypeOf(t,n){return o(t,n),r?t.__proto__=n:e(t,n),t}}({},!1):Jt),check:o}},function(t,n,r){var o=r(4),u=r(71).set;t.exports=function(t,n,r){var e,i=n.constructor;return i!==r&&"function"==typeof i&&(e=i.prototype)!==r.prototype&&o(e)&&u&&u(t,e),t}},function(t,n){t.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,r){var i=r(20),o=r(23);t.exports=function repeat(t){var n=String(o(this)),r="",e=i(t);if(e<0||e==Infinity)throw RangeError("Count can't be negative");for(;0>>=1)&&(n+=n))1&e&&(r+=n);return r}},function(t,n){t.exports=Math.sign||function sign(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var r=Math.expm1;t.exports=!r||22025.465794806718>1,s=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=P(t))!=t||t===M?(i=t!=t?1:0,e=a):(e=A(k(t)/N),t*(o=F(2,-e))<1&&(e--,o*=2),2<=(t+=1<=e+f?s/o:s*F(2,1-f))*o&&(e++,o/=2),a<=e+f?(i=0,e=a):1<=e+f?(i=(t*o-1)*F(2,n),e+=f):(i=t*F(2,f-1)*F(2,n),e=0));8<=n;u[l++]=255&i,i/=256,n-=8);for(e=e<>1,c=i-7,a=r-1,f=t[a--],s=127&f;for(f>>=7;0>=-c,c+=n;0>8&255]}function packI32(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function packF64(t){return packIEEE754(t,52,8)}function packF32(t){return packIEEE754(t,23,4)}function addGetter(t,n,r){g(t[_],n,{get:function(){return this[r]}})}function get(t,n,r,e){var i=p(+r);if(t[L]>24)},setUint8:function setUint8(t,n){B.call(this,t,n<<24>>24)}},!0)}else m=function ArrayBuffer(t){s(this,m,b);var n=p(t);this._b=y.call(new Array(n),0),this[L]=n},w=function DataView(t,n,r){s(this,w,S),s(t,m,S);var e=t[L],i=l(n);if(i<0||e>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var n=get(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function getUint16(t){var n=get(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function getInt32(t){return unpackI32(get(this,4,t,arguments[1]))},getUint32:function getUint32(t){return unpackI32(get(this,4,t,arguments[1]))>>>0},getFloat32:function getFloat32(t){return unpackIEEE754(get(this,4,t,arguments[1]),23,4)},getFloat64:function getFloat64(t){return unpackIEEE754(get(this,8,t,arguments[1]),52,8)},setInt8:function setInt8(t,n){set(this,1,t,packI8,n)},setUint8:function setUint8(t,n){set(this,1,t,packI8,n)},setInt16:function setInt16(t,n){set(this,2,t,packI16,n,arguments[2])},setUint16:function setUint16(t,n){set(this,2,t,packI16,n,arguments[2])},setInt32:function setInt32(t,n){set(this,4,t,packI32,n,arguments[2])},setUint32:function setUint32(t,n){set(this,4,t,packI32,n,arguments[2])},setFloat32:function setFloat32(t,n){set(this,4,t,packF32,n,arguments[2])}, +setFloat64:function setFloat64(t,n){set(this,8,t,packF64,n,arguments[2])}});d(m,b),d(w,S),c(w[_],u.VIEW,!0),n[b]=m,n[S]=w},function(t,n,r){t.exports=!r(7)&&!r(3)(function(){return 7!=Object.defineProperty(r(66)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){n.f=r(5)},function(t,n,r){var u=r(14),c=r(15),a=r(52)(!1),f=r(68)("IE_PROTO");t.exports=function(t,n){var r,e=c(t),i=0,o=[];for(r in e)r!=f&&u(e,r)&&o.push(r);for(;i>>0||(u.test(r)?16:10))}:e},function(t,n){t.exports=Math.log1p||function log1p(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){var o=r(75),e=Math.pow,u=e(2,-52),c=e(2,-23),a=e(2,127)*(2-c),f=e(2,-126);t.exports=Math.fround||function fround(t){var n,r,e=Math.abs(t),i=o(t);return e>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(0),i=Math.exp;e(e.S,"Math",{cosh:function cosh(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(0),i=r(76);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(0);e(e.S,"Math",{fround:r(107)})},function(t,n,r){var e=r(0),a=Math.abs;e(e.S,"Math",{hypot:function hypot(t,n){for(var r,e,i=0,o=0,u=arguments.length,c=0;o>>16)*u+o*(r&i>>>16)<<16>>>0)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log10:function log10(t){return Math.log(t)*Math.LOG10E}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log1p:r(106)})},function(t,n,r){var e=r(0);e(e.S,"Math",{log2:function log2(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(0);e(e.S,"Math",{sign:r(75)})},function(t,n,r){var e=r(0),i=r(76),o=Math.exp;e(e.S+e.F*r(3)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(0),i=r(76),o=Math.exp;e(e.S,"Math",{tanh:function tanh(t){var n=i(t=+t),r=i(-t);return n==Infinity?1:r==Infinity?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(0);e(e.S,"Math",{trunc:function trunc(t){return(0>10),n%1024+56320))}return r.join("")}})},function(t,n,r){var e=r(0),u=r(15),c=r(6);e(e.S,"String",{raw:function raw(t){for(var n=u(t.raw),r=c(n.length),e=arguments.length,i=[],o=0;o]*>)/g,v=/\$([$&`']|\d\d?)/g;r(59)("replace",2,function(i,o,x,m){return[function replace(t,n){var r=i(this),e=t==Jt?Jt:t[o];return e!==Jt?e.call(t,r,n):x.call(String(r),t,n)},function(t,n){var r=m(x,t,this,n);if(r.done)return r.value;var e=w(t),i=String(this),o="function"==typeof n;o||(n=String(n));var u=e.global;if(u){var c=e.unicode;e.lastIndex=0}for(var a=[];;){var f=I(e,i);if( +null===f)break;if(a.push(f),!u)break;""===String(f[0])&&(e.lastIndex=M(i,E(e.lastIndex),c))}for(var s,l="",h=0,p=0;p>>0,f=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(e=l.call(f,r))&&!(c<(i=f[v])&&(u.push(r.slice(c,e.index)),1>>0;if(0===a)return[];if(0===i.length)return null===m(c,i)?[i]:[];for(var f=0,s=0,l=[];s>>0,o=r>>>0;return(n>>>0)+(e>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{isubh:function isubh(t,n,r,e){var i=t>>>0,o=r>>>0;return(n>>>0)-(e>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{imulh:function imulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>16,c=e>>16,a=(u*o>>>0)+(i*o>>>16);return u*c+(a>>16)+((i*c>>>0)+(65535&a)>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,n,r){var e=r(0),i=Math.PI/180;e(e.S,"Math",{radians:function radians(t){return t*i}})},function(t,n,r){var e=r(0);e(e.S,"Math",{scale:r(128)})},function(t,n,r){var e=r(0);e(e.S,"Math",{umulh:function umulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>>16,c=e>>>16,a=(u*o>>>0)+(i*o>>>16);return u*c+(a>>>16)+((i*c>>>0)+(65535&a)>>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{signbit:function signbit(t){return(t=+t)!=t?t:0==t?1/t==Infinity:0 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; +}; diff --git a/node_modules/core-js/library/modules/_array-fill.js b/node_modules/core-js/library/modules/_array-fill.js new file mode 100644 index 0000000000000..0753c36aca033 --- /dev/null +++ b/node_modules/core-js/library/modules/_array-fill.js @@ -0,0 +1,15 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +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; +}; diff --git a/node_modules/core-js/library/modules/_array-from-iterable.js b/node_modules/core-js/library/modules/_array-from-iterable.js new file mode 100644 index 0000000000000..08be255f0ad0a --- /dev/null +++ b/node_modules/core-js/library/modules/_array-from-iterable.js @@ -0,0 +1,7 @@ +var forOf = require('./_for-of'); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; diff --git a/node_modules/core-js/library/modules/_array-includes.js b/node_modules/core-js/library/modules/_array-includes.js new file mode 100644 index 0000000000000..0ef3efebedec5 --- /dev/null +++ b/node_modules/core-js/library/modules/_array-includes.js @@ -0,0 +1,23 @@ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +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; + }; +}; diff --git a/node_modules/core-js/library/modules/_array-methods.js b/node_modules/core-js/library/modules/_array-methods.js new file mode 100644 index 0000000000000..ae7f447da3c8f --- /dev/null +++ b/node_modules/core-js/library/modules/_array-methods.js @@ -0,0 +1,44 @@ +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = require('./_ctx'); +var IObject = require('./_iobject'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var asc = require('./_array-species-create'); +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; + }; +}; diff --git a/node_modules/core-js/library/modules/_array-reduce.js b/node_modules/core-js/library/modules/_array-reduce.js new file mode 100644 index 0000000000000..8596ac70ad19e --- /dev/null +++ b/node_modules/core-js/library/modules/_array-reduce.js @@ -0,0 +1,28 @@ +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var toLength = require('./_to-length'); + +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; +}; diff --git a/node_modules/core-js/library/modules/_array-species-constructor.js b/node_modules/core-js/library/modules/_array-species-constructor.js new file mode 100644 index 0000000000000..0771c236d0b28 --- /dev/null +++ b/node_modules/core-js/library/modules/_array-species-constructor.js @@ -0,0 +1,16 @@ +var isObject = require('./_is-object'); +var isArray = require('./_is-array'); +var SPECIES = require('./_wks')('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; +}; diff --git a/node_modules/core-js/library/modules/_array-species-create.js b/node_modules/core-js/library/modules/_array-species-create.js new file mode 100644 index 0000000000000..36ed58bd79c88 --- /dev/null +++ b/node_modules/core-js/library/modules/_array-species-create.js @@ -0,0 +1,6 @@ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; diff --git a/node_modules/core-js/library/modules/_bind.js b/node_modules/core-js/library/modules/_bind.js new file mode 100644 index 0000000000000..3cf1e5ae5343e --- /dev/null +++ b/node_modules/core-js/library/modules/_bind.js @@ -0,0 +1,25 @@ +'use strict'; +var aFunction = require('./_a-function'); +var isObject = require('./_is-object'); +var invoke = require('./_invoke'); +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; +}; diff --git a/node_modules/core-js/library/modules/_classof.js b/node_modules/core-js/library/modules/_classof.js new file mode 100644 index 0000000000000..d106d5be62cfc --- /dev/null +++ b/node_modules/core-js/library/modules/_classof.js @@ -0,0 +1,23 @@ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('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; +}; diff --git a/node_modules/core-js/library/modules/_cof.js b/node_modules/core-js/library/modules/_cof.js new file mode 100644 index 0000000000000..332c0bc0b9633 --- /dev/null +++ b/node_modules/core-js/library/modules/_cof.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; diff --git a/node_modules/core-js/library/modules/_collection-strong.js b/node_modules/core-js/library/modules/_collection-strong.js new file mode 100644 index 0000000000000..68ce63f0e068f --- /dev/null +++ b/node_modules/core-js/library/modules/_collection-strong.js @@ -0,0 +1,144 @@ +'use strict'; +var dP = require('./_object-dp').f; +var create = require('./_object-create'); +var redefineAll = require('./_redefine-all'); +var ctx = require('./_ctx'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var $iterDefine = require('./_iter-define'); +var step = require('./_iter-step'); +var setSpecies = require('./_set-species'); +var DESCRIPTORS = require('./_descriptors'); +var fastKey = require('./_meta').fastKey; +var validate = require('./_validate-collection'); +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); + } +}; diff --git a/node_modules/core-js/library/modules/_collection-to-json.js b/node_modules/core-js/library/modules/_collection-to-json.js new file mode 100644 index 0000000000000..a6ee0029a426e --- /dev/null +++ b/node_modules/core-js/library/modules/_collection-to-json.js @@ -0,0 +1,9 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof'); +var from = require('./_array-from-iterable'); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; diff --git a/node_modules/core-js/library/modules/_collection-weak.js b/node_modules/core-js/library/modules/_collection-weak.js new file mode 100644 index 0000000000000..04d3af5afe5ec --- /dev/null +++ b/node_modules/core-js/library/modules/_collection-weak.js @@ -0,0 +1,85 @@ +'use strict'; +var redefineAll = require('./_redefine-all'); +var getWeak = require('./_meta').getWeak; +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var createArrayMethod = require('./_array-methods'); +var $has = require('./_has'); +var validate = require('./_validate-collection'); +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 +}; diff --git a/node_modules/core-js/library/modules/_collection.js b/node_modules/core-js/library/modules/_collection.js new file mode 100644 index 0000000000000..31a36b87a4569 --- /dev/null +++ b/node_modules/core-js/library/modules/_collection.js @@ -0,0 +1,59 @@ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var meta = require('./_meta'); +var fails = require('./_fails'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var setToStringTag = require('./_set-to-string-tag'); +var dP = require('./_object-dp').f; +var each = require('./_array-methods')(0); +var DESCRIPTORS = require('./_descriptors'); + +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 = {}; + if (!DESCRIPTORS || 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 { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; diff --git a/node_modules/core-js/library/modules/_core.js b/node_modules/core-js/library/modules/_core.js new file mode 100644 index 0000000000000..275d56149c5f3 --- /dev/null +++ b/node_modules/core-js/library/modules/_core.js @@ -0,0 +1,2 @@ +var core = module.exports = { version: '2.6.12' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef diff --git a/node_modules/core-js/library/modules/_create-property.js b/node_modules/core-js/library/modules/_create-property.js new file mode 100644 index 0000000000000..fd0ea8c9a7b09 --- /dev/null +++ b/node_modules/core-js/library/modules/_create-property.js @@ -0,0 +1,8 @@ +'use strict'; +var $defineProperty = require('./_object-dp'); +var createDesc = require('./_property-desc'); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; diff --git a/node_modules/core-js/library/modules/_ctx.js b/node_modules/core-js/library/modules/_ctx.js new file mode 100644 index 0000000000000..0a100ff3d6c99 --- /dev/null +++ b/node_modules/core-js/library/modules/_ctx.js @@ -0,0 +1,20 @@ +// optional / simple context binding +var aFunction = require('./_a-function'); +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); + }; +}; diff --git a/node_modules/core-js/library/modules/_date-to-iso-string.js b/node_modules/core-js/library/modules/_date-to-iso-string.js new file mode 100644 index 0000000000000..95a02e224e3b7 --- /dev/null +++ b/node_modules/core-js/library/modules/_date-to-iso-string.js @@ -0,0 +1,26 @@ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = require('./_fails'); +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; diff --git a/node_modules/core-js/library/modules/_date-to-primitive.js b/node_modules/core-js/library/modules/_date-to-primitive.js new file mode 100644 index 0000000000000..57c32030c82f8 --- /dev/null +++ b/node_modules/core-js/library/modules/_date-to-primitive.js @@ -0,0 +1,9 @@ +'use strict'; +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; diff --git a/node_modules/core-js/library/modules/_defined.js b/node_modules/core-js/library/modules/_defined.js new file mode 100644 index 0000000000000..66c7ed323c4be --- /dev/null +++ b/node_modules/core-js/library/modules/_defined.js @@ -0,0 +1,5 @@ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; diff --git a/node_modules/core-js/library/modules/_descriptors.js b/node_modules/core-js/library/modules/_descriptors.js new file mode 100644 index 0000000000000..046974066d33a --- /dev/null +++ b/node_modules/core-js/library/modules/_descriptors.js @@ -0,0 +1,4 @@ +// Thank's IE8 for his funny defineProperty +module.exports = !require('./_fails')(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); diff --git a/node_modules/core-js/library/modules/_dom-create.js b/node_modules/core-js/library/modules/_dom-create.js new file mode 100644 index 0000000000000..39ca2569d7093 --- /dev/null +++ b/node_modules/core-js/library/modules/_dom-create.js @@ -0,0 +1,7 @@ +var isObject = require('./_is-object'); +var document = require('./_global').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) : {}; +}; diff --git a/node_modules/core-js/library/modules/_entry-virtual.js b/node_modules/core-js/library/modules/_entry-virtual.js new file mode 100644 index 0000000000000..7a734390a7d5b --- /dev/null +++ b/node_modules/core-js/library/modules/_entry-virtual.js @@ -0,0 +1,5 @@ +var core = require('./_core'); +module.exports = function (CONSTRUCTOR) { + var C = core[CONSTRUCTOR]; + return (C.virtual || C.prototype); +}; diff --git a/node_modules/core-js/library/modules/_enum-bug-keys.js b/node_modules/core-js/library/modules/_enum-bug-keys.js new file mode 100644 index 0000000000000..d9ad85514ac63 --- /dev/null +++ b/node_modules/core-js/library/modules/_enum-bug-keys.js @@ -0,0 +1,4 @@ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); diff --git a/node_modules/core-js/library/modules/_enum-keys.js b/node_modules/core-js/library/modules/_enum-keys.js new file mode 100644 index 0000000000000..3e7053d135c40 --- /dev/null +++ b/node_modules/core-js/library/modules/_enum-keys.js @@ -0,0 +1,15 @@ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +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; +}; diff --git a/node_modules/core-js/library/modules/_export.js b/node_modules/core-js/library/modules/_export.js new file mode 100644 index 0000000000000..02bddc0aa72d5 --- /dev/null +++ b/node_modules/core-js/library/modules/_export.js @@ -0,0 +1,62 @@ +var global = require('./_global'); +var core = require('./_core'); +var ctx = require('./_ctx'); +var hide = require('./_hide'); +var has = require('./_has'); +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 IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// 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; diff --git a/node_modules/core-js/library/modules/_fails-is-regexp.js b/node_modules/core-js/library/modules/_fails-is-regexp.js new file mode 100644 index 0000000000000..8eec2e4715cb7 --- /dev/null +++ b/node_modules/core-js/library/modules/_fails-is-regexp.js @@ -0,0 +1,12 @@ +var MATCH = require('./_wks')('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; diff --git a/node_modules/core-js/library/modules/_fails.js b/node_modules/core-js/library/modules/_fails.js new file mode 100644 index 0000000000000..3b4cdf6740b36 --- /dev/null +++ b/node_modules/core-js/library/modules/_fails.js @@ -0,0 +1,7 @@ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; diff --git a/node_modules/core-js/library/modules/_fix-re-wks.js b/node_modules/core-js/library/modules/_fix-re-wks.js new file mode 100644 index 0000000000000..64d00fe6941ca --- /dev/null +++ b/node_modules/core-js/library/modules/_fix-re-wks.js @@ -0,0 +1,96 @@ +'use strict'; +require('./es6.regexp.exec'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var wks = require('./_wks'); +var regexpExec = require('./_regexp-exec'); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + 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); } + ); + } +}; diff --git a/node_modules/core-js/library/modules/_flags.js b/node_modules/core-js/library/modules/_flags.js new file mode 100644 index 0000000000000..b6fc324bdfde4 --- /dev/null +++ b/node_modules/core-js/library/modules/_flags.js @@ -0,0 +1,13 @@ +'use strict'; +// 21.2.5.3 get RegExp.prototype.flags +var anObject = require('./_an-object'); +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; +}; diff --git a/node_modules/core-js/library/modules/_flatten-into-array.js b/node_modules/core-js/library/modules/_flatten-into-array.js new file mode 100644 index 0000000000000..1838517ae3889 --- /dev/null +++ b/node_modules/core-js/library/modules/_flatten-into-array.js @@ -0,0 +1,39 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = require('./_is-array'); +var isObject = require('./_is-object'); +var toLength = require('./_to-length'); +var ctx = require('./_ctx'); +var IS_CONCAT_SPREADABLE = require('./_wks')('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; diff --git a/node_modules/core-js/library/modules/_for-of.js b/node_modules/core-js/library/modules/_for-of.js new file mode 100644 index 0000000000000..9ed22818b5d70 --- /dev/null +++ b/node_modules/core-js/library/modules/_for-of.js @@ -0,0 +1,25 @@ +var ctx = require('./_ctx'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var getIterFn = require('./core.get-iterator-method'); +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; diff --git a/node_modules/core-js/library/modules/_function-to-string.js b/node_modules/core-js/library/modules/_function-to-string.js new file mode 100644 index 0000000000000..d7f5419ce36ba --- /dev/null +++ b/node_modules/core-js/library/modules/_function-to-string.js @@ -0,0 +1 @@ +module.exports = require('./_shared')('native-function-to-string', Function.toString); diff --git a/node_modules/core-js/library/modules/_global.js b/node_modules/core-js/library/modules/_global.js new file mode 100644 index 0000000000000..bf85b44a107b5 --- /dev/null +++ b/node_modules/core-js/library/modules/_global.js @@ -0,0 +1,6 @@ +// 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 diff --git a/node_modules/core-js/library/modules/_has.js b/node_modules/core-js/library/modules/_has.js new file mode 100644 index 0000000000000..2a37d8b7adf0f --- /dev/null +++ b/node_modules/core-js/library/modules/_has.js @@ -0,0 +1,4 @@ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; diff --git a/node_modules/core-js/library/modules/_hide.js b/node_modules/core-js/library/modules/_hide.js new file mode 100644 index 0000000000000..cec258a0ad2bc --- /dev/null +++ b/node_modules/core-js/library/modules/_hide.js @@ -0,0 +1,8 @@ +var dP = require('./_object-dp'); +var createDesc = require('./_property-desc'); +module.exports = require('./_descriptors') ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; diff --git a/node_modules/core-js/library/modules/_html.js b/node_modules/core-js/library/modules/_html.js new file mode 100644 index 0000000000000..7daff14ca8e3a --- /dev/null +++ b/node_modules/core-js/library/modules/_html.js @@ -0,0 +1,2 @@ +var document = require('./_global').document; +module.exports = document && document.documentElement; diff --git a/node_modules/core-js/library/modules/_ie8-dom-define.js b/node_modules/core-js/library/modules/_ie8-dom-define.js new file mode 100644 index 0000000000000..a3805cb7fe171 --- /dev/null +++ b/node_modules/core-js/library/modules/_ie8-dom-define.js @@ -0,0 +1,3 @@ +module.exports = !require('./_descriptors') && !require('./_fails')(function () { + return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; +}); diff --git a/node_modules/core-js/library/modules/_inherit-if-required.js b/node_modules/core-js/library/modules/_inherit-if-required.js new file mode 100644 index 0000000000000..b95fcd984547d --- /dev/null +++ b/node_modules/core-js/library/modules/_inherit-if-required.js @@ -0,0 +1,9 @@ +var isObject = require('./_is-object'); +var setPrototypeOf = require('./_set-proto').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; +}; diff --git a/node_modules/core-js/library/modules/_invoke.js b/node_modules/core-js/library/modules/_invoke.js new file mode 100644 index 0000000000000..6cccebdc12ea2 --- /dev/null +++ b/node_modules/core-js/library/modules/_invoke.js @@ -0,0 +1,16 @@ +// 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); +}; diff --git a/node_modules/core-js/library/modules/_iobject.js b/node_modules/core-js/library/modules/_iobject.js new file mode 100644 index 0000000000000..2b57c8a07c078 --- /dev/null +++ b/node_modules/core-js/library/modules/_iobject.js @@ -0,0 +1,6 @@ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; diff --git a/node_modules/core-js/library/modules/_is-array-iter.js b/node_modules/core-js/library/modules/_is-array-iter.js new file mode 100644 index 0000000000000..6f67d90522e96 --- /dev/null +++ b/node_modules/core-js/library/modules/_is-array-iter.js @@ -0,0 +1,8 @@ +// check on default Array iterator +var Iterators = require('./_iterators'); +var ITERATOR = require('./_wks')('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; diff --git a/node_modules/core-js/library/modules/_is-array.js b/node_modules/core-js/library/modules/_is-array.js new file mode 100644 index 0000000000000..0581dc2e79b20 --- /dev/null +++ b/node_modules/core-js/library/modules/_is-array.js @@ -0,0 +1,5 @@ +// 7.2.2 IsArray(argument) +var cof = require('./_cof'); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; diff --git a/node_modules/core-js/library/modules/_is-integer.js b/node_modules/core-js/library/modules/_is-integer.js new file mode 100644 index 0000000000000..0074ae975a3d6 --- /dev/null +++ b/node_modules/core-js/library/modules/_is-integer.js @@ -0,0 +1,6 @@ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object'); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; diff --git a/node_modules/core-js/library/modules/_is-object.js b/node_modules/core-js/library/modules/_is-object.js new file mode 100644 index 0000000000000..dda6e04d27301 --- /dev/null +++ b/node_modules/core-js/library/modules/_is-object.js @@ -0,0 +1,3 @@ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; diff --git a/node_modules/core-js/library/modules/_is-regexp.js b/node_modules/core-js/library/modules/_is-regexp.js new file mode 100644 index 0000000000000..598d159d5fce3 --- /dev/null +++ b/node_modules/core-js/library/modules/_is-regexp.js @@ -0,0 +1,8 @@ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object'); +var cof = require('./_cof'); +var MATCH = require('./_wks')('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; diff --git a/node_modules/core-js/library/modules/_iter-call.js b/node_modules/core-js/library/modules/_iter-call.js new file mode 100644 index 0000000000000..a7026e3474bbe --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-call.js @@ -0,0 +1,12 @@ +// call something on iterator step with safe closing on error +var anObject = require('./_an-object'); +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; + } +}; diff --git a/node_modules/core-js/library/modules/_iter-create.js b/node_modules/core-js/library/modules/_iter-create.js new file mode 100644 index 0000000000000..04708c83cc382 --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-create.js @@ -0,0 +1,13 @@ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; diff --git a/node_modules/core-js/library/modules/_iter-define.js b/node_modules/core-js/library/modules/_iter-define.js new file mode 100644 index 0000000000000..578dfb734b5dd --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-define.js @@ -0,0 +1,69 @@ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('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 = $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 && typeof IteratorPrototype[ITERATOR] != 'function') 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; +}; diff --git a/node_modules/core-js/library/modules/_iter-detect.js b/node_modules/core-js/library/modules/_iter-detect.js new file mode 100644 index 0000000000000..5cb34973ce930 --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-detect.js @@ -0,0 +1,22 @@ +var ITERATOR = require('./_wks')('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; +}; diff --git a/node_modules/core-js/library/modules/_iter-step.js b/node_modules/core-js/library/modules/_iter-step.js new file mode 100644 index 0000000000000..b0691c883d967 --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-step.js @@ -0,0 +1,3 @@ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; diff --git a/node_modules/core-js/library/modules/_iterators.js b/node_modules/core-js/library/modules/_iterators.js new file mode 100644 index 0000000000000..f053ebf7976e3 --- /dev/null +++ b/node_modules/core-js/library/modules/_iterators.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/node_modules/core-js/library/modules/_keyof.js b/node_modules/core-js/library/modules/_keyof.js new file mode 100644 index 0000000000000..0786096fd04f6 --- /dev/null +++ b/node_modules/core-js/library/modules/_keyof.js @@ -0,0 +1,10 @@ +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +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; +}; diff --git a/node_modules/core-js/library/modules/_library.js b/node_modules/core-js/library/modules/_library.js new file mode 100644 index 0000000000000..ec01c2c141667 --- /dev/null +++ b/node_modules/core-js/library/modules/_library.js @@ -0,0 +1 @@ +module.exports = true; diff --git a/node_modules/core-js/library/modules/_math-expm1.js b/node_modules/core-js/library/modules/_math-expm1.js new file mode 100644 index 0000000000000..75c685014b661 --- /dev/null +++ b/node_modules/core-js/library/modules/_math-expm1.js @@ -0,0 +1,10 @@ +// 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; diff --git a/node_modules/core-js/library/modules/_math-fround.js b/node_modules/core-js/library/modules/_math-fround.js new file mode 100644 index 0000000000000..c85eb4b7ea5cf --- /dev/null +++ b/node_modules/core-js/library/modules/_math-fround.js @@ -0,0 +1,23 @@ +// 20.2.2.16 Math.fround(x) +var sign = require('./_math-sign'); +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; +}; diff --git a/node_modules/core-js/library/modules/_math-log1p.js b/node_modules/core-js/library/modules/_math-log1p.js new file mode 100644 index 0000000000000..16d5f49311ffb --- /dev/null +++ b/node_modules/core-js/library/modules/_math-log1p.js @@ -0,0 +1,4 @@ +// 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); +}; diff --git a/node_modules/core-js/library/modules/_math-scale.js b/node_modules/core-js/library/modules/_math-scale.js new file mode 100644 index 0000000000000..ba3cdb20c6299 --- /dev/null +++ b/node_modules/core-js/library/modules/_math-scale.js @@ -0,0 +1,18 @@ +// 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; +}; diff --git a/node_modules/core-js/library/modules/_math-sign.js b/node_modules/core-js/library/modules/_math-sign.js new file mode 100644 index 0000000000000..7a46b9d088560 --- /dev/null +++ b/node_modules/core-js/library/modules/_math-sign.js @@ -0,0 +1,5 @@ +// 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; +}; diff --git a/node_modules/core-js/library/modules/_meta.js b/node_modules/core-js/library/modules/_meta.js new file mode 100644 index 0000000000000..2d4b32579993d --- /dev/null +++ b/node_modules/core-js/library/modules/_meta.js @@ -0,0 +1,53 @@ +var META = require('./_uid')('meta'); +var isObject = require('./_is-object'); +var has = require('./_has'); +var setDesc = require('./_object-dp').f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !require('./_fails')(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 +}; diff --git a/node_modules/core-js/library/modules/_metadata.js b/node_modules/core-js/library/modules/_metadata.js new file mode 100644 index 0000000000000..759cfc445c93f --- /dev/null +++ b/node_modules/core-js/library/modules/_metadata.js @@ -0,0 +1,51 @@ +var Map = require('./es6.map'); +var $export = require('./_export'); +var shared = require('./_shared')('metadata'); +var store = shared.store || (shared.store = new (require('./es6.weak-map'))()); + +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 +}; diff --git a/node_modules/core-js/library/modules/_microtask.js b/node_modules/core-js/library/modules/_microtask.js new file mode 100644 index 0000000000000..b321c648c45fc --- /dev/null +++ b/node_modules/core-js/library/modules/_microtask.js @@ -0,0 +1,69 @@ +var global = require('./_global'); +var macrotask = require('./_task').set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = require('./_cof')(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) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + 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; + }; +}; diff --git a/node_modules/core-js/library/modules/_native-weak-map.js b/node_modules/core-js/library/modules/_native-weak-map.js new file mode 100644 index 0000000000000..ebaf445ffa96c --- /dev/null +++ b/node_modules/core-js/library/modules/_native-weak-map.js @@ -0,0 +1,4 @@ +var nativeFunctionToString = require('./_function-to-string'); +var WeakMap = require('./_global').WeakMap; + +module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap)); diff --git a/node_modules/core-js/library/modules/_new-promise-capability.js b/node_modules/core-js/library/modules/_new-promise-capability.js new file mode 100644 index 0000000000000..82b74a33150d2 --- /dev/null +++ b/node_modules/core-js/library/modules/_new-promise-capability.js @@ -0,0 +1,18 @@ +'use strict'; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = require('./_a-function'); + +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); +}; diff --git a/node_modules/core-js/library/modules/_object-assign.js b/node_modules/core-js/library/modules/_object-assign.js new file mode 100644 index 0000000000000..d739c430cfe3d --- /dev/null +++ b/node_modules/core-js/library/modules/_object-assign.js @@ -0,0 +1,38 @@ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = require('./_descriptors'); +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(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) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; diff --git a/node_modules/core-js/library/modules/_object-create.js b/node_modules/core-js/library/modules/_object-create.js new file mode 100644 index 0000000000000..a76808ea618f0 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-create.js @@ -0,0 +1,41 @@ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('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 = require('./_dom-create')('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + require('./_html').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); +}; diff --git a/node_modules/core-js/library/modules/_object-define.js b/node_modules/core-js/library/modules/_object-define.js new file mode 100644 index 0000000000000..4d131f331733d --- /dev/null +++ b/node_modules/core-js/library/modules/_object-define.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); + +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; +}; diff --git a/node_modules/core-js/library/modules/_object-dp.js b/node_modules/core-js/library/modules/_object-dp.js new file mode 100644 index 0000000000000..0340a8308d119 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-dp.js @@ -0,0 +1,16 @@ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? 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; +}; diff --git a/node_modules/core-js/library/modules/_object-dps.js b/node_modules/core-js/library/modules/_object-dps.js new file mode 100644 index 0000000000000..173c338ff91dd --- /dev/null +++ b/node_modules/core-js/library/modules/_object-dps.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? 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; +}; diff --git a/node_modules/core-js/library/modules/_object-forced-pam.js b/node_modules/core-js/library/modules/_object-forced-pam.js new file mode 100644 index 0000000000000..71ede9225ab33 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-forced-pam.js @@ -0,0 +1,9 @@ +'use strict'; +// Forced replacement prototype accessors methods +module.exports = require('./_library') || !require('./_fails')(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 require('./_global')[K]; +}); diff --git a/node_modules/core-js/library/modules/_object-gopd.js b/node_modules/core-js/library/modules/_object-gopd.js new file mode 100644 index 0000000000000..555dd31a5bc0b --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gopd.js @@ -0,0 +1,16 @@ +var pIE = require('./_object-pie'); +var createDesc = require('./_property-desc'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var has = require('./_has'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = require('./_descriptors') ? 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]); +}; diff --git a/node_modules/core-js/library/modules/_object-gopn-ext.js b/node_modules/core-js/library/modules/_object-gopn-ext.js new file mode 100644 index 0000000000000..4abb6ae83c4fd --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gopn-ext.js @@ -0,0 +1,19 @@ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject'); +var gOPN = require('./_object-gopn').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)); +}; diff --git a/node_modules/core-js/library/modules/_object-gopn.js b/node_modules/core-js/library/modules/_object-gopn.js new file mode 100644 index 0000000000000..da82333f60eca --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gopn.js @@ -0,0 +1,7 @@ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal'); +var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; diff --git a/node_modules/core-js/library/modules/_object-gops.js b/node_modules/core-js/library/modules/_object-gops.js new file mode 100644 index 0000000000000..bc06729056418 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gops.js @@ -0,0 +1 @@ +exports.f = Object.getOwnPropertySymbols; diff --git a/node_modules/core-js/library/modules/_object-gpo.js b/node_modules/core-js/library/modules/_object-gpo.js new file mode 100644 index 0000000000000..27f2a94e88693 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gpo.js @@ -0,0 +1,13 @@ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('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; +}; diff --git a/node_modules/core-js/library/modules/_object-keys-internal.js b/node_modules/core-js/library/modules/_object-keys-internal.js new file mode 100644 index 0000000000000..71abdd1a53568 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-keys-internal.js @@ -0,0 +1,17 @@ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('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; +}; diff --git a/node_modules/core-js/library/modules/_object-keys.js b/node_modules/core-js/library/modules/_object-keys.js new file mode 100644 index 0000000000000..62f73f91eee94 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-keys.js @@ -0,0 +1,7 @@ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; diff --git a/node_modules/core-js/library/modules/_object-pie.js b/node_modules/core-js/library/modules/_object-pie.js new file mode 100644 index 0000000000000..4cc71072d3612 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-pie.js @@ -0,0 +1 @@ +exports.f = {}.propertyIsEnumerable; diff --git a/node_modules/core-js/library/modules/_object-sap.js b/node_modules/core-js/library/modules/_object-sap.js new file mode 100644 index 0000000000000..643535e0a6433 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-sap.js @@ -0,0 +1,10 @@ +// most Object methods by ES6 should accept primitives +var $export = require('./_export'); +var core = require('./_core'); +var fails = require('./_fails'); +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); +}; diff --git a/node_modules/core-js/library/modules/_object-to-array.js b/node_modules/core-js/library/modules/_object-to-array.js new file mode 100644 index 0000000000000..288b5fcc5ba94 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-to-array.js @@ -0,0 +1,21 @@ +var DESCRIPTORS = require('./_descriptors'); +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +var isEnum = require('./_object-pie').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) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; diff --git a/node_modules/core-js/library/modules/_own-keys.js b/node_modules/core-js/library/modules/_own-keys.js new file mode 100644 index 0000000000000..84faece8f44fc --- /dev/null +++ b/node_modules/core-js/library/modules/_own-keys.js @@ -0,0 +1,10 @@ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn'); +var gOPS = require('./_object-gops'); +var anObject = require('./_an-object'); +var Reflect = require('./_global').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; +}; diff --git a/node_modules/core-js/library/modules/_parse-float.js b/node_modules/core-js/library/modules/_parse-float.js new file mode 100644 index 0000000000000..acfb350f934c4 --- /dev/null +++ b/node_modules/core-js/library/modules/_parse-float.js @@ -0,0 +1,8 @@ +var $parseFloat = require('./_global').parseFloat; +var $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; diff --git a/node_modules/core-js/library/modules/_parse-int.js b/node_modules/core-js/library/modules/_parse-int.js new file mode 100644 index 0000000000000..ddd7172a987bb --- /dev/null +++ b/node_modules/core-js/library/modules/_parse-int.js @@ -0,0 +1,9 @@ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +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; diff --git a/node_modules/core-js/library/modules/_partial.js b/node_modules/core-js/library/modules/_partial.js new file mode 100644 index 0000000000000..ca3f35bf844e7 --- /dev/null +++ b/node_modules/core-js/library/modules/_partial.js @@ -0,0 +1,25 @@ +'use strict'; +var path = require('./_path'); +var invoke = require('./_invoke'); +var aFunction = require('./_a-function'); +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); + }; +}; diff --git a/node_modules/core-js/library/modules/_path.js b/node_modules/core-js/library/modules/_path.js new file mode 100644 index 0000000000000..2796ebcb9a985 --- /dev/null +++ b/node_modules/core-js/library/modules/_path.js @@ -0,0 +1 @@ +module.exports = require('./_core'); diff --git a/node_modules/core-js/library/modules/_perform.js b/node_modules/core-js/library/modules/_perform.js new file mode 100644 index 0000000000000..bfc7b296da958 --- /dev/null +++ b/node_modules/core-js/library/modules/_perform.js @@ -0,0 +1,7 @@ +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; diff --git a/node_modules/core-js/library/modules/_promise-resolve.js b/node_modules/core-js/library/modules/_promise-resolve.js new file mode 100644 index 0000000000000..c3cac7646da87 --- /dev/null +++ b/node_modules/core-js/library/modules/_promise-resolve.js @@ -0,0 +1,12 @@ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var newPromiseCapability = require('./_new-promise-capability'); + +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; +}; diff --git a/node_modules/core-js/library/modules/_property-desc.js b/node_modules/core-js/library/modules/_property-desc.js new file mode 100644 index 0000000000000..090593405ff93 --- /dev/null +++ b/node_modules/core-js/library/modules/_property-desc.js @@ -0,0 +1,8 @@ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; diff --git a/node_modules/core-js/library/modules/_redefine-all.js b/node_modules/core-js/library/modules/_redefine-all.js new file mode 100644 index 0000000000000..bf8c0ea39eb87 --- /dev/null +++ b/node_modules/core-js/library/modules/_redefine-all.js @@ -0,0 +1,7 @@ +var hide = require('./_hide'); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; diff --git a/node_modules/core-js/library/modules/_redefine.js b/node_modules/core-js/library/modules/_redefine.js new file mode 100644 index 0000000000000..fde6108efd5da --- /dev/null +++ b/node_modules/core-js/library/modules/_redefine.js @@ -0,0 +1 @@ +module.exports = require('./_hide'); diff --git a/node_modules/core-js/library/modules/_regexp-exec-abstract.js b/node_modules/core-js/library/modules/_regexp-exec-abstract.js new file mode 100644 index 0000000000000..8b1a393741c96 --- /dev/null +++ b/node_modules/core-js/library/modules/_regexp-exec-abstract.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/library/modules/_regexp-exec.js b/node_modules/core-js/library/modules/_regexp-exec.js new file mode 100644 index 0000000000000..8b1a393741c96 --- /dev/null +++ b/node_modules/core-js/library/modules/_regexp-exec.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/library/modules/_replacer.js b/node_modules/core-js/library/modules/_replacer.js new file mode 100644 index 0000000000000..c37703dd2cc51 --- /dev/null +++ b/node_modules/core-js/library/modules/_replacer.js @@ -0,0 +1,8 @@ +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); + }; +}; diff --git a/node_modules/core-js/library/modules/_same-value.js b/node_modules/core-js/library/modules/_same-value.js new file mode 100644 index 0000000000000..c6d045e831b7b --- /dev/null +++ b/node_modules/core-js/library/modules/_same-value.js @@ -0,0 +1,5 @@ +// 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; +}; diff --git a/node_modules/core-js/library/modules/_set-collection-from.js b/node_modules/core-js/library/modules/_set-collection-from.js new file mode 100644 index 0000000000000..d5001f93e9963 --- /dev/null +++ b/node_modules/core-js/library/modules/_set-collection-from.js @@ -0,0 +1,28 @@ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var ctx = require('./_ctx'); +var forOf = require('./_for-of'); + +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); + } }); +}; diff --git a/node_modules/core-js/library/modules/_set-collection-of.js b/node_modules/core-js/library/modules/_set-collection-of.js new file mode 100644 index 0000000000000..f559af3fc27de --- /dev/null +++ b/node_modules/core-js/library/modules/_set-collection-of.js @@ -0,0 +1,12 @@ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); + +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); + } }); +}; diff --git a/node_modules/core-js/library/modules/_set-proto.js b/node_modules/core-js/library/modules/_set-proto.js new file mode 100644 index 0000000000000..c1990622ec9dd --- /dev/null +++ b/node_modules/core-js/library/modules/_set-proto.js @@ -0,0 +1,25 @@ +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); +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 = require('./_ctx')(Function.call, require('./_object-gopd').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 +}; diff --git a/node_modules/core-js/library/modules/_set-species.js b/node_modules/core-js/library/modules/_set-species.js new file mode 100644 index 0000000000000..1f25fde1e3184 --- /dev/null +++ b/node_modules/core-js/library/modules/_set-species.js @@ -0,0 +1,14 @@ +'use strict'; +var global = require('./_global'); +var core = require('./_core'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; diff --git a/node_modules/core-js/library/modules/_set-to-string-tag.js b/node_modules/core-js/library/modules/_set-to-string-tag.js new file mode 100644 index 0000000000000..5bd64144f0dd5 --- /dev/null +++ b/node_modules/core-js/library/modules/_set-to-string-tag.js @@ -0,0 +1,7 @@ +var def = require('./_object-dp').f; +var has = require('./_has'); +var TAG = require('./_wks')('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; diff --git a/node_modules/core-js/library/modules/_shared-key.js b/node_modules/core-js/library/modules/_shared-key.js new file mode 100644 index 0000000000000..d47fe7a281282 --- /dev/null +++ b/node_modules/core-js/library/modules/_shared-key.js @@ -0,0 +1,5 @@ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; diff --git a/node_modules/core-js/library/modules/_shared.js b/node_modules/core-js/library/modules/_shared.js new file mode 100644 index 0000000000000..49bc187777f8d --- /dev/null +++ b/node_modules/core-js/library/modules/_shared.js @@ -0,0 +1,12 @@ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2020 Denis Pushkarev (zloirock.ru)' +}); diff --git a/node_modules/core-js/library/modules/_species-constructor.js b/node_modules/core-js/library/modules/_species-constructor.js new file mode 100644 index 0000000000000..0cb4ffb8fc8f8 --- /dev/null +++ b/node_modules/core-js/library/modules/_species-constructor.js @@ -0,0 +1,9 @@ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var SPECIES = require('./_wks')('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; diff --git a/node_modules/core-js/library/modules/_strict-method.js b/node_modules/core-js/library/modules/_strict-method.js new file mode 100644 index 0000000000000..e68f41bb62c8f --- /dev/null +++ b/node_modules/core-js/library/modules/_strict-method.js @@ -0,0 +1,9 @@ +'use strict'; +var fails = require('./_fails'); + +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); + }); +}; diff --git a/node_modules/core-js/library/modules/_string-at.js b/node_modules/core-js/library/modules/_string-at.js new file mode 100644 index 0000000000000..88d66bd18eb28 --- /dev/null +++ b/node_modules/core-js/library/modules/_string-at.js @@ -0,0 +1,17 @@ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// 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; + }; +}; diff --git a/node_modules/core-js/library/modules/_string-context.js b/node_modules/core-js/library/modules/_string-context.js new file mode 100644 index 0000000000000..becf3fbebea98 --- /dev/null +++ b/node_modules/core-js/library/modules/_string-context.js @@ -0,0 +1,8 @@ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp'); +var defined = require('./_defined'); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; diff --git a/node_modules/core-js/library/modules/_string-html.js b/node_modules/core-js/library/modules/_string-html.js new file mode 100644 index 0000000000000..1dcc95bcd6594 --- /dev/null +++ b/node_modules/core-js/library/modules/_string-html.js @@ -0,0 +1,19 @@ +var $export = require('./_export'); +var fails = require('./_fails'); +var defined = require('./_defined'); +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); +}; diff --git a/node_modules/core-js/library/modules/_string-pad.js b/node_modules/core-js/library/modules/_string-pad.js new file mode 100644 index 0000000000000..ceb6077f055c4 --- /dev/null +++ b/node_modules/core-js/library/modules/_string-pad.js @@ -0,0 +1,16 @@ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length'); +var repeat = require('./_string-repeat'); +var defined = require('./_defined'); + +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; +}; diff --git a/node_modules/core-js/library/modules/_string-repeat.js b/node_modules/core-js/library/modules/_string-repeat.js new file mode 100644 index 0000000000000..a69b9626b7d90 --- /dev/null +++ b/node_modules/core-js/library/modules/_string-repeat.js @@ -0,0 +1,12 @@ +'use strict'; +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); + +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; +}; diff --git a/node_modules/core-js/library/modules/_string-trim.js b/node_modules/core-js/library/modules/_string-trim.js new file mode 100644 index 0000000000000..6b54a81a848cf --- /dev/null +++ b/node_modules/core-js/library/modules/_string-trim.js @@ -0,0 +1,30 @@ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +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; diff --git a/node_modules/core-js/library/modules/_string-ws.js b/node_modules/core-js/library/modules/_string-ws.js new file mode 100644 index 0000000000000..2c68cf9f4bae6 --- /dev/null +++ b/node_modules/core-js/library/modules/_string-ws.js @@ -0,0 +1,2 @@ +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'; diff --git a/node_modules/core-js/library/modules/_task.js b/node_modules/core-js/library/modules/_task.js new file mode 100644 index 0000000000000..8777a6e28baf9 --- /dev/null +++ b/node_modules/core-js/library/modules/_task.js @@ -0,0 +1,84 @@ +var ctx = require('./_ctx'); +var invoke = require('./_invoke'); +var html = require('./_html'); +var cel = require('./_dom-create'); +var global = require('./_global'); +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 (require('./_cof')(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 +}; diff --git a/node_modules/core-js/library/modules/_to-absolute-index.js b/node_modules/core-js/library/modules/_to-absolute-index.js new file mode 100644 index 0000000000000..dfee02e8e25cf --- /dev/null +++ b/node_modules/core-js/library/modules/_to-absolute-index.js @@ -0,0 +1,7 @@ +var toInteger = require('./_to-integer'); +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); +}; diff --git a/node_modules/core-js/library/modules/_to-index.js b/node_modules/core-js/library/modules/_to-index.js new file mode 100644 index 0000000000000..8f51c32d26fc6 --- /dev/null +++ b/node_modules/core-js/library/modules/_to-index.js @@ -0,0 +1,10 @@ +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +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; +}; diff --git a/node_modules/core-js/library/modules/_to-integer.js b/node_modules/core-js/library/modules/_to-integer.js new file mode 100644 index 0000000000000..3d50f97dd80ac --- /dev/null +++ b/node_modules/core-js/library/modules/_to-integer.js @@ -0,0 +1,6 @@ +// 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); +}; diff --git a/node_modules/core-js/library/modules/_to-iobject.js b/node_modules/core-js/library/modules/_to-iobject.js new file mode 100644 index 0000000000000..7614503a2e7bb --- /dev/null +++ b/node_modules/core-js/library/modules/_to-iobject.js @@ -0,0 +1,6 @@ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; diff --git a/node_modules/core-js/library/modules/_to-length.js b/node_modules/core-js/library/modules/_to-length.js new file mode 100644 index 0000000000000..a9db501735573 --- /dev/null +++ b/node_modules/core-js/library/modules/_to-length.js @@ -0,0 +1,6 @@ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; diff --git a/node_modules/core-js/library/modules/_to-object.js b/node_modules/core-js/library/modules/_to-object.js new file mode 100644 index 0000000000000..0efea4c69656d --- /dev/null +++ b/node_modules/core-js/library/modules/_to-object.js @@ -0,0 +1,5 @@ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; diff --git a/node_modules/core-js/library/modules/_to-primitive.js b/node_modules/core-js/library/modules/_to-primitive.js new file mode 100644 index 0000000000000..de3dd6b19d117 --- /dev/null +++ b/node_modules/core-js/library/modules/_to-primitive.js @@ -0,0 +1,12 @@ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = require('./_is-object'); +// 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"); +}; diff --git a/node_modules/core-js/library/modules/_typed-array.js b/node_modules/core-js/library/modules/_typed-array.js new file mode 100644 index 0000000000000..30d9c0ba5544c --- /dev/null +++ b/node_modules/core-js/library/modules/_typed-array.js @@ -0,0 +1,480 @@ +'use strict'; +if (require('./_descriptors')) { + var LIBRARY = require('./_library'); + var global = require('./_global'); + var fails = require('./_fails'); + var $export = require('./_export'); + var $typed = require('./_typed'); + var $buffer = require('./_typed-buffer'); + var ctx = require('./_ctx'); + var anInstance = require('./_an-instance'); + var propertyDesc = require('./_property-desc'); + var hide = require('./_hide'); + var redefineAll = require('./_redefine-all'); + var toInteger = require('./_to-integer'); + var toLength = require('./_to-length'); + var toIndex = require('./_to-index'); + var toAbsoluteIndex = require('./_to-absolute-index'); + var toPrimitive = require('./_to-primitive'); + var has = require('./_has'); + var classof = require('./_classof'); + var isObject = require('./_is-object'); + var toObject = require('./_to-object'); + var isArrayIter = require('./_is-array-iter'); + var create = require('./_object-create'); + var getPrototypeOf = require('./_object-gpo'); + var gOPN = require('./_object-gopn').f; + var getIterFn = require('./core.get-iterator-method'); + var uid = require('./_uid'); + var wks = require('./_wks'); + var createArrayMethod = require('./_array-methods'); + var createArrayIncludes = require('./_array-includes'); + var speciesConstructor = require('./_species-constructor'); + var ArrayIterators = require('./es6.array.iterator'); + var Iterators = require('./_iterators'); + var $iterDetect = require('./_iter-detect'); + var setSpecies = require('./_set-species'); + var arrayFill = require('./_array-fill'); + var arrayCopyWithin = require('./_array-copy-within'); + var $DP = require('./_object-dp'); + var $GOPD = require('./_object-gopd'); + 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 */ }; diff --git a/node_modules/core-js/library/modules/_typed-buffer.js b/node_modules/core-js/library/modules/_typed-buffer.js new file mode 100644 index 0000000000000..c24cef38c2e64 --- /dev/null +++ b/node_modules/core-js/library/modules/_typed-buffer.js @@ -0,0 +1,276 @@ +'use strict'; +var global = require('./_global'); +var DESCRIPTORS = require('./_descriptors'); +var LIBRARY = require('./_library'); +var $typed = require('./_typed'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var fails = require('./_fails'); +var anInstance = require('./_an-instance'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var toIndex = require('./_to-index'); +var gOPN = require('./_object-gopn').f; +var dP = require('./_object-dp').f; +var arrayFill = require('./_array-fill'); +var setToStringTag = require('./_set-to-string-tag'); +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; diff --git a/node_modules/core-js/library/modules/_typed.js b/node_modules/core-js/library/modules/_typed.js new file mode 100644 index 0000000000000..8747ffd71b32b --- /dev/null +++ b/node_modules/core-js/library/modules/_typed.js @@ -0,0 +1,28 @@ +var global = require('./_global'); +var hide = require('./_hide'); +var uid = require('./_uid'); +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 +}; diff --git a/node_modules/core-js/library/modules/_uid.js b/node_modules/core-js/library/modules/_uid.js new file mode 100644 index 0000000000000..ffbe7185fcc78 --- /dev/null +++ b/node_modules/core-js/library/modules/_uid.js @@ -0,0 +1,5 @@ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; diff --git a/node_modules/core-js/library/modules/_user-agent.js b/node_modules/core-js/library/modules/_user-agent.js new file mode 100644 index 0000000000000..363fedc25b71d --- /dev/null +++ b/node_modules/core-js/library/modules/_user-agent.js @@ -0,0 +1,4 @@ +var global = require('./_global'); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; diff --git a/node_modules/core-js/library/modules/_validate-collection.js b/node_modules/core-js/library/modules/_validate-collection.js new file mode 100644 index 0000000000000..cec1ceff722f1 --- /dev/null +++ b/node_modules/core-js/library/modules/_validate-collection.js @@ -0,0 +1,5 @@ +var isObject = require('./_is-object'); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; diff --git a/node_modules/core-js/library/modules/_wks-define.js b/node_modules/core-js/library/modules/_wks-define.js new file mode 100644 index 0000000000000..7284d6adaf520 --- /dev/null +++ b/node_modules/core-js/library/modules/_wks-define.js @@ -0,0 +1,9 @@ +var global = require('./_global'); +var core = require('./_core'); +var LIBRARY = require('./_library'); +var wksExt = require('./_wks-ext'); +var defineProperty = require('./_object-dp').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) }); +}; diff --git a/node_modules/core-js/library/modules/_wks-ext.js b/node_modules/core-js/library/modules/_wks-ext.js new file mode 100644 index 0000000000000..13bd83b16a114 --- /dev/null +++ b/node_modules/core-js/library/modules/_wks-ext.js @@ -0,0 +1 @@ +exports.f = require('./_wks'); diff --git a/node_modules/core-js/library/modules/_wks.js b/node_modules/core-js/library/modules/_wks.js new file mode 100644 index 0000000000000..e33f857a69507 --- /dev/null +++ b/node_modules/core-js/library/modules/_wks.js @@ -0,0 +1,11 @@ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').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; diff --git a/node_modules/core-js/library/modules/core.delay.js b/node_modules/core-js/library/modules/core.delay.js new file mode 100644 index 0000000000000..73712c0126395 --- /dev/null +++ b/node_modules/core-js/library/modules/core.delay.js @@ -0,0 +1,12 @@ +var global = require('./_global'); +var core = require('./_core'); +var $export = require('./_export'); +var partial = require('./_partial'); +// 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); + }); + } +}); diff --git a/node_modules/core-js/library/modules/core.dict.js b/node_modules/core-js/library/modules/core.dict.js new file mode 100644 index 0000000000000..5422ad30d8aaf --- /dev/null +++ b/node_modules/core-js/library/modules/core.dict.js @@ -0,0 +1,157 @@ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var assign = require('./_object-assign'); +var create = require('./_object-create'); +var getPrototypeOf = require('./_object-gpo'); +var getKeys = require('./_object-keys'); +var dP = require('./_object-dp'); +var keyOf = require('./_keyof'); +var aFunction = require('./_a-function'); +var forOf = require('./_for-of'); +var isIterable = require('./core.is-iterable'); +var $iterCreate = require('./_iter-create'); +var step = require('./_iter-step'); +var isObject = require('./_is-object'); +var toIObject = require('./_to-iobject'); +var DESCRIPTORS = require('./_descriptors'); +var has = require('./_has'); + +// 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 +}); diff --git a/node_modules/core-js/library/modules/core.function.part.js b/node_modules/core-js/library/modules/core.function.part.js new file mode 100644 index 0000000000000..050154f858d98 --- /dev/null +++ b/node_modules/core-js/library/modules/core.function.part.js @@ -0,0 +1,7 @@ +var path = require('./_path'); +var $export = require('./_export'); + +// Placeholder +require('./_core')._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: require('./_partial') }); diff --git a/node_modules/core-js/library/modules/core.get-iterator-method.js b/node_modules/core-js/library/modules/core.get-iterator-method.js new file mode 100644 index 0000000000000..9b6fa62a56e31 --- /dev/null +++ b/node_modules/core-js/library/modules/core.get-iterator-method.js @@ -0,0 +1,8 @@ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; diff --git a/node_modules/core-js/library/modules/core.get-iterator.js b/node_modules/core-js/library/modules/core.get-iterator.js new file mode 100644 index 0000000000000..04568c86c8bed --- /dev/null +++ b/node_modules/core-js/library/modules/core.get-iterator.js @@ -0,0 +1,7 @@ +var anObject = require('./_an-object'); +var get = require('./core.get-iterator-method'); +module.exports = require('./_core').getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; diff --git a/node_modules/core-js/library/modules/core.is-iterable.js b/node_modules/core-js/library/modules/core.is-iterable.js new file mode 100644 index 0000000000000..388e5e35b0885 --- /dev/null +++ b/node_modules/core-js/library/modules/core.is-iterable.js @@ -0,0 +1,10 @@ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').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)); +}; diff --git a/node_modules/core-js/library/modules/core.number.iterator.js b/node_modules/core-js/library/modules/core.number.iterator.js new file mode 100644 index 0000000000000..fa37791eb1d20 --- /dev/null +++ b/node_modules/core-js/library/modules/core.number.iterator.js @@ -0,0 +1,9 @@ +'use strict'; +require('./_iter-define')(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 }; +}); diff --git a/node_modules/core-js/library/modules/core.object.classof.js b/node_modules/core-js/library/modules/core.object.classof.js new file mode 100644 index 0000000000000..fe16595a53e12 --- /dev/null +++ b/node_modules/core-js/library/modules/core.object.classof.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { classof: require('./_classof') }); diff --git a/node_modules/core-js/library/modules/core.object.define.js b/node_modules/core-js/library/modules/core.object.define.js new file mode 100644 index 0000000000000..e4e717b58668d --- /dev/null +++ b/node_modules/core-js/library/modules/core.object.define.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var define = require('./_object-define'); + +$export($export.S + $export.F, 'Object', { define: define }); diff --git a/node_modules/core-js/library/modules/core.object.is-object.js b/node_modules/core-js/library/modules/core.object.is-object.js new file mode 100644 index 0000000000000..fea80b6067fbc --- /dev/null +++ b/node_modules/core-js/library/modules/core.object.is-object.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { isObject: require('./_is-object') }); diff --git a/node_modules/core-js/library/modules/core.object.make.js b/node_modules/core-js/library/modules/core.object.make.js new file mode 100644 index 0000000000000..51d47740a5ad4 --- /dev/null +++ b/node_modules/core-js/library/modules/core.object.make.js @@ -0,0 +1,9 @@ +var $export = require('./_export'); +var define = require('./_object-define'); +var create = require('./_object-create'); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); diff --git a/node_modules/core-js/library/modules/core.regexp.escape.js b/node_modules/core-js/library/modules/core.regexp.escape.js new file mode 100644 index 0000000000000..3ddd748c0abac --- /dev/null +++ b/node_modules/core-js/library/modules/core.regexp.escape.js @@ -0,0 +1,5 @@ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export'); +var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); diff --git a/node_modules/core-js/library/modules/core.string.escape-html.js b/node_modules/core-js/library/modules/core.string.escape-html.js new file mode 100644 index 0000000000000..f96788614fbb5 --- /dev/null +++ b/node_modules/core-js/library/modules/core.string.escape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); diff --git a/node_modules/core-js/library/modules/core.string.unescape-html.js b/node_modules/core-js/library/modules/core.string.unescape-html.js new file mode 100644 index 0000000000000..eb8a6cfbf74c4 --- /dev/null +++ b/node_modules/core-js/library/modules/core.string.unescape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } }); diff --git a/node_modules/core-js/library/modules/es5.js b/node_modules/core-js/library/modules/es5.js new file mode 100644 index 0000000000000..ca10612d14cd9 --- /dev/null +++ b/node_modules/core-js/library/modules/es5.js @@ -0,0 +1,35 @@ +// This file still here for a legacy code and will be removed in a near time +require('./es6.object.create'); +require('./es6.object.define-property'); +require('./es6.object.define-properties'); +require('./es6.object.get-own-property-descriptor'); +require('./es6.object.get-prototype-of'); +require('./es6.object.keys'); +require('./es6.object.get-own-property-names'); +require('./es6.object.freeze'); +require('./es6.object.seal'); +require('./es6.object.prevent-extensions'); +require('./es6.object.is-frozen'); +require('./es6.object.is-sealed'); +require('./es6.object.is-extensible'); +require('./es6.function.bind'); +require('./es6.array.is-array'); +require('./es6.array.join'); +require('./es6.array.slice'); +require('./es6.array.sort'); +require('./es6.array.for-each'); +require('./es6.array.map'); +require('./es6.array.filter'); +require('./es6.array.some'); +require('./es6.array.every'); +require('./es6.array.reduce'); +require('./es6.array.reduce-right'); +require('./es6.array.index-of'); +require('./es6.array.last-index-of'); +require('./es6.date.now'); +require('./es6.date.to-iso-string'); +require('./es6.date.to-json'); +require('./es6.parse-int'); +require('./es6.parse-float'); +require('./es6.string.trim'); +require('./es6.regexp.to-string'); diff --git a/node_modules/core-js/library/modules/es6.array.copy-within.js b/node_modules/core-js/library/modules/es6.array.copy-within.js new file mode 100644 index 0000000000000..f866a959120bf --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.copy-within.js @@ -0,0 +1,6 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { copyWithin: require('./_array-copy-within') }); + +require('./_add-to-unscopables')('copyWithin'); diff --git a/node_modules/core-js/library/modules/es6.array.every.js b/node_modules/core-js/library/modules/es6.array.every.js new file mode 100644 index 0000000000000..cfd448f5c5e84 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.every.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $every = require('./_array-methods')(4); + +$export($export.P + $export.F * !require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.fill.js b/node_modules/core-js/library/modules/es6.array.fill.js new file mode 100644 index 0000000000000..ac17144249bd8 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.fill.js @@ -0,0 +1,6 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { fill: require('./_array-fill') }); + +require('./_add-to-unscopables')('fill'); diff --git a/node_modules/core-js/library/modules/es6.array.filter.js b/node_modules/core-js/library/modules/es6.array.filter.js new file mode 100644 index 0000000000000..447ecf4036a2e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.filter.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $filter = require('./_array-methods')(2); + +$export($export.P + $export.F * !require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.find-index.js b/node_modules/core-js/library/modules/es6.array.find-index.js new file mode 100644 index 0000000000000..374cadd77d318 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.find-index.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(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); + } +}); +require('./_add-to-unscopables')(KEY); diff --git a/node_modules/core-js/library/modules/es6.array.find.js b/node_modules/core-js/library/modules/es6.array.find.js new file mode 100644 index 0000000000000..4fbe76ce00a36 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.find.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(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); + } +}); +require('./_add-to-unscopables')(KEY); diff --git a/node_modules/core-js/library/modules/es6.array.for-each.js b/node_modules/core-js/library/modules/es6.array.for-each.js new file mode 100644 index 0000000000000..525ba0740d358 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.for-each.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $forEach = require('./_array-methods')(0); +var STRICT = require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.from.js b/node_modules/core-js/library/modules/es6.array.from.js new file mode 100644 index 0000000000000..4db38017f4654 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.from.js @@ -0,0 +1,37 @@ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var toObject = require('./_to-object'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var toLength = require('./_to-length'); +var createProperty = require('./_create-property'); +var getIterFn = require('./core.get-iterator-method'); + +$export($export.S + $export.F * !require('./_iter-detect')(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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.index-of.js b/node_modules/core-js/library/modules/es6.array.index-of.js new file mode 100644 index 0000000000000..231c92e9c5728 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.index-of.js @@ -0,0 +1,15 @@ +'use strict'; +var $export = require('./_export'); +var $indexOf = require('./_array-includes')(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($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]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.is-array.js b/node_modules/core-js/library/modules/es6.array.is-array.js new file mode 100644 index 0000000000000..27ca6fc5bbb56 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.is-array.js @@ -0,0 +1,4 @@ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = require('./_export'); + +$export($export.S, 'Array', { isArray: require('./_is-array') }); diff --git a/node_modules/core-js/library/modules/es6.array.iterator.js b/node_modules/core-js/library/modules/es6.array.iterator.js new file mode 100644 index 0000000000000..c64e88b1b2e79 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.iterator.js @@ -0,0 +1,34 @@ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var toIObject = require('./_to-iobject'); + +// 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 = require('./_iter-define')(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'); diff --git a/node_modules/core-js/library/modules/es6.array.join.js b/node_modules/core-js/library/modules/es6.array.join.js new file mode 100644 index 0000000000000..48e55d2e3c98e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.join.js @@ -0,0 +1,12 @@ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.last-index-of.js b/node_modules/core-js/library/modules/es6.array.last-index-of.js new file mode 100644 index 0000000000000..1f70e340d83d2 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.last-index-of.js @@ -0,0 +1,22 @@ +'use strict'; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.map.js b/node_modules/core-js/library/modules/es6.array.map.js new file mode 100644 index 0000000000000..1326033f1fb13 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.map.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $map = require('./_array-methods')(1); + +$export($export.P + $export.F * !require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.of.js b/node_modules/core-js/library/modules/es6.array.of.js new file mode 100644 index 0000000000000..b83e058c16a8d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.of.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export'); +var createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.reduce-right.js b/node_modules/core-js/library/modules/es6.array.reduce-right.js new file mode 100644 index 0000000000000..168e421d88a8b --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.reduce-right.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].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); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.reduce.js b/node_modules/core-js/library/modules/es6.array.reduce.js new file mode 100644 index 0000000000000..f4e4761212c12 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.reduce.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].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); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.slice.js b/node_modules/core-js/library/modules/es6.array.slice.js new file mode 100644 index 0000000000000..bdd496ecbb2d2 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.slice.js @@ -0,0 +1,28 @@ +'use strict'; +var $export = require('./_export'); +var html = require('./_html'); +var cof = require('./_cof'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * require('./_fails')(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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.some.js b/node_modules/core-js/library/modules/es6.array.some.js new file mode 100644 index 0000000000000..14c5eec268e23 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.some.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $some = require('./_array-methods')(3); + +$export($export.P + $export.F * !require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.sort.js b/node_modules/core-js/library/modules/es6.array.sort.js new file mode 100644 index 0000000000000..39817ffae80fb --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.sort.js @@ -0,0 +1,23 @@ +'use strict'; +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var fails = require('./_fails'); +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 +}) || !require('./_strict-method')($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)); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.species.js b/node_modules/core-js/library/modules/es6.array.species.js new file mode 100644 index 0000000000000..ce0b8917f7ade --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.species.js @@ -0,0 +1 @@ +require('./_set-species')('Array'); diff --git a/node_modules/core-js/library/modules/es6.date.now.js b/node_modules/core-js/library/modules/es6.date.now.js new file mode 100644 index 0000000000000..65f134e562be8 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.date.now.js @@ -0,0 +1,4 @@ +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = require('./_export'); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); diff --git a/node_modules/core-js/library/modules/es6.date.to-iso-string.js b/node_modules/core-js/library/modules/es6.date.to-iso-string.js new file mode 100644 index 0000000000000..13b27818cc9eb --- /dev/null +++ b/node_modules/core-js/library/modules/es6.date.to-iso-string.js @@ -0,0 +1,8 @@ +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export'); +var toISOString = require('./_date-to-iso-string'); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); diff --git a/node_modules/core-js/library/modules/es6.date.to-json.js b/node_modules/core-js/library/modules/es6.date.to-json.js new file mode 100644 index 0000000000000..69b1f3018e744 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.date.to-json.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var toISOString = require('./_date-to-iso-string'); +var classof = require('./_classof'); + +$export($export.P + $export.F * require('./_fails')(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 : + (!('toISOString' in O) && classof(O) == 'Date') ? toISOString.call(O) : O.toISOString(); + } +}); diff --git a/node_modules/core-js/library/modules/es6.date.to-primitive.js b/node_modules/core-js/library/modules/es6.date.to-primitive.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.date.to-string.js b/node_modules/core-js/library/modules/es6.date.to-string.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.function.bind.js b/node_modules/core-js/library/modules/es6.function.bind.js new file mode 100644 index 0000000000000..38e84e1acdee4 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.function.bind.js @@ -0,0 +1,4 @@ +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = require('./_export'); + +$export($export.P, 'Function', { bind: require('./_bind') }); diff --git a/node_modules/core-js/library/modules/es6.function.has-instance.js b/node_modules/core-js/library/modules/es6.function.has-instance.js new file mode 100644 index 0000000000000..7556ed9bd3052 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.function.has-instance.js @@ -0,0 +1,13 @@ +'use strict'; +var isObject = require('./_is-object'); +var getPrototypeOf = require('./_object-gpo'); +var HAS_INSTANCE = require('./_wks')('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').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; +} }); diff --git a/node_modules/core-js/library/modules/es6.function.name.js b/node_modules/core-js/library/modules/es6.function.name.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.map.js b/node_modules/core-js/library/modules/es6.map.js new file mode 100644 index 0000000000000..a282f0222c74c --- /dev/null +++ b/node_modules/core-js/library/modules/es6.map.js @@ -0,0 +1,19 @@ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = require('./_collection')(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); diff --git a/node_modules/core-js/library/modules/es6.math.acosh.js b/node_modules/core-js/library/modules/es6.math.acosh.js new file mode 100644 index 0000000000000..8a8989ebb30b1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.acosh.js @@ -0,0 +1,18 @@ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export'); +var log1p = require('./_math-log1p'); +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)); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.asinh.js b/node_modules/core-js/library/modules/es6.math.asinh.js new file mode 100644 index 0000000000000..ddf466628c541 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.asinh.js @@ -0,0 +1,10 @@ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export'); +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 }); diff --git a/node_modules/core-js/library/modules/es6.math.atanh.js b/node_modules/core-js/library/modules/es6.math.atanh.js new file mode 100644 index 0000000000000..af3c3e809211e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.atanh.js @@ -0,0 +1,10 @@ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export'); +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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.cbrt.js b/node_modules/core-js/library/modules/es6.math.cbrt.js new file mode 100644 index 0000000000000..e45ac4445f645 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.cbrt.js @@ -0,0 +1,9 @@ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export'); +var sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.clz32.js b/node_modules/core-js/library/modules/es6.math.clz32.js new file mode 100644 index 0000000000000..1e4d7e19c59c6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.clz32.js @@ -0,0 +1,8 @@ +// 20.2.2.11 Math.clz32(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.cosh.js b/node_modules/core-js/library/modules/es6.math.cosh.js new file mode 100644 index 0000000000000..1e0cffc1a899a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.cosh.js @@ -0,0 +1,9 @@ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export'); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.expm1.js b/node_modules/core-js/library/modules/es6.math.expm1.js new file mode 100644 index 0000000000000..da4c90df89054 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.expm1.js @@ -0,0 +1,5 @@ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export'); +var $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); diff --git a/node_modules/core-js/library/modules/es6.math.fround.js b/node_modules/core-js/library/modules/es6.math.fround.js new file mode 100644 index 0000000000000..9c262f2ec75a0 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.fround.js @@ -0,0 +1,4 @@ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { fround: require('./_math-fround') }); diff --git a/node_modules/core-js/library/modules/es6.math.hypot.js b/node_modules/core-js/library/modules/es6.math.hypot.js new file mode 100644 index 0000000000000..41ffdb27a28e6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.hypot.js @@ -0,0 +1,25 @@ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export'); +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); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.imul.js b/node_modules/core-js/library/modules/es6.math.imul.js new file mode 100644 index 0000000000000..96e683d25d43c --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.imul.js @@ -0,0 +1,17 @@ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export'); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * require('./_fails')(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); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.log10.js b/node_modules/core-js/library/modules/es6.math.log10.js new file mode 100644 index 0000000000000..9ee8ae68f5898 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.log10.js @@ -0,0 +1,8 @@ +// 20.2.2.21 Math.log10(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.log1p.js b/node_modules/core-js/library/modules/es6.math.log1p.js new file mode 100644 index 0000000000000..62959800ac0be --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { log1p: require('./_math-log1p') }); diff --git a/node_modules/core-js/library/modules/es6.math.log2.js b/node_modules/core-js/library/modules/es6.math.log2.js new file mode 100644 index 0000000000000..03d127cba7c83 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.log2.js @@ -0,0 +1,8 @@ +// 20.2.2.22 Math.log2(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.sign.js b/node_modules/core-js/library/modules/es6.math.sign.js new file mode 100644 index 0000000000000..981f69e566b83 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.sign.js @@ -0,0 +1,4 @@ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { sign: require('./_math-sign') }); diff --git a/node_modules/core-js/library/modules/es6.math.sinh.js b/node_modules/core-js/library/modules/es6.math.sinh.js new file mode 100644 index 0000000000000..57606333c8c6d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.sinh.js @@ -0,0 +1,15 @@ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * require('./_fails')(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); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.tanh.js b/node_modules/core-js/library/modules/es6.math.tanh.js new file mode 100644 index 0000000000000..0d3135b0fa5d9 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.tanh.js @@ -0,0 +1,12 @@ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +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)); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.trunc.js b/node_modules/core-js/library/modules/es6.math.trunc.js new file mode 100644 index 0000000000000..35ddb8086feca --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.trunc.js @@ -0,0 +1,8 @@ +// 20.2.2.34 Math.trunc(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.constructor.js b/node_modules/core-js/library/modules/es6.number.constructor.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.number.epsilon.js b/node_modules/core-js/library/modules/es6.number.epsilon.js new file mode 100644 index 0000000000000..34a2ec5fa78d6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.epsilon.js @@ -0,0 +1,4 @@ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); diff --git a/node_modules/core-js/library/modules/es6.number.is-finite.js b/node_modules/core-js/library/modules/es6.number.is-finite.js new file mode 100644 index 0000000000000..8719da97168aa --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.is-finite.js @@ -0,0 +1,9 @@ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export'); +var _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.is-integer.js b/node_modules/core-js/library/modules/es6.number.is-integer.js new file mode 100644 index 0000000000000..f1ab5dc4c8911 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.is-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { isInteger: require('./_is-integer') }); diff --git a/node_modules/core-js/library/modules/es6.number.is-nan.js b/node_modules/core-js/library/modules/es6.number.is-nan.js new file mode 100644 index 0000000000000..01d76ba28a07d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.is-nan.js @@ -0,0 +1,9 @@ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.is-safe-integer.js b/node_modules/core-js/library/modules/es6.number.is-safe-integer.js new file mode 100644 index 0000000000000..004e7d16f5f24 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.is-safe-integer.js @@ -0,0 +1,10 @@ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export'); +var isInteger = require('./_is-integer'); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.max-safe-integer.js b/node_modules/core-js/library/modules/es6.number.max-safe-integer.js new file mode 100644 index 0000000000000..a4f248f1b11c3 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.max-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); diff --git a/node_modules/core-js/library/modules/es6.number.min-safe-integer.js b/node_modules/core-js/library/modules/es6.number.min-safe-integer.js new file mode 100644 index 0000000000000..34df374bce770 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.min-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); diff --git a/node_modules/core-js/library/modules/es6.number.parse-float.js b/node_modules/core-js/library/modules/es6.number.parse-float.js new file mode 100644 index 0000000000000..317c431091886 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); diff --git a/node_modules/core-js/library/modules/es6.number.parse-int.js b/node_modules/core-js/library/modules/es6.number.parse-int.js new file mode 100644 index 0000000000000..cb48da28d2e8f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); diff --git a/node_modules/core-js/library/modules/es6.number.to-fixed.js b/node_modules/core-js/library/modules/es6.number.to-fixed.js new file mode 100644 index 0000000000000..2bf78af915963 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.to-fixed.js @@ -0,0 +1,114 @@ +'use strict'; +var $export = require('./_export'); +var toInteger = require('./_to-integer'); +var aNumberValue = require('./_a-number-value'); +var repeat = require('./_string-repeat'); +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' +) || !require('./_fails')(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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.to-precision.js b/node_modules/core-js/library/modules/es6.number.to-precision.js new file mode 100644 index 0000000000000..0d92527ffbcd6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.to-precision.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var $fails = require('./_fails'); +var aNumberValue = require('./_a-number-value'); +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); + } +}); diff --git a/node_modules/core-js/library/modules/es6.object.assign.js b/node_modules/core-js/library/modules/es6.object.assign.js new file mode 100644 index 0000000000000..d28085a7e4e04 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.assign.js @@ -0,0 +1,4 @@ +// 19.1.3.1 Object.assign(target, source) +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') }); diff --git a/node_modules/core-js/library/modules/es6.object.create.js b/node_modules/core-js/library/modules/es6.object.create.js new file mode 100644 index 0000000000000..70627d69cecde --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.create.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: require('./_object-create') }); diff --git a/node_modules/core-js/library/modules/es6.object.define-properties.js b/node_modules/core-js/library/modules/es6.object.define-properties.js new file mode 100644 index 0000000000000..5ec34214d1146 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.define-properties.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') }); diff --git a/node_modules/core-js/library/modules/es6.object.define-property.js b/node_modules/core-js/library/modules/es6.object.define-property.js new file mode 100644 index 0000000000000..1206858256002 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.define-property.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f }); diff --git a/node_modules/core-js/library/modules/es6.object.freeze.js b/node_modules/core-js/library/modules/es6.object.freeze.js new file mode 100644 index 0000000000000..0856ce9d7976c --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.freeze.js @@ -0,0 +1,9 @@ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js b/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js new file mode 100644 index 0000000000000..9df214172fba7 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js @@ -0,0 +1,9 @@ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject'); +var $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.get-own-property-names.js b/node_modules/core-js/library/modules/es6.object.get-own-property-names.js new file mode 100644 index 0000000000000..172f51c730f7b --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.get-own-property-names.js @@ -0,0 +1,4 @@ +// 19.1.2.7 Object.getOwnPropertyNames(O) +require('./_object-sap')('getOwnPropertyNames', function () { + return require('./_object-gopn-ext').f; +}); diff --git a/node_modules/core-js/library/modules/es6.object.get-prototype-of.js b/node_modules/core-js/library/modules/es6.object.get-prototype-of.js new file mode 100644 index 0000000000000..8fe2728c0f1f9 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.get-prototype-of.js @@ -0,0 +1,9 @@ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object'); +var $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.is-extensible.js b/node_modules/core-js/library/modules/es6.object.is-extensible.js new file mode 100644 index 0000000000000..5cd4575a517b6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.is-extensible.js @@ -0,0 +1,8 @@ +// 19.1.2.11 Object.isExtensible(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.is-frozen.js b/node_modules/core-js/library/modules/es6.object.is-frozen.js new file mode 100644 index 0000000000000..0ceeabbb0175f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.is-frozen.js @@ -0,0 +1,8 @@ +// 19.1.2.12 Object.isFrozen(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.is-sealed.js b/node_modules/core-js/library/modules/es6.object.is-sealed.js new file mode 100644 index 0000000000000..7fa8ddedd542f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.is-sealed.js @@ -0,0 +1,8 @@ +// 19.1.2.13 Object.isSealed(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.is.js b/node_modules/core-js/library/modules/es6.object.is.js new file mode 100644 index 0000000000000..204d7030f9229 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.is.js @@ -0,0 +1,3 @@ +// 19.1.3.10 Object.is(value1, value2) +var $export = require('./_export'); +$export($export.S, 'Object', { is: require('./_same-value') }); diff --git a/node_modules/core-js/library/modules/es6.object.keys.js b/node_modules/core-js/library/modules/es6.object.keys.js new file mode 100644 index 0000000000000..e9dade7de3af7 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.keys.js @@ -0,0 +1,9 @@ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object'); +var $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.prevent-extensions.js b/node_modules/core-js/library/modules/es6.object.prevent-extensions.js new file mode 100644 index 0000000000000..2f729181f44ec --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.prevent-extensions.js @@ -0,0 +1,9 @@ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.seal.js b/node_modules/core-js/library/modules/es6.object.seal.js new file mode 100644 index 0000000000000..12c3f6a3ad888 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.seal.js @@ -0,0 +1,9 @@ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.set-prototype-of.js b/node_modules/core-js/library/modules/es6.object.set-prototype-of.js new file mode 100644 index 0000000000000..461dbd2ed69b1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.set-prototype-of.js @@ -0,0 +1,3 @@ +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = require('./_export'); +$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set }); diff --git a/node_modules/core-js/library/modules/es6.object.to-string.js b/node_modules/core-js/library/modules/es6.object.to-string.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.parse-float.js b/node_modules/core-js/library/modules/es6.parse-float.js new file mode 100644 index 0000000000000..cbf50ead51bf6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); diff --git a/node_modules/core-js/library/modules/es6.parse-int.js b/node_modules/core-js/library/modules/es6.parse-int.js new file mode 100644 index 0000000000000..7ea358e847547 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); diff --git a/node_modules/core-js/library/modules/es6.promise.js b/node_modules/core-js/library/modules/es6.promise.js new file mode 100644 index 0000000000000..b0ff3bfcf50a8 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.promise.js @@ -0,0 +1,286 @@ +'use strict'; +var LIBRARY = require('./_library'); +var global = require('./_global'); +var ctx = require('./_ctx'); +var classof = require('./_classof'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var aFunction = require('./_a-function'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var speciesConstructor = require('./_species-constructor'); +var task = require('./_task').set; +var microtask = require('./_microtask')(); +var newPromiseCapabilityModule = require('./_new-promise-capability'); +var perform = require('./_perform'); +var userAgent = require('./_user-agent'); +var promiseResolve = require('./_promise-resolve'); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +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 = {})[require('./_wks')('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 + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } 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, exited; + 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); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + 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) { + if (domain && !exited) domain.exit(); + 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 = require('./_redefine-all')($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 }); +require('./_set-to-string-tag')($Promise, PROMISE); +require('./_set-species')(PROMISE); +Wrapper = require('./_core')[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 && require('./_iter-detect')(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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.apply.js b/node_modules/core-js/library/modules/es6.reflect.apply.js new file mode 100644 index 0000000000000..3b9c03a917264 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.apply.js @@ -0,0 +1,16 @@ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var rApply = (require('./_global').Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(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); + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.construct.js b/node_modules/core-js/library/modules/es6.reflect.construct.js new file mode 100644 index 0000000000000..380addb57bad1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.construct.js @@ -0,0 +1,47 @@ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export'); +var create = require('./_object-create'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var bind = require('./_bind'); +var rConstruct = (require('./_global').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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.define-property.js b/node_modules/core-js/library/modules/es6.reflect.define-property.js new file mode 100644 index 0000000000000..be7fbde6bd9da --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.define-property.js @@ -0,0 +1,23 @@ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp'); +var $export = require('./_export'); +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(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; + } + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.delete-property.js b/node_modules/core-js/library/modules/es6.reflect.delete-property.js new file mode 100644 index 0000000000000..0902b38a9b6c5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.delete-property.js @@ -0,0 +1,11 @@ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export'); +var gOPD = require('./_object-gopd').f; +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.enumerate.js b/node_modules/core-js/library/modules/es6.reflect.enumerate.js new file mode 100644 index 0000000000000..9e7c76a34f347 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.enumerate.js @@ -0,0 +1,26 @@ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +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); +}; +require('./_iter-create')(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); + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js b/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js new file mode 100644 index 0000000000000..e1299f906f986 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js @@ -0,0 +1,10 @@ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd'); +var $export = require('./_export'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js b/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js new file mode 100644 index 0000000000000..28351d410fca0 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js @@ -0,0 +1,10 @@ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export'); +var getProto = require('./_object-gpo'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.get.js b/node_modules/core-js/library/modules/es6.reflect.get.js new file mode 100644 index 0000000000000..a7ee766673ae1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.get.js @@ -0,0 +1,21 @@ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); + +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 }); diff --git a/node_modules/core-js/library/modules/es6.reflect.has.js b/node_modules/core-js/library/modules/es6.reflect.has.js new file mode 100644 index 0000000000000..4f5efa99294b3 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.has.js @@ -0,0 +1,8 @@ +// 26.1.9 Reflect.has(target, propertyKey) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.is-extensible.js b/node_modules/core-js/library/modules/es6.reflect.is-extensible.js new file mode 100644 index 0000000000000..700f938ac7788 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.is-extensible.js @@ -0,0 +1,11 @@ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.own-keys.js b/node_modules/core-js/library/modules/es6.reflect.own-keys.js new file mode 100644 index 0000000000000..9f2424ae8dae1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.own-keys.js @@ -0,0 +1,4 @@ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); diff --git a/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js b/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js new file mode 100644 index 0000000000000..e1037fa19480a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js @@ -0,0 +1,16 @@ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +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; + } + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js b/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js new file mode 100644 index 0000000000000..5dae90122b565 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js @@ -0,0 +1,15 @@ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export'); +var setProto = require('./_set-proto'); + +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; + } + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.set.js b/node_modules/core-js/library/modules/es6.reflect.set.js new file mode 100644 index 0000000000000..d809d7a4ef4ee --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.set.js @@ -0,0 +1,33 @@ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); + +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; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); diff --git a/node_modules/core-js/library/modules/es6.regexp.constructor.js b/node_modules/core-js/library/modules/es6.regexp.constructor.js new file mode 100644 index 0000000000000..e85e3141a2ad3 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.regexp.constructor.js @@ -0,0 +1 @@ +require('./_set-species')('RegExp'); diff --git a/node_modules/core-js/library/modules/es6.regexp.exec.js b/node_modules/core-js/library/modules/es6.regexp.exec.js new file mode 100644 index 0000000000000..8b1a393741c96 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.regexp.exec.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/library/modules/es6.regexp.flags.js b/node_modules/core-js/library/modules/es6.regexp.flags.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.regexp.match.js b/node_modules/core-js/library/modules/es6.regexp.match.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.regexp.replace.js b/node_modules/core-js/library/modules/es6.regexp.replace.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.regexp.search.js b/node_modules/core-js/library/modules/es6.regexp.search.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.regexp.split.js b/node_modules/core-js/library/modules/es6.regexp.split.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.regexp.to-string.js b/node_modules/core-js/library/modules/es6.regexp.to-string.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/library/modules/es6.set.js b/node_modules/core-js/library/modules/es6.set.js new file mode 100644 index 0000000000000..55b8bdd89b66b --- /dev/null +++ b/node_modules/core-js/library/modules/es6.set.js @@ -0,0 +1,14 @@ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = require('./_collection')(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); diff --git a/node_modules/core-js/library/modules/es6.string.anchor.js b/node_modules/core-js/library/modules/es6.string.anchor.js new file mode 100644 index 0000000000000..3493e54c023ee --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.anchor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.2 String.prototype.anchor(name) +require('./_string-html')('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.big.js b/node_modules/core-js/library/modules/es6.string.big.js new file mode 100644 index 0000000000000..38aab3414a584 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.big.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.3 String.prototype.big() +require('./_string-html')('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.blink.js b/node_modules/core-js/library/modules/es6.string.blink.js new file mode 100644 index 0000000000000..6188d96e32587 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.blink.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.4 String.prototype.blink() +require('./_string-html')('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.bold.js b/node_modules/core-js/library/modules/es6.string.bold.js new file mode 100644 index 0000000000000..ff3ecb9cb7e85 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.bold.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.5 String.prototype.bold() +require('./_string-html')('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.code-point-at.js b/node_modules/core-js/library/modules/es6.string.code-point-at.js new file mode 100644 index 0000000000000..e39b8c5eaa200 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.code-point-at.js @@ -0,0 +1,9 @@ +'use strict'; +var $export = require('./_export'); +var $at = require('./_string-at')(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.ends-with.js b/node_modules/core-js/library/modules/es6.string.ends-with.js new file mode 100644 index 0000000000000..06568888407a5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.ends-with.js @@ -0,0 +1,20 @@ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.fixed.js b/node_modules/core-js/library/modules/es6.string.fixed.js new file mode 100644 index 0000000000000..d4a60f37d701d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.fixed.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.6 String.prototype.fixed() +require('./_string-html')('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.fontcolor.js b/node_modules/core-js/library/modules/es6.string.fontcolor.js new file mode 100644 index 0000000000000..f7b95957ccb0b --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.fontcolor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.7 String.prototype.fontcolor(color) +require('./_string-html')('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.fontsize.js b/node_modules/core-js/library/modules/es6.string.fontsize.js new file mode 100644 index 0000000000000..f4cc20aec27b5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.fontsize.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.8 String.prototype.fontsize(size) +require('./_string-html')('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.from-code-point.js b/node_modules/core-js/library/modules/es6.string.from-code-point.js new file mode 100644 index 0000000000000..bece66e292df4 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.from-code-point.js @@ -0,0 +1,23 @@ +var $export = require('./_export'); +var toAbsoluteIndex = require('./_to-absolute-index'); +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(''); + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.includes.js b/node_modules/core-js/library/modules/es6.string.includes.js new file mode 100644 index 0000000000000..28d17416b53ce --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.includes.js @@ -0,0 +1,12 @@ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export'); +var context = require('./_string-context'); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.italics.js b/node_modules/core-js/library/modules/es6.string.italics.js new file mode 100644 index 0000000000000..ed4cc3bf0f50a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.italics.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.9 String.prototype.italics() +require('./_string-html')('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.iterator.js b/node_modules/core-js/library/modules/es6.string.iterator.js new file mode 100644 index 0000000000000..5d84c7fde4d45 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.iterator.js @@ -0,0 +1,17 @@ +'use strict'; +var $at = require('./_string-at')(true); + +// 21.1.3.27 String.prototype[@@iterator]() +require('./_iter-define')(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 }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.link.js b/node_modules/core-js/library/modules/es6.string.link.js new file mode 100644 index 0000000000000..d0255edd68ab2 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.link.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.10 String.prototype.link(url) +require('./_string-html')('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.raw.js b/node_modules/core-js/library/modules/es6.string.raw.js new file mode 100644 index 0000000000000..aa40ff6fae01d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.raw.js @@ -0,0 +1,18 @@ +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); + +$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(''); + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.repeat.js b/node_modules/core-js/library/modules/es6.string.repeat.js new file mode 100644 index 0000000000000..08412d91be6d1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.repeat.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: require('./_string-repeat') +}); diff --git a/node_modules/core-js/library/modules/es6.string.small.js b/node_modules/core-js/library/modules/es6.string.small.js new file mode 100644 index 0000000000000..941e4a767780e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.small.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.11 String.prototype.small() +require('./_string-html')('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.starts-with.js b/node_modules/core-js/library/modules/es6.string.starts-with.js new file mode 100644 index 0000000000000..c1723767de5f8 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.starts-with.js @@ -0,0 +1,18 @@ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(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; + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.strike.js b/node_modules/core-js/library/modules/es6.string.strike.js new file mode 100644 index 0000000000000..66055bc00a19a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.strike.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.12 String.prototype.strike() +require('./_string-html')('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.sub.js b/node_modules/core-js/library/modules/es6.string.sub.js new file mode 100644 index 0000000000000..e295a27b056ac --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.sub.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.13 String.prototype.sub() +require('./_string-html')('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.sup.js b/node_modules/core-js/library/modules/es6.string.sup.js new file mode 100644 index 0000000000000..125a989a79abb --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.sup.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.14 String.prototype.sup() +require('./_string-html')('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.trim.js b/node_modules/core-js/library/modules/es6.string.trim.js new file mode 100644 index 0000000000000..02b8a6c695a9f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.trim.js @@ -0,0 +1,7 @@ +'use strict'; +// 21.1.3.25 String.prototype.trim() +require('./_string-trim')('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.symbol.js b/node_modules/core-js/library/modules/es6.symbol.js new file mode 100644 index 0000000000000..52dbbc81f0f57 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.symbol.js @@ -0,0 +1,246 @@ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global'); +var has = require('./_has'); +var DESCRIPTORS = require('./_descriptors'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var META = require('./_meta').KEY; +var $fails = require('./_fails'); +var shared = require('./_shared'); +var setToStringTag = require('./_set-to-string-tag'); +var uid = require('./_uid'); +var wks = require('./_wks'); +var wksExt = require('./_wks-ext'); +var wksDefine = require('./_wks-define'); +var enumKeys = require('./_enum-keys'); +var isArray = require('./_is-array'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var toObject = require('./_to-object'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var createDesc = require('./_property-desc'); +var _create = require('./_object-create'); +var gOPNExt = require('./_object-gopn-ext'); +var $GOPD = require('./_object-gopd'); +var $GOPS = require('./_object-gops'); +var $DP = require('./_object-dp'); +var $keys = require('./_object-keys'); +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' && !!$GOPS.f; +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; + require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; + require('./_object-pie').f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !require('./_library')) { + 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 +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 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] || require('./_hide')($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); diff --git a/node_modules/core-js/library/modules/es6.typed.array-buffer.js b/node_modules/core-js/library/modules/es6.typed.array-buffer.js new file mode 100644 index 0000000000000..b2473709c1ceb --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.array-buffer.js @@ -0,0 +1,46 @@ +'use strict'; +var $export = require('./_export'); +var $typed = require('./_typed'); +var buffer = require('./_typed-buffer'); +var anObject = require('./_an-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var isObject = require('./_is-object'); +var ArrayBuffer = require('./_global').ArrayBuffer; +var speciesConstructor = require('./_species-constructor'); +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 * require('./_fails')(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 fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); diff --git a/node_modules/core-js/library/modules/es6.typed.data-view.js b/node_modules/core-js/library/modules/es6.typed.data-view.js new file mode 100644 index 0000000000000..d0e23536b68fd --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.data-view.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); diff --git a/node_modules/core-js/library/modules/es6.typed.float32-array.js b/node_modules/core-js/library/modules/es6.typed.float32-array.js new file mode 100644 index 0000000000000..f49700617c682 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.float32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.float64-array.js b/node_modules/core-js/library/modules/es6.typed.float64-array.js new file mode 100644 index 0000000000000..85dedcd597dc9 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.float64-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.int16-array.js b/node_modules/core-js/library/modules/es6.typed.int16-array.js new file mode 100644 index 0000000000000..b20ed0413e007 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.int16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.int32-array.js b/node_modules/core-js/library/modules/es6.typed.int32-array.js new file mode 100644 index 0000000000000..c7e6ae06ff37e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.int32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.int8-array.js b/node_modules/core-js/library/modules/es6.typed.int8-array.js new file mode 100644 index 0000000000000..58ab9f36e24c3 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.int8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.uint16-array.js b/node_modules/core-js/library/modules/es6.typed.uint16-array.js new file mode 100644 index 0000000000000..992805d6311e9 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.uint16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.uint32-array.js b/node_modules/core-js/library/modules/es6.typed.uint32-array.js new file mode 100644 index 0000000000000..5c444246aee2f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.uint32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.uint8-array.js b/node_modules/core-js/library/modules/es6.typed.uint8-array.js new file mode 100644 index 0000000000000..465cdc806a52d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.uint8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js b/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js new file mode 100644 index 0000000000000..a84a1c1ac2163 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); diff --git a/node_modules/core-js/library/modules/es6.weak-map.js b/node_modules/core-js/library/modules/es6.weak-map.js new file mode 100644 index 0000000000000..356052147e96e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.weak-map.js @@ -0,0 +1,60 @@ +'use strict'; +var global = require('./_global'); +var each = require('./_array-methods')(0); +var redefine = require('./_redefine'); +var meta = require('./_meta'); +var assign = require('./_object-assign'); +var weak = require('./_collection-weak'); +var isObject = require('./_is-object'); +var validate = require('./_validate-collection'); +var NATIVE_WEAK_MAP = require('./_validate-collection'); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +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 = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + 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); + }); + }); +} diff --git a/node_modules/core-js/library/modules/es6.weak-set.js b/node_modules/core-js/library/modules/es6.weak-set.js new file mode 100644 index 0000000000000..18a81e5243208 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.weak-set.js @@ -0,0 +1,14 @@ +'use strict'; +var weak = require('./_collection-weak'); +var validate = require('./_validate-collection'); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +require('./_collection')(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); diff --git a/node_modules/core-js/library/modules/es7.array.flat-map.js b/node_modules/core-js/library/modules/es7.array.flat-map.js new file mode 100644 index 0000000000000..2a210cd355855 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.array.flat-map.js @@ -0,0 +1,22 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var aFunction = require('./_a-function'); +var arraySpeciesCreate = require('./_array-species-create'); + +$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; + } +}); + +require('./_add-to-unscopables')('flatMap'); diff --git a/node_modules/core-js/library/modules/es7.array.flatten.js b/node_modules/core-js/library/modules/es7.array.flatten.js new file mode 100644 index 0000000000000..9019b2d1c0af4 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.array.flatten.js @@ -0,0 +1,21 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var arraySpeciesCreate = require('./_array-species-create'); + +$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; + } +}); + +require('./_add-to-unscopables')('flatten'); diff --git a/node_modules/core-js/library/modules/es7.array.includes.js b/node_modules/core-js/library/modules/es7.array.includes.js new file mode 100644 index 0000000000000..1b77f0eb867ab --- /dev/null +++ b/node_modules/core-js/library/modules/es7.array.includes.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export'); +var $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); diff --git a/node_modules/core-js/library/modules/es7.asap.js b/node_modules/core-js/library/modules/es7.asap.js new file mode 100644 index 0000000000000..d36f7c7608796 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.asap.js @@ -0,0 +1,12 @@ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export'); +var microtask = require('./_microtask')(); +var process = require('./_global').process; +var isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); diff --git a/node_modules/core-js/library/modules/es7.error.is-error.js b/node_modules/core-js/library/modules/es7.error.is-error.js new file mode 100644 index 0000000000000..ba94f5d13740a --- /dev/null +++ b/node_modules/core-js/library/modules/es7.error.is-error.js @@ -0,0 +1,9 @@ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export'); +var cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); diff --git a/node_modules/core-js/library/modules/es7.global.js b/node_modules/core-js/library/modules/es7.global.js new file mode 100644 index 0000000000000..a315fd4300254 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.global.js @@ -0,0 +1,4 @@ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.G, { global: require('./_global') }); diff --git a/node_modules/core-js/library/modules/es7.map.from.js b/node_modules/core-js/library/modules/es7.map.from.js new file mode 100644 index 0000000000000..a60573704e6b7 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.map.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +require('./_set-collection-from')('Map'); diff --git a/node_modules/core-js/library/modules/es7.map.of.js b/node_modules/core-js/library/modules/es7.map.of.js new file mode 100644 index 0000000000000..a2bf1fef70707 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.map.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +require('./_set-collection-of')('Map'); diff --git a/node_modules/core-js/library/modules/es7.map.to-json.js b/node_modules/core-js/library/modules/es7.map.to-json.js new file mode 100644 index 0000000000000..95a3569fa423a --- /dev/null +++ b/node_modules/core-js/library/modules/es7.map.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Map', { toJSON: require('./_collection-to-json')('Map') }); diff --git a/node_modules/core-js/library/modules/es7.math.clamp.js b/node_modules/core-js/library/modules/es7.math.clamp.js new file mode 100644 index 0000000000000..319cda60997cd --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.clamp.js @@ -0,0 +1,8 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.deg-per-rad.js b/node_modules/core-js/library/modules/es7.math.deg-per-rad.js new file mode 100644 index 0000000000000..99b95bba9f2c7 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.deg-per-rad.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); diff --git a/node_modules/core-js/library/modules/es7.math.degrees.js b/node_modules/core-js/library/modules/es7.math.degrees.js new file mode 100644 index 0000000000000..6637d915eabbc --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.degrees.js @@ -0,0 +1,9 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.fscale.js b/node_modules/core-js/library/modules/es7.math.fscale.js new file mode 100644 index 0000000000000..ad660a05888cb --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.fscale.js @@ -0,0 +1,10 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var scale = require('./_math-scale'); +var fround = require('./_math-fround'); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.iaddh.js b/node_modules/core-js/library/modules/es7.math.iaddh.js new file mode 100644 index 0000000000000..a331ba9b26fa0 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.iaddh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$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; + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.imulh.js b/node_modules/core-js/library/modules/es7.math.imulh.js new file mode 100644 index 0000000000000..58d19f3ac33b4 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.imulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$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); + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.isubh.js b/node_modules/core-js/library/modules/es7.math.isubh.js new file mode 100644 index 0000000000000..de22793c1bfdb --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.isubh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$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; + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.rad-per-deg.js b/node_modules/core-js/library/modules/es7.math.rad-per-deg.js new file mode 100644 index 0000000000000..6f702596a9ab2 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.rad-per-deg.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); diff --git a/node_modules/core-js/library/modules/es7.math.radians.js b/node_modules/core-js/library/modules/es7.math.radians.js new file mode 100644 index 0000000000000..abd9575fee3f7 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.radians.js @@ -0,0 +1,9 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.scale.js b/node_modules/core-js/library/modules/es7.math.scale.js new file mode 100644 index 0000000000000..2866dcd7ce9f6 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.scale.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { scale: require('./_math-scale') }); diff --git a/node_modules/core-js/library/modules/es7.math.signbit.js b/node_modules/core-js/library/modules/es7.math.signbit.js new file mode 100644 index 0000000000000..c2568048633b3 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.signbit.js @@ -0,0 +1,7 @@ +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = require('./_export'); + +$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; +} }); diff --git a/node_modules/core-js/library/modules/es7.math.umulh.js b/node_modules/core-js/library/modules/es7.math.umulh.js new file mode 100644 index 0000000000000..3ddfa4685be35 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.umulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$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); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.define-getter.js b/node_modules/core-js/library/modules/es7.object.define-getter.js new file mode 100644 index 0000000000000..ffc6203fd1d49 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.define-getter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.define-setter.js b/node_modules/core-js/library/modules/es7.object.define-setter.js new file mode 100644 index 0000000000000..8ceefdd68e308 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.define-setter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.entries.js b/node_modules/core-js/library/modules/es7.object.entries.js new file mode 100644 index 0000000000000..2f83437c8c464 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.entries.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js b/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js new file mode 100644 index 0000000000000..b1ab72fde5ccb --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js @@ -0,0 +1,22 @@ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); +var gOPD = require('./_object-gopd'); +var createProperty = require('./_create-property'); + +$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; + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.lookup-getter.js b/node_modules/core-js/library/modules/es7.object.lookup-getter.js new file mode 100644 index 0000000000000..f802229164468 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.lookup-getter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), '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)); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.lookup-setter.js b/node_modules/core-js/library/modules/es7.object.lookup-setter.js new file mode 100644 index 0000000000000..8bf8b64eab9dc --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.lookup-setter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), '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)); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.values.js b/node_modules/core-js/library/modules/es7.object.values.js new file mode 100644 index 0000000000000..d6f095275933a --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.values.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); diff --git a/node_modules/core-js/library/modules/es7.observable.js b/node_modules/core-js/library/modules/es7.observable.js new file mode 100644 index 0000000000000..6dcb2c8f2afa2 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.observable.js @@ -0,0 +1,199 @@ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export'); +var global = require('./_global'); +var core = require('./_core'); +var microtask = require('./_microtask')(); +var OBSERVABLE = require('./_wks')('observable'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var anInstance = require('./_an-instance'); +var redefineAll = require('./_redefine-all'); +var hide = require('./_hide'); +var forOf = require('./_for-of'); +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 }); + +require('./_set-species')('Observable'); diff --git a/node_modules/core-js/library/modules/es7.promise.finally.js b/node_modules/core-js/library/modules/es7.promise.finally.js new file mode 100644 index 0000000000000..fa04b63998f19 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.promise.finally.js @@ -0,0 +1,20 @@ +// https://github.com/tc39/proposal-promise-finally +'use strict'; +var $export = require('./_export'); +var core = require('./_core'); +var global = require('./_global'); +var speciesConstructor = require('./_species-constructor'); +var promiseResolve = require('./_promise-resolve'); + +$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 + ); +} }); diff --git a/node_modules/core-js/library/modules/es7.promise.try.js b/node_modules/core-js/library/modules/es7.promise.try.js new file mode 100644 index 0000000000000..e8163720b67cc --- /dev/null +++ b/node_modules/core-js/library/modules/es7.promise.try.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/proposal-promise-try +var $export = require('./_export'); +var newPromiseCapability = require('./_new-promise-capability'); +var perform = require('./_perform'); + +$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; +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.define-metadata.js b/node_modules/core-js/library/modules/es7.reflect.define-metadata.js new file mode 100644 index 0000000000000..ebef52c24dfe7 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.define-metadata.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js b/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js new file mode 100644 index 0000000000000..590ed53ce349a --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js @@ -0,0 +1,15 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +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); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js b/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js new file mode 100644 index 0000000000000..f344172b5c00f --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js @@ -0,0 +1,19 @@ +var Set = require('./es6.set'); +var from = require('./_array-from-iterable'); +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +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])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.get-metadata.js b/node_modules/core-js/library/modules/es7.reflect.get-metadata.js new file mode 100644 index 0000000000000..58c278e98ed96 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.get-metadata.js @@ -0,0 +1,17 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +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])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js new file mode 100644 index 0000000000000..03e3201bbea9c --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +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])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js new file mode 100644 index 0000000000000..4a18b07176a67 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +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])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.has-metadata.js b/node_modules/core-js/library/modules/es7.reflect.has-metadata.js new file mode 100644 index 0000000000000..b934bb4ecb784 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.has-metadata.js @@ -0,0 +1,16 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +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])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js b/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js new file mode 100644 index 0000000000000..512850dd8fe3a --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +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])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.metadata.js b/node_modules/core-js/library/modules/es7.reflect.metadata.js new file mode 100644 index 0000000000000..efb9a9e26610c --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.metadata.js @@ -0,0 +1,15 @@ +var $metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +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) + ); + }; +} }); diff --git a/node_modules/core-js/library/modules/es7.set.from.js b/node_modules/core-js/library/modules/es7.set.from.js new file mode 100644 index 0000000000000..26542b6644f5b --- /dev/null +++ b/node_modules/core-js/library/modules/es7.set.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +require('./_set-collection-from')('Set'); diff --git a/node_modules/core-js/library/modules/es7.set.of.js b/node_modules/core-js/library/modules/es7.set.of.js new file mode 100644 index 0000000000000..2a50ad911a8d2 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.set.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +require('./_set-collection-of')('Set'); diff --git a/node_modules/core-js/library/modules/es7.set.to-json.js b/node_modules/core-js/library/modules/es7.set.to-json.js new file mode 100644 index 0000000000000..95cbcfa51b54d --- /dev/null +++ b/node_modules/core-js/library/modules/es7.set.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') }); diff --git a/node_modules/core-js/library/modules/es7.string.at.js b/node_modules/core-js/library/modules/es7.string.at.js new file mode 100644 index 0000000000000..1c52db66ddd90 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.at.js @@ -0,0 +1,15 @@ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export'); +var $at = require('./_string-at')(true); +var $fails = require('./_fails'); + +var FORCED = $fails(function () { + return '𠮷'.at(0) !== '𠮷'; +}); + +$export($export.P + $export.F * FORCED, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); diff --git a/node_modules/core-js/library/modules/es7.string.match-all.js b/node_modules/core-js/library/modules/es7.string.match-all.js new file mode 100644 index 0000000000000..78237036e8f90 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.match-all.js @@ -0,0 +1,30 @@ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export'); +var defined = require('./_defined'); +var toLength = require('./_to-length'); +var isRegExp = require('./_is-regexp'); +var getFlags = require('./_flags'); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($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); + } +}); diff --git a/node_modules/core-js/library/modules/es7.string.pad-end.js b/node_modules/core-js/library/modules/es7.string.pad-end.js new file mode 100644 index 0000000000000..5a531a1c8c711 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.pad-end.js @@ -0,0 +1,14 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); diff --git a/node_modules/core-js/library/modules/es7.string.pad-start.js b/node_modules/core-js/library/modules/es7.string.pad-start.js new file mode 100644 index 0000000000000..729ed933ef8d3 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.pad-start.js @@ -0,0 +1,14 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); diff --git a/node_modules/core-js/library/modules/es7.string.trim-left.js b/node_modules/core-js/library/modules/es7.string.trim-left.js new file mode 100644 index 0000000000000..39a4b47cfa7d6 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.trim-left.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); diff --git a/node_modules/core-js/library/modules/es7.string.trim-right.js b/node_modules/core-js/library/modules/es7.string.trim-right.js new file mode 100644 index 0000000000000..7b7c4529880af --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.trim-right.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); diff --git a/node_modules/core-js/library/modules/es7.symbol.async-iterator.js b/node_modules/core-js/library/modules/es7.symbol.async-iterator.js new file mode 100644 index 0000000000000..f56dc2a8eb760 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.symbol.async-iterator.js @@ -0,0 +1 @@ +require('./_wks-define')('asyncIterator'); diff --git a/node_modules/core-js/library/modules/es7.symbol.observable.js b/node_modules/core-js/library/modules/es7.symbol.observable.js new file mode 100644 index 0000000000000..fc9a23761a49f --- /dev/null +++ b/node_modules/core-js/library/modules/es7.symbol.observable.js @@ -0,0 +1 @@ +require('./_wks-define')('observable'); diff --git a/node_modules/core-js/library/modules/es7.system.global.js b/node_modules/core-js/library/modules/es7.system.global.js new file mode 100644 index 0000000000000..310a802ada397 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.system.global.js @@ -0,0 +1,4 @@ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', { global: require('./_global') }); diff --git a/node_modules/core-js/library/modules/es7.weak-map.from.js b/node_modules/core-js/library/modules/es7.weak-map.from.js new file mode 100644 index 0000000000000..1a01365761356 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.weak-map.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +require('./_set-collection-from')('WeakMap'); diff --git a/node_modules/core-js/library/modules/es7.weak-map.of.js b/node_modules/core-js/library/modules/es7.weak-map.of.js new file mode 100644 index 0000000000000..52c3f66dfce37 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.weak-map.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +require('./_set-collection-of')('WeakMap'); diff --git a/node_modules/core-js/library/modules/es7.weak-set.from.js b/node_modules/core-js/library/modules/es7.weak-set.from.js new file mode 100644 index 0000000000000..493e5bee0322c --- /dev/null +++ b/node_modules/core-js/library/modules/es7.weak-set.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +require('./_set-collection-from')('WeakSet'); diff --git a/node_modules/core-js/library/modules/es7.weak-set.of.js b/node_modules/core-js/library/modules/es7.weak-set.of.js new file mode 100644 index 0000000000000..5941e72aab9ee --- /dev/null +++ b/node_modules/core-js/library/modules/es7.weak-set.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +require('./_set-collection-of')('WeakSet'); diff --git a/node_modules/core-js/library/modules/web.dom.iterable.js b/node_modules/core-js/library/modules/web.dom.iterable.js new file mode 100644 index 0000000000000..fc00afac49bb7 --- /dev/null +++ b/node_modules/core-js/library/modules/web.dom.iterable.js @@ -0,0 +1,19 @@ +require('./es6.array.iterator'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var TO_STRING_TAG = require('./_wks')('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} diff --git a/node_modules/core-js/library/modules/web.immediate.js b/node_modules/core-js/library/modules/web.immediate.js new file mode 100644 index 0000000000000..70f3e70daa425 --- /dev/null +++ b/node_modules/core-js/library/modules/web.immediate.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); +var $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); diff --git a/node_modules/core-js/library/modules/web.timers.js b/node_modules/core-js/library/modules/web.timers.js new file mode 100644 index 0000000000000..c879083046192 --- /dev/null +++ b/node_modules/core-js/library/modules/web.timers.js @@ -0,0 +1,20 @@ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global'); +var $export = require('./_export'); +var userAgent = require('./_user-agent'); +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) +}); diff --git a/node_modules/core-js/library/shim.js b/node_modules/core-js/library/shim.js new file mode 100644 index 0000000000000..e2d53f45a6ef2 --- /dev/null +++ b/node_modules/core-js/library/shim.js @@ -0,0 +1,198 @@ +require('./modules/es6.symbol'); +require('./modules/es6.object.create'); +require('./modules/es6.object.define-property'); +require('./modules/es6.object.define-properties'); +require('./modules/es6.object.get-own-property-descriptor'); +require('./modules/es6.object.get-prototype-of'); +require('./modules/es6.object.keys'); +require('./modules/es6.object.get-own-property-names'); +require('./modules/es6.object.freeze'); +require('./modules/es6.object.seal'); +require('./modules/es6.object.prevent-extensions'); +require('./modules/es6.object.is-frozen'); +require('./modules/es6.object.is-sealed'); +require('./modules/es6.object.is-extensible'); +require('./modules/es6.object.assign'); +require('./modules/es6.object.is'); +require('./modules/es6.object.set-prototype-of'); +require('./modules/es6.object.to-string'); +require('./modules/es6.function.bind'); +require('./modules/es6.function.name'); +require('./modules/es6.function.has-instance'); +require('./modules/es6.parse-int'); +require('./modules/es6.parse-float'); +require('./modules/es6.number.constructor'); +require('./modules/es6.number.to-fixed'); +require('./modules/es6.number.to-precision'); +require('./modules/es6.number.epsilon'); +require('./modules/es6.number.is-finite'); +require('./modules/es6.number.is-integer'); +require('./modules/es6.number.is-nan'); +require('./modules/es6.number.is-safe-integer'); +require('./modules/es6.number.max-safe-integer'); +require('./modules/es6.number.min-safe-integer'); +require('./modules/es6.number.parse-float'); +require('./modules/es6.number.parse-int'); +require('./modules/es6.math.acosh'); +require('./modules/es6.math.asinh'); +require('./modules/es6.math.atanh'); +require('./modules/es6.math.cbrt'); +require('./modules/es6.math.clz32'); +require('./modules/es6.math.cosh'); +require('./modules/es6.math.expm1'); +require('./modules/es6.math.fround'); +require('./modules/es6.math.hypot'); +require('./modules/es6.math.imul'); +require('./modules/es6.math.log10'); +require('./modules/es6.math.log1p'); +require('./modules/es6.math.log2'); +require('./modules/es6.math.sign'); +require('./modules/es6.math.sinh'); +require('./modules/es6.math.tanh'); +require('./modules/es6.math.trunc'); +require('./modules/es6.string.from-code-point'); +require('./modules/es6.string.raw'); +require('./modules/es6.string.trim'); +require('./modules/es6.string.iterator'); +require('./modules/es6.string.code-point-at'); +require('./modules/es6.string.ends-with'); +require('./modules/es6.string.includes'); +require('./modules/es6.string.repeat'); +require('./modules/es6.string.starts-with'); +require('./modules/es6.string.anchor'); +require('./modules/es6.string.big'); +require('./modules/es6.string.blink'); +require('./modules/es6.string.bold'); +require('./modules/es6.string.fixed'); +require('./modules/es6.string.fontcolor'); +require('./modules/es6.string.fontsize'); +require('./modules/es6.string.italics'); +require('./modules/es6.string.link'); +require('./modules/es6.string.small'); +require('./modules/es6.string.strike'); +require('./modules/es6.string.sub'); +require('./modules/es6.string.sup'); +require('./modules/es6.date.now'); +require('./modules/es6.date.to-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +require('./modules/es6.array.is-array'); +require('./modules/es6.array.from'); +require('./modules/es6.array.of'); +require('./modules/es6.array.join'); +require('./modules/es6.array.slice'); +require('./modules/es6.array.sort'); +require('./modules/es6.array.for-each'); +require('./modules/es6.array.map'); +require('./modules/es6.array.filter'); +require('./modules/es6.array.some'); +require('./modules/es6.array.every'); +require('./modules/es6.array.reduce'); +require('./modules/es6.array.reduce-right'); +require('./modules/es6.array.index-of'); +require('./modules/es6.array.last-index-of'); +require('./modules/es6.array.copy-within'); +require('./modules/es6.array.fill'); +require('./modules/es6.array.find'); +require('./modules/es6.array.find-index'); +require('./modules/es6.array.species'); +require('./modules/es6.array.iterator'); +require('./modules/es6.regexp.constructor'); +require('./modules/es6.regexp.exec'); +require('./modules/es6.regexp.to-string'); +require('./modules/es6.regexp.flags'); +require('./modules/es6.regexp.match'); +require('./modules/es6.regexp.replace'); +require('./modules/es6.regexp.search'); +require('./modules/es6.regexp.split'); +require('./modules/es6.promise'); +require('./modules/es6.map'); +require('./modules/es6.set'); +require('./modules/es6.weak-map'); +require('./modules/es6.weak-set'); +require('./modules/es6.typed.array-buffer'); +require('./modules/es6.typed.data-view'); +require('./modules/es6.typed.int8-array'); +require('./modules/es6.typed.uint8-array'); +require('./modules/es6.typed.uint8-clamped-array'); +require('./modules/es6.typed.int16-array'); +require('./modules/es6.typed.uint16-array'); +require('./modules/es6.typed.int32-array'); +require('./modules/es6.typed.uint32-array'); +require('./modules/es6.typed.float32-array'); +require('./modules/es6.typed.float64-array'); +require('./modules/es6.reflect.apply'); +require('./modules/es6.reflect.construct'); +require('./modules/es6.reflect.define-property'); +require('./modules/es6.reflect.delete-property'); +require('./modules/es6.reflect.enumerate'); +require('./modules/es6.reflect.get'); +require('./modules/es6.reflect.get-own-property-descriptor'); +require('./modules/es6.reflect.get-prototype-of'); +require('./modules/es6.reflect.has'); +require('./modules/es6.reflect.is-extensible'); +require('./modules/es6.reflect.own-keys'); +require('./modules/es6.reflect.prevent-extensions'); +require('./modules/es6.reflect.set'); +require('./modules/es6.reflect.set-prototype-of'); +require('./modules/es7.array.includes'); +require('./modules/es7.array.flat-map'); +require('./modules/es7.array.flatten'); +require('./modules/es7.string.at'); +require('./modules/es7.string.pad-start'); +require('./modules/es7.string.pad-end'); +require('./modules/es7.string.trim-left'); +require('./modules/es7.string.trim-right'); +require('./modules/es7.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.map.of'); +require('./modules/es7.set.of'); +require('./modules/es7.weak-map.of'); +require('./modules/es7.weak-set.of'); +require('./modules/es7.map.from'); +require('./modules/es7.set.from'); +require('./modules/es7.weak-map.from'); +require('./modules/es7.weak-set.from'); +require('./modules/es7.global'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.clamp'); +require('./modules/es7.math.deg-per-rad'); +require('./modules/es7.math.degrees'); +require('./modules/es7.math.fscale'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.rad-per-deg'); +require('./modules/es7.math.radians'); +require('./modules/es7.math.scale'); +require('./modules/es7.math.umulh'); +require('./modules/es7.math.signbit'); +require('./modules/es7.promise.finally'); +require('./modules/es7.promise.try'); +require('./modules/es7.reflect.define-metadata'); +require('./modules/es7.reflect.delete-metadata'); +require('./modules/es7.reflect.get-metadata'); +require('./modules/es7.reflect.get-metadata-keys'); +require('./modules/es7.reflect.get-own-metadata'); +require('./modules/es7.reflect.get-own-metadata-keys'); +require('./modules/es7.reflect.has-metadata'); +require('./modules/es7.reflect.has-own-metadata'); +require('./modules/es7.reflect.metadata'); +require('./modules/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); diff --git a/node_modules/core-js/library/stage/0.js b/node_modules/core-js/library/stage/0.js new file mode 100644 index 0000000000000..4aa50704c6982 --- /dev/null +++ b/node_modules/core-js/library/stage/0.js @@ -0,0 +1,10 @@ +require('../modules/es7.string.at'); +require('../modules/es7.map.to-json'); +require('../modules/es7.set.to-json'); +require('../modules/es7.error.is-error'); +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +require('../modules/es7.asap'); +module.exports = require('./1'); diff --git a/node_modules/core-js/library/stage/1.js b/node_modules/core-js/library/stage/1.js new file mode 100644 index 0000000000000..5f634d80b46e2 --- /dev/null +++ b/node_modules/core-js/library/stage/1.js @@ -0,0 +1,23 @@ +require('../modules/es7.map.of'); +require('../modules/es7.set.of'); +require('../modules/es7.weak-map.of'); +require('../modules/es7.weak-set.of'); +require('../modules/es7.map.from'); +require('../modules/es7.set.from'); +require('../modules/es7.weak-map.from'); +require('../modules/es7.weak-set.from'); +require('../modules/es7.math.clamp'); +require('../modules/es7.math.deg-per-rad'); +require('../modules/es7.math.degrees'); +require('../modules/es7.math.fscale'); +require('../modules/es7.math.rad-per-deg'); +require('../modules/es7.math.radians'); +require('../modules/es7.math.scale'); +require('../modules/es7.math.signbit'); +require('../modules/es7.promise.try'); +require('../modules/es7.string.match-all'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +require('../modules/es7.array.flat-map'); +require('../modules/es7.array.flatten'); +module.exports = require('./2'); diff --git a/node_modules/core-js/library/stage/2.js b/node_modules/core-js/library/stage/2.js new file mode 100644 index 0000000000000..d7aaa0ef963b7 --- /dev/null +++ b/node_modules/core-js/library/stage/2.js @@ -0,0 +1,4 @@ +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.symbol.async-iterator'); +module.exports = require('./3'); diff --git a/node_modules/core-js/library/stage/3.js b/node_modules/core-js/library/stage/3.js new file mode 100644 index 0000000000000..9afd07fe97a1b --- /dev/null +++ b/node_modules/core-js/library/stage/3.js @@ -0,0 +1,4 @@ +require('../modules/es7.global'); +require('../modules/es7.system.global'); +require('../modules/es7.promise.finally'); +module.exports = require('./4'); diff --git a/node_modules/core-js/library/stage/4.js b/node_modules/core-js/library/stage/4.js new file mode 100644 index 0000000000000..875762a235843 --- /dev/null +++ b/node_modules/core-js/library/stage/4.js @@ -0,0 +1,11 @@ +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.array.includes'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/library/stage/index.js b/node_modules/core-js/library/stage/index.js new file mode 100644 index 0000000000000..24dcf2e564223 --- /dev/null +++ b/node_modules/core-js/library/stage/index.js @@ -0,0 +1 @@ +module.exports = require('./pre'); diff --git a/node_modules/core-js/library/stage/pre.js b/node_modules/core-js/library/stage/pre.js new file mode 100644 index 0000000000000..ed197a8ba6618 --- /dev/null +++ b/node_modules/core-js/library/stage/pre.js @@ -0,0 +1,10 @@ +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +module.exports = require('./0'); diff --git a/node_modules/core-js/library/web/dom-collections.js b/node_modules/core-js/library/web/dom-collections.js new file mode 100644 index 0000000000000..a138bb9ddab32 --- /dev/null +++ b/node_modules/core-js/library/web/dom-collections.js @@ -0,0 +1,2 @@ +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/library/web/immediate.js b/node_modules/core-js/library/web/immediate.js new file mode 100644 index 0000000000000..6866abdeb5b2d --- /dev/null +++ b/node_modules/core-js/library/web/immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/library/web/index.js b/node_modules/core-js/library/web/index.js new file mode 100644 index 0000000000000..66db256d6ce77 --- /dev/null +++ b/node_modules/core-js/library/web/index.js @@ -0,0 +1,4 @@ +require('../modules/web.timers'); +require('../modules/web.immediate'); +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/library/web/timers.js b/node_modules/core-js/library/web/timers.js new file mode 100644 index 0000000000000..a3f528e4dcec3 --- /dev/null +++ b/node_modules/core-js/library/web/timers.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/modules/_a-function.js b/node_modules/core-js/modules/_a-function.js new file mode 100644 index 0000000000000..a9a5d84ff431c --- /dev/null +++ b/node_modules/core-js/modules/_a-function.js @@ -0,0 +1,4 @@ +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; diff --git a/node_modules/core-js/modules/_a-number-value.js b/node_modules/core-js/modules/_a-number-value.js new file mode 100644 index 0000000000000..2723de4d0e108 --- /dev/null +++ b/node_modules/core-js/modules/_a-number-value.js @@ -0,0 +1,5 @@ +var cof = require('./_cof'); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; diff --git a/node_modules/core-js/modules/_add-to-unscopables.js b/node_modules/core-js/modules/_add-to-unscopables.js new file mode 100644 index 0000000000000..a2dd97d998452 --- /dev/null +++ b/node_modules/core-js/modules/_add-to-unscopables.js @@ -0,0 +1,7 @@ +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = require('./_wks')('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; diff --git a/node_modules/core-js/modules/_advance-string-index.js b/node_modules/core-js/modules/_advance-string-index.js new file mode 100644 index 0000000000000..a4688c189735c --- /dev/null +++ b/node_modules/core-js/modules/_advance-string-index.js @@ -0,0 +1,8 @@ +'use strict'; +var at = require('./_string-at')(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; diff --git a/node_modules/core-js/modules/_an-instance.js b/node_modules/core-js/modules/_an-instance.js new file mode 100644 index 0000000000000..c0a5f9200c153 --- /dev/null +++ b/node_modules/core-js/modules/_an-instance.js @@ -0,0 +1,5 @@ +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; diff --git a/node_modules/core-js/modules/_an-object.js b/node_modules/core-js/modules/_an-object.js new file mode 100644 index 0000000000000..b1c316cd2bac0 --- /dev/null +++ b/node_modules/core-js/modules/_an-object.js @@ -0,0 +1,5 @@ +var isObject = require('./_is-object'); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; diff --git a/node_modules/core-js/modules/_array-copy-within.js b/node_modules/core-js/modules/_array-copy-within.js new file mode 100644 index 0000000000000..d331576c46448 --- /dev/null +++ b/node_modules/core-js/modules/_array-copy-within.js @@ -0,0 +1,26 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); + +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; +}; diff --git a/node_modules/core-js/modules/_array-fill.js b/node_modules/core-js/modules/_array-fill.js new file mode 100644 index 0000000000000..0753c36aca033 --- /dev/null +++ b/node_modules/core-js/modules/_array-fill.js @@ -0,0 +1,15 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +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; +}; diff --git a/node_modules/core-js/modules/_array-from-iterable.js b/node_modules/core-js/modules/_array-from-iterable.js new file mode 100644 index 0000000000000..08be255f0ad0a --- /dev/null +++ b/node_modules/core-js/modules/_array-from-iterable.js @@ -0,0 +1,7 @@ +var forOf = require('./_for-of'); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; diff --git a/node_modules/core-js/modules/_array-includes.js b/node_modules/core-js/modules/_array-includes.js new file mode 100644 index 0000000000000..0ef3efebedec5 --- /dev/null +++ b/node_modules/core-js/modules/_array-includes.js @@ -0,0 +1,23 @@ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +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; + }; +}; diff --git a/node_modules/core-js/modules/_array-methods.js b/node_modules/core-js/modules/_array-methods.js new file mode 100644 index 0000000000000..ae7f447da3c8f --- /dev/null +++ b/node_modules/core-js/modules/_array-methods.js @@ -0,0 +1,44 @@ +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = require('./_ctx'); +var IObject = require('./_iobject'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var asc = require('./_array-species-create'); +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; + }; +}; diff --git a/node_modules/core-js/modules/_array-reduce.js b/node_modules/core-js/modules/_array-reduce.js new file mode 100644 index 0000000000000..8596ac70ad19e --- /dev/null +++ b/node_modules/core-js/modules/_array-reduce.js @@ -0,0 +1,28 @@ +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var toLength = require('./_to-length'); + +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; +}; diff --git a/node_modules/core-js/modules/_array-species-constructor.js b/node_modules/core-js/modules/_array-species-constructor.js new file mode 100644 index 0000000000000..0771c236d0b28 --- /dev/null +++ b/node_modules/core-js/modules/_array-species-constructor.js @@ -0,0 +1,16 @@ +var isObject = require('./_is-object'); +var isArray = require('./_is-array'); +var SPECIES = require('./_wks')('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; +}; diff --git a/node_modules/core-js/modules/_array-species-create.js b/node_modules/core-js/modules/_array-species-create.js new file mode 100644 index 0000000000000..36ed58bd79c88 --- /dev/null +++ b/node_modules/core-js/modules/_array-species-create.js @@ -0,0 +1,6 @@ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; diff --git a/node_modules/core-js/modules/_bind.js b/node_modules/core-js/modules/_bind.js new file mode 100644 index 0000000000000..3cf1e5ae5343e --- /dev/null +++ b/node_modules/core-js/modules/_bind.js @@ -0,0 +1,25 @@ +'use strict'; +var aFunction = require('./_a-function'); +var isObject = require('./_is-object'); +var invoke = require('./_invoke'); +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; +}; diff --git a/node_modules/core-js/modules/_classof.js b/node_modules/core-js/modules/_classof.js new file mode 100644 index 0000000000000..d106d5be62cfc --- /dev/null +++ b/node_modules/core-js/modules/_classof.js @@ -0,0 +1,23 @@ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('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; +}; diff --git a/node_modules/core-js/modules/_cof.js b/node_modules/core-js/modules/_cof.js new file mode 100644 index 0000000000000..332c0bc0b9633 --- /dev/null +++ b/node_modules/core-js/modules/_cof.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; diff --git a/node_modules/core-js/modules/_collection-strong.js b/node_modules/core-js/modules/_collection-strong.js new file mode 100644 index 0000000000000..68ce63f0e068f --- /dev/null +++ b/node_modules/core-js/modules/_collection-strong.js @@ -0,0 +1,144 @@ +'use strict'; +var dP = require('./_object-dp').f; +var create = require('./_object-create'); +var redefineAll = require('./_redefine-all'); +var ctx = require('./_ctx'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var $iterDefine = require('./_iter-define'); +var step = require('./_iter-step'); +var setSpecies = require('./_set-species'); +var DESCRIPTORS = require('./_descriptors'); +var fastKey = require('./_meta').fastKey; +var validate = require('./_validate-collection'); +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); + } +}; diff --git a/node_modules/core-js/modules/_collection-to-json.js b/node_modules/core-js/modules/_collection-to-json.js new file mode 100644 index 0000000000000..a6ee0029a426e --- /dev/null +++ b/node_modules/core-js/modules/_collection-to-json.js @@ -0,0 +1,9 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof'); +var from = require('./_array-from-iterable'); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; diff --git a/node_modules/core-js/modules/_collection-weak.js b/node_modules/core-js/modules/_collection-weak.js new file mode 100644 index 0000000000000..04d3af5afe5ec --- /dev/null +++ b/node_modules/core-js/modules/_collection-weak.js @@ -0,0 +1,85 @@ +'use strict'; +var redefineAll = require('./_redefine-all'); +var getWeak = require('./_meta').getWeak; +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var createArrayMethod = require('./_array-methods'); +var $has = require('./_has'); +var validate = require('./_validate-collection'); +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 +}; diff --git a/node_modules/core-js/modules/_collection.js b/node_modules/core-js/modules/_collection.js new file mode 100644 index 0000000000000..767dde5068288 --- /dev/null +++ b/node_modules/core-js/modules/_collection.js @@ -0,0 +1,85 @@ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var redefineAll = require('./_redefine-all'); +var meta = require('./_meta'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var $iterDetect = require('./_iter-detect'); +var setToStringTag = require('./_set-to-string-tag'); +var inheritIfRequired = require('./_inherit-if-required'); + +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; +}; diff --git a/node_modules/core-js/modules/_core.js b/node_modules/core-js/modules/_core.js new file mode 100644 index 0000000000000..275d56149c5f3 --- /dev/null +++ b/node_modules/core-js/modules/_core.js @@ -0,0 +1,2 @@ +var core = module.exports = { version: '2.6.12' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef diff --git a/node_modules/core-js/modules/_create-property.js b/node_modules/core-js/modules/_create-property.js new file mode 100644 index 0000000000000..fd0ea8c9a7b09 --- /dev/null +++ b/node_modules/core-js/modules/_create-property.js @@ -0,0 +1,8 @@ +'use strict'; +var $defineProperty = require('./_object-dp'); +var createDesc = require('./_property-desc'); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; diff --git a/node_modules/core-js/modules/_ctx.js b/node_modules/core-js/modules/_ctx.js new file mode 100644 index 0000000000000..0a100ff3d6c99 --- /dev/null +++ b/node_modules/core-js/modules/_ctx.js @@ -0,0 +1,20 @@ +// optional / simple context binding +var aFunction = require('./_a-function'); +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); + }; +}; diff --git a/node_modules/core-js/modules/_date-to-iso-string.js b/node_modules/core-js/modules/_date-to-iso-string.js new file mode 100644 index 0000000000000..95a02e224e3b7 --- /dev/null +++ b/node_modules/core-js/modules/_date-to-iso-string.js @@ -0,0 +1,26 @@ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = require('./_fails'); +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; diff --git a/node_modules/core-js/modules/_date-to-primitive.js b/node_modules/core-js/modules/_date-to-primitive.js new file mode 100644 index 0000000000000..57c32030c82f8 --- /dev/null +++ b/node_modules/core-js/modules/_date-to-primitive.js @@ -0,0 +1,9 @@ +'use strict'; +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; diff --git a/node_modules/core-js/modules/_defined.js b/node_modules/core-js/modules/_defined.js new file mode 100644 index 0000000000000..66c7ed323c4be --- /dev/null +++ b/node_modules/core-js/modules/_defined.js @@ -0,0 +1,5 @@ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; diff --git a/node_modules/core-js/modules/_descriptors.js b/node_modules/core-js/modules/_descriptors.js new file mode 100644 index 0000000000000..046974066d33a --- /dev/null +++ b/node_modules/core-js/modules/_descriptors.js @@ -0,0 +1,4 @@ +// Thank's IE8 for his funny defineProperty +module.exports = !require('./_fails')(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); diff --git a/node_modules/core-js/modules/_dom-create.js b/node_modules/core-js/modules/_dom-create.js new file mode 100644 index 0000000000000..39ca2569d7093 --- /dev/null +++ b/node_modules/core-js/modules/_dom-create.js @@ -0,0 +1,7 @@ +var isObject = require('./_is-object'); +var document = require('./_global').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) : {}; +}; diff --git a/node_modules/core-js/modules/_entry-virtual.js b/node_modules/core-js/modules/_entry-virtual.js new file mode 100644 index 0000000000000..7a734390a7d5b --- /dev/null +++ b/node_modules/core-js/modules/_entry-virtual.js @@ -0,0 +1,5 @@ +var core = require('./_core'); +module.exports = function (CONSTRUCTOR) { + var C = core[CONSTRUCTOR]; + return (C.virtual || C.prototype); +}; diff --git a/node_modules/core-js/modules/_enum-bug-keys.js b/node_modules/core-js/modules/_enum-bug-keys.js new file mode 100644 index 0000000000000..d9ad85514ac63 --- /dev/null +++ b/node_modules/core-js/modules/_enum-bug-keys.js @@ -0,0 +1,4 @@ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); diff --git a/node_modules/core-js/modules/_enum-keys.js b/node_modules/core-js/modules/_enum-keys.js new file mode 100644 index 0000000000000..3e7053d135c40 --- /dev/null +++ b/node_modules/core-js/modules/_enum-keys.js @@ -0,0 +1,15 @@ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +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; +}; diff --git a/node_modules/core-js/modules/_export.js b/node_modules/core-js/modules/_export.js new file mode 100644 index 0000000000000..3c907c6ea3935 --- /dev/null +++ b/node_modules/core-js/modules/_export.js @@ -0,0 +1,43 @@ +var global = require('./_global'); +var core = require('./_core'); +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var ctx = require('./_ctx'); +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; diff --git a/node_modules/core-js/modules/_fails-is-regexp.js b/node_modules/core-js/modules/_fails-is-regexp.js new file mode 100644 index 0000000000000..8eec2e4715cb7 --- /dev/null +++ b/node_modules/core-js/modules/_fails-is-regexp.js @@ -0,0 +1,12 @@ +var MATCH = require('./_wks')('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; diff --git a/node_modules/core-js/modules/_fails.js b/node_modules/core-js/modules/_fails.js new file mode 100644 index 0000000000000..3b4cdf6740b36 --- /dev/null +++ b/node_modules/core-js/modules/_fails.js @@ -0,0 +1,7 @@ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; diff --git a/node_modules/core-js/modules/_fix-re-wks.js b/node_modules/core-js/modules/_fix-re-wks.js new file mode 100644 index 0000000000000..64d00fe6941ca --- /dev/null +++ b/node_modules/core-js/modules/_fix-re-wks.js @@ -0,0 +1,96 @@ +'use strict'; +require('./es6.regexp.exec'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var wks = require('./_wks'); +var regexpExec = require('./_regexp-exec'); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + 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); } + ); + } +}; diff --git a/node_modules/core-js/modules/_flags.js b/node_modules/core-js/modules/_flags.js new file mode 100644 index 0000000000000..b6fc324bdfde4 --- /dev/null +++ b/node_modules/core-js/modules/_flags.js @@ -0,0 +1,13 @@ +'use strict'; +// 21.2.5.3 get RegExp.prototype.flags +var anObject = require('./_an-object'); +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; +}; diff --git a/node_modules/core-js/modules/_flatten-into-array.js b/node_modules/core-js/modules/_flatten-into-array.js new file mode 100644 index 0000000000000..1838517ae3889 --- /dev/null +++ b/node_modules/core-js/modules/_flatten-into-array.js @@ -0,0 +1,39 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = require('./_is-array'); +var isObject = require('./_is-object'); +var toLength = require('./_to-length'); +var ctx = require('./_ctx'); +var IS_CONCAT_SPREADABLE = require('./_wks')('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; diff --git a/node_modules/core-js/modules/_for-of.js b/node_modules/core-js/modules/_for-of.js new file mode 100644 index 0000000000000..9ed22818b5d70 --- /dev/null +++ b/node_modules/core-js/modules/_for-of.js @@ -0,0 +1,25 @@ +var ctx = require('./_ctx'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var getIterFn = require('./core.get-iterator-method'); +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; diff --git a/node_modules/core-js/modules/_function-to-string.js b/node_modules/core-js/modules/_function-to-string.js new file mode 100644 index 0000000000000..d7f5419ce36ba --- /dev/null +++ b/node_modules/core-js/modules/_function-to-string.js @@ -0,0 +1 @@ +module.exports = require('./_shared')('native-function-to-string', Function.toString); diff --git a/node_modules/core-js/modules/_global.js b/node_modules/core-js/modules/_global.js new file mode 100644 index 0000000000000..bf85b44a107b5 --- /dev/null +++ b/node_modules/core-js/modules/_global.js @@ -0,0 +1,6 @@ +// 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 diff --git a/node_modules/core-js/modules/_has.js b/node_modules/core-js/modules/_has.js new file mode 100644 index 0000000000000..2a37d8b7adf0f --- /dev/null +++ b/node_modules/core-js/modules/_has.js @@ -0,0 +1,4 @@ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; diff --git a/node_modules/core-js/modules/_hide.js b/node_modules/core-js/modules/_hide.js new file mode 100644 index 0000000000000..cec258a0ad2bc --- /dev/null +++ b/node_modules/core-js/modules/_hide.js @@ -0,0 +1,8 @@ +var dP = require('./_object-dp'); +var createDesc = require('./_property-desc'); +module.exports = require('./_descriptors') ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; diff --git a/node_modules/core-js/modules/_html.js b/node_modules/core-js/modules/_html.js new file mode 100644 index 0000000000000..7daff14ca8e3a --- /dev/null +++ b/node_modules/core-js/modules/_html.js @@ -0,0 +1,2 @@ +var document = require('./_global').document; +module.exports = document && document.documentElement; diff --git a/node_modules/core-js/modules/_ie8-dom-define.js b/node_modules/core-js/modules/_ie8-dom-define.js new file mode 100644 index 0000000000000..a3805cb7fe171 --- /dev/null +++ b/node_modules/core-js/modules/_ie8-dom-define.js @@ -0,0 +1,3 @@ +module.exports = !require('./_descriptors') && !require('./_fails')(function () { + return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; +}); diff --git a/node_modules/core-js/modules/_inherit-if-required.js b/node_modules/core-js/modules/_inherit-if-required.js new file mode 100644 index 0000000000000..b95fcd984547d --- /dev/null +++ b/node_modules/core-js/modules/_inherit-if-required.js @@ -0,0 +1,9 @@ +var isObject = require('./_is-object'); +var setPrototypeOf = require('./_set-proto').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; +}; diff --git a/node_modules/core-js/modules/_invoke.js b/node_modules/core-js/modules/_invoke.js new file mode 100644 index 0000000000000..6cccebdc12ea2 --- /dev/null +++ b/node_modules/core-js/modules/_invoke.js @@ -0,0 +1,16 @@ +// 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); +}; diff --git a/node_modules/core-js/modules/_iobject.js b/node_modules/core-js/modules/_iobject.js new file mode 100644 index 0000000000000..2b57c8a07c078 --- /dev/null +++ b/node_modules/core-js/modules/_iobject.js @@ -0,0 +1,6 @@ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; diff --git a/node_modules/core-js/modules/_is-array-iter.js b/node_modules/core-js/modules/_is-array-iter.js new file mode 100644 index 0000000000000..6f67d90522e96 --- /dev/null +++ b/node_modules/core-js/modules/_is-array-iter.js @@ -0,0 +1,8 @@ +// check on default Array iterator +var Iterators = require('./_iterators'); +var ITERATOR = require('./_wks')('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; diff --git a/node_modules/core-js/modules/_is-array.js b/node_modules/core-js/modules/_is-array.js new file mode 100644 index 0000000000000..0581dc2e79b20 --- /dev/null +++ b/node_modules/core-js/modules/_is-array.js @@ -0,0 +1,5 @@ +// 7.2.2 IsArray(argument) +var cof = require('./_cof'); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; diff --git a/node_modules/core-js/modules/_is-integer.js b/node_modules/core-js/modules/_is-integer.js new file mode 100644 index 0000000000000..0074ae975a3d6 --- /dev/null +++ b/node_modules/core-js/modules/_is-integer.js @@ -0,0 +1,6 @@ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object'); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; diff --git a/node_modules/core-js/modules/_is-object.js b/node_modules/core-js/modules/_is-object.js new file mode 100644 index 0000000000000..dda6e04d27301 --- /dev/null +++ b/node_modules/core-js/modules/_is-object.js @@ -0,0 +1,3 @@ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; diff --git a/node_modules/core-js/modules/_is-regexp.js b/node_modules/core-js/modules/_is-regexp.js new file mode 100644 index 0000000000000..598d159d5fce3 --- /dev/null +++ b/node_modules/core-js/modules/_is-regexp.js @@ -0,0 +1,8 @@ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object'); +var cof = require('./_cof'); +var MATCH = require('./_wks')('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; diff --git a/node_modules/core-js/modules/_iter-call.js b/node_modules/core-js/modules/_iter-call.js new file mode 100644 index 0000000000000..a7026e3474bbe --- /dev/null +++ b/node_modules/core-js/modules/_iter-call.js @@ -0,0 +1,12 @@ +// call something on iterator step with safe closing on error +var anObject = require('./_an-object'); +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; + } +}; diff --git a/node_modules/core-js/modules/_iter-create.js b/node_modules/core-js/modules/_iter-create.js new file mode 100644 index 0000000000000..04708c83cc382 --- /dev/null +++ b/node_modules/core-js/modules/_iter-create.js @@ -0,0 +1,13 @@ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; diff --git a/node_modules/core-js/modules/_iter-define.js b/node_modules/core-js/modules/_iter-define.js new file mode 100644 index 0000000000000..578dfb734b5dd --- /dev/null +++ b/node_modules/core-js/modules/_iter-define.js @@ -0,0 +1,69 @@ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('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 = $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 && typeof IteratorPrototype[ITERATOR] != 'function') 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; +}; diff --git a/node_modules/core-js/modules/_iter-detect.js b/node_modules/core-js/modules/_iter-detect.js new file mode 100644 index 0000000000000..5cb34973ce930 --- /dev/null +++ b/node_modules/core-js/modules/_iter-detect.js @@ -0,0 +1,22 @@ +var ITERATOR = require('./_wks')('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; +}; diff --git a/node_modules/core-js/modules/_iter-step.js b/node_modules/core-js/modules/_iter-step.js new file mode 100644 index 0000000000000..b0691c883d967 --- /dev/null +++ b/node_modules/core-js/modules/_iter-step.js @@ -0,0 +1,3 @@ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; diff --git a/node_modules/core-js/modules/_iterators.js b/node_modules/core-js/modules/_iterators.js new file mode 100644 index 0000000000000..f053ebf7976e3 --- /dev/null +++ b/node_modules/core-js/modules/_iterators.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/node_modules/core-js/modules/_keyof.js b/node_modules/core-js/modules/_keyof.js new file mode 100644 index 0000000000000..0786096fd04f6 --- /dev/null +++ b/node_modules/core-js/modules/_keyof.js @@ -0,0 +1,10 @@ +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +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; +}; diff --git a/node_modules/core-js/modules/_library.js b/node_modules/core-js/modules/_library.js new file mode 100644 index 0000000000000..a5d30209bd0bb --- /dev/null +++ b/node_modules/core-js/modules/_library.js @@ -0,0 +1 @@ +module.exports = false; diff --git a/node_modules/core-js/modules/_math-expm1.js b/node_modules/core-js/modules/_math-expm1.js new file mode 100644 index 0000000000000..75c685014b661 --- /dev/null +++ b/node_modules/core-js/modules/_math-expm1.js @@ -0,0 +1,10 @@ +// 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; diff --git a/node_modules/core-js/modules/_math-fround.js b/node_modules/core-js/modules/_math-fround.js new file mode 100644 index 0000000000000..c85eb4b7ea5cf --- /dev/null +++ b/node_modules/core-js/modules/_math-fround.js @@ -0,0 +1,23 @@ +// 20.2.2.16 Math.fround(x) +var sign = require('./_math-sign'); +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; +}; diff --git a/node_modules/core-js/modules/_math-log1p.js b/node_modules/core-js/modules/_math-log1p.js new file mode 100644 index 0000000000000..16d5f49311ffb --- /dev/null +++ b/node_modules/core-js/modules/_math-log1p.js @@ -0,0 +1,4 @@ +// 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); +}; diff --git a/node_modules/core-js/modules/_math-scale.js b/node_modules/core-js/modules/_math-scale.js new file mode 100644 index 0000000000000..ba3cdb20c6299 --- /dev/null +++ b/node_modules/core-js/modules/_math-scale.js @@ -0,0 +1,18 @@ +// 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; +}; diff --git a/node_modules/core-js/modules/_math-sign.js b/node_modules/core-js/modules/_math-sign.js new file mode 100644 index 0000000000000..7a46b9d088560 --- /dev/null +++ b/node_modules/core-js/modules/_math-sign.js @@ -0,0 +1,5 @@ +// 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; +}; diff --git a/node_modules/core-js/modules/_meta.js b/node_modules/core-js/modules/_meta.js new file mode 100644 index 0000000000000..2d4b32579993d --- /dev/null +++ b/node_modules/core-js/modules/_meta.js @@ -0,0 +1,53 @@ +var META = require('./_uid')('meta'); +var isObject = require('./_is-object'); +var has = require('./_has'); +var setDesc = require('./_object-dp').f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !require('./_fails')(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 +}; diff --git a/node_modules/core-js/modules/_metadata.js b/node_modules/core-js/modules/_metadata.js new file mode 100644 index 0000000000000..759cfc445c93f --- /dev/null +++ b/node_modules/core-js/modules/_metadata.js @@ -0,0 +1,51 @@ +var Map = require('./es6.map'); +var $export = require('./_export'); +var shared = require('./_shared')('metadata'); +var store = shared.store || (shared.store = new (require('./es6.weak-map'))()); + +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 +}; diff --git a/node_modules/core-js/modules/_microtask.js b/node_modules/core-js/modules/_microtask.js new file mode 100644 index 0000000000000..b321c648c45fc --- /dev/null +++ b/node_modules/core-js/modules/_microtask.js @@ -0,0 +1,69 @@ +var global = require('./_global'); +var macrotask = require('./_task').set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = require('./_cof')(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) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + 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; + }; +}; diff --git a/node_modules/core-js/modules/_native-weak-map.js b/node_modules/core-js/modules/_native-weak-map.js new file mode 100644 index 0000000000000..ebaf445ffa96c --- /dev/null +++ b/node_modules/core-js/modules/_native-weak-map.js @@ -0,0 +1,4 @@ +var nativeFunctionToString = require('./_function-to-string'); +var WeakMap = require('./_global').WeakMap; + +module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap)); diff --git a/node_modules/core-js/modules/_new-promise-capability.js b/node_modules/core-js/modules/_new-promise-capability.js new file mode 100644 index 0000000000000..82b74a33150d2 --- /dev/null +++ b/node_modules/core-js/modules/_new-promise-capability.js @@ -0,0 +1,18 @@ +'use strict'; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = require('./_a-function'); + +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); +}; diff --git a/node_modules/core-js/modules/_object-assign.js b/node_modules/core-js/modules/_object-assign.js new file mode 100644 index 0000000000000..d739c430cfe3d --- /dev/null +++ b/node_modules/core-js/modules/_object-assign.js @@ -0,0 +1,38 @@ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = require('./_descriptors'); +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(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) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; diff --git a/node_modules/core-js/modules/_object-create.js b/node_modules/core-js/modules/_object-create.js new file mode 100644 index 0000000000000..a76808ea618f0 --- /dev/null +++ b/node_modules/core-js/modules/_object-create.js @@ -0,0 +1,41 @@ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('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 = require('./_dom-create')('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + require('./_html').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); +}; diff --git a/node_modules/core-js/modules/_object-define.js b/node_modules/core-js/modules/_object-define.js new file mode 100644 index 0000000000000..4d131f331733d --- /dev/null +++ b/node_modules/core-js/modules/_object-define.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); + +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; +}; diff --git a/node_modules/core-js/modules/_object-dp.js b/node_modules/core-js/modules/_object-dp.js new file mode 100644 index 0000000000000..0340a8308d119 --- /dev/null +++ b/node_modules/core-js/modules/_object-dp.js @@ -0,0 +1,16 @@ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? 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; +}; diff --git a/node_modules/core-js/modules/_object-dps.js b/node_modules/core-js/modules/_object-dps.js new file mode 100644 index 0000000000000..173c338ff91dd --- /dev/null +++ b/node_modules/core-js/modules/_object-dps.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? 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; +}; diff --git a/node_modules/core-js/modules/_object-forced-pam.js b/node_modules/core-js/modules/_object-forced-pam.js new file mode 100644 index 0000000000000..71ede9225ab33 --- /dev/null +++ b/node_modules/core-js/modules/_object-forced-pam.js @@ -0,0 +1,9 @@ +'use strict'; +// Forced replacement prototype accessors methods +module.exports = require('./_library') || !require('./_fails')(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 require('./_global')[K]; +}); diff --git a/node_modules/core-js/modules/_object-gopd.js b/node_modules/core-js/modules/_object-gopd.js new file mode 100644 index 0000000000000..555dd31a5bc0b --- /dev/null +++ b/node_modules/core-js/modules/_object-gopd.js @@ -0,0 +1,16 @@ +var pIE = require('./_object-pie'); +var createDesc = require('./_property-desc'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var has = require('./_has'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = require('./_descriptors') ? 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]); +}; diff --git a/node_modules/core-js/modules/_object-gopn-ext.js b/node_modules/core-js/modules/_object-gopn-ext.js new file mode 100644 index 0000000000000..4abb6ae83c4fd --- /dev/null +++ b/node_modules/core-js/modules/_object-gopn-ext.js @@ -0,0 +1,19 @@ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject'); +var gOPN = require('./_object-gopn').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)); +}; diff --git a/node_modules/core-js/modules/_object-gopn.js b/node_modules/core-js/modules/_object-gopn.js new file mode 100644 index 0000000000000..da82333f60eca --- /dev/null +++ b/node_modules/core-js/modules/_object-gopn.js @@ -0,0 +1,7 @@ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal'); +var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; diff --git a/node_modules/core-js/modules/_object-gops.js b/node_modules/core-js/modules/_object-gops.js new file mode 100644 index 0000000000000..bc06729056418 --- /dev/null +++ b/node_modules/core-js/modules/_object-gops.js @@ -0,0 +1 @@ +exports.f = Object.getOwnPropertySymbols; diff --git a/node_modules/core-js/modules/_object-gpo.js b/node_modules/core-js/modules/_object-gpo.js new file mode 100644 index 0000000000000..27f2a94e88693 --- /dev/null +++ b/node_modules/core-js/modules/_object-gpo.js @@ -0,0 +1,13 @@ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('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; +}; diff --git a/node_modules/core-js/modules/_object-keys-internal.js b/node_modules/core-js/modules/_object-keys-internal.js new file mode 100644 index 0000000000000..71abdd1a53568 --- /dev/null +++ b/node_modules/core-js/modules/_object-keys-internal.js @@ -0,0 +1,17 @@ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('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; +}; diff --git a/node_modules/core-js/modules/_object-keys.js b/node_modules/core-js/modules/_object-keys.js new file mode 100644 index 0000000000000..62f73f91eee94 --- /dev/null +++ b/node_modules/core-js/modules/_object-keys.js @@ -0,0 +1,7 @@ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; diff --git a/node_modules/core-js/modules/_object-pie.js b/node_modules/core-js/modules/_object-pie.js new file mode 100644 index 0000000000000..4cc71072d3612 --- /dev/null +++ b/node_modules/core-js/modules/_object-pie.js @@ -0,0 +1 @@ +exports.f = {}.propertyIsEnumerable; diff --git a/node_modules/core-js/modules/_object-sap.js b/node_modules/core-js/modules/_object-sap.js new file mode 100644 index 0000000000000..643535e0a6433 --- /dev/null +++ b/node_modules/core-js/modules/_object-sap.js @@ -0,0 +1,10 @@ +// most Object methods by ES6 should accept primitives +var $export = require('./_export'); +var core = require('./_core'); +var fails = require('./_fails'); +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); +}; diff --git a/node_modules/core-js/modules/_object-to-array.js b/node_modules/core-js/modules/_object-to-array.js new file mode 100644 index 0000000000000..288b5fcc5ba94 --- /dev/null +++ b/node_modules/core-js/modules/_object-to-array.js @@ -0,0 +1,21 @@ +var DESCRIPTORS = require('./_descriptors'); +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +var isEnum = require('./_object-pie').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) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; diff --git a/node_modules/core-js/modules/_own-keys.js b/node_modules/core-js/modules/_own-keys.js new file mode 100644 index 0000000000000..84faece8f44fc --- /dev/null +++ b/node_modules/core-js/modules/_own-keys.js @@ -0,0 +1,10 @@ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn'); +var gOPS = require('./_object-gops'); +var anObject = require('./_an-object'); +var Reflect = require('./_global').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; +}; diff --git a/node_modules/core-js/modules/_parse-float.js b/node_modules/core-js/modules/_parse-float.js new file mode 100644 index 0000000000000..acfb350f934c4 --- /dev/null +++ b/node_modules/core-js/modules/_parse-float.js @@ -0,0 +1,8 @@ +var $parseFloat = require('./_global').parseFloat; +var $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; diff --git a/node_modules/core-js/modules/_parse-int.js b/node_modules/core-js/modules/_parse-int.js new file mode 100644 index 0000000000000..ddd7172a987bb --- /dev/null +++ b/node_modules/core-js/modules/_parse-int.js @@ -0,0 +1,9 @@ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +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; diff --git a/node_modules/core-js/modules/_partial.js b/node_modules/core-js/modules/_partial.js new file mode 100644 index 0000000000000..ca3f35bf844e7 --- /dev/null +++ b/node_modules/core-js/modules/_partial.js @@ -0,0 +1,25 @@ +'use strict'; +var path = require('./_path'); +var invoke = require('./_invoke'); +var aFunction = require('./_a-function'); +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); + }; +}; diff --git a/node_modules/core-js/modules/_path.js b/node_modules/core-js/modules/_path.js new file mode 100644 index 0000000000000..754592ada546f --- /dev/null +++ b/node_modules/core-js/modules/_path.js @@ -0,0 +1 @@ +module.exports = require('./_global'); diff --git a/node_modules/core-js/modules/_perform.js b/node_modules/core-js/modules/_perform.js new file mode 100644 index 0000000000000..bfc7b296da958 --- /dev/null +++ b/node_modules/core-js/modules/_perform.js @@ -0,0 +1,7 @@ +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; diff --git a/node_modules/core-js/modules/_promise-resolve.js b/node_modules/core-js/modules/_promise-resolve.js new file mode 100644 index 0000000000000..c3cac7646da87 --- /dev/null +++ b/node_modules/core-js/modules/_promise-resolve.js @@ -0,0 +1,12 @@ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var newPromiseCapability = require('./_new-promise-capability'); + +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; +}; diff --git a/node_modules/core-js/modules/_property-desc.js b/node_modules/core-js/modules/_property-desc.js new file mode 100644 index 0000000000000..090593405ff93 --- /dev/null +++ b/node_modules/core-js/modules/_property-desc.js @@ -0,0 +1,8 @@ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; diff --git a/node_modules/core-js/modules/_redefine-all.js b/node_modules/core-js/modules/_redefine-all.js new file mode 100644 index 0000000000000..dcf7944f57a49 --- /dev/null +++ b/node_modules/core-js/modules/_redefine-all.js @@ -0,0 +1,5 @@ +var redefine = require('./_redefine'); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; diff --git a/node_modules/core-js/modules/_redefine.js b/node_modules/core-js/modules/_redefine.js new file mode 100644 index 0000000000000..442ea611049b5 --- /dev/null +++ b/node_modules/core-js/modules/_redefine.js @@ -0,0 +1,31 @@ +var global = require('./_global'); +var hide = require('./_hide'); +var has = require('./_has'); +var SRC = require('./_uid')('src'); +var $toString = require('./_function-to-string'); +var TO_STRING = 'toString'; +var TPL = ('' + $toString).split(TO_STRING); + +require('./_core').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); +}); diff --git a/node_modules/core-js/modules/_regexp-exec-abstract.js b/node_modules/core-js/modules/_regexp-exec-abstract.js new file mode 100644 index 0000000000000..b722aad13d079 --- /dev/null +++ b/node_modules/core-js/modules/_regexp-exec-abstract.js @@ -0,0 +1,21 @@ +'use strict'; + +var classof = require('./_classof'); +var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); +}; diff --git a/node_modules/core-js/modules/_regexp-exec.js b/node_modules/core-js/modules/_regexp-exec.js new file mode 100644 index 0000000000000..f88bfe9928578 --- /dev/null +++ b/node_modules/core-js/modules/_regexp-exec.js @@ -0,0 +1,58 @@ +'use strict'; + +var regexpFlags = require('./_flags'); + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +module.exports = patchedExec; diff --git a/node_modules/core-js/modules/_replacer.js b/node_modules/core-js/modules/_replacer.js new file mode 100644 index 0000000000000..c37703dd2cc51 --- /dev/null +++ b/node_modules/core-js/modules/_replacer.js @@ -0,0 +1,8 @@ +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); + }; +}; diff --git a/node_modules/core-js/modules/_same-value.js b/node_modules/core-js/modules/_same-value.js new file mode 100644 index 0000000000000..c6d045e831b7b --- /dev/null +++ b/node_modules/core-js/modules/_same-value.js @@ -0,0 +1,5 @@ +// 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; +}; diff --git a/node_modules/core-js/modules/_set-collection-from.js b/node_modules/core-js/modules/_set-collection-from.js new file mode 100644 index 0000000000000..d5001f93e9963 --- /dev/null +++ b/node_modules/core-js/modules/_set-collection-from.js @@ -0,0 +1,28 @@ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var ctx = require('./_ctx'); +var forOf = require('./_for-of'); + +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); + } }); +}; diff --git a/node_modules/core-js/modules/_set-collection-of.js b/node_modules/core-js/modules/_set-collection-of.js new file mode 100644 index 0000000000000..f559af3fc27de --- /dev/null +++ b/node_modules/core-js/modules/_set-collection-of.js @@ -0,0 +1,12 @@ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); + +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); + } }); +}; diff --git a/node_modules/core-js/modules/_set-proto.js b/node_modules/core-js/modules/_set-proto.js new file mode 100644 index 0000000000000..c1990622ec9dd --- /dev/null +++ b/node_modules/core-js/modules/_set-proto.js @@ -0,0 +1,25 @@ +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); +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 = require('./_ctx')(Function.call, require('./_object-gopd').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 +}; diff --git a/node_modules/core-js/modules/_set-species.js b/node_modules/core-js/modules/_set-species.js new file mode 100644 index 0000000000000..2d505d2aa623a --- /dev/null +++ b/node_modules/core-js/modules/_set-species.js @@ -0,0 +1,13 @@ +'use strict'; +var global = require('./_global'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; diff --git a/node_modules/core-js/modules/_set-to-string-tag.js b/node_modules/core-js/modules/_set-to-string-tag.js new file mode 100644 index 0000000000000..5bd64144f0dd5 --- /dev/null +++ b/node_modules/core-js/modules/_set-to-string-tag.js @@ -0,0 +1,7 @@ +var def = require('./_object-dp').f; +var has = require('./_has'); +var TAG = require('./_wks')('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; diff --git a/node_modules/core-js/modules/_shared-key.js b/node_modules/core-js/modules/_shared-key.js new file mode 100644 index 0000000000000..d47fe7a281282 --- /dev/null +++ b/node_modules/core-js/modules/_shared-key.js @@ -0,0 +1,5 @@ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; diff --git a/node_modules/core-js/modules/_shared.js b/node_modules/core-js/modules/_shared.js new file mode 100644 index 0000000000000..49bc187777f8d --- /dev/null +++ b/node_modules/core-js/modules/_shared.js @@ -0,0 +1,12 @@ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2020 Denis Pushkarev (zloirock.ru)' +}); diff --git a/node_modules/core-js/modules/_species-constructor.js b/node_modules/core-js/modules/_species-constructor.js new file mode 100644 index 0000000000000..0cb4ffb8fc8f8 --- /dev/null +++ b/node_modules/core-js/modules/_species-constructor.js @@ -0,0 +1,9 @@ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var SPECIES = require('./_wks')('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; diff --git a/node_modules/core-js/modules/_strict-method.js b/node_modules/core-js/modules/_strict-method.js new file mode 100644 index 0000000000000..e68f41bb62c8f --- /dev/null +++ b/node_modules/core-js/modules/_strict-method.js @@ -0,0 +1,9 @@ +'use strict'; +var fails = require('./_fails'); + +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); + }); +}; diff --git a/node_modules/core-js/modules/_string-at.js b/node_modules/core-js/modules/_string-at.js new file mode 100644 index 0000000000000..88d66bd18eb28 --- /dev/null +++ b/node_modules/core-js/modules/_string-at.js @@ -0,0 +1,17 @@ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// 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; + }; +}; diff --git a/node_modules/core-js/modules/_string-context.js b/node_modules/core-js/modules/_string-context.js new file mode 100644 index 0000000000000..becf3fbebea98 --- /dev/null +++ b/node_modules/core-js/modules/_string-context.js @@ -0,0 +1,8 @@ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp'); +var defined = require('./_defined'); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; diff --git a/node_modules/core-js/modules/_string-html.js b/node_modules/core-js/modules/_string-html.js new file mode 100644 index 0000000000000..1dcc95bcd6594 --- /dev/null +++ b/node_modules/core-js/modules/_string-html.js @@ -0,0 +1,19 @@ +var $export = require('./_export'); +var fails = require('./_fails'); +var defined = require('./_defined'); +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); +}; diff --git a/node_modules/core-js/modules/_string-pad.js b/node_modules/core-js/modules/_string-pad.js new file mode 100644 index 0000000000000..ceb6077f055c4 --- /dev/null +++ b/node_modules/core-js/modules/_string-pad.js @@ -0,0 +1,16 @@ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length'); +var repeat = require('./_string-repeat'); +var defined = require('./_defined'); + +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; +}; diff --git a/node_modules/core-js/modules/_string-repeat.js b/node_modules/core-js/modules/_string-repeat.js new file mode 100644 index 0000000000000..a69b9626b7d90 --- /dev/null +++ b/node_modules/core-js/modules/_string-repeat.js @@ -0,0 +1,12 @@ +'use strict'; +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); + +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; +}; diff --git a/node_modules/core-js/modules/_string-trim.js b/node_modules/core-js/modules/_string-trim.js new file mode 100644 index 0000000000000..6b54a81a848cf --- /dev/null +++ b/node_modules/core-js/modules/_string-trim.js @@ -0,0 +1,30 @@ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +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; diff --git a/node_modules/core-js/modules/_string-ws.js b/node_modules/core-js/modules/_string-ws.js new file mode 100644 index 0000000000000..2c68cf9f4bae6 --- /dev/null +++ b/node_modules/core-js/modules/_string-ws.js @@ -0,0 +1,2 @@ +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'; diff --git a/node_modules/core-js/modules/_task.js b/node_modules/core-js/modules/_task.js new file mode 100644 index 0000000000000..8777a6e28baf9 --- /dev/null +++ b/node_modules/core-js/modules/_task.js @@ -0,0 +1,84 @@ +var ctx = require('./_ctx'); +var invoke = require('./_invoke'); +var html = require('./_html'); +var cel = require('./_dom-create'); +var global = require('./_global'); +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 (require('./_cof')(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 +}; diff --git a/node_modules/core-js/modules/_to-absolute-index.js b/node_modules/core-js/modules/_to-absolute-index.js new file mode 100644 index 0000000000000..dfee02e8e25cf --- /dev/null +++ b/node_modules/core-js/modules/_to-absolute-index.js @@ -0,0 +1,7 @@ +var toInteger = require('./_to-integer'); +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); +}; diff --git a/node_modules/core-js/modules/_to-index.js b/node_modules/core-js/modules/_to-index.js new file mode 100644 index 0000000000000..8f51c32d26fc6 --- /dev/null +++ b/node_modules/core-js/modules/_to-index.js @@ -0,0 +1,10 @@ +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +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; +}; diff --git a/node_modules/core-js/modules/_to-integer.js b/node_modules/core-js/modules/_to-integer.js new file mode 100644 index 0000000000000..3d50f97dd80ac --- /dev/null +++ b/node_modules/core-js/modules/_to-integer.js @@ -0,0 +1,6 @@ +// 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); +}; diff --git a/node_modules/core-js/modules/_to-iobject.js b/node_modules/core-js/modules/_to-iobject.js new file mode 100644 index 0000000000000..7614503a2e7bb --- /dev/null +++ b/node_modules/core-js/modules/_to-iobject.js @@ -0,0 +1,6 @@ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; diff --git a/node_modules/core-js/modules/_to-length.js b/node_modules/core-js/modules/_to-length.js new file mode 100644 index 0000000000000..a9db501735573 --- /dev/null +++ b/node_modules/core-js/modules/_to-length.js @@ -0,0 +1,6 @@ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; diff --git a/node_modules/core-js/modules/_to-object.js b/node_modules/core-js/modules/_to-object.js new file mode 100644 index 0000000000000..0efea4c69656d --- /dev/null +++ b/node_modules/core-js/modules/_to-object.js @@ -0,0 +1,5 @@ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; diff --git a/node_modules/core-js/modules/_to-primitive.js b/node_modules/core-js/modules/_to-primitive.js new file mode 100644 index 0000000000000..de3dd6b19d117 --- /dev/null +++ b/node_modules/core-js/modules/_to-primitive.js @@ -0,0 +1,12 @@ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = require('./_is-object'); +// 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"); +}; diff --git a/node_modules/core-js/modules/_typed-array.js b/node_modules/core-js/modules/_typed-array.js new file mode 100644 index 0000000000000..30d9c0ba5544c --- /dev/null +++ b/node_modules/core-js/modules/_typed-array.js @@ -0,0 +1,480 @@ +'use strict'; +if (require('./_descriptors')) { + var LIBRARY = require('./_library'); + var global = require('./_global'); + var fails = require('./_fails'); + var $export = require('./_export'); + var $typed = require('./_typed'); + var $buffer = require('./_typed-buffer'); + var ctx = require('./_ctx'); + var anInstance = require('./_an-instance'); + var propertyDesc = require('./_property-desc'); + var hide = require('./_hide'); + var redefineAll = require('./_redefine-all'); + var toInteger = require('./_to-integer'); + var toLength = require('./_to-length'); + var toIndex = require('./_to-index'); + var toAbsoluteIndex = require('./_to-absolute-index'); + var toPrimitive = require('./_to-primitive'); + var has = require('./_has'); + var classof = require('./_classof'); + var isObject = require('./_is-object'); + var toObject = require('./_to-object'); + var isArrayIter = require('./_is-array-iter'); + var create = require('./_object-create'); + var getPrototypeOf = require('./_object-gpo'); + var gOPN = require('./_object-gopn').f; + var getIterFn = require('./core.get-iterator-method'); + var uid = require('./_uid'); + var wks = require('./_wks'); + var createArrayMethod = require('./_array-methods'); + var createArrayIncludes = require('./_array-includes'); + var speciesConstructor = require('./_species-constructor'); + var ArrayIterators = require('./es6.array.iterator'); + var Iterators = require('./_iterators'); + var $iterDetect = require('./_iter-detect'); + var setSpecies = require('./_set-species'); + var arrayFill = require('./_array-fill'); + var arrayCopyWithin = require('./_array-copy-within'); + var $DP = require('./_object-dp'); + var $GOPD = require('./_object-gopd'); + 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 */ }; diff --git a/node_modules/core-js/modules/_typed-buffer.js b/node_modules/core-js/modules/_typed-buffer.js new file mode 100644 index 0000000000000..c24cef38c2e64 --- /dev/null +++ b/node_modules/core-js/modules/_typed-buffer.js @@ -0,0 +1,276 @@ +'use strict'; +var global = require('./_global'); +var DESCRIPTORS = require('./_descriptors'); +var LIBRARY = require('./_library'); +var $typed = require('./_typed'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var fails = require('./_fails'); +var anInstance = require('./_an-instance'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var toIndex = require('./_to-index'); +var gOPN = require('./_object-gopn').f; +var dP = require('./_object-dp').f; +var arrayFill = require('./_array-fill'); +var setToStringTag = require('./_set-to-string-tag'); +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; diff --git a/node_modules/core-js/modules/_typed.js b/node_modules/core-js/modules/_typed.js new file mode 100644 index 0000000000000..8747ffd71b32b --- /dev/null +++ b/node_modules/core-js/modules/_typed.js @@ -0,0 +1,28 @@ +var global = require('./_global'); +var hide = require('./_hide'); +var uid = require('./_uid'); +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 +}; diff --git a/node_modules/core-js/modules/_uid.js b/node_modules/core-js/modules/_uid.js new file mode 100644 index 0000000000000..ffbe7185fcc78 --- /dev/null +++ b/node_modules/core-js/modules/_uid.js @@ -0,0 +1,5 @@ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; diff --git a/node_modules/core-js/modules/_user-agent.js b/node_modules/core-js/modules/_user-agent.js new file mode 100644 index 0000000000000..363fedc25b71d --- /dev/null +++ b/node_modules/core-js/modules/_user-agent.js @@ -0,0 +1,4 @@ +var global = require('./_global'); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; diff --git a/node_modules/core-js/modules/_validate-collection.js b/node_modules/core-js/modules/_validate-collection.js new file mode 100644 index 0000000000000..cec1ceff722f1 --- /dev/null +++ b/node_modules/core-js/modules/_validate-collection.js @@ -0,0 +1,5 @@ +var isObject = require('./_is-object'); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; diff --git a/node_modules/core-js/modules/_wks-define.js b/node_modules/core-js/modules/_wks-define.js new file mode 100644 index 0000000000000..7284d6adaf520 --- /dev/null +++ b/node_modules/core-js/modules/_wks-define.js @@ -0,0 +1,9 @@ +var global = require('./_global'); +var core = require('./_core'); +var LIBRARY = require('./_library'); +var wksExt = require('./_wks-ext'); +var defineProperty = require('./_object-dp').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) }); +}; diff --git a/node_modules/core-js/modules/_wks-ext.js b/node_modules/core-js/modules/_wks-ext.js new file mode 100644 index 0000000000000..13bd83b16a114 --- /dev/null +++ b/node_modules/core-js/modules/_wks-ext.js @@ -0,0 +1 @@ +exports.f = require('./_wks'); diff --git a/node_modules/core-js/modules/_wks.js b/node_modules/core-js/modules/_wks.js new file mode 100644 index 0000000000000..e33f857a69507 --- /dev/null +++ b/node_modules/core-js/modules/_wks.js @@ -0,0 +1,11 @@ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').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; diff --git a/node_modules/core-js/modules/core.delay.js b/node_modules/core-js/modules/core.delay.js new file mode 100644 index 0000000000000..73712c0126395 --- /dev/null +++ b/node_modules/core-js/modules/core.delay.js @@ -0,0 +1,12 @@ +var global = require('./_global'); +var core = require('./_core'); +var $export = require('./_export'); +var partial = require('./_partial'); +// 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); + }); + } +}); diff --git a/node_modules/core-js/modules/core.dict.js b/node_modules/core-js/modules/core.dict.js new file mode 100644 index 0000000000000..5422ad30d8aaf --- /dev/null +++ b/node_modules/core-js/modules/core.dict.js @@ -0,0 +1,157 @@ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var assign = require('./_object-assign'); +var create = require('./_object-create'); +var getPrototypeOf = require('./_object-gpo'); +var getKeys = require('./_object-keys'); +var dP = require('./_object-dp'); +var keyOf = require('./_keyof'); +var aFunction = require('./_a-function'); +var forOf = require('./_for-of'); +var isIterable = require('./core.is-iterable'); +var $iterCreate = require('./_iter-create'); +var step = require('./_iter-step'); +var isObject = require('./_is-object'); +var toIObject = require('./_to-iobject'); +var DESCRIPTORS = require('./_descriptors'); +var has = require('./_has'); + +// 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 +}); diff --git a/node_modules/core-js/modules/core.function.part.js b/node_modules/core-js/modules/core.function.part.js new file mode 100644 index 0000000000000..050154f858d98 --- /dev/null +++ b/node_modules/core-js/modules/core.function.part.js @@ -0,0 +1,7 @@ +var path = require('./_path'); +var $export = require('./_export'); + +// Placeholder +require('./_core')._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: require('./_partial') }); diff --git a/node_modules/core-js/modules/core.get-iterator-method.js b/node_modules/core-js/modules/core.get-iterator-method.js new file mode 100644 index 0000000000000..9b6fa62a56e31 --- /dev/null +++ b/node_modules/core-js/modules/core.get-iterator-method.js @@ -0,0 +1,8 @@ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; diff --git a/node_modules/core-js/modules/core.get-iterator.js b/node_modules/core-js/modules/core.get-iterator.js new file mode 100644 index 0000000000000..04568c86c8bed --- /dev/null +++ b/node_modules/core-js/modules/core.get-iterator.js @@ -0,0 +1,7 @@ +var anObject = require('./_an-object'); +var get = require('./core.get-iterator-method'); +module.exports = require('./_core').getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; diff --git a/node_modules/core-js/modules/core.is-iterable.js b/node_modules/core-js/modules/core.is-iterable.js new file mode 100644 index 0000000000000..388e5e35b0885 --- /dev/null +++ b/node_modules/core-js/modules/core.is-iterable.js @@ -0,0 +1,10 @@ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').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)); +}; diff --git a/node_modules/core-js/modules/core.number.iterator.js b/node_modules/core-js/modules/core.number.iterator.js new file mode 100644 index 0000000000000..fa37791eb1d20 --- /dev/null +++ b/node_modules/core-js/modules/core.number.iterator.js @@ -0,0 +1,9 @@ +'use strict'; +require('./_iter-define')(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 }; +}); diff --git a/node_modules/core-js/modules/core.object.classof.js b/node_modules/core-js/modules/core.object.classof.js new file mode 100644 index 0000000000000..fe16595a53e12 --- /dev/null +++ b/node_modules/core-js/modules/core.object.classof.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { classof: require('./_classof') }); diff --git a/node_modules/core-js/modules/core.object.define.js b/node_modules/core-js/modules/core.object.define.js new file mode 100644 index 0000000000000..e4e717b58668d --- /dev/null +++ b/node_modules/core-js/modules/core.object.define.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var define = require('./_object-define'); + +$export($export.S + $export.F, 'Object', { define: define }); diff --git a/node_modules/core-js/modules/core.object.is-object.js b/node_modules/core-js/modules/core.object.is-object.js new file mode 100644 index 0000000000000..fea80b6067fbc --- /dev/null +++ b/node_modules/core-js/modules/core.object.is-object.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { isObject: require('./_is-object') }); diff --git a/node_modules/core-js/modules/core.object.make.js b/node_modules/core-js/modules/core.object.make.js new file mode 100644 index 0000000000000..51d47740a5ad4 --- /dev/null +++ b/node_modules/core-js/modules/core.object.make.js @@ -0,0 +1,9 @@ +var $export = require('./_export'); +var define = require('./_object-define'); +var create = require('./_object-create'); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); diff --git a/node_modules/core-js/modules/core.regexp.escape.js b/node_modules/core-js/modules/core.regexp.escape.js new file mode 100644 index 0000000000000..3ddd748c0abac --- /dev/null +++ b/node_modules/core-js/modules/core.regexp.escape.js @@ -0,0 +1,5 @@ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export'); +var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); diff --git a/node_modules/core-js/modules/core.string.escape-html.js b/node_modules/core-js/modules/core.string.escape-html.js new file mode 100644 index 0000000000000..f96788614fbb5 --- /dev/null +++ b/node_modules/core-js/modules/core.string.escape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); diff --git a/node_modules/core-js/modules/core.string.unescape-html.js b/node_modules/core-js/modules/core.string.unescape-html.js new file mode 100644 index 0000000000000..eb8a6cfbf74c4 --- /dev/null +++ b/node_modules/core-js/modules/core.string.unescape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } }); diff --git a/node_modules/core-js/modules/es5.js b/node_modules/core-js/modules/es5.js new file mode 100644 index 0000000000000..ca10612d14cd9 --- /dev/null +++ b/node_modules/core-js/modules/es5.js @@ -0,0 +1,35 @@ +// This file still here for a legacy code and will be removed in a near time +require('./es6.object.create'); +require('./es6.object.define-property'); +require('./es6.object.define-properties'); +require('./es6.object.get-own-property-descriptor'); +require('./es6.object.get-prototype-of'); +require('./es6.object.keys'); +require('./es6.object.get-own-property-names'); +require('./es6.object.freeze'); +require('./es6.object.seal'); +require('./es6.object.prevent-extensions'); +require('./es6.object.is-frozen'); +require('./es6.object.is-sealed'); +require('./es6.object.is-extensible'); +require('./es6.function.bind'); +require('./es6.array.is-array'); +require('./es6.array.join'); +require('./es6.array.slice'); +require('./es6.array.sort'); +require('./es6.array.for-each'); +require('./es6.array.map'); +require('./es6.array.filter'); +require('./es6.array.some'); +require('./es6.array.every'); +require('./es6.array.reduce'); +require('./es6.array.reduce-right'); +require('./es6.array.index-of'); +require('./es6.array.last-index-of'); +require('./es6.date.now'); +require('./es6.date.to-iso-string'); +require('./es6.date.to-json'); +require('./es6.parse-int'); +require('./es6.parse-float'); +require('./es6.string.trim'); +require('./es6.regexp.to-string'); diff --git a/node_modules/core-js/modules/es6.array.copy-within.js b/node_modules/core-js/modules/es6.array.copy-within.js new file mode 100644 index 0000000000000..f866a959120bf --- /dev/null +++ b/node_modules/core-js/modules/es6.array.copy-within.js @@ -0,0 +1,6 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { copyWithin: require('./_array-copy-within') }); + +require('./_add-to-unscopables')('copyWithin'); diff --git a/node_modules/core-js/modules/es6.array.every.js b/node_modules/core-js/modules/es6.array.every.js new file mode 100644 index 0000000000000..cfd448f5c5e84 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.every.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $every = require('./_array-methods')(4); + +$export($export.P + $export.F * !require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.fill.js b/node_modules/core-js/modules/es6.array.fill.js new file mode 100644 index 0000000000000..ac17144249bd8 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.fill.js @@ -0,0 +1,6 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { fill: require('./_array-fill') }); + +require('./_add-to-unscopables')('fill'); diff --git a/node_modules/core-js/modules/es6.array.filter.js b/node_modules/core-js/modules/es6.array.filter.js new file mode 100644 index 0000000000000..447ecf4036a2e --- /dev/null +++ b/node_modules/core-js/modules/es6.array.filter.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $filter = require('./_array-methods')(2); + +$export($export.P + $export.F * !require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.find-index.js b/node_modules/core-js/modules/es6.array.find-index.js new file mode 100644 index 0000000000000..374cadd77d318 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.find-index.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(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); + } +}); +require('./_add-to-unscopables')(KEY); diff --git a/node_modules/core-js/modules/es6.array.find.js b/node_modules/core-js/modules/es6.array.find.js new file mode 100644 index 0000000000000..4fbe76ce00a36 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.find.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(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); + } +}); +require('./_add-to-unscopables')(KEY); diff --git a/node_modules/core-js/modules/es6.array.for-each.js b/node_modules/core-js/modules/es6.array.for-each.js new file mode 100644 index 0000000000000..525ba0740d358 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.for-each.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $forEach = require('./_array-methods')(0); +var STRICT = require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.from.js b/node_modules/core-js/modules/es6.array.from.js new file mode 100644 index 0000000000000..4db38017f4654 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.from.js @@ -0,0 +1,37 @@ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var toObject = require('./_to-object'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var toLength = require('./_to-length'); +var createProperty = require('./_create-property'); +var getIterFn = require('./core.get-iterator-method'); + +$export($export.S + $export.F * !require('./_iter-detect')(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; + } +}); diff --git a/node_modules/core-js/modules/es6.array.index-of.js b/node_modules/core-js/modules/es6.array.index-of.js new file mode 100644 index 0000000000000..231c92e9c5728 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.index-of.js @@ -0,0 +1,15 @@ +'use strict'; +var $export = require('./_export'); +var $indexOf = require('./_array-includes')(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($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]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.is-array.js b/node_modules/core-js/modules/es6.array.is-array.js new file mode 100644 index 0000000000000..27ca6fc5bbb56 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.is-array.js @@ -0,0 +1,4 @@ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = require('./_export'); + +$export($export.S, 'Array', { isArray: require('./_is-array') }); diff --git a/node_modules/core-js/modules/es6.array.iterator.js b/node_modules/core-js/modules/es6.array.iterator.js new file mode 100644 index 0000000000000..c64e88b1b2e79 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.iterator.js @@ -0,0 +1,34 @@ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var toIObject = require('./_to-iobject'); + +// 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 = require('./_iter-define')(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'); diff --git a/node_modules/core-js/modules/es6.array.join.js b/node_modules/core-js/modules/es6.array.join.js new file mode 100644 index 0000000000000..48e55d2e3c98e --- /dev/null +++ b/node_modules/core-js/modules/es6.array.join.js @@ -0,0 +1,12 @@ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); diff --git a/node_modules/core-js/modules/es6.array.last-index-of.js b/node_modules/core-js/modules/es6.array.last-index-of.js new file mode 100644 index 0000000000000..1f70e340d83d2 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.last-index-of.js @@ -0,0 +1,22 @@ +'use strict'; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($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; + } +}); diff --git a/node_modules/core-js/modules/es6.array.map.js b/node_modules/core-js/modules/es6.array.map.js new file mode 100644 index 0000000000000..1326033f1fb13 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.map.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $map = require('./_array-methods')(1); + +$export($export.P + $export.F * !require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.of.js b/node_modules/core-js/modules/es6.array.of.js new file mode 100644 index 0000000000000..b83e058c16a8d --- /dev/null +++ b/node_modules/core-js/modules/es6.array.of.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export'); +var createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(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; + } +}); diff --git a/node_modules/core-js/modules/es6.array.reduce-right.js b/node_modules/core-js/modules/es6.array.reduce-right.js new file mode 100644 index 0000000000000..168e421d88a8b --- /dev/null +++ b/node_modules/core-js/modules/es6.array.reduce-right.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].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); + } +}); diff --git a/node_modules/core-js/modules/es6.array.reduce.js b/node_modules/core-js/modules/es6.array.reduce.js new file mode 100644 index 0000000000000..f4e4761212c12 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.reduce.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].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); + } +}); diff --git a/node_modules/core-js/modules/es6.array.slice.js b/node_modules/core-js/modules/es6.array.slice.js new file mode 100644 index 0000000000000..bdd496ecbb2d2 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.slice.js @@ -0,0 +1,28 @@ +'use strict'; +var $export = require('./_export'); +var html = require('./_html'); +var cof = require('./_cof'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * require('./_fails')(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; + } +}); diff --git a/node_modules/core-js/modules/es6.array.some.js b/node_modules/core-js/modules/es6.array.some.js new file mode 100644 index 0000000000000..14c5eec268e23 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.some.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $some = require('./_array-methods')(3); + +$export($export.P + $export.F * !require('./_strict-method')([].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]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.sort.js b/node_modules/core-js/modules/es6.array.sort.js new file mode 100644 index 0000000000000..39817ffae80fb --- /dev/null +++ b/node_modules/core-js/modules/es6.array.sort.js @@ -0,0 +1,23 @@ +'use strict'; +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var fails = require('./_fails'); +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 +}) || !require('./_strict-method')($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)); + } +}); diff --git a/node_modules/core-js/modules/es6.array.species.js b/node_modules/core-js/modules/es6.array.species.js new file mode 100644 index 0000000000000..ce0b8917f7ade --- /dev/null +++ b/node_modules/core-js/modules/es6.array.species.js @@ -0,0 +1 @@ +require('./_set-species')('Array'); diff --git a/node_modules/core-js/modules/es6.date.now.js b/node_modules/core-js/modules/es6.date.now.js new file mode 100644 index 0000000000000..65f134e562be8 --- /dev/null +++ b/node_modules/core-js/modules/es6.date.now.js @@ -0,0 +1,4 @@ +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = require('./_export'); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); diff --git a/node_modules/core-js/modules/es6.date.to-iso-string.js b/node_modules/core-js/modules/es6.date.to-iso-string.js new file mode 100644 index 0000000000000..13b27818cc9eb --- /dev/null +++ b/node_modules/core-js/modules/es6.date.to-iso-string.js @@ -0,0 +1,8 @@ +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export'); +var toISOString = require('./_date-to-iso-string'); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); diff --git a/node_modules/core-js/modules/es6.date.to-json.js b/node_modules/core-js/modules/es6.date.to-json.js new file mode 100644 index 0000000000000..1508e0428e34d --- /dev/null +++ b/node_modules/core-js/modules/es6.date.to-json.js @@ -0,0 +1,16 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); + +$export($export.P + $export.F * require('./_fails')(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(); + } +}); diff --git a/node_modules/core-js/modules/es6.date.to-primitive.js b/node_modules/core-js/modules/es6.date.to-primitive.js new file mode 100644 index 0000000000000..41754b9c225b6 --- /dev/null +++ b/node_modules/core-js/modules/es6.date.to-primitive.js @@ -0,0 +1,4 @@ +var TO_PRIMITIVE = require('./_wks')('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); diff --git a/node_modules/core-js/modules/es6.date.to-string.js b/node_modules/core-js/modules/es6.date.to-string.js new file mode 100644 index 0000000000000..15ee75ac1e1b8 --- /dev/null +++ b/node_modules/core-js/modules/es6.date.to-string.js @@ -0,0 +1,12 @@ +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) { + require('./_redefine')(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; + }); +} diff --git a/node_modules/core-js/modules/es6.function.bind.js b/node_modules/core-js/modules/es6.function.bind.js new file mode 100644 index 0000000000000..38e84e1acdee4 --- /dev/null +++ b/node_modules/core-js/modules/es6.function.bind.js @@ -0,0 +1,4 @@ +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = require('./_export'); + +$export($export.P, 'Function', { bind: require('./_bind') }); diff --git a/node_modules/core-js/modules/es6.function.has-instance.js b/node_modules/core-js/modules/es6.function.has-instance.js new file mode 100644 index 0000000000000..7556ed9bd3052 --- /dev/null +++ b/node_modules/core-js/modules/es6.function.has-instance.js @@ -0,0 +1,13 @@ +'use strict'; +var isObject = require('./_is-object'); +var getPrototypeOf = require('./_object-gpo'); +var HAS_INSTANCE = require('./_wks')('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').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; +} }); diff --git a/node_modules/core-js/modules/es6.function.name.js b/node_modules/core-js/modules/es6.function.name.js new file mode 100644 index 0000000000000..05dd333f810f9 --- /dev/null +++ b/node_modules/core-js/modules/es6.function.name.js @@ -0,0 +1,16 @@ +var dP = require('./_object-dp').f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); diff --git a/node_modules/core-js/modules/es6.map.js b/node_modules/core-js/modules/es6.map.js new file mode 100644 index 0000000000000..a282f0222c74c --- /dev/null +++ b/node_modules/core-js/modules/es6.map.js @@ -0,0 +1,19 @@ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = require('./_collection')(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); diff --git a/node_modules/core-js/modules/es6.math.acosh.js b/node_modules/core-js/modules/es6.math.acosh.js new file mode 100644 index 0000000000000..8a8989ebb30b1 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.acosh.js @@ -0,0 +1,18 @@ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export'); +var log1p = require('./_math-log1p'); +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)); + } +}); diff --git a/node_modules/core-js/modules/es6.math.asinh.js b/node_modules/core-js/modules/es6.math.asinh.js new file mode 100644 index 0000000000000..ddf466628c541 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.asinh.js @@ -0,0 +1,10 @@ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export'); +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 }); diff --git a/node_modules/core-js/modules/es6.math.atanh.js b/node_modules/core-js/modules/es6.math.atanh.js new file mode 100644 index 0000000000000..af3c3e809211e --- /dev/null +++ b/node_modules/core-js/modules/es6.math.atanh.js @@ -0,0 +1,10 @@ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export'); +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; + } +}); diff --git a/node_modules/core-js/modules/es6.math.cbrt.js b/node_modules/core-js/modules/es6.math.cbrt.js new file mode 100644 index 0000000000000..e45ac4445f645 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.cbrt.js @@ -0,0 +1,9 @@ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export'); +var sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); diff --git a/node_modules/core-js/modules/es6.math.clz32.js b/node_modules/core-js/modules/es6.math.clz32.js new file mode 100644 index 0000000000000..1e4d7e19c59c6 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.clz32.js @@ -0,0 +1,8 @@ +// 20.2.2.11 Math.clz32(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); diff --git a/node_modules/core-js/modules/es6.math.cosh.js b/node_modules/core-js/modules/es6.math.cosh.js new file mode 100644 index 0000000000000..1e0cffc1a899a --- /dev/null +++ b/node_modules/core-js/modules/es6.math.cosh.js @@ -0,0 +1,9 @@ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export'); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); diff --git a/node_modules/core-js/modules/es6.math.expm1.js b/node_modules/core-js/modules/es6.math.expm1.js new file mode 100644 index 0000000000000..da4c90df89054 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.expm1.js @@ -0,0 +1,5 @@ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export'); +var $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); diff --git a/node_modules/core-js/modules/es6.math.fround.js b/node_modules/core-js/modules/es6.math.fround.js new file mode 100644 index 0000000000000..9c262f2ec75a0 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.fround.js @@ -0,0 +1,4 @@ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { fround: require('./_math-fround') }); diff --git a/node_modules/core-js/modules/es6.math.hypot.js b/node_modules/core-js/modules/es6.math.hypot.js new file mode 100644 index 0000000000000..41ffdb27a28e6 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.hypot.js @@ -0,0 +1,25 @@ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export'); +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); + } +}); diff --git a/node_modules/core-js/modules/es6.math.imul.js b/node_modules/core-js/modules/es6.math.imul.js new file mode 100644 index 0000000000000..96e683d25d43c --- /dev/null +++ b/node_modules/core-js/modules/es6.math.imul.js @@ -0,0 +1,17 @@ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export'); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * require('./_fails')(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); + } +}); diff --git a/node_modules/core-js/modules/es6.math.log10.js b/node_modules/core-js/modules/es6.math.log10.js new file mode 100644 index 0000000000000..9ee8ae68f5898 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.log10.js @@ -0,0 +1,8 @@ +// 20.2.2.21 Math.log10(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); diff --git a/node_modules/core-js/modules/es6.math.log1p.js b/node_modules/core-js/modules/es6.math.log1p.js new file mode 100644 index 0000000000000..62959800ac0be --- /dev/null +++ b/node_modules/core-js/modules/es6.math.log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { log1p: require('./_math-log1p') }); diff --git a/node_modules/core-js/modules/es6.math.log2.js b/node_modules/core-js/modules/es6.math.log2.js new file mode 100644 index 0000000000000..03d127cba7c83 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.log2.js @@ -0,0 +1,8 @@ +// 20.2.2.22 Math.log2(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); diff --git a/node_modules/core-js/modules/es6.math.sign.js b/node_modules/core-js/modules/es6.math.sign.js new file mode 100644 index 0000000000000..981f69e566b83 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.sign.js @@ -0,0 +1,4 @@ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { sign: require('./_math-sign') }); diff --git a/node_modules/core-js/modules/es6.math.sinh.js b/node_modules/core-js/modules/es6.math.sinh.js new file mode 100644 index 0000000000000..57606333c8c6d --- /dev/null +++ b/node_modules/core-js/modules/es6.math.sinh.js @@ -0,0 +1,15 @@ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * require('./_fails')(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); + } +}); diff --git a/node_modules/core-js/modules/es6.math.tanh.js b/node_modules/core-js/modules/es6.math.tanh.js new file mode 100644 index 0000000000000..0d3135b0fa5d9 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.tanh.js @@ -0,0 +1,12 @@ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +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)); + } +}); diff --git a/node_modules/core-js/modules/es6.math.trunc.js b/node_modules/core-js/modules/es6.math.trunc.js new file mode 100644 index 0000000000000..35ddb8086feca --- /dev/null +++ b/node_modules/core-js/modules/es6.math.trunc.js @@ -0,0 +1,8 @@ +// 20.2.2.34 Math.trunc(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); diff --git a/node_modules/core-js/modules/es6.number.constructor.js b/node_modules/core-js/modules/es6.number.constructor.js new file mode 100644 index 0000000000000..aee40e9ac487e --- /dev/null +++ b/node_modules/core-js/modules/es6.number.constructor.js @@ -0,0 +1,69 @@ +'use strict'; +var global = require('./_global'); +var has = require('./_has'); +var cof = require('./_cof'); +var inheritIfRequired = require('./_inherit-if-required'); +var toPrimitive = require('./_to-primitive'); +var fails = require('./_fails'); +var gOPN = require('./_object-gopn').f; +var gOPD = require('./_object-gopd').f; +var dP = require('./_object-dp').f; +var $trim = require('./_string-trim').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(require('./_object-create')(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 = require('./_descriptors') ? 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; + require('./_redefine')(global, NUMBER, $Number); +} diff --git a/node_modules/core-js/modules/es6.number.epsilon.js b/node_modules/core-js/modules/es6.number.epsilon.js new file mode 100644 index 0000000000000..34a2ec5fa78d6 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.epsilon.js @@ -0,0 +1,4 @@ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); diff --git a/node_modules/core-js/modules/es6.number.is-finite.js b/node_modules/core-js/modules/es6.number.is-finite.js new file mode 100644 index 0000000000000..8719da97168aa --- /dev/null +++ b/node_modules/core-js/modules/es6.number.is-finite.js @@ -0,0 +1,9 @@ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export'); +var _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); diff --git a/node_modules/core-js/modules/es6.number.is-integer.js b/node_modules/core-js/modules/es6.number.is-integer.js new file mode 100644 index 0000000000000..f1ab5dc4c8911 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.is-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { isInteger: require('./_is-integer') }); diff --git a/node_modules/core-js/modules/es6.number.is-nan.js b/node_modules/core-js/modules/es6.number.is-nan.js new file mode 100644 index 0000000000000..01d76ba28a07d --- /dev/null +++ b/node_modules/core-js/modules/es6.number.is-nan.js @@ -0,0 +1,9 @@ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); diff --git a/node_modules/core-js/modules/es6.number.is-safe-integer.js b/node_modules/core-js/modules/es6.number.is-safe-integer.js new file mode 100644 index 0000000000000..004e7d16f5f24 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.is-safe-integer.js @@ -0,0 +1,10 @@ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export'); +var isInteger = require('./_is-integer'); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); diff --git a/node_modules/core-js/modules/es6.number.max-safe-integer.js b/node_modules/core-js/modules/es6.number.max-safe-integer.js new file mode 100644 index 0000000000000..a4f248f1b11c3 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.max-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); diff --git a/node_modules/core-js/modules/es6.number.min-safe-integer.js b/node_modules/core-js/modules/es6.number.min-safe-integer.js new file mode 100644 index 0000000000000..34df374bce770 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.min-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); diff --git a/node_modules/core-js/modules/es6.number.parse-float.js b/node_modules/core-js/modules/es6.number.parse-float.js new file mode 100644 index 0000000000000..317c431091886 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); diff --git a/node_modules/core-js/modules/es6.number.parse-int.js b/node_modules/core-js/modules/es6.number.parse-int.js new file mode 100644 index 0000000000000..cb48da28d2e8f --- /dev/null +++ b/node_modules/core-js/modules/es6.number.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); diff --git a/node_modules/core-js/modules/es6.number.to-fixed.js b/node_modules/core-js/modules/es6.number.to-fixed.js new file mode 100644 index 0000000000000..2bf78af915963 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.to-fixed.js @@ -0,0 +1,114 @@ +'use strict'; +var $export = require('./_export'); +var toInteger = require('./_to-integer'); +var aNumberValue = require('./_a-number-value'); +var repeat = require('./_string-repeat'); +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' +) || !require('./_fails')(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; + } +}); diff --git a/node_modules/core-js/modules/es6.number.to-precision.js b/node_modules/core-js/modules/es6.number.to-precision.js new file mode 100644 index 0000000000000..0d92527ffbcd6 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.to-precision.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var $fails = require('./_fails'); +var aNumberValue = require('./_a-number-value'); +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); + } +}); diff --git a/node_modules/core-js/modules/es6.object.assign.js b/node_modules/core-js/modules/es6.object.assign.js new file mode 100644 index 0000000000000..d28085a7e4e04 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.assign.js @@ -0,0 +1,4 @@ +// 19.1.3.1 Object.assign(target, source) +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') }); diff --git a/node_modules/core-js/modules/es6.object.create.js b/node_modules/core-js/modules/es6.object.create.js new file mode 100644 index 0000000000000..70627d69cecde --- /dev/null +++ b/node_modules/core-js/modules/es6.object.create.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: require('./_object-create') }); diff --git a/node_modules/core-js/modules/es6.object.define-properties.js b/node_modules/core-js/modules/es6.object.define-properties.js new file mode 100644 index 0000000000000..5ec34214d1146 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.define-properties.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') }); diff --git a/node_modules/core-js/modules/es6.object.define-property.js b/node_modules/core-js/modules/es6.object.define-property.js new file mode 100644 index 0000000000000..1206858256002 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.define-property.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f }); diff --git a/node_modules/core-js/modules/es6.object.freeze.js b/node_modules/core-js/modules/es6.object.freeze.js new file mode 100644 index 0000000000000..0856ce9d7976c --- /dev/null +++ b/node_modules/core-js/modules/es6.object.freeze.js @@ -0,0 +1,9 @@ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js b/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js new file mode 100644 index 0000000000000..9df214172fba7 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js @@ -0,0 +1,9 @@ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject'); +var $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); diff --git a/node_modules/core-js/modules/es6.object.get-own-property-names.js b/node_modules/core-js/modules/es6.object.get-own-property-names.js new file mode 100644 index 0000000000000..172f51c730f7b --- /dev/null +++ b/node_modules/core-js/modules/es6.object.get-own-property-names.js @@ -0,0 +1,4 @@ +// 19.1.2.7 Object.getOwnPropertyNames(O) +require('./_object-sap')('getOwnPropertyNames', function () { + return require('./_object-gopn-ext').f; +}); diff --git a/node_modules/core-js/modules/es6.object.get-prototype-of.js b/node_modules/core-js/modules/es6.object.get-prototype-of.js new file mode 100644 index 0000000000000..8fe2728c0f1f9 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.get-prototype-of.js @@ -0,0 +1,9 @@ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object'); +var $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); diff --git a/node_modules/core-js/modules/es6.object.is-extensible.js b/node_modules/core-js/modules/es6.object.is-extensible.js new file mode 100644 index 0000000000000..5cd4575a517b6 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.is-extensible.js @@ -0,0 +1,8 @@ +// 19.1.2.11 Object.isExtensible(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.is-frozen.js b/node_modules/core-js/modules/es6.object.is-frozen.js new file mode 100644 index 0000000000000..0ceeabbb0175f --- /dev/null +++ b/node_modules/core-js/modules/es6.object.is-frozen.js @@ -0,0 +1,8 @@ +// 19.1.2.12 Object.isFrozen(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.is-sealed.js b/node_modules/core-js/modules/es6.object.is-sealed.js new file mode 100644 index 0000000000000..7fa8ddedd542f --- /dev/null +++ b/node_modules/core-js/modules/es6.object.is-sealed.js @@ -0,0 +1,8 @@ +// 19.1.2.13 Object.isSealed(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.is.js b/node_modules/core-js/modules/es6.object.is.js new file mode 100644 index 0000000000000..204d7030f9229 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.is.js @@ -0,0 +1,3 @@ +// 19.1.3.10 Object.is(value1, value2) +var $export = require('./_export'); +$export($export.S, 'Object', { is: require('./_same-value') }); diff --git a/node_modules/core-js/modules/es6.object.keys.js b/node_modules/core-js/modules/es6.object.keys.js new file mode 100644 index 0000000000000..e9dade7de3af7 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.keys.js @@ -0,0 +1,9 @@ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object'); +var $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); diff --git a/node_modules/core-js/modules/es6.object.prevent-extensions.js b/node_modules/core-js/modules/es6.object.prevent-extensions.js new file mode 100644 index 0000000000000..2f729181f44ec --- /dev/null +++ b/node_modules/core-js/modules/es6.object.prevent-extensions.js @@ -0,0 +1,9 @@ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.seal.js b/node_modules/core-js/modules/es6.object.seal.js new file mode 100644 index 0000000000000..12c3f6a3ad888 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.seal.js @@ -0,0 +1,9 @@ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.set-prototype-of.js b/node_modules/core-js/modules/es6.object.set-prototype-of.js new file mode 100644 index 0000000000000..461dbd2ed69b1 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.set-prototype-of.js @@ -0,0 +1,3 @@ +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = require('./_export'); +$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set }); diff --git a/node_modules/core-js/modules/es6.object.to-string.js b/node_modules/core-js/modules/es6.object.to-string.js new file mode 100644 index 0000000000000..1c7b85feb9f41 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.to-string.js @@ -0,0 +1,10 @@ +'use strict'; +// 19.1.3.6 Object.prototype.toString() +var classof = require('./_classof'); +var test = {}; +test[require('./_wks')('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + require('./_redefine')(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} diff --git a/node_modules/core-js/modules/es6.parse-float.js b/node_modules/core-js/modules/es6.parse-float.js new file mode 100644 index 0000000000000..cbf50ead51bf6 --- /dev/null +++ b/node_modules/core-js/modules/es6.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); diff --git a/node_modules/core-js/modules/es6.parse-int.js b/node_modules/core-js/modules/es6.parse-int.js new file mode 100644 index 0000000000000..7ea358e847547 --- /dev/null +++ b/node_modules/core-js/modules/es6.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); diff --git a/node_modules/core-js/modules/es6.promise.js b/node_modules/core-js/modules/es6.promise.js new file mode 100644 index 0000000000000..b0ff3bfcf50a8 --- /dev/null +++ b/node_modules/core-js/modules/es6.promise.js @@ -0,0 +1,286 @@ +'use strict'; +var LIBRARY = require('./_library'); +var global = require('./_global'); +var ctx = require('./_ctx'); +var classof = require('./_classof'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var aFunction = require('./_a-function'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var speciesConstructor = require('./_species-constructor'); +var task = require('./_task').set; +var microtask = require('./_microtask')(); +var newPromiseCapabilityModule = require('./_new-promise-capability'); +var perform = require('./_perform'); +var userAgent = require('./_user-agent'); +var promiseResolve = require('./_promise-resolve'); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +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 = {})[require('./_wks')('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 + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } 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, exited; + 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); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + 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) { + if (domain && !exited) domain.exit(); + 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 = require('./_redefine-all')($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 }); +require('./_set-to-string-tag')($Promise, PROMISE); +require('./_set-species')(PROMISE); +Wrapper = require('./_core')[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 && require('./_iter-detect')(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; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.apply.js b/node_modules/core-js/modules/es6.reflect.apply.js new file mode 100644 index 0000000000000..3b9c03a917264 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.apply.js @@ -0,0 +1,16 @@ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var rApply = (require('./_global').Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(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); + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.construct.js b/node_modules/core-js/modules/es6.reflect.construct.js new file mode 100644 index 0000000000000..380addb57bad1 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.construct.js @@ -0,0 +1,47 @@ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export'); +var create = require('./_object-create'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var bind = require('./_bind'); +var rConstruct = (require('./_global').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; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.define-property.js b/node_modules/core-js/modules/es6.reflect.define-property.js new file mode 100644 index 0000000000000..be7fbde6bd9da --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.define-property.js @@ -0,0 +1,23 @@ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp'); +var $export = require('./_export'); +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(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; + } + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.delete-property.js b/node_modules/core-js/modules/es6.reflect.delete-property.js new file mode 100644 index 0000000000000..0902b38a9b6c5 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.delete-property.js @@ -0,0 +1,11 @@ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export'); +var gOPD = require('./_object-gopd').f; +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.enumerate.js b/node_modules/core-js/modules/es6.reflect.enumerate.js new file mode 100644 index 0000000000000..9e7c76a34f347 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.enumerate.js @@ -0,0 +1,26 @@ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +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); +}; +require('./_iter-create')(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); + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js b/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js new file mode 100644 index 0000000000000..e1299f906f986 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js @@ -0,0 +1,10 @@ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd'); +var $export = require('./_export'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.get-prototype-of.js b/node_modules/core-js/modules/es6.reflect.get-prototype-of.js new file mode 100644 index 0000000000000..28351d410fca0 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.get-prototype-of.js @@ -0,0 +1,10 @@ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export'); +var getProto = require('./_object-gpo'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.get.js b/node_modules/core-js/modules/es6.reflect.get.js new file mode 100644 index 0000000000000..a7ee766673ae1 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.get.js @@ -0,0 +1,21 @@ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); + +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 }); diff --git a/node_modules/core-js/modules/es6.reflect.has.js b/node_modules/core-js/modules/es6.reflect.has.js new file mode 100644 index 0000000000000..4f5efa99294b3 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.has.js @@ -0,0 +1,8 @@ +// 26.1.9 Reflect.has(target, propertyKey) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.is-extensible.js b/node_modules/core-js/modules/es6.reflect.is-extensible.js new file mode 100644 index 0000000000000..700f938ac7788 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.is-extensible.js @@ -0,0 +1,11 @@ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.own-keys.js b/node_modules/core-js/modules/es6.reflect.own-keys.js new file mode 100644 index 0000000000000..9f2424ae8dae1 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.own-keys.js @@ -0,0 +1,4 @@ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); diff --git a/node_modules/core-js/modules/es6.reflect.prevent-extensions.js b/node_modules/core-js/modules/es6.reflect.prevent-extensions.js new file mode 100644 index 0000000000000..e1037fa19480a --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.prevent-extensions.js @@ -0,0 +1,16 @@ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +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; + } + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.set-prototype-of.js b/node_modules/core-js/modules/es6.reflect.set-prototype-of.js new file mode 100644 index 0000000000000..5dae90122b565 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.set-prototype-of.js @@ -0,0 +1,15 @@ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export'); +var setProto = require('./_set-proto'); + +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; + } + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.set.js b/node_modules/core-js/modules/es6.reflect.set.js new file mode 100644 index 0000000000000..d809d7a4ef4ee --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.set.js @@ -0,0 +1,33 @@ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); + +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; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); diff --git a/node_modules/core-js/modules/es6.regexp.constructor.js b/node_modules/core-js/modules/es6.regexp.constructor.js new file mode 100644 index 0000000000000..76247c32f2312 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.constructor.js @@ -0,0 +1,43 @@ +var global = require('./_global'); +var inheritIfRequired = require('./_inherit-if-required'); +var dP = require('./_object-dp').f; +var gOPN = require('./_object-gopn').f; +var isRegExp = require('./_is-regexp'); +var $flags = require('./_flags'); +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 (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () { + re2[require('./_wks')('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; + require('./_redefine')(global, 'RegExp', $RegExp); +} + +require('./_set-species')('RegExp'); diff --git a/node_modules/core-js/modules/es6.regexp.exec.js b/node_modules/core-js/modules/es6.regexp.exec.js new file mode 100644 index 0000000000000..a19f1eee67e1f --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.exec.js @@ -0,0 +1,9 @@ +'use strict'; +var regexpExec = require('./_regexp-exec'); +require('./_export')({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); diff --git a/node_modules/core-js/modules/es6.regexp.flags.js b/node_modules/core-js/modules/es6.regexp.flags.js new file mode 100644 index 0000000000000..47008680b0517 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.flags.js @@ -0,0 +1,5 @@ +// 21.2.5.3 get RegExp.prototype.flags() +if (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', { + configurable: true, + get: require('./_flags') +}); diff --git a/node_modules/core-js/modules/es6.regexp.match.js b/node_modules/core-js/modules/es6.regexp.match.js new file mode 100644 index 0000000000000..6ac294eb58910 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.match.js @@ -0,0 +1,40 @@ +'use strict'; + +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var advanceStringIndex = require('./_advance-string-index'); +var regExpExec = require('./_regexp-exec-abstract'); + +// @@match logic +require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); diff --git a/node_modules/core-js/modules/es6.regexp.replace.js b/node_modules/core-js/modules/es6.regexp.replace.js new file mode 100644 index 0000000000000..abd0f9c847dd3 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.replace.js @@ -0,0 +1,118 @@ +'use strict'; + +var anObject = require('./_an-object'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var advanceStringIndex = require('./_advance-string-index'); +var regExpExec = require('./_regexp-exec-abstract'); +var max = Math.max; +var min = Math.min; +var floor = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + 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); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } +}); diff --git a/node_modules/core-js/modules/es6.regexp.search.js b/node_modules/core-js/modules/es6.regexp.search.js new file mode 100644 index 0000000000000..ecb53bb35ca42 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.search.js @@ -0,0 +1,31 @@ +'use strict'; + +var anObject = require('./_an-object'); +var sameValue = require('./_same-value'); +var regExpExec = require('./_regexp-exec-abstract'); + +// @@search logic +require('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; +}); diff --git a/node_modules/core-js/modules/es6.regexp.split.js b/node_modules/core-js/modules/es6.regexp.split.js new file mode 100644 index 0000000000000..45f81ce4d2b1d --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.split.js @@ -0,0 +1,134 @@ +'use strict'; + +var isRegExp = require('./_is-regexp'); +var anObject = require('./_an-object'); +var speciesConstructor = require('./_species-constructor'); +var advanceStringIndex = require('./_advance-string-index'); +var toLength = require('./_to-length'); +var callRegExpExec = require('./_regexp-exec-abstract'); +var regexpExec = require('./_regexp-exec'); +var fails = require('./_fails'); +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = 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 ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + 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]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}); diff --git a/node_modules/core-js/modules/es6.regexp.to-string.js b/node_modules/core-js/modules/es6.regexp.to-string.js new file mode 100644 index 0000000000000..33d6e6fe30a5d --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.to-string.js @@ -0,0 +1,25 @@ +'use strict'; +require('./es6.regexp.flags'); +var anObject = require('./_an-object'); +var $flags = require('./_flags'); +var DESCRIPTORS = require('./_descriptors'); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + require('./_redefine')(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (require('./_fails')(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); + }); +} diff --git a/node_modules/core-js/modules/es6.set.js b/node_modules/core-js/modules/es6.set.js new file mode 100644 index 0000000000000..55b8bdd89b66b --- /dev/null +++ b/node_modules/core-js/modules/es6.set.js @@ -0,0 +1,14 @@ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = require('./_collection')(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); diff --git a/node_modules/core-js/modules/es6.string.anchor.js b/node_modules/core-js/modules/es6.string.anchor.js new file mode 100644 index 0000000000000..3493e54c023ee --- /dev/null +++ b/node_modules/core-js/modules/es6.string.anchor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.2 String.prototype.anchor(name) +require('./_string-html')('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.big.js b/node_modules/core-js/modules/es6.string.big.js new file mode 100644 index 0000000000000..38aab3414a584 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.big.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.3 String.prototype.big() +require('./_string-html')('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.blink.js b/node_modules/core-js/modules/es6.string.blink.js new file mode 100644 index 0000000000000..6188d96e32587 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.blink.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.4 String.prototype.blink() +require('./_string-html')('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.bold.js b/node_modules/core-js/modules/es6.string.bold.js new file mode 100644 index 0000000000000..ff3ecb9cb7e85 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.bold.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.5 String.prototype.bold() +require('./_string-html')('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.code-point-at.js b/node_modules/core-js/modules/es6.string.code-point-at.js new file mode 100644 index 0000000000000..e39b8c5eaa200 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.code-point-at.js @@ -0,0 +1,9 @@ +'use strict'; +var $export = require('./_export'); +var $at = require('./_string-at')(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); diff --git a/node_modules/core-js/modules/es6.string.ends-with.js b/node_modules/core-js/modules/es6.string.ends-with.js new file mode 100644 index 0000000000000..06568888407a5 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.ends-with.js @@ -0,0 +1,20 @@ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(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; + } +}); diff --git a/node_modules/core-js/modules/es6.string.fixed.js b/node_modules/core-js/modules/es6.string.fixed.js new file mode 100644 index 0000000000000..d4a60f37d701d --- /dev/null +++ b/node_modules/core-js/modules/es6.string.fixed.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.6 String.prototype.fixed() +require('./_string-html')('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.fontcolor.js b/node_modules/core-js/modules/es6.string.fontcolor.js new file mode 100644 index 0000000000000..f7b95957ccb0b --- /dev/null +++ b/node_modules/core-js/modules/es6.string.fontcolor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.7 String.prototype.fontcolor(color) +require('./_string-html')('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.fontsize.js b/node_modules/core-js/modules/es6.string.fontsize.js new file mode 100644 index 0000000000000..f4cc20aec27b5 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.fontsize.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.8 String.prototype.fontsize(size) +require('./_string-html')('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.from-code-point.js b/node_modules/core-js/modules/es6.string.from-code-point.js new file mode 100644 index 0000000000000..bece66e292df4 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.from-code-point.js @@ -0,0 +1,23 @@ +var $export = require('./_export'); +var toAbsoluteIndex = require('./_to-absolute-index'); +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(''); + } +}); diff --git a/node_modules/core-js/modules/es6.string.includes.js b/node_modules/core-js/modules/es6.string.includes.js new file mode 100644 index 0000000000000..28d17416b53ce --- /dev/null +++ b/node_modules/core-js/modules/es6.string.includes.js @@ -0,0 +1,12 @@ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export'); +var context = require('./_string-context'); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); diff --git a/node_modules/core-js/modules/es6.string.italics.js b/node_modules/core-js/modules/es6.string.italics.js new file mode 100644 index 0000000000000..ed4cc3bf0f50a --- /dev/null +++ b/node_modules/core-js/modules/es6.string.italics.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.9 String.prototype.italics() +require('./_string-html')('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.iterator.js b/node_modules/core-js/modules/es6.string.iterator.js new file mode 100644 index 0000000000000..5d84c7fde4d45 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.iterator.js @@ -0,0 +1,17 @@ +'use strict'; +var $at = require('./_string-at')(true); + +// 21.1.3.27 String.prototype[@@iterator]() +require('./_iter-define')(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 }; +}); diff --git a/node_modules/core-js/modules/es6.string.link.js b/node_modules/core-js/modules/es6.string.link.js new file mode 100644 index 0000000000000..d0255edd68ab2 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.link.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.10 String.prototype.link(url) +require('./_string-html')('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.raw.js b/node_modules/core-js/modules/es6.string.raw.js new file mode 100644 index 0000000000000..aa40ff6fae01d --- /dev/null +++ b/node_modules/core-js/modules/es6.string.raw.js @@ -0,0 +1,18 @@ +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); + +$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(''); + } +}); diff --git a/node_modules/core-js/modules/es6.string.repeat.js b/node_modules/core-js/modules/es6.string.repeat.js new file mode 100644 index 0000000000000..08412d91be6d1 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.repeat.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: require('./_string-repeat') +}); diff --git a/node_modules/core-js/modules/es6.string.small.js b/node_modules/core-js/modules/es6.string.small.js new file mode 100644 index 0000000000000..941e4a767780e --- /dev/null +++ b/node_modules/core-js/modules/es6.string.small.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.11 String.prototype.small() +require('./_string-html')('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.starts-with.js b/node_modules/core-js/modules/es6.string.starts-with.js new file mode 100644 index 0000000000000..c1723767de5f8 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.starts-with.js @@ -0,0 +1,18 @@ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(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; + } +}); diff --git a/node_modules/core-js/modules/es6.string.strike.js b/node_modules/core-js/modules/es6.string.strike.js new file mode 100644 index 0000000000000..66055bc00a19a --- /dev/null +++ b/node_modules/core-js/modules/es6.string.strike.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.12 String.prototype.strike() +require('./_string-html')('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.sub.js b/node_modules/core-js/modules/es6.string.sub.js new file mode 100644 index 0000000000000..e295a27b056ac --- /dev/null +++ b/node_modules/core-js/modules/es6.string.sub.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.13 String.prototype.sub() +require('./_string-html')('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.sup.js b/node_modules/core-js/modules/es6.string.sup.js new file mode 100644 index 0000000000000..125a989a79abb --- /dev/null +++ b/node_modules/core-js/modules/es6.string.sup.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.14 String.prototype.sup() +require('./_string-html')('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.trim.js b/node_modules/core-js/modules/es6.string.trim.js new file mode 100644 index 0000000000000..02b8a6c695a9f --- /dev/null +++ b/node_modules/core-js/modules/es6.string.trim.js @@ -0,0 +1,7 @@ +'use strict'; +// 21.1.3.25 String.prototype.trim() +require('./_string-trim')('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); diff --git a/node_modules/core-js/modules/es6.symbol.js b/node_modules/core-js/modules/es6.symbol.js new file mode 100644 index 0000000000000..52dbbc81f0f57 --- /dev/null +++ b/node_modules/core-js/modules/es6.symbol.js @@ -0,0 +1,246 @@ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global'); +var has = require('./_has'); +var DESCRIPTORS = require('./_descriptors'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var META = require('./_meta').KEY; +var $fails = require('./_fails'); +var shared = require('./_shared'); +var setToStringTag = require('./_set-to-string-tag'); +var uid = require('./_uid'); +var wks = require('./_wks'); +var wksExt = require('./_wks-ext'); +var wksDefine = require('./_wks-define'); +var enumKeys = require('./_enum-keys'); +var isArray = require('./_is-array'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var toObject = require('./_to-object'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var createDesc = require('./_property-desc'); +var _create = require('./_object-create'); +var gOPNExt = require('./_object-gopn-ext'); +var $GOPD = require('./_object-gopd'); +var $GOPS = require('./_object-gops'); +var $DP = require('./_object-dp'); +var $keys = require('./_object-keys'); +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' && !!$GOPS.f; +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; + require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; + require('./_object-pie').f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !require('./_library')) { + 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 +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 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] || require('./_hide')($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); diff --git a/node_modules/core-js/modules/es6.typed.array-buffer.js b/node_modules/core-js/modules/es6.typed.array-buffer.js new file mode 100644 index 0000000000000..b2473709c1ceb --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.array-buffer.js @@ -0,0 +1,46 @@ +'use strict'; +var $export = require('./_export'); +var $typed = require('./_typed'); +var buffer = require('./_typed-buffer'); +var anObject = require('./_an-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var isObject = require('./_is-object'); +var ArrayBuffer = require('./_global').ArrayBuffer; +var speciesConstructor = require('./_species-constructor'); +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 * require('./_fails')(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 fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); diff --git a/node_modules/core-js/modules/es6.typed.data-view.js b/node_modules/core-js/modules/es6.typed.data-view.js new file mode 100644 index 0000000000000..d0e23536b68fd --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.data-view.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); diff --git a/node_modules/core-js/modules/es6.typed.float32-array.js b/node_modules/core-js/modules/es6.typed.float32-array.js new file mode 100644 index 0000000000000..f49700617c682 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.float32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.float64-array.js b/node_modules/core-js/modules/es6.typed.float64-array.js new file mode 100644 index 0000000000000..85dedcd597dc9 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.float64-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.int16-array.js b/node_modules/core-js/modules/es6.typed.int16-array.js new file mode 100644 index 0000000000000..b20ed0413e007 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.int16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.int32-array.js b/node_modules/core-js/modules/es6.typed.int32-array.js new file mode 100644 index 0000000000000..c7e6ae06ff37e --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.int32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.int8-array.js b/node_modules/core-js/modules/es6.typed.int8-array.js new file mode 100644 index 0000000000000..58ab9f36e24c3 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.int8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.uint16-array.js b/node_modules/core-js/modules/es6.typed.uint16-array.js new file mode 100644 index 0000000000000..992805d6311e9 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.uint16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.uint32-array.js b/node_modules/core-js/modules/es6.typed.uint32-array.js new file mode 100644 index 0000000000000..5c444246aee2f --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.uint32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.uint8-array.js b/node_modules/core-js/modules/es6.typed.uint8-array.js new file mode 100644 index 0000000000000..465cdc806a52d --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.uint8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js b/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js new file mode 100644 index 0000000000000..a84a1c1ac2163 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); diff --git a/node_modules/core-js/modules/es6.weak-map.js b/node_modules/core-js/modules/es6.weak-map.js new file mode 100644 index 0000000000000..356052147e96e --- /dev/null +++ b/node_modules/core-js/modules/es6.weak-map.js @@ -0,0 +1,60 @@ +'use strict'; +var global = require('./_global'); +var each = require('./_array-methods')(0); +var redefine = require('./_redefine'); +var meta = require('./_meta'); +var assign = require('./_object-assign'); +var weak = require('./_collection-weak'); +var isObject = require('./_is-object'); +var validate = require('./_validate-collection'); +var NATIVE_WEAK_MAP = require('./_validate-collection'); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +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 = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + 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); + }); + }); +} diff --git a/node_modules/core-js/modules/es6.weak-set.js b/node_modules/core-js/modules/es6.weak-set.js new file mode 100644 index 0000000000000..18a81e5243208 --- /dev/null +++ b/node_modules/core-js/modules/es6.weak-set.js @@ -0,0 +1,14 @@ +'use strict'; +var weak = require('./_collection-weak'); +var validate = require('./_validate-collection'); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +require('./_collection')(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); diff --git a/node_modules/core-js/modules/es7.array.flat-map.js b/node_modules/core-js/modules/es7.array.flat-map.js new file mode 100644 index 0000000000000..2a210cd355855 --- /dev/null +++ b/node_modules/core-js/modules/es7.array.flat-map.js @@ -0,0 +1,22 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var aFunction = require('./_a-function'); +var arraySpeciesCreate = require('./_array-species-create'); + +$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; + } +}); + +require('./_add-to-unscopables')('flatMap'); diff --git a/node_modules/core-js/modules/es7.array.flatten.js b/node_modules/core-js/modules/es7.array.flatten.js new file mode 100644 index 0000000000000..9019b2d1c0af4 --- /dev/null +++ b/node_modules/core-js/modules/es7.array.flatten.js @@ -0,0 +1,21 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var arraySpeciesCreate = require('./_array-species-create'); + +$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; + } +}); + +require('./_add-to-unscopables')('flatten'); diff --git a/node_modules/core-js/modules/es7.array.includes.js b/node_modules/core-js/modules/es7.array.includes.js new file mode 100644 index 0000000000000..1b77f0eb867ab --- /dev/null +++ b/node_modules/core-js/modules/es7.array.includes.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export'); +var $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); diff --git a/node_modules/core-js/modules/es7.asap.js b/node_modules/core-js/modules/es7.asap.js new file mode 100644 index 0000000000000..d36f7c7608796 --- /dev/null +++ b/node_modules/core-js/modules/es7.asap.js @@ -0,0 +1,12 @@ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export'); +var microtask = require('./_microtask')(); +var process = require('./_global').process; +var isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); diff --git a/node_modules/core-js/modules/es7.error.is-error.js b/node_modules/core-js/modules/es7.error.is-error.js new file mode 100644 index 0000000000000..ba94f5d13740a --- /dev/null +++ b/node_modules/core-js/modules/es7.error.is-error.js @@ -0,0 +1,9 @@ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export'); +var cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); diff --git a/node_modules/core-js/modules/es7.global.js b/node_modules/core-js/modules/es7.global.js new file mode 100644 index 0000000000000..a315fd4300254 --- /dev/null +++ b/node_modules/core-js/modules/es7.global.js @@ -0,0 +1,4 @@ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.G, { global: require('./_global') }); diff --git a/node_modules/core-js/modules/es7.map.from.js b/node_modules/core-js/modules/es7.map.from.js new file mode 100644 index 0000000000000..a60573704e6b7 --- /dev/null +++ b/node_modules/core-js/modules/es7.map.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +require('./_set-collection-from')('Map'); diff --git a/node_modules/core-js/modules/es7.map.of.js b/node_modules/core-js/modules/es7.map.of.js new file mode 100644 index 0000000000000..a2bf1fef70707 --- /dev/null +++ b/node_modules/core-js/modules/es7.map.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +require('./_set-collection-of')('Map'); diff --git a/node_modules/core-js/modules/es7.map.to-json.js b/node_modules/core-js/modules/es7.map.to-json.js new file mode 100644 index 0000000000000..95a3569fa423a --- /dev/null +++ b/node_modules/core-js/modules/es7.map.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Map', { toJSON: require('./_collection-to-json')('Map') }); diff --git a/node_modules/core-js/modules/es7.math.clamp.js b/node_modules/core-js/modules/es7.math.clamp.js new file mode 100644 index 0000000000000..319cda60997cd --- /dev/null +++ b/node_modules/core-js/modules/es7.math.clamp.js @@ -0,0 +1,8 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); diff --git a/node_modules/core-js/modules/es7.math.deg-per-rad.js b/node_modules/core-js/modules/es7.math.deg-per-rad.js new file mode 100644 index 0000000000000..99b95bba9f2c7 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.deg-per-rad.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); diff --git a/node_modules/core-js/modules/es7.math.degrees.js b/node_modules/core-js/modules/es7.math.degrees.js new file mode 100644 index 0000000000000..6637d915eabbc --- /dev/null +++ b/node_modules/core-js/modules/es7.math.degrees.js @@ -0,0 +1,9 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); diff --git a/node_modules/core-js/modules/es7.math.fscale.js b/node_modules/core-js/modules/es7.math.fscale.js new file mode 100644 index 0000000000000..ad660a05888cb --- /dev/null +++ b/node_modules/core-js/modules/es7.math.fscale.js @@ -0,0 +1,10 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var scale = require('./_math-scale'); +var fround = require('./_math-fround'); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); diff --git a/node_modules/core-js/modules/es7.math.iaddh.js b/node_modules/core-js/modules/es7.math.iaddh.js new file mode 100644 index 0000000000000..a331ba9b26fa0 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.iaddh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$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; + } +}); diff --git a/node_modules/core-js/modules/es7.math.imulh.js b/node_modules/core-js/modules/es7.math.imulh.js new file mode 100644 index 0000000000000..58d19f3ac33b4 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.imulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$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); + } +}); diff --git a/node_modules/core-js/modules/es7.math.isubh.js b/node_modules/core-js/modules/es7.math.isubh.js new file mode 100644 index 0000000000000..de22793c1bfdb --- /dev/null +++ b/node_modules/core-js/modules/es7.math.isubh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$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; + } +}); diff --git a/node_modules/core-js/modules/es7.math.rad-per-deg.js b/node_modules/core-js/modules/es7.math.rad-per-deg.js new file mode 100644 index 0000000000000..6f702596a9ab2 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.rad-per-deg.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); diff --git a/node_modules/core-js/modules/es7.math.radians.js b/node_modules/core-js/modules/es7.math.radians.js new file mode 100644 index 0000000000000..abd9575fee3f7 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.radians.js @@ -0,0 +1,9 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); diff --git a/node_modules/core-js/modules/es7.math.scale.js b/node_modules/core-js/modules/es7.math.scale.js new file mode 100644 index 0000000000000..2866dcd7ce9f6 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.scale.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { scale: require('./_math-scale') }); diff --git a/node_modules/core-js/modules/es7.math.signbit.js b/node_modules/core-js/modules/es7.math.signbit.js new file mode 100644 index 0000000000000..c2568048633b3 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.signbit.js @@ -0,0 +1,7 @@ +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = require('./_export'); + +$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; +} }); diff --git a/node_modules/core-js/modules/es7.math.umulh.js b/node_modules/core-js/modules/es7.math.umulh.js new file mode 100644 index 0000000000000..3ddfa4685be35 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.umulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$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); + } +}); diff --git a/node_modules/core-js/modules/es7.object.define-getter.js b/node_modules/core-js/modules/es7.object.define-getter.js new file mode 100644 index 0000000000000..ffc6203fd1d49 --- /dev/null +++ b/node_modules/core-js/modules/es7.object.define-getter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); diff --git a/node_modules/core-js/modules/es7.object.define-setter.js b/node_modules/core-js/modules/es7.object.define-setter.js new file mode 100644 index 0000000000000..8ceefdd68e308 --- /dev/null +++ b/node_modules/core-js/modules/es7.object.define-setter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); diff --git a/node_modules/core-js/modules/es7.object.entries.js b/node_modules/core-js/modules/es7.object.entries.js new file mode 100644 index 0000000000000..2f83437c8c464 --- /dev/null +++ b/node_modules/core-js/modules/es7.object.entries.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); diff --git a/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js b/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js new file mode 100644 index 0000000000000..b1ab72fde5ccb --- /dev/null +++ b/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js @@ -0,0 +1,22 @@ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); +var gOPD = require('./_object-gopd'); +var createProperty = require('./_create-property'); + +$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; + } +}); diff --git a/node_modules/core-js/modules/es7.object.lookup-getter.js b/node_modules/core-js/modules/es7.object.lookup-getter.js new file mode 100644 index 0000000000000..f802229164468 --- /dev/null +++ b/node_modules/core-js/modules/es7.object.lookup-getter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), '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)); + } +}); diff --git a/node_modules/core-js/modules/es7.object.lookup-setter.js b/node_modules/core-js/modules/es7.object.lookup-setter.js new file mode 100644 index 0000000000000..8bf8b64eab9dc --- /dev/null +++ b/node_modules/core-js/modules/es7.object.lookup-setter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), '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)); + } +}); diff --git a/node_modules/core-js/modules/es7.object.values.js b/node_modules/core-js/modules/es7.object.values.js new file mode 100644 index 0000000000000..d6f095275933a --- /dev/null +++ b/node_modules/core-js/modules/es7.object.values.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); diff --git a/node_modules/core-js/modules/es7.observable.js b/node_modules/core-js/modules/es7.observable.js new file mode 100644 index 0000000000000..6dcb2c8f2afa2 --- /dev/null +++ b/node_modules/core-js/modules/es7.observable.js @@ -0,0 +1,199 @@ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export'); +var global = require('./_global'); +var core = require('./_core'); +var microtask = require('./_microtask')(); +var OBSERVABLE = require('./_wks')('observable'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var anInstance = require('./_an-instance'); +var redefineAll = require('./_redefine-all'); +var hide = require('./_hide'); +var forOf = require('./_for-of'); +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 }); + +require('./_set-species')('Observable'); diff --git a/node_modules/core-js/modules/es7.promise.finally.js b/node_modules/core-js/modules/es7.promise.finally.js new file mode 100644 index 0000000000000..fa04b63998f19 --- /dev/null +++ b/node_modules/core-js/modules/es7.promise.finally.js @@ -0,0 +1,20 @@ +// https://github.com/tc39/proposal-promise-finally +'use strict'; +var $export = require('./_export'); +var core = require('./_core'); +var global = require('./_global'); +var speciesConstructor = require('./_species-constructor'); +var promiseResolve = require('./_promise-resolve'); + +$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 + ); +} }); diff --git a/node_modules/core-js/modules/es7.promise.try.js b/node_modules/core-js/modules/es7.promise.try.js new file mode 100644 index 0000000000000..e8163720b67cc --- /dev/null +++ b/node_modules/core-js/modules/es7.promise.try.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/proposal-promise-try +var $export = require('./_export'); +var newPromiseCapability = require('./_new-promise-capability'); +var perform = require('./_perform'); + +$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; +} }); diff --git a/node_modules/core-js/modules/es7.reflect.define-metadata.js b/node_modules/core-js/modules/es7.reflect.define-metadata.js new file mode 100644 index 0000000000000..ebef52c24dfe7 --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.define-metadata.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.delete-metadata.js b/node_modules/core-js/modules/es7.reflect.delete-metadata.js new file mode 100644 index 0000000000000..590ed53ce349a --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.delete-metadata.js @@ -0,0 +1,15 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +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); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js b/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js new file mode 100644 index 0000000000000..f344172b5c00f --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js @@ -0,0 +1,19 @@ +var Set = require('./es6.set'); +var from = require('./_array-from-iterable'); +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +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])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.get-metadata.js b/node_modules/core-js/modules/es7.reflect.get-metadata.js new file mode 100644 index 0000000000000..58c278e98ed96 --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.get-metadata.js @@ -0,0 +1,17 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +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])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js b/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js new file mode 100644 index 0000000000000..03e3201bbea9c --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +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])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.get-own-metadata.js b/node_modules/core-js/modules/es7.reflect.get-own-metadata.js new file mode 100644 index 0000000000000..4a18b07176a67 --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.get-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +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])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.has-metadata.js b/node_modules/core-js/modules/es7.reflect.has-metadata.js new file mode 100644 index 0000000000000..b934bb4ecb784 --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.has-metadata.js @@ -0,0 +1,16 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +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])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.has-own-metadata.js b/node_modules/core-js/modules/es7.reflect.has-own-metadata.js new file mode 100644 index 0000000000000..512850dd8fe3a --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.has-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +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])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.metadata.js b/node_modules/core-js/modules/es7.reflect.metadata.js new file mode 100644 index 0000000000000..efb9a9e26610c --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.metadata.js @@ -0,0 +1,15 @@ +var $metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +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) + ); + }; +} }); diff --git a/node_modules/core-js/modules/es7.set.from.js b/node_modules/core-js/modules/es7.set.from.js new file mode 100644 index 0000000000000..26542b6644f5b --- /dev/null +++ b/node_modules/core-js/modules/es7.set.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +require('./_set-collection-from')('Set'); diff --git a/node_modules/core-js/modules/es7.set.of.js b/node_modules/core-js/modules/es7.set.of.js new file mode 100644 index 0000000000000..2a50ad911a8d2 --- /dev/null +++ b/node_modules/core-js/modules/es7.set.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +require('./_set-collection-of')('Set'); diff --git a/node_modules/core-js/modules/es7.set.to-json.js b/node_modules/core-js/modules/es7.set.to-json.js new file mode 100644 index 0000000000000..95cbcfa51b54d --- /dev/null +++ b/node_modules/core-js/modules/es7.set.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') }); diff --git a/node_modules/core-js/modules/es7.string.at.js b/node_modules/core-js/modules/es7.string.at.js new file mode 100644 index 0000000000000..1c52db66ddd90 --- /dev/null +++ b/node_modules/core-js/modules/es7.string.at.js @@ -0,0 +1,15 @@ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export'); +var $at = require('./_string-at')(true); +var $fails = require('./_fails'); + +var FORCED = $fails(function () { + return '𠮷'.at(0) !== '𠮷'; +}); + +$export($export.P + $export.F * FORCED, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); diff --git a/node_modules/core-js/modules/es7.string.match-all.js b/node_modules/core-js/modules/es7.string.match-all.js new file mode 100644 index 0000000000000..78237036e8f90 --- /dev/null +++ b/node_modules/core-js/modules/es7.string.match-all.js @@ -0,0 +1,30 @@ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export'); +var defined = require('./_defined'); +var toLength = require('./_to-length'); +var isRegExp = require('./_is-regexp'); +var getFlags = require('./_flags'); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($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); + } +}); diff --git a/node_modules/core-js/modules/es7.string.pad-end.js b/node_modules/core-js/modules/es7.string.pad-end.js new file mode 100644 index 0000000000000..5a531a1c8c711 --- /dev/null +++ b/node_modules/core-js/modules/es7.string.pad-end.js @@ -0,0 +1,14 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); diff --git a/node_modules/core-js/modules/es7.string.pad-start.js b/node_modules/core-js/modules/es7.string.pad-start.js new file mode 100644 index 0000000000000..729ed933ef8d3 --- /dev/null +++ b/node_modules/core-js/modules/es7.string.pad-start.js @@ -0,0 +1,14 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); diff --git a/node_modules/core-js/modules/es7.string.trim-left.js b/node_modules/core-js/modules/es7.string.trim-left.js new file mode 100644 index 0000000000000..39a4b47cfa7d6 --- /dev/null +++ b/node_modules/core-js/modules/es7.string.trim-left.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); diff --git a/node_modules/core-js/modules/es7.string.trim-right.js b/node_modules/core-js/modules/es7.string.trim-right.js new file mode 100644 index 0000000000000..7b7c4529880af --- /dev/null +++ b/node_modules/core-js/modules/es7.string.trim-right.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); diff --git a/node_modules/core-js/modules/es7.symbol.async-iterator.js b/node_modules/core-js/modules/es7.symbol.async-iterator.js new file mode 100644 index 0000000000000..f56dc2a8eb760 --- /dev/null +++ b/node_modules/core-js/modules/es7.symbol.async-iterator.js @@ -0,0 +1 @@ +require('./_wks-define')('asyncIterator'); diff --git a/node_modules/core-js/modules/es7.symbol.observable.js b/node_modules/core-js/modules/es7.symbol.observable.js new file mode 100644 index 0000000000000..fc9a23761a49f --- /dev/null +++ b/node_modules/core-js/modules/es7.symbol.observable.js @@ -0,0 +1 @@ +require('./_wks-define')('observable'); diff --git a/node_modules/core-js/modules/es7.system.global.js b/node_modules/core-js/modules/es7.system.global.js new file mode 100644 index 0000000000000..310a802ada397 --- /dev/null +++ b/node_modules/core-js/modules/es7.system.global.js @@ -0,0 +1,4 @@ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', { global: require('./_global') }); diff --git a/node_modules/core-js/modules/es7.weak-map.from.js b/node_modules/core-js/modules/es7.weak-map.from.js new file mode 100644 index 0000000000000..1a01365761356 --- /dev/null +++ b/node_modules/core-js/modules/es7.weak-map.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +require('./_set-collection-from')('WeakMap'); diff --git a/node_modules/core-js/modules/es7.weak-map.of.js b/node_modules/core-js/modules/es7.weak-map.of.js new file mode 100644 index 0000000000000..52c3f66dfce37 --- /dev/null +++ b/node_modules/core-js/modules/es7.weak-map.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +require('./_set-collection-of')('WeakMap'); diff --git a/node_modules/core-js/modules/es7.weak-set.from.js b/node_modules/core-js/modules/es7.weak-set.from.js new file mode 100644 index 0000000000000..493e5bee0322c --- /dev/null +++ b/node_modules/core-js/modules/es7.weak-set.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +require('./_set-collection-from')('WeakSet'); diff --git a/node_modules/core-js/modules/es7.weak-set.of.js b/node_modules/core-js/modules/es7.weak-set.of.js new file mode 100644 index 0000000000000..5941e72aab9ee --- /dev/null +++ b/node_modules/core-js/modules/es7.weak-set.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +require('./_set-collection-of')('WeakSet'); diff --git a/node_modules/core-js/modules/library/_add-to-unscopables.js b/node_modules/core-js/modules/library/_add-to-unscopables.js new file mode 100644 index 0000000000000..02ef44ba4ce8a --- /dev/null +++ b/node_modules/core-js/modules/library/_add-to-unscopables.js @@ -0,0 +1 @@ +module.exports = function () { /* empty */ }; diff --git a/node_modules/core-js/modules/library/_collection.js b/node_modules/core-js/modules/library/_collection.js new file mode 100644 index 0000000000000..31a36b87a4569 --- /dev/null +++ b/node_modules/core-js/modules/library/_collection.js @@ -0,0 +1,59 @@ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var meta = require('./_meta'); +var fails = require('./_fails'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var setToStringTag = require('./_set-to-string-tag'); +var dP = require('./_object-dp').f; +var each = require('./_array-methods')(0); +var DESCRIPTORS = require('./_descriptors'); + +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 = {}; + if (!DESCRIPTORS || 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 { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; diff --git a/node_modules/core-js/modules/library/_export.js b/node_modules/core-js/modules/library/_export.js new file mode 100644 index 0000000000000..02bddc0aa72d5 --- /dev/null +++ b/node_modules/core-js/modules/library/_export.js @@ -0,0 +1,62 @@ +var global = require('./_global'); +var core = require('./_core'); +var ctx = require('./_ctx'); +var hide = require('./_hide'); +var has = require('./_has'); +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 IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// 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; diff --git a/node_modules/core-js/modules/library/_library.js b/node_modules/core-js/modules/library/_library.js new file mode 100644 index 0000000000000..ec01c2c141667 --- /dev/null +++ b/node_modules/core-js/modules/library/_library.js @@ -0,0 +1 @@ +module.exports = true; diff --git a/node_modules/core-js/modules/library/_path.js b/node_modules/core-js/modules/library/_path.js new file mode 100644 index 0000000000000..2796ebcb9a985 --- /dev/null +++ b/node_modules/core-js/modules/library/_path.js @@ -0,0 +1 @@ +module.exports = require('./_core'); diff --git a/node_modules/core-js/modules/library/_redefine-all.js b/node_modules/core-js/modules/library/_redefine-all.js new file mode 100644 index 0000000000000..bf8c0ea39eb87 --- /dev/null +++ b/node_modules/core-js/modules/library/_redefine-all.js @@ -0,0 +1,7 @@ +var hide = require('./_hide'); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; diff --git a/node_modules/core-js/modules/library/_redefine.js b/node_modules/core-js/modules/library/_redefine.js new file mode 100644 index 0000000000000..fde6108efd5da --- /dev/null +++ b/node_modules/core-js/modules/library/_redefine.js @@ -0,0 +1 @@ +module.exports = require('./_hide'); diff --git a/node_modules/core-js/modules/library/_regexp-exec-abstract.js b/node_modules/core-js/modules/library/_regexp-exec-abstract.js new file mode 100644 index 0000000000000..8b1a393741c96 --- /dev/null +++ b/node_modules/core-js/modules/library/_regexp-exec-abstract.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/modules/library/_regexp-exec.js b/node_modules/core-js/modules/library/_regexp-exec.js new file mode 100644 index 0000000000000..8b1a393741c96 --- /dev/null +++ b/node_modules/core-js/modules/library/_regexp-exec.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/modules/library/_set-species.js b/node_modules/core-js/modules/library/_set-species.js new file mode 100644 index 0000000000000..1f25fde1e3184 --- /dev/null +++ b/node_modules/core-js/modules/library/_set-species.js @@ -0,0 +1,14 @@ +'use strict'; +var global = require('./_global'); +var core = require('./_core'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; diff --git a/node_modules/core-js/modules/library/es6.date.to-json.js b/node_modules/core-js/modules/library/es6.date.to-json.js new file mode 100644 index 0000000000000..69b1f3018e744 --- /dev/null +++ b/node_modules/core-js/modules/library/es6.date.to-json.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var toISOString = require('./_date-to-iso-string'); +var classof = require('./_classof'); + +$export($export.P + $export.F * require('./_fails')(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 : + (!('toISOString' in O) && classof(O) == 'Date') ? toISOString.call(O) : O.toISOString(); + } +}); diff --git a/node_modules/core-js/modules/library/es6.date.to-primitive.js b/node_modules/core-js/modules/library/es6.date.to-primitive.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.date.to-string.js b/node_modules/core-js/modules/library/es6.date.to-string.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.function.name.js b/node_modules/core-js/modules/library/es6.function.name.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.number.constructor.js b/node_modules/core-js/modules/library/es6.number.constructor.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.object.to-string.js b/node_modules/core-js/modules/library/es6.object.to-string.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.regexp.constructor.js b/node_modules/core-js/modules/library/es6.regexp.constructor.js new file mode 100644 index 0000000000000..e85e3141a2ad3 --- /dev/null +++ b/node_modules/core-js/modules/library/es6.regexp.constructor.js @@ -0,0 +1 @@ +require('./_set-species')('RegExp'); diff --git a/node_modules/core-js/modules/library/es6.regexp.exec.js b/node_modules/core-js/modules/library/es6.regexp.exec.js new file mode 100644 index 0000000000000..8b1a393741c96 --- /dev/null +++ b/node_modules/core-js/modules/library/es6.regexp.exec.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/modules/library/es6.regexp.flags.js b/node_modules/core-js/modules/library/es6.regexp.flags.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.regexp.match.js b/node_modules/core-js/modules/library/es6.regexp.match.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.regexp.replace.js b/node_modules/core-js/modules/library/es6.regexp.replace.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.regexp.search.js b/node_modules/core-js/modules/library/es6.regexp.search.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.regexp.split.js b/node_modules/core-js/modules/library/es6.regexp.split.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/es6.regexp.to-string.js b/node_modules/core-js/modules/library/es6.regexp.to-string.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/core-js/modules/library/web.dom.iterable.js b/node_modules/core-js/modules/library/web.dom.iterable.js new file mode 100644 index 0000000000000..fc00afac49bb7 --- /dev/null +++ b/node_modules/core-js/modules/library/web.dom.iterable.js @@ -0,0 +1,19 @@ +require('./es6.array.iterator'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var TO_STRING_TAG = require('./_wks')('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} diff --git a/node_modules/core-js/modules/web.dom.iterable.js b/node_modules/core-js/modules/web.dom.iterable.js new file mode 100644 index 0000000000000..40834b02bc719 --- /dev/null +++ b/node_modules/core-js/modules/web.dom.iterable.js @@ -0,0 +1,58 @@ +var $iterators = require('./es6.array.iterator'); +var getKeys = require('./_object-keys'); +var redefine = require('./_redefine'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var wks = require('./_wks'); +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); + } +} diff --git a/node_modules/core-js/modules/web.immediate.js b/node_modules/core-js/modules/web.immediate.js new file mode 100644 index 0000000000000..70f3e70daa425 --- /dev/null +++ b/node_modules/core-js/modules/web.immediate.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); +var $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); diff --git a/node_modules/core-js/modules/web.timers.js b/node_modules/core-js/modules/web.timers.js new file mode 100644 index 0000000000000..c879083046192 --- /dev/null +++ b/node_modules/core-js/modules/web.timers.js @@ -0,0 +1,20 @@ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global'); +var $export = require('./_export'); +var userAgent = require('./_user-agent'); +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) +}); diff --git a/node_modules/core-js/package.json b/node_modules/core-js/package.json new file mode 100644 index 0000000000000..7869f22d7412b --- /dev/null +++ b/node_modules/core-js/package.json @@ -0,0 +1,73 @@ +{ + "name": "core-js", + "description": "Standard library", + "version": "2.6.12", + "repository": { + "type": "git", + "url": "https://github.com/zloirock/core-js.git" + }, + "main": "index.js", + "devDependencies": { + "LiveScript": "1.3.x", + "es-observable-tests": "0.2.x", + "eslint": "4.19.x", + "eslint-plugin-import": "2.12.x", + "grunt": "^1.0.2", + "grunt-cli": "^1.2.0", + "grunt-contrib-clean": "^1.1.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "3.3.x", + "grunt-contrib-watch": "^1.0.0", + "grunt-karma": "^2.0.0", + "grunt-livescript": "0.6.x", + "karma": "^2.0.0", + "karma-qunit": "^2.1.0", + "karma-chrome-launcher": "^2.2.0", + "karma-firefox-launcher": "^1.0.1", + "karma-ie-launcher": "^1.0.0", + "karma-phantomjs-launcher": "1.0.x", + "phantomjs-prebuilt": "2.1.x", + "promises-aplus-tests": "^2.1.2", + "qunit": "2.6.x", + "temp": "^0.8.3", + "webpack": "^3.11.0" + }, + "scripts": { + "grunt": "grunt", + "lint": "eslint ./", + "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", + "observables-tests": "node tests/observables/adapter && node tests/observables/adapter-library", + "test": "npm run grunt clean copy && npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && lsc tests/commonjs", + "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\"" + }, + "license": "MIT", + "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" + ] +} diff --git a/node_modules/core-js/postinstall.js b/node_modules/core-js/postinstall.js new file mode 100644 index 0000000000000..96bdc870f87ba --- /dev/null +++ b/node_modules/core-js/postinstall.js @@ -0,0 +1,58 @@ +/* eslint-disable max-len */ +var fs = require('fs'); +var os = require('os'); +var path = require('path'); +var env = process.env; + +var ADBLOCK = is(env.ADBLOCK); +var COLOR = is(env.npm_config_color); +var DISABLE_OPENCOLLECTIVE = is(env.DISABLE_OPENCOLLECTIVE); +var SILENT = ['silent', 'error', 'warn'].indexOf(env.npm_config_loglevel) !== -1; +var OPEN_SOURCE_CONTRIBUTOR = is(env.OPEN_SOURCE_CONTRIBUTOR); +var MINUTE = 60 * 1000; + +// you could add a PR with an env variable for your CI detection +var CI = [ + 'BUILD_NUMBER', + 'CI', + 'CONTINUOUS_INTEGRATION', + 'DRONE', + 'RUN_ID' +].some(function (it) { return is(env[it]); }); + +var BANNER = '\u001B[96mThank you for using core-js (\u001B[94m https://github.com/zloirock/core-js \u001B[96m) for polyfilling JavaScript standard library!\u001B[0m\n\n' + + '\u001B[96mThe project needs your help! Please consider supporting of core-js on Open Collective or Patreon: \u001B[0m\n' + + '\u001B[96m>\u001B[94m https://opencollective.com/core-js \u001B[0m\n' + + '\u001B[96m>\u001B[94m https://www.patreon.com/zloirock \u001B[0m\n\n' + + '\u001B[96mAlso, the author of core-js (\u001B[94m https://github.com/zloirock \u001B[96m) is looking for a good job -)\u001B[0m\n'; + +function is(it) { + return !!it && it !== '0' && it !== 'false'; +} + +function isBannerRequired() { + if (ADBLOCK || CI || DISABLE_OPENCOLLECTIVE || SILENT || OPEN_SOURCE_CONTRIBUTOR) return false; + var file = path.join(os.tmpdir(), 'core-js-banners'); + var banners = []; + try { + var DELTA = Date.now() - fs.statSync(file).mtime; + if (DELTA >= 0 && DELTA < MINUTE * 3) { + banners = JSON.parse(fs.readFileSync(file, 'utf8')); + if (banners.indexOf(BANNER) !== -1) return false; + } + } catch (error) { + banners = []; + } + try { + banners.push(BANNER); + fs.writeFileSync(file, JSON.stringify(banners), 'utf8'); + } catch (error) { /* empty */ } + return true; +} + +function showBanner() { + // eslint-disable-next-line no-console,no-control-regex + console.log(COLOR ? BANNER : BANNER.replace(/\u001B\[\d+m/g, '')); +} + +if (isBannerRequired()) showBanner(); diff --git a/node_modules/core-js/shim.js b/node_modules/core-js/shim.js new file mode 100644 index 0000000000000..e2d53f45a6ef2 --- /dev/null +++ b/node_modules/core-js/shim.js @@ -0,0 +1,198 @@ +require('./modules/es6.symbol'); +require('./modules/es6.object.create'); +require('./modules/es6.object.define-property'); +require('./modules/es6.object.define-properties'); +require('./modules/es6.object.get-own-property-descriptor'); +require('./modules/es6.object.get-prototype-of'); +require('./modules/es6.object.keys'); +require('./modules/es6.object.get-own-property-names'); +require('./modules/es6.object.freeze'); +require('./modules/es6.object.seal'); +require('./modules/es6.object.prevent-extensions'); +require('./modules/es6.object.is-frozen'); +require('./modules/es6.object.is-sealed'); +require('./modules/es6.object.is-extensible'); +require('./modules/es6.object.assign'); +require('./modules/es6.object.is'); +require('./modules/es6.object.set-prototype-of'); +require('./modules/es6.object.to-string'); +require('./modules/es6.function.bind'); +require('./modules/es6.function.name'); +require('./modules/es6.function.has-instance'); +require('./modules/es6.parse-int'); +require('./modules/es6.parse-float'); +require('./modules/es6.number.constructor'); +require('./modules/es6.number.to-fixed'); +require('./modules/es6.number.to-precision'); +require('./modules/es6.number.epsilon'); +require('./modules/es6.number.is-finite'); +require('./modules/es6.number.is-integer'); +require('./modules/es6.number.is-nan'); +require('./modules/es6.number.is-safe-integer'); +require('./modules/es6.number.max-safe-integer'); +require('./modules/es6.number.min-safe-integer'); +require('./modules/es6.number.parse-float'); +require('./modules/es6.number.parse-int'); +require('./modules/es6.math.acosh'); +require('./modules/es6.math.asinh'); +require('./modules/es6.math.atanh'); +require('./modules/es6.math.cbrt'); +require('./modules/es6.math.clz32'); +require('./modules/es6.math.cosh'); +require('./modules/es6.math.expm1'); +require('./modules/es6.math.fround'); +require('./modules/es6.math.hypot'); +require('./modules/es6.math.imul'); +require('./modules/es6.math.log10'); +require('./modules/es6.math.log1p'); +require('./modules/es6.math.log2'); +require('./modules/es6.math.sign'); +require('./modules/es6.math.sinh'); +require('./modules/es6.math.tanh'); +require('./modules/es6.math.trunc'); +require('./modules/es6.string.from-code-point'); +require('./modules/es6.string.raw'); +require('./modules/es6.string.trim'); +require('./modules/es6.string.iterator'); +require('./modules/es6.string.code-point-at'); +require('./modules/es6.string.ends-with'); +require('./modules/es6.string.includes'); +require('./modules/es6.string.repeat'); +require('./modules/es6.string.starts-with'); +require('./modules/es6.string.anchor'); +require('./modules/es6.string.big'); +require('./modules/es6.string.blink'); +require('./modules/es6.string.bold'); +require('./modules/es6.string.fixed'); +require('./modules/es6.string.fontcolor'); +require('./modules/es6.string.fontsize'); +require('./modules/es6.string.italics'); +require('./modules/es6.string.link'); +require('./modules/es6.string.small'); +require('./modules/es6.string.strike'); +require('./modules/es6.string.sub'); +require('./modules/es6.string.sup'); +require('./modules/es6.date.now'); +require('./modules/es6.date.to-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +require('./modules/es6.array.is-array'); +require('./modules/es6.array.from'); +require('./modules/es6.array.of'); +require('./modules/es6.array.join'); +require('./modules/es6.array.slice'); +require('./modules/es6.array.sort'); +require('./modules/es6.array.for-each'); +require('./modules/es6.array.map'); +require('./modules/es6.array.filter'); +require('./modules/es6.array.some'); +require('./modules/es6.array.every'); +require('./modules/es6.array.reduce'); +require('./modules/es6.array.reduce-right'); +require('./modules/es6.array.index-of'); +require('./modules/es6.array.last-index-of'); +require('./modules/es6.array.copy-within'); +require('./modules/es6.array.fill'); +require('./modules/es6.array.find'); +require('./modules/es6.array.find-index'); +require('./modules/es6.array.species'); +require('./modules/es6.array.iterator'); +require('./modules/es6.regexp.constructor'); +require('./modules/es6.regexp.exec'); +require('./modules/es6.regexp.to-string'); +require('./modules/es6.regexp.flags'); +require('./modules/es6.regexp.match'); +require('./modules/es6.regexp.replace'); +require('./modules/es6.regexp.search'); +require('./modules/es6.regexp.split'); +require('./modules/es6.promise'); +require('./modules/es6.map'); +require('./modules/es6.set'); +require('./modules/es6.weak-map'); +require('./modules/es6.weak-set'); +require('./modules/es6.typed.array-buffer'); +require('./modules/es6.typed.data-view'); +require('./modules/es6.typed.int8-array'); +require('./modules/es6.typed.uint8-array'); +require('./modules/es6.typed.uint8-clamped-array'); +require('./modules/es6.typed.int16-array'); +require('./modules/es6.typed.uint16-array'); +require('./modules/es6.typed.int32-array'); +require('./modules/es6.typed.uint32-array'); +require('./modules/es6.typed.float32-array'); +require('./modules/es6.typed.float64-array'); +require('./modules/es6.reflect.apply'); +require('./modules/es6.reflect.construct'); +require('./modules/es6.reflect.define-property'); +require('./modules/es6.reflect.delete-property'); +require('./modules/es6.reflect.enumerate'); +require('./modules/es6.reflect.get'); +require('./modules/es6.reflect.get-own-property-descriptor'); +require('./modules/es6.reflect.get-prototype-of'); +require('./modules/es6.reflect.has'); +require('./modules/es6.reflect.is-extensible'); +require('./modules/es6.reflect.own-keys'); +require('./modules/es6.reflect.prevent-extensions'); +require('./modules/es6.reflect.set'); +require('./modules/es6.reflect.set-prototype-of'); +require('./modules/es7.array.includes'); +require('./modules/es7.array.flat-map'); +require('./modules/es7.array.flatten'); +require('./modules/es7.string.at'); +require('./modules/es7.string.pad-start'); +require('./modules/es7.string.pad-end'); +require('./modules/es7.string.trim-left'); +require('./modules/es7.string.trim-right'); +require('./modules/es7.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.map.of'); +require('./modules/es7.set.of'); +require('./modules/es7.weak-map.of'); +require('./modules/es7.weak-set.of'); +require('./modules/es7.map.from'); +require('./modules/es7.set.from'); +require('./modules/es7.weak-map.from'); +require('./modules/es7.weak-set.from'); +require('./modules/es7.global'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.clamp'); +require('./modules/es7.math.deg-per-rad'); +require('./modules/es7.math.degrees'); +require('./modules/es7.math.fscale'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.rad-per-deg'); +require('./modules/es7.math.radians'); +require('./modules/es7.math.scale'); +require('./modules/es7.math.umulh'); +require('./modules/es7.math.signbit'); +require('./modules/es7.promise.finally'); +require('./modules/es7.promise.try'); +require('./modules/es7.reflect.define-metadata'); +require('./modules/es7.reflect.delete-metadata'); +require('./modules/es7.reflect.get-metadata'); +require('./modules/es7.reflect.get-metadata-keys'); +require('./modules/es7.reflect.get-own-metadata'); +require('./modules/es7.reflect.get-own-metadata-keys'); +require('./modules/es7.reflect.has-metadata'); +require('./modules/es7.reflect.has-own-metadata'); +require('./modules/es7.reflect.metadata'); +require('./modules/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); diff --git a/node_modules/core-js/stage/0.js b/node_modules/core-js/stage/0.js new file mode 100644 index 0000000000000..4aa50704c6982 --- /dev/null +++ b/node_modules/core-js/stage/0.js @@ -0,0 +1,10 @@ +require('../modules/es7.string.at'); +require('../modules/es7.map.to-json'); +require('../modules/es7.set.to-json'); +require('../modules/es7.error.is-error'); +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +require('../modules/es7.asap'); +module.exports = require('./1'); diff --git a/node_modules/core-js/stage/1.js b/node_modules/core-js/stage/1.js new file mode 100644 index 0000000000000..5f634d80b46e2 --- /dev/null +++ b/node_modules/core-js/stage/1.js @@ -0,0 +1,23 @@ +require('../modules/es7.map.of'); +require('../modules/es7.set.of'); +require('../modules/es7.weak-map.of'); +require('../modules/es7.weak-set.of'); +require('../modules/es7.map.from'); +require('../modules/es7.set.from'); +require('../modules/es7.weak-map.from'); +require('../modules/es7.weak-set.from'); +require('../modules/es7.math.clamp'); +require('../modules/es7.math.deg-per-rad'); +require('../modules/es7.math.degrees'); +require('../modules/es7.math.fscale'); +require('../modules/es7.math.rad-per-deg'); +require('../modules/es7.math.radians'); +require('../modules/es7.math.scale'); +require('../modules/es7.math.signbit'); +require('../modules/es7.promise.try'); +require('../modules/es7.string.match-all'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +require('../modules/es7.array.flat-map'); +require('../modules/es7.array.flatten'); +module.exports = require('./2'); diff --git a/node_modules/core-js/stage/2.js b/node_modules/core-js/stage/2.js new file mode 100644 index 0000000000000..d7aaa0ef963b7 --- /dev/null +++ b/node_modules/core-js/stage/2.js @@ -0,0 +1,4 @@ +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.symbol.async-iterator'); +module.exports = require('./3'); diff --git a/node_modules/core-js/stage/3.js b/node_modules/core-js/stage/3.js new file mode 100644 index 0000000000000..9afd07fe97a1b --- /dev/null +++ b/node_modules/core-js/stage/3.js @@ -0,0 +1,4 @@ +require('../modules/es7.global'); +require('../modules/es7.system.global'); +require('../modules/es7.promise.finally'); +module.exports = require('./4'); diff --git a/node_modules/core-js/stage/4.js b/node_modules/core-js/stage/4.js new file mode 100644 index 0000000000000..875762a235843 --- /dev/null +++ b/node_modules/core-js/stage/4.js @@ -0,0 +1,11 @@ +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.array.includes'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/stage/index.js b/node_modules/core-js/stage/index.js new file mode 100644 index 0000000000000..24dcf2e564223 --- /dev/null +++ b/node_modules/core-js/stage/index.js @@ -0,0 +1 @@ +module.exports = require('./pre'); diff --git a/node_modules/core-js/stage/pre.js b/node_modules/core-js/stage/pre.js new file mode 100644 index 0000000000000..ed197a8ba6618 --- /dev/null +++ b/node_modules/core-js/stage/pre.js @@ -0,0 +1,10 @@ +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +module.exports = require('./0'); diff --git a/node_modules/core-js/web/dom-collections.js b/node_modules/core-js/web/dom-collections.js new file mode 100644 index 0000000000000..a138bb9ddab32 --- /dev/null +++ b/node_modules/core-js/web/dom-collections.js @@ -0,0 +1,2 @@ +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/web/immediate.js b/node_modules/core-js/web/immediate.js new file mode 100644 index 0000000000000..6866abdeb5b2d --- /dev/null +++ b/node_modules/core-js/web/immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/web/index.js b/node_modules/core-js/web/index.js new file mode 100644 index 0000000000000..66db256d6ce77 --- /dev/null +++ b/node_modules/core-js/web/index.js @@ -0,0 +1,4 @@ +require('../modules/web.timers'); +require('../modules/web.immediate'); +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/web/timers.js b/node_modules/core-js/web/timers.js new file mode 100644 index 0000000000000..a3f528e4dcec3 --- /dev/null +++ b/node_modules/core-js/web/timers.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-util-is/LICENSE b/node_modules/core-util-is/LICENSE new file mode 100644 index 0000000000000..d8d7f9437dbf5 --- /dev/null +++ b/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/node_modules/core-util-is/README.md b/node_modules/core-util-is/README.md new file mode 100644 index 0000000000000..5a76b4149c5eb --- /dev/null +++ b/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/core-util-is/lib/util.js b/node_modules/core-util-is/lib/util.js new file mode 100644 index 0000000000000..6e5a20d7dc09e --- /dev/null +++ b/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = require('buffer').Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/node_modules/core-util-is/package.json b/node_modules/core-util-is/package.json new file mode 100644 index 0000000000000..b0c51f580be4c --- /dev/null +++ b/node_modules/core-util-is/package.json @@ -0,0 +1,38 @@ +{ + "name": "core-util-is", + "version": "1.0.3", + "description": "The `util.is*` functions introduced in Node v0.12.", + "main": "lib/util.js", + "files": [ + "lib" + ], + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is" + }, + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "scripts": { + "test": "tap test.js", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags" + }, + "devDependencies": { + "tap": "^15.0.9" + } +} diff --git a/node_modules/cross-spawn-async/.editorconfig b/node_modules/cross-spawn-async/.editorconfig new file mode 100644 index 0000000000000..8bc4f108d549f --- /dev/null +++ b/node_modules/cross-spawn-async/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[package.json] +indent_size = 2 diff --git a/node_modules/cross-spawn-async/.eslintrc b/node_modules/cross-spawn-async/.eslintrc new file mode 100644 index 0000000000000..f34b41d96cca8 --- /dev/null +++ b/node_modules/cross-spawn-async/.eslintrc @@ -0,0 +1,7 @@ +{ + "root": true, + "extends": [ + "@satazor/eslint-config/es5", + "@satazor/eslint-config/addons/node" + ] +} \ No newline at end of file diff --git a/node_modules/cross-spawn-async/.npmignore b/node_modules/cross-spawn-async/.npmignore new file mode 100644 index 0000000000000..93f2f731a92ab --- /dev/null +++ b/node_modules/cross-spawn-async/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +npm-debug.* +test/ diff --git a/node_modules/cross-spawn-async/.travis.yml b/node_modules/cross-spawn-async/.travis.yml new file mode 100644 index 0000000000000..22e38a0fdd788 --- /dev/null +++ b/node_modules/cross-spawn-async/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - '0.10' + - '0.12' + - '4' + - '5' + - '6' diff --git a/node_modules/cross-spawn-async/LICENSE b/node_modules/cross-spawn-async/LICENSE new file mode 100644 index 0000000000000..e898822ad304d --- /dev/null +++ b/node_modules/cross-spawn-async/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 IndigoUnited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/cross-spawn-async/README.md b/node_modules/cross-spawn-async/README.md new file mode 100644 index 0000000000000..8b3bd69835f3d --- /dev/null +++ b/node_modules/cross-spawn-async/README.md @@ -0,0 +1,58 @@ +# cross-spawn-async + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] + +[npm-url]:https://npmjs.org/package/cross-spawn-async +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn-async.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn-async.svg +[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn-async +[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn-async/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn-async +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn-async/master.svg +[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn-async +[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn-async.svg +[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn-async#info=devDependencies +[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn-async.svg + +A cross platform solution to node's spawn. + +**This module is deprecated, use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) instead which no longer requires a build toolchain.** + + +## Installation + +`$ npm install cross-spawn-async` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang) +- It does not allow you to run `del` or `dir` +- It does not properly escape arguments with spaces or special characters + +All these issues are handled correctly by `cross-spawn-async`. +There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments. + + +## Usage + +Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options), so it's a drop in replacement. + +```javascript +var spawn = require('cross-spawn-async'); + +var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); +``` + + +## Tests + +`$ npm test` + + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn-async/appveyor.yml b/node_modules/cross-spawn-async/appveyor.yml new file mode 100644 index 0000000000000..9b92823ee7876 --- /dev/null +++ b/node_modules/cross-spawn-async/appveyor.yml @@ -0,0 +1,30 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml + +# build version format +version: "{build}" + +# fix lineendings in Windows +init: + - git config --global core.autocrlf input + +# what combinations to test +environment: + matrix: + - nodejs_version: 0.10 + - nodejs_version: 0.12 + - nodejs_version: 4 + - nodejs_version: 5 + - nodejs_version: 6 + +# get the latest stable version of Node 0.STABLE.latest +install: + - ps: Install-Product node $env:nodejs_version + - npm install + +build: off + +test_script: + - node --version + - npm --version + - cmd: npm test --no-color diff --git a/node_modules/cross-spawn-async/index.js b/node_modules/cross-spawn-async/index.js new file mode 100644 index 0000000000000..92afff0833362 --- /dev/null +++ b/node_modules/cross-spawn-async/index.js @@ -0,0 +1,27 @@ +'use strict'; + +var cp = require('child_process'); +var parse = require('./lib/parse'); +var enoent = require('./lib/enoent'); + +function spawn(command, args, options) { + var parsed; + var spawned; + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn-async/lib/enoent.js b/node_modules/cross-spawn-async/lib/enoent.js new file mode 100644 index 0000000000000..3254833ae77f1 --- /dev/null +++ b/node_modules/cross-spawn-async/lib/enoent.js @@ -0,0 +1,51 @@ +'use strict'; + +var isWin = process.platform === 'win32'; + +function notFoundError(command, syscall) { + var err; + + err = new Error(syscall + ' ' + command + ' ENOENT'); + err.code = err.errno = 'ENOENT'; + err.syscall = syscall + ' ' + command; + + return err; +} + +function hookChildProcess(cp, parsed) { + var originalEmit; + + if (!isWin) { + return; + } + + originalEmit = cp.emit; + cp.emit = function (name, arg1) { + var err; + + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); + }; +} + +function verifyENOENT(status, parsed, syscall) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, syscall); + } + + return null; +} + +module.exports.hookChildProcess = hookChildProcess; +module.exports.verifyENOENT = verifyENOENT; +module.exports.notFoundError = notFoundError; diff --git a/node_modules/cross-spawn-async/lib/parse.js b/node_modules/cross-spawn-async/lib/parse.js new file mode 100644 index 0000000000000..923e05e7af342 --- /dev/null +++ b/node_modules/cross-spawn-async/lib/parse.js @@ -0,0 +1,128 @@ +'use strict'; + +var fs = require('fs'); +var LRU = require('lru-cache'); +var resolveCommand = require('./resolveCommand'); + +var isWin = process.platform === 'win32'; +var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function readShebang(command) { + var buffer; + var fd; + var match; + var shebang; + + // Check if it is in the cache first + if (shebangCache.has(command)) { + return shebangCache.get(command); + } + + // Read the first 150 bytes from the file + buffer = new Buffer(150); + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, 150, 0); + fs.closeSync(fd); + } catch (e) { /* empty */ } + + // Check if it is a shebang + match = buffer.toString().trim().match(/#!(.+)/i); + + if (match) { + shebang = match[1].replace(/\/usr\/bin\/env\s+/i, ''); // Remove /usr/bin/env + } + + // Store the shebang in the cache + shebangCache.set(command, shebang); + + return shebang; +} + +function escapeArg(arg, quote) { + // Convert to string + arg = '' + arg; + + // If we are not going to quote the argument, + // escape shell metacharacters, including double and single quotes: + if (!quote) { + arg = arg.replace(/([\(\)%!\^<>&|;,"'\s])/g, '^$1'); + } else { + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = '"' + arg + '"'; + } + + return arg; +} + +function escapeCommand(command) { + // Do not escape if this command is not dangerous.. + // We do this so that commands like "echo" or "ifconfig" work + // Quoting them, will make them unaccessible + return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArg(command, true); +} + +function parse(command, args, options) { + var shebang; + var applyQuotes; + var file; + var original; + + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = options || {}; + original = command; + + if (isWin) { + // Detect & add support for shebangs + file = resolveCommand(command); + file = file || resolveCommand(command, true); + shebang = file && readShebang(file); + + if (shebang) { + args.unshift(file); + command = shebang; + } + + // Escape command & arguments + applyQuotes = command !== 'echo'; // Do not quote arguments for the special "echo" command + command = escapeCommand(command); + args = args.map(function (arg) { + return escapeArg(arg, applyQuotes); + }); + + // Use cmd.exe + args = ['/s', '/c', '"' + command + (args.length ? ' ' + args.join(' ') : '') + '"']; + command = process.env.comspec || 'cmd.exe'; + + // Tell node's spawn that the arguments are already escaped + options.windowsVerbatimArguments = true; + } + + return { + command: command, + args: args, + options: options, + file: file, + original: original, + }; +} + +module.exports = parse; diff --git a/node_modules/cross-spawn-async/lib/resolveCommand.js b/node_modules/cross-spawn-async/lib/resolveCommand.js new file mode 100644 index 0000000000000..391d3d9b07353 --- /dev/null +++ b/node_modules/cross-spawn-async/lib/resolveCommand.js @@ -0,0 +1,38 @@ +'use strict'; + +var path = require('path'); +var which = require('which'); +var LRU = require('lru-cache'); + +var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec +var hasSepInPathRegExp = new RegExp(process.platform === 'win32' ? /[\/\\]/ : /\//); + +function resolveCommand(command, noExtension) { + var resolved; + + // If command looks like a file path, make it absolute to make it canonical + // and also to circuvent a bug in which, see: https://github.com/npm/node-which/issues/33 + if (hasSepInPathRegExp.test(command)) { + command = path.resolve(command); + } + + noExtension = !!noExtension; + resolved = commandCache.get(command + '!' + noExtension); + + // Check if its resolved in the cache + if (commandCache.has(command)) { + return commandCache.get(command); + } + + try { + resolved = !noExtension ? + which.sync(command) : + which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') }); + } catch (e) { /* empty */ } + + commandCache.set(command + '!' + noExtension, resolved); + + return resolved; +} + +module.exports = resolveCommand; diff --git a/node_modules/cross-spawn-async/package.json b/node_modules/cross-spawn-async/package.json new file mode 100644 index 0000000000000..5026fa4f082ac --- /dev/null +++ b/node_modules/cross-spawn-async/package.json @@ -0,0 +1,46 @@ +{ + "name": "cross-spawn-async", + "version": "2.2.5", + "description": "Cross platform child_process#spawn", + "main": "index.js", + "scripts": { + "test": "node test/prepare && mocha --bail test/test", + "lint": "eslint '{*.js,lib/**/*.js,test/**/*.js}'" + }, + "bugs": { + "url": "https://github.com/IndigoUnited/node-cross-spawn-async/issues/" + }, + "repository": { + "type": "git", + "url": "git://github.com/IndigoUnited/node-cross-spawn-async.git" + }, + "keywords": [ + "spawn", + "windows", + "cross", + "platform", + "path", + "ext", + "path-ext", + "path_ext", + "shebang", + "hashbang", + "cmd", + "execute" + ], + "author": "IndigoUnited (http://indigounited.com)", + "license": "MIT", + "dependencies": { + "lru-cache": "^4.0.0", + "which": "^1.2.8" + }, + "devDependencies": { + "@satazor/eslint-config": "^3.0.0", + "eslint": "^3.0.0", + "expect.js": "^0.3.0", + "glob": "^7.0.0", + "mkdirp": "^0.5.1", + "mocha": "^3.0.2", + "rimraf": "^2.5.0" + } +} diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE new file mode 100644 index 0000000000000..db5e914de1f58 --- /dev/null +++ b/node_modules/cross-spawn/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 IndigoUnited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/cross-spawn/README.md b/node_modules/cross-spawn/README.md new file mode 100644 index 0000000000000..18cc2b8bc8c8b --- /dev/null +++ b/node_modules/cross-spawn/README.md @@ -0,0 +1,71 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg +[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn +[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg +[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn +[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn.svg +[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn#info=devDependencies +[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn.svg + +A cross platform solution to node's spawn and spawnSync. + + +## Installation + +`$ npm install cross-spawn` + +If you are using `spawnSync` on node 0.10 or older, you will also need to install `spawn-sync`: + +`$ npm install spawn-sync` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang) +- It does not allow you to run `del` or `dir` +- It does not properly escape arguments with spaces or special characters + +All these issues are handled correctly by `cross-spawn`. +There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments. + + +## Usage + +Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement. + +```javascript +var spawn = require('cross-spawn'); + +// Spawn NPM asynchronously +var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); + +// Spawn NPM synchronously +var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); +``` + +## Caveat + +On Windows, cross-spawn will only spawn `cmd.exe` if necessary. If the extension +of the executable is `.exe` or `.com`, it will spawn it directly. If you wish +to override this behavior and *always* spawn a shell, pass the `{shell: true}` +option. + + +## Tests + +`$ npm test` + + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js new file mode 100644 index 0000000000000..7814a9692dc0c --- /dev/null +++ b/node_modules/cross-spawn/index.js @@ -0,0 +1,59 @@ +'use strict'; + +var cp = require('child_process'); +var parse = require('./lib/parse'); +var enoent = require('./lib/enoent'); + +var cpSpawnSync = cp.spawnSync; + +function spawn(command, args, options) { + var parsed; + var spawned; + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + var parsed; + var result; + + if (!cpSpawnSync) { + try { + cpSpawnSync = require('spawn-sync'); // eslint-disable-line global-require + } catch (ex) { + throw new Error( + 'In order to use spawnSync on node 0.10 or older, you must ' + + 'install spawn-sync:\n\n' + + ' npm install spawn-sync --save' + ); + } + } + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + result = cpSpawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 0000000000000..74ff06e495950 --- /dev/null +++ b/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,73 @@ +'use strict'; + +var isWin = process.platform === 'win32'; +var resolveCommand = require('./resolveCommand'); + +var isNode10 = process.version.indexOf('v0.10.') === 0; + +function notFoundError(command, syscall) { + var err; + + err = new Error(syscall + ' ' + command + ' ENOENT'); + err.code = err.errno = 'ENOENT'; + err.syscall = syscall + ' ' + command; + + return err; +} + +function hookChildProcess(cp, parsed) { + var originalEmit; + + if (!isWin) { + return; + } + + originalEmit = cp.emit; + cp.emit = function (name, arg1) { + var err; + + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + // If we are in node 10, then we are using spawn-sync; if it exited + // with -1 it probably means that the command does not exist + if (isNode10 && status === -1) { + parsed.file = isWin ? parsed.file : resolveCommand(parsed.original); + + if (!parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + } + + return null; +} + +module.exports.hookChildProcess = hookChildProcess; +module.exports.verifyENOENT = verifyENOENT; +module.exports.verifyENOENTSync = verifyENOENTSync; +module.exports.notFoundError = notFoundError; diff --git a/node_modules/cross-spawn/lib/hasBrokenSpawn.js b/node_modules/cross-spawn/lib/hasBrokenSpawn.js new file mode 100644 index 0000000000000..e73f906b61779 --- /dev/null +++ b/node_modules/cross-spawn/lib/hasBrokenSpawn.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = (function () { + if (process.platform !== 'win32') { + return false; + } + var nodeVer = process.version.substr(1).split('.').map(function (num) { + return parseInt(num, 10); + }); + return (nodeVer[0] === 0 && nodeVer[1] < 12); +})(); diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 0000000000000..77cbb83d2db79 --- /dev/null +++ b/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,140 @@ +'use strict'; + +var fs = require('fs'); +var LRU = require('lru-cache'); +var resolveCommand = require('./resolveCommand'); +var hasBrokenSpawn = require('./hasBrokenSpawn'); + +var isWin = process.platform === 'win32'; +var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function readShebang(command) { + var buffer; + var fd; + var match; + var shebang; + + // Check if it is in the cache first + if (shebangCache.has(command)) { + return shebangCache.get(command); + } + + // Read the first 150 bytes from the file + buffer = new Buffer(150); + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, 150, 0); + fs.closeSync(fd); + } catch (e) { /* empty */ } + + // Check if it is a shebang + match = buffer.toString().trim().match(/#!(.+)/i); + + if (match) { + shebang = match[1].replace(/\/usr\/bin\/env\s+/i, ''); // Remove /usr/bin/env + } + + // Store the shebang in the cache + shebangCache.set(command, shebang); + + return shebang; +} + +function escapeArg(arg, quote) { + // Convert to string + arg = '' + arg; + + // If we are not going to quote the argument, + // escape shell metacharacters, including double and single quotes: + if (!quote) { + arg = arg.replace(/([\(\)%!\^<>&|;,"'\s])/g, '^$1'); + } else { + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = '"' + arg + '"'; + } + + return arg; +} + +function escapeCommand(command) { + // Do not escape if this command is not dangerous.. + // We do this so that commands like "echo" or "ifconfig" work + // Quoting them, will make them unaccessible + return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArg(command, true); +} + +function requiresShell(command) { + return !/\.(?:com|exe)$/i.test(command); +} + +function parse(command, args, options) { + var shebang; + var applyQuotes; + var file; + var original; + var shell; + + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = options || {}; + original = command; + + if (isWin) { + // Detect & add support for shebangs + file = resolveCommand(command); + file = file || resolveCommand(command, true); + shebang = file && readShebang(file); + shell = options.shell || hasBrokenSpawn; + + if (shebang) { + args.unshift(file); + command = shebang; + shell = shell || requiresShell(resolveCommand(shebang) || resolveCommand(shebang, true)); + } else { + shell = shell || requiresShell(file); + } + + if (shell) { + // Escape command & arguments + applyQuotes = (command !== 'echo'); // Do not quote arguments for the special "echo" command + command = escapeCommand(command); + args = args.map(function (arg) { + return escapeArg(arg, applyQuotes); + }); + + // Use cmd.exe + args = ['/s', '/c', '"' + command + (args.length ? ' ' + args.join(' ') : '') + '"']; + command = process.env.comspec || 'cmd.exe'; + + // Tell node's spawn that the arguments are already escaped + options.windowsVerbatimArguments = true; + } + } + + return { + command: command, + args: args, + options: options, + file: file, + original: original, + }; +} + +module.exports = parse; diff --git a/node_modules/cross-spawn/lib/resolveCommand.js b/node_modules/cross-spawn/lib/resolveCommand.js new file mode 100644 index 0000000000000..b7a94909749bf --- /dev/null +++ b/node_modules/cross-spawn/lib/resolveCommand.js @@ -0,0 +1,31 @@ +'use strict'; + +var path = require('path'); +var which = require('which'); +var LRU = require('lru-cache'); + +var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function resolveCommand(command, noExtension) { + var resolved; + + noExtension = !!noExtension; + resolved = commandCache.get(command + '!' + noExtension); + + // Check if its resolved in the cache + if (commandCache.has(command)) { + return commandCache.get(command); + } + + try { + resolved = !noExtension ? + which.sync(command) : + which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') }); + } catch (e) { /* empty */ } + + commandCache.set(command + '!' + noExtension, resolved); + + return resolved; +} + +module.exports = resolveCommand; diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json new file mode 100644 index 0000000000000..7d7bb88a5cf5f --- /dev/null +++ b/node_modules/cross-spawn/package.json @@ -0,0 +1,51 @@ +{ + "name": "cross-spawn", + "version": "4.0.2", + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "main": "index.js", + "scripts": { + "test": "node test/prepare && mocha --bail test/test", + "lint": "eslint '{*.js,lib/**/*.js,test/**/*.js}'" + }, + "bugs": { + "url": "https://github.com/IndigoUnited/node-cross-spawn/issues/" + }, + "repository": { + "type": "git", + "url": "git://github.com/IndigoUnited/node-cross-spawn.git" + }, + "files": [ + "index.js", + "lib" + ], + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross", + "platform", + "path", + "ext", + "path-ext", + "path_ext", + "shebang", + "hashbang", + "cmd", + "execute" + ], + "author": "IndigoUnited (http://indigounited.com)", + "license": "MIT", + "dependencies": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + }, + "devDependencies": { + "@satazor/eslint-config": "^3.0.0", + "eslint": "^3.0.0", + "expect.js": "^0.3.0", + "glob": "^7.0.0", + "mkdirp": "^0.5.1", + "mocha": "^3.0.2", + "rimraf": "^2.5.0" + } +} diff --git a/node_modules/debug/.coveralls.yml b/node_modules/debug/.coveralls.yml new file mode 100644 index 0000000000000..20a7068581791 --- /dev/null +++ b/node_modules/debug/.coveralls.yml @@ -0,0 +1 @@ +repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/node_modules/debug/.eslintrc b/node_modules/debug/.eslintrc new file mode 100644 index 0000000000000..8a37ae2c2e5a3 --- /dev/null +++ b/node_modules/debug/.eslintrc @@ -0,0 +1,11 @@ +{ + "env": { + "browser": true, + "node": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/node_modules/debug/.npmignore b/node_modules/debug/.npmignore new file mode 100644 index 0000000000000..5f60eecc84e21 --- /dev/null +++ b/node_modules/debug/.npmignore @@ -0,0 +1,9 @@ +support +test +examples +example +*.sock +dist +yarn.lock +coverage +bower.json diff --git a/node_modules/debug/.travis.yml b/node_modules/debug/.travis.yml new file mode 100644 index 0000000000000..6c6090c3b09f2 --- /dev/null +++ b/node_modules/debug/.travis.yml @@ -0,0 +1,14 @@ + +language: node_js +node_js: + - "6" + - "5" + - "4" + +install: + - make node_modules + +script: + - make lint + - make test + - make coveralls diff --git a/node_modules/debug/CHANGELOG.md b/node_modules/debug/CHANGELOG.md new file mode 100644 index 0000000000000..eadaa189517bb --- /dev/null +++ b/node_modules/debug/CHANGELOG.md @@ -0,0 +1,362 @@ + +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + +2.6.8 / 2017-05-18 +================== + + * Fix: Check for undefined on browser globals (#462, @marbemac) + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE new file mode 100644 index 0000000000000..658c933d28255 --- /dev/null +++ b/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/debug/Makefile b/node_modules/debug/Makefile new file mode 100644 index 0000000000000..584da8bf938e6 --- /dev/null +++ b/node_modules/debug/Makefile @@ -0,0 +1,50 @@ +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# Path +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +# applications +NODE ?= $(shell which node) +YARN ?= $(shell which yarn) +PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +.FORCE: + +install: node_modules + +node_modules: package.json + @NODE_ENV= $(PKG) install + @touch node_modules + +lint: .FORCE + eslint browser.js debug.js index.js node.js + +test-node: .FORCE + istanbul cover node_modules/mocha/bin/_mocha -- test/**.js + +test-browser: .FORCE + mkdir -p dist + + @$(BROWSERIFY) \ + --standalone debug \ + . > dist/debug.js + + karma start --single-run + rimraf dist + +test: .FORCE + concurrently \ + "make test-node" \ + "make test-browser" + +coveralls: + cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +.PHONY: all install clean distclean diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md new file mode 100644 index 0000000000000..f67be6b317c19 --- /dev/null +++ b/node_modules/debug/README.md @@ -0,0 +1,312 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny node.js debugging utility modelled after node core's debugging technique. + +**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example _app.js_: + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %s', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example _worker.js_: + +```js +var debug = require('debug')('worker'); + +setInterval(function(){ + debug('doing some work'); +}, 1000); +``` + + The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: + + ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) + + ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) + +#### Windows note + + On Windows the environment variable is set using the `set` command. + + ```cmd + set DEBUG=*,-not_this + ``` + + Note that PowerShell uses different syntax to set environment variables. + + ```cmd + $env:DEBUG = "*,-not_this" + ``` + +Then, run the program to be debugged as usual. + +## Millisecond diff + + When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) + + When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + + ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) + +## Conventions + + If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". + +## Wildcards + + The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + + You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". + +## Environment Variables + + When running through Node.js, you can set a few environment variables that will + change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + + __Note:__ The environment variables beginning with `DEBUG_` end up being + converted into an Options object that gets used with `%o`/`%O` formatters. + See the Node.js documentation for + [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) + for the complete list. + +## Formatters + + + Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + +### Custom formatters + + You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + +## Browser support + You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), + or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), + if you don't want to build it yourself. + + Debug's enable state is currently persisted by `localStorage`. + Consider the situation shown below where you have `worker:a` and `worker:b`, + and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + +#### Web Inspector Colors + + Colors are also enabled on "Web Inspectors" that understand the `%c` formatting + option. These are WebKit web inspectors, Firefox ([since version + 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) + and the Firebug plugin for Firefox (any version). + + Colored output looks something like: + + ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example _stdout.js_: + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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/debug/component.json b/node_modules/debug/component.json new file mode 100644 index 0000000000000..9de26410f0d0b --- /dev/null +++ b/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.6.9", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "src/browser.js", + "scripts": [ + "src/browser.js", + "src/debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/node_modules/debug/karma.conf.js b/node_modules/debug/karma.conf.js new file mode 100644 index 0000000000000..103a82d15bd72 --- /dev/null +++ b/node_modules/debug/karma.conf.js @@ -0,0 +1,70 @@ +// Karma configuration +// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'chai', 'sinon'], + + + // list of files / patterns to load in the browser + files: [ + 'dist/debug.js', + 'test/*spec.js' + ], + + + // list of files to exclude + exclude: [ + 'src/node.js' + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/node_modules/debug/node.js b/node_modules/debug/node.js new file mode 100644 index 0000000000000..7fc36fe6dbecb --- /dev/null +++ b/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json new file mode 100644 index 0000000000000..dc787ba76781d --- /dev/null +++ b/node_modules/debug/package.json @@ -0,0 +1,49 @@ +{ + "name": "debug", + "version": "2.6.9", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "description": "small debugging utility", + "keywords": [ + "debug", + "log", + "debugger" + ], + "author": "TJ Holowaychuk ", + "contributors": [ + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + }, + "devDependencies": { + "browserify": "9.0.3", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^2.11.15", + "eslint": "^3.12.1", + "istanbul": "^0.4.5", + "karma": "^1.3.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sinon": "^1.0.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + } +} diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js new file mode 100644 index 0000000000000..7106924934501 --- /dev/null +++ b/node_modules/debug/src/browser.js @@ -0,0 +1,185 @@ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} diff --git a/node_modules/debug/src/debug.js b/node_modules/debug/src/debug.js new file mode 100644 index 0000000000000..6a5e3fc94c3ab --- /dev/null +++ b/node_modules/debug/src/debug.js @@ -0,0 +1,202 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js new file mode 100644 index 0000000000000..e12cf4d58c9f2 --- /dev/null +++ b/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/node_modules/debug/src/inspector-log.js b/node_modules/debug/src/inspector-log.js new file mode 100644 index 0000000000000..60ea6c04aafd4 --- /dev/null +++ b/node_modules/debug/src/inspector-log.js @@ -0,0 +1,15 @@ +module.exports = inspectorLog; + +// black hole +const nullStream = new (require('stream').Writable)(); +nullStream._write = () => {}; + +/** + * Outputs a `console.log()` to the Node.js Inspector console *only*. + */ +function inspectorLog() { + const stdout = console._stdout; + console._stdout = nullStream; + console.log.apply(console, arguments); + console._stdout = stdout; +} diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js new file mode 100644 index 0000000000000..b15109c905a45 --- /dev/null +++ b/node_modules/debug/src/node.js @@ -0,0 +1,248 @@ +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); + + // coerce string value into JS value + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === 'null') val = null; + else val = Number(val); + + obj[prop] = val; + return obj; +}, {}); + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} + +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n').map(function(str) { + return str.trim() + }).join(' '); +}; + +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ + +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; + + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} + +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ + +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init (debug) { + debug.inspectOpts = {}; + + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/node_modules/decamelize/index.js b/node_modules/decamelize/index.js new file mode 100644 index 0000000000000..8d5bab7e4672f --- /dev/null +++ b/node_modules/decamelize/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = function (str, sep) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + sep = typeof sep === 'undefined' ? '_' : sep; + + return str + .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2') + .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2') + .toLowerCase(); +}; diff --git a/node_modules/decamelize/license b/node_modules/decamelize/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/decamelize/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/decamelize/package.json b/node_modules/decamelize/package.json new file mode 100644 index 0000000000000..ca3579031890a --- /dev/null +++ b/node_modules/decamelize/package.json @@ -0,0 +1,38 @@ +{ + "name": "decamelize", + "version": "1.2.0", + "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", + "license": "MIT", + "repository": "sindresorhus/decamelize", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "decamelize", + "decamelcase", + "camelcase", + "lowercase", + "case", + "dash", + "hyphen", + "string", + "str", + "text", + "convert" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/decamelize/readme.md b/node_modules/decamelize/readme.md new file mode 100644 index 0000000000000..624c7ee5ed056 --- /dev/null +++ b/node_modules/decamelize/readme.md @@ -0,0 +1,48 @@ +# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize) + +> Convert a camelized string into a lowercased one with a custom separator
+> Example: `unicornRainbow` → `unicorn_rainbow` + + +## Install + +``` +$ npm install --save decamelize +``` + + +## Usage + +```js +const decamelize = require('decamelize'); + +decamelize('unicornRainbow'); +//=> 'unicorn_rainbow' + +decamelize('unicornRainbow', '-'); +//=> 'unicorn-rainbow' +``` + + +## API + +### decamelize(input, [separator]) + +#### input + +Type: `string` + +#### separator + +Type: `string`
+Default: `_` + + +## Related + +See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/decode-uri-component/index.js b/node_modules/decode-uri-component/index.js new file mode 100644 index 0000000000000..24e7db0cc55aa --- /dev/null +++ b/node_modules/decode-uri-component/index.js @@ -0,0 +1,94 @@ +'use strict'; +var token = '%[a-f0-9]{2}'; +var singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi'); +var multiMatcher = new RegExp('(' + token + ')+', 'gi'); + +function decodeComponents(components, split) { + try { + // Try to decode the entire string first + return [decodeURIComponent(components.join(''))]; + } catch (err) { + // Do nothing + } + + if (components.length === 1) { + return components; + } + + split = split || 1; + + // Split the array in 2 parts + var left = components.slice(0, split); + var right = components.slice(split); + + return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right)); +} + +function decode(input) { + try { + return decodeURIComponent(input); + } catch (err) { + var tokens = input.match(singleMatcher) || []; + + for (var i = 1; i < tokens.length; i++) { + input = decodeComponents(tokens, i).join(''); + + tokens = input.match(singleMatcher) || []; + } + + return input; + } +} + +function customDecodeURIComponent(input) { + // Keep track of all the replacements and prefill the map with the `BOM` + var replaceMap = { + '%FE%FF': '\uFFFD\uFFFD', + '%FF%FE': '\uFFFD\uFFFD' + }; + + var match = multiMatcher.exec(input); + while (match) { + try { + // Decode as big chunks as possible + replaceMap[match[0]] = decodeURIComponent(match[0]); + } catch (err) { + var result = decode(match[0]); + + if (result !== match[0]) { + replaceMap[match[0]] = result; + } + } + + match = multiMatcher.exec(input); + } + + // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else + replaceMap['%C2'] = '\uFFFD'; + + var entries = Object.keys(replaceMap); + + for (var i = 0; i < entries.length; i++) { + // Replace all decoded components + var key = entries[i]; + input = input.replace(new RegExp(key, 'g'), replaceMap[key]); + } + + return input; +} + +module.exports = function (encodedURI) { + if (typeof encodedURI !== 'string') { + throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`'); + } + + try { + encodedURI = encodedURI.replace(/\+/g, ' '); + + // Try the built in decoder first + return decodeURIComponent(encodedURI); + } catch (err) { + // Fallback to a more advanced decoder + return customDecodeURIComponent(encodedURI); + } +}; diff --git a/node_modules/decode-uri-component/license b/node_modules/decode-uri-component/license new file mode 100644 index 0000000000000..8dbcd5316fa58 --- /dev/null +++ b/node_modules/decode-uri-component/license @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2017, Sam Verschueren (github.com/SamVerschueren) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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/decode-uri-component/package.json b/node_modules/decode-uri-component/package.json new file mode 100644 index 0000000000000..e23282337c791 --- /dev/null +++ b/node_modules/decode-uri-component/package.json @@ -0,0 +1,37 @@ +{ + "name": "decode-uri-component", + "version": "0.2.2", + "description": "A better decodeURIComponent", + "license": "MIT", + "repository": "SamVerschueren/decode-uri-component", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "engines": { + "node": ">=0.10" + }, + "scripts": { + "test": "xo && nyc ava", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "decode", + "uri", + "component", + "decodeuricomponent", + "components", + "decoder", + "url" + ], + "devDependencies": { + "ava": "^0.17.0", + "coveralls": "^2.13.1", + "nyc": "^10.3.2", + "xo": "^0.16.0" + } +} diff --git a/node_modules/decode-uri-component/readme.md b/node_modules/decode-uri-component/readme.md new file mode 100644 index 0000000000000..3ed99b01c517d --- /dev/null +++ b/node_modules/decode-uri-component/readme.md @@ -0,0 +1,83 @@ +# decode-uri-component + +![CI](https://github.com/SamVerschueren/decode-uri-component/workflows/CI/badge.svg) [![Coverage Status](https://coveralls.io/repos/SamVerschueren/decode-uri-component/badge.svg?branch=master&service=github)](https://coveralls.io/github/SamVerschueren/decode-uri-component?branch=master) + +> A better [decodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) + + +## Why? + +- Decodes `+` to a space. +- Converts the [BOM](https://en.wikipedia.org/wiki/Byte_order_mark) to a [replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) `�`. +- Does not throw with invalid encoded input. +- Decodes as much of the string as possible. + + +## Install + +``` +$ npm install --save decode-uri-component +``` + + +## Usage + +```js +const decodeUriComponent = require('decode-uri-component'); + +decodeUriComponent('%25'); +//=> '%' + +decodeUriComponent('%'); +//=> '%' + +decodeUriComponent('st%C3%A5le'); +//=> 'ståle' + +decodeUriComponent('%st%C3%A5le%'); +//=> '%ståle%' + +decodeUriComponent('%%7Bst%C3%A5le%7D%'); +//=> '%{ståle}%' + +decodeUriComponent('%7B%ab%%7C%de%%7D'); +//=> '{%ab%|%de%}' + +decodeUriComponent('%FE%FF'); +//=> '\uFFFD\uFFFD' + +decodeUriComponent('%C2'); +//=> '\uFFFD' + +decodeUriComponent('%C2%B5'); +//=> 'µ' +``` + + +## API + +### decodeUriComponent(encodedURI) + +#### encodedURI + +Type: `string` + +An encoded component of a Uniform Resource Identifier. + + +## License + +MIT © [Sam Verschueren](https://github.com/SamVerschueren) + + +--- + +

+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/define-data-property/.eslintrc b/node_modules/define-data-property/.eslintrc new file mode 100644 index 0000000000000..75443e81ee0f6 --- /dev/null +++ b/node_modules/define-data-property/.eslintrc @@ -0,0 +1,24 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": 0, + "id-length": 0, + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/define-data-property/.github/FUNDING.yml b/node_modules/define-data-property/.github/FUNDING.yml new file mode 100644 index 0000000000000..3e17725ddfc68 --- /dev/null +++ b/node_modules/define-data-property/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/define-data-property +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/define-data-property/.nycrc b/node_modules/define-data-property/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/define-data-property/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/define-data-property/CHANGELOG.md b/node_modules/define-data-property/CHANGELOG.md new file mode 100644 index 0000000000000..94bad092de7aa --- /dev/null +++ b/node_modules/define-data-property/CHANGELOG.md @@ -0,0 +1,41 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.1](https://github.com/ljharb/define-data-property/compare/v1.1.0...v1.1.1) - 2023-10-12 + +### Commits + +- [Tests] fix tests in ES3 engines [`5c6920e`](https://github.com/ljharb/define-data-property/commit/5c6920edd1f52f675b02f417e539c28135b43f94) +- [Dev Deps] update `@types/es-value-fixtures`, `@types/for-each`, `@types/gopd`, `@types/has-property-descriptors`, `tape`, `typescript` [`7d82dfc`](https://github.com/ljharb/define-data-property/commit/7d82dfc20f778b4465bba06335dd53f6f431aea3) +- [Fix] IE 8 has a broken `Object.defineProperty` [`0672e1a`](https://github.com/ljharb/define-data-property/commit/0672e1af2a9fcc787e7c23b96dea60d290df5548) +- [meta] emit types on prepack [`73acb1f`](https://github.com/ljharb/define-data-property/commit/73acb1f903c21b314ec7156bf10f73c7910530c0) +- [Dev Deps] update `tape`, `typescript` [`9489a77`](https://github.com/ljharb/define-data-property/commit/9489a7738bf2ecf0ac71d5b78ec4ca6ad7ba0142) + +## [v1.1.0](https://github.com/ljharb/define-data-property/compare/v1.0.1...v1.1.0) - 2023-09-13 + +### Commits + +- [New] add `loose` arg [`155235a`](https://github.com/ljharb/define-data-property/commit/155235a4c4d7741f6de01cd87c99599a56654b72) +- [New] allow `null` to be passed for the non* args [`7d2fa5f`](https://github.com/ljharb/define-data-property/commit/7d2fa5f06be0392736c13b126f7cd38979f34792) + +## [v1.0.1](https://github.com/ljharb/define-data-property/compare/v1.0.0...v1.0.1) - 2023-09-12 + +### Commits + +- [meta] add TS types [`43d763c`](https://github.com/ljharb/define-data-property/commit/43d763c6c883f652de1c9c02ef6216ee507ffa69) +- [Dev Deps] update `@types/tape`, `typescript` [`f444985`](https://github.com/ljharb/define-data-property/commit/f444985811c36f3e6448a03ad2f9b7898917f4c7) +- [meta] add `safe-publish-latest`, [`172bb10`](https://github.com/ljharb/define-data-property/commit/172bb10890896ebb160e64398f6ee55760107bee) + +## v1.0.0 - 2023-09-12 + +### Commits + +- Initial implementation, tests, readme [`5b43d6b`](https://github.com/ljharb/define-data-property/commit/5b43d6b44e675a904810467a7d4e0adb7efc3196) +- Initial commit [`35e577a`](https://github.com/ljharb/define-data-property/commit/35e577a6ba59a98befa97776d70d90f3bea9009d) +- npm init [`82a0a04`](https://github.com/ljharb/define-data-property/commit/82a0a04a321ca7de220af02d41e2745e8a9962ed) +- Only apps should have lockfiles [`96df244`](https://github.com/ljharb/define-data-property/commit/96df244a3c6f426f9a2437be825d1c6f5dd7158e) +- [meta] use `npmignore` to autogenerate an npmignore file [`a87ff18`](https://github.com/ljharb/define-data-property/commit/a87ff18cb79e14c2eb5720486c4759fd9a189375) diff --git a/node_modules/define-data-property/LICENSE b/node_modules/define-data-property/LICENSE new file mode 100644 index 0000000000000..b4213ac640ad5 --- /dev/null +++ b/node_modules/define-data-property/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/define-data-property/README.md b/node_modules/define-data-property/README.md new file mode 100644 index 0000000000000..f2304daef9b10 --- /dev/null +++ b/node_modules/define-data-property/README.md @@ -0,0 +1,67 @@ +# define-data-property [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Define a data property on an object. Will fall back to assignment in an engine without descriptors. + +The three `non*` argument can also be passed `null`, which will use the existing state if available. + +The `loose` argument will mean that if you attempt to set a non-normal data property, in an environment without descriptor support, it will fall back to normal assignment. + +## Usage + +```javascript +var defineDataProperty = require('define-data-property'); +var assert = require('assert'); + +var obj = {}; +defineDataProperty(obj, 'key', 'value'); +defineDataProperty( + obj, + 'key2', + 'value', + true, // nonEnumerable, optional + false, // nonWritable, optional + true, // nonConfigurable, optional + false // loose, optional +); + +assert.deepEqual( + Object.getOwnPropertyDescriptors(obj), + { + key: { + configurable: true, + enumerable: true, + value: 'value', + writable: true, + }, + key2: { + configurable: false, + enumerable: false, + value: 'value', + writable: true, + }, + } +); +``` + +[package-url]: https://npmjs.org/package/define-data-property +[npm-version-svg]: https://versionbadg.es/ljharb/define-data-property.svg +[deps-svg]: https://david-dm.org/ljharb/define-data-property.svg +[deps-url]: https://david-dm.org/ljharb/define-data-property +[dev-deps-svg]: https://david-dm.org/ljharb/define-data-property/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/define-data-property#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/define-data-property.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/define-data-property.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/define-data-property.svg +[downloads-url]: https://npm-stat.com/charts.html?package=define-data-property +[codecov-image]: https://codecov.io/gh/ljharb/define-data-property/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/define-data-property/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-data-property +[actions-url]: https://github.com/ljharb/define-data-property/actions diff --git a/node_modules/define-data-property/index.d.ts b/node_modules/define-data-property/index.d.ts new file mode 100644 index 0000000000000..d2e353d109fb9 --- /dev/null +++ b/node_modules/define-data-property/index.d.ts @@ -0,0 +1,3 @@ +declare const _exports: (obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void; +export = _exports; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/define-data-property/index.d.ts.map b/node_modules/define-data-property/index.d.ts.map new file mode 100644 index 0000000000000..39aca4b8d3877 --- /dev/null +++ b/node_modules/define-data-property/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"8BAqBiB,OAAO,WAAW,EAAE,OAAO,CAAC,YAAY,WAAW,SAAS,OAAO,kBAAkB,OAAO,GAAG,IAAI,gBAAgB,OAAO,GAAG,IAAI,oBAAoB,OAAO,GAAG,IAAI,UAAU,OAAO,KAAK,IAAI"} \ No newline at end of file diff --git a/node_modules/define-data-property/index.js b/node_modules/define-data-property/index.js new file mode 100644 index 0000000000000..95340651982e2 --- /dev/null +++ b/node_modules/define-data-property/index.js @@ -0,0 +1,68 @@ +'use strict'; + +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var gopd = require('gopd'); + +/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; diff --git a/node_modules/define-data-property/package.json b/node_modules/define-data-property/package.json new file mode 100644 index 0000000000000..1bb5815ba3335 --- /dev/null +++ b/node_modules/define-data-property/package.json @@ -0,0 +1,113 @@ +{ + "name": "define-data-property", + "version": "1.1.1", + "description": "Define a data property on an object. Will fall back to assignment in an engine without descriptors.", + "main": "index.js", + "exports": { + ".": [ + { + "types": "./index.d.ts", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "types": "./index.d.ts", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated && npm run emit-types", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "tsc": "tsc -p .", + "preemit-types": "rm -f *.ts *.ts.map test/*.ts test/*.ts.map", + "emit-types": "npm run tsc -- --noEmit false --emitDeclarationOnly", + "postemit-types": "rm test/*.ts test/*.ts.map", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/define-data-property.git" + }, + "keywords": [ + "define", + "data", + "property", + "object", + "accessor", + "javascript", + "ecmascript", + "enumerable", + "configurable", + "writable" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/define-data-property/issues" + }, + "homepage": "https://github.com/ljharb/define-data-property#readme", + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/es-value-fixtures": "^1.4.1", + "@types/for-each": "^0.3.1", + "@types/get-intrinsic": "^1.2.0", + "@types/gopd": "^1.0.1", + "@types/has": "^1.0.0", + "@types/has-property-descriptors": "^1.0.1", + "@types/object-inspect": "^1.8.2", + "@types/object.getownpropertydescriptors": "^2.1.2", + "@types/tape": "^5.6.1", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "has": "^1.0.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "object.getownpropertydescriptors": "^2.1.7", + "reflect.ownkeys": "^1.1.4", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1", + "typescript": "^5.3.0-dev.20231012" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "!*.ts", + "!*.ts.map", + "types/reflect.ownkeys" + ] + } +} diff --git a/node_modules/define-data-property/test/index.js b/node_modules/define-data-property/test/index.js new file mode 100644 index 0000000000000..405508ec510a7 --- /dev/null +++ b/node_modules/define-data-property/test/index.js @@ -0,0 +1,392 @@ +'use strict'; + +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); +var has = require('has'); +var hasPropertyDescriptors = require('has-property-descriptors')(); +var getOwnPropertyDescriptors = require('object.getownpropertydescriptors'); +var ownKeys = require('reflect.ownkeys'); + +var defineDataProperty = require('../'); + +test('defineDataProperty', function (t) { + t.test('argument validation', function (st) { + forEach(v.primitives, function (nonObject) { + st['throws']( + // @ts-expect-error + function () { defineDataProperty(nonObject, 'key', 'value'); }, + TypeError, + 'throws on non-object input: ' + inspect(nonObject) + ); + }); + + forEach(v.nonPropertyKeys, function (nonPropertyKey) { + st['throws']( + // @ts-expect-error + function () { defineDataProperty({}, nonPropertyKey, 'value'); }, + TypeError, + 'throws on non-PropertyKey input: ' + inspect(nonPropertyKey) + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + if (nonBoolean !== null) { + st['throws']( + // @ts-expect-error + function () { defineDataProperty({}, 'key', 'value', nonBoolean); }, + TypeError, + 'throws on non-boolean nonEnumerable: ' + inspect(nonBoolean) + ); + + st['throws']( + // @ts-expect-error + function () { defineDataProperty({}, 'key', 'value', false, nonBoolean); }, + TypeError, + 'throws on non-boolean nonWritable: ' + inspect(nonBoolean) + ); + + st['throws']( + // @ts-expect-error + function () { defineDataProperty({}, 'key', 'value', false, false, nonBoolean); }, + TypeError, + 'throws on non-boolean nonConfigurable: ' + inspect(nonBoolean) + ); + } + }); + + st.end(); + }); + + t.test('normal data property', function (st) { + /** @type {Record} */ + var obj = { existing: 'existing property' }; + st.ok(has(obj, 'existing'), 'has initial own property'); + st.equal(obj.existing, 'existing property', 'has expected initial value'); + + var res = defineDataProperty(obj, 'added', 'added property'); + st.equal(res, void undefined, 'returns `undefined`'); + st.ok(has(obj, 'added'), 'has expected own property'); + st.equal(obj.added, 'added property', 'has expected value'); + + defineDataProperty(obj, 'existing', 'new value'); + st.ok(has(obj, 'existing'), 'still has expected own property'); + st.equal(obj.existing, 'new value', 'has new expected value'); + + defineDataProperty(obj, 'explicit1', 'new value', false); + st.ok(has(obj, 'explicit1'), 'has expected own property (explicit enumerable)'); + st.equal(obj.explicit1, 'new value', 'has new expected value (explicit enumerable)'); + + defineDataProperty(obj, 'explicit2', 'new value', false, false); + st.ok(has(obj, 'explicit2'), 'has expected own property (explicit writable)'); + st.equal(obj.explicit2, 'new value', 'has new expected value (explicit writable)'); + + defineDataProperty(obj, 'explicit3', 'new value', false, false, false); + st.ok(has(obj, 'explicit3'), 'has expected own property (explicit configurable)'); + st.equal(obj.explicit3, 'new value', 'has new expected value (explicit configurable)'); + + st.end(); + }); + + t.test('loose mode', { skip: !hasPropertyDescriptors }, function (st) { + var obj = { existing: 'existing property' }; + + defineDataProperty(obj, 'added', 'added value 1', true, null, null, true); + st.deepEqual( + getOwnPropertyDescriptors(obj), + { + existing: { + configurable: true, + enumerable: true, + value: 'existing property', + writable: true + }, + added: { + configurable: true, + enumerable: !hasPropertyDescriptors, + value: 'added value 1', + writable: true + } + }, + 'in loose mode, obj still adds property 1' + ); + + defineDataProperty(obj, 'added', 'added value 2', false, true, null, true); + st.deepEqual( + getOwnPropertyDescriptors(obj), + { + existing: { + configurable: true, + enumerable: true, + value: 'existing property', + writable: true + }, + added: { + configurable: true, + enumerable: true, + value: 'added value 2', + writable: !hasPropertyDescriptors + } + }, + 'in loose mode, obj still adds property 2' + ); + + defineDataProperty(obj, 'added', 'added value 3', false, false, true, true); + st.deepEqual( + getOwnPropertyDescriptors(obj), + { + existing: { + configurable: true, + enumerable: true, + value: 'existing property', + writable: true + }, + added: { + configurable: !hasPropertyDescriptors, + enumerable: true, + value: 'added value 3', + writable: true + } + }, + 'in loose mode, obj still adds property 3' + ); + + st.end(); + }); + + t.test('non-normal data property, ES3', { skip: hasPropertyDescriptors }, function (st) { + /** @type {Record} */ + var obj = { existing: 'existing property' }; + + st['throws']( + function () { defineDataProperty(obj, 'added', 'added value', true); }, + SyntaxError, + 'nonEnumerable throws a Syntax Error' + ); + + st['throws']( + function () { defineDataProperty(obj, 'added', 'added value', false, true); }, + SyntaxError, + 'nonWritable throws a Syntax Error' + ); + + st['throws']( + function () { defineDataProperty(obj, 'added', 'added value', false, false, true); }, + SyntaxError, + 'nonWritable throws a Syntax Error' + ); + + st.deepEqual( + ownKeys(obj), + ['existing'], + 'obj still has expected keys' + ); + st.equal(obj.existing, 'existing property', 'obj still has expected values'); + + st.end(); + }); + + t.test('new non-normal data property, ES5+', { skip: !hasPropertyDescriptors }, function (st) { + /** @type {Record} */ + var obj = { existing: 'existing property' }; + + defineDataProperty(obj, 'nonEnum', null, true); + defineDataProperty(obj, 'nonWrit', null, false, true); + defineDataProperty(obj, 'nonConf', null, false, false, true); + + st.deepEqual( + getOwnPropertyDescriptors(obj), + { + existing: { + configurable: true, + enumerable: true, + value: 'existing property', + writable: true + }, + nonEnum: { + configurable: true, + enumerable: false, + value: null, + writable: true + }, + nonWrit: { + configurable: true, + enumerable: true, + value: null, + writable: false + }, + nonConf: { + configurable: false, + enumerable: true, + value: null, + writable: true + } + }, + 'obj has expected property descriptors' + ); + + st.end(); + }); + + t.test('existing non-normal data property, ES5+', { skip: !hasPropertyDescriptors }, function (st) { + // test case changing an existing non-normal property + + /** @type {Record} */ + var obj = {}; + Object.defineProperty(obj, 'nonEnum', { configurable: true, enumerable: false, value: null, writable: true }); + Object.defineProperty(obj, 'nonWrit', { configurable: true, enumerable: true, value: null, writable: false }); + Object.defineProperty(obj, 'nonConf', { configurable: false, enumerable: true, value: null, writable: true }); + + st.deepEqual( + getOwnPropertyDescriptors(obj), + { + nonEnum: { + configurable: true, + enumerable: false, + value: null, + writable: true + }, + nonWrit: { + configurable: true, + enumerable: true, + value: null, + writable: false + }, + nonConf: { + configurable: false, + enumerable: true, + value: null, + writable: true + } + }, + 'obj initially has expected property descriptors' + ); + + defineDataProperty(obj, 'nonEnum', 'new value', false); + defineDataProperty(obj, 'nonWrit', 'new value', false, false); + st['throws']( + function () { defineDataProperty(obj, 'nonConf', 'new value', false, false, false); }, + TypeError, + 'can not alter a nonconfigurable property' + ); + + st.deepEqual( + getOwnPropertyDescriptors(obj), + { + nonEnum: { + configurable: true, + enumerable: true, + value: 'new value', + writable: true + }, + nonWrit: { + configurable: true, + enumerable: true, + value: 'new value', + writable: true + }, + nonConf: { + configurable: false, + enumerable: true, + value: null, + writable: true + } + }, + 'obj ends up with expected property descriptors' + ); + + st.end(); + }); + + t.test('frozen object, ES5+', { skip: !hasPropertyDescriptors }, function (st) { + var frozen = Object.freeze({ existing: true }); + + st['throws']( + function () { defineDataProperty(frozen, 'existing', 'new value'); }, + TypeError, + 'frozen object can not modify an existing property' + ); + + st['throws']( + function () { defineDataProperty(frozen, 'new', 'new property'); }, + TypeError, + 'frozen object can not add a new property' + ); + + st.end(); + }); + + t.test('sealed object, ES5+', { skip: !hasPropertyDescriptors }, function (st) { + var sealed = Object.seal({ existing: true }); + st.deepEqual( + Object.getOwnPropertyDescriptor(sealed, 'existing'), + { + configurable: false, + enumerable: true, + value: true, + writable: true + }, + 'existing value on sealed object has expected descriptor' + ); + + defineDataProperty(sealed, 'existing', 'new value'); + + st.deepEqual( + Object.getOwnPropertyDescriptor(sealed, 'existing'), + { + configurable: false, + enumerable: true, + value: 'new value', + writable: true + }, + 'existing value on sealed object has changed descriptor' + ); + + st['throws']( + function () { defineDataProperty(sealed, 'new', 'new property'); }, + TypeError, + 'sealed object can not add a new property' + ); + + st.end(); + }); + + t.test('nonextensible object, ES5+', { skip: !hasPropertyDescriptors }, function (st) { + var nonExt = Object.preventExtensions({ existing: true }); + + st.deepEqual( + Object.getOwnPropertyDescriptor(nonExt, 'existing'), + { + configurable: true, + enumerable: true, + value: true, + writable: true + }, + 'existing value on non-extensible object has expected descriptor' + ); + + defineDataProperty(nonExt, 'existing', 'new value', true); + + st.deepEqual( + Object.getOwnPropertyDescriptor(nonExt, 'existing'), + { + configurable: true, + enumerable: false, + value: 'new value', + writable: true + }, + 'existing value on non-extensible object has changed descriptor' + ); + + st['throws']( + function () { defineDataProperty(nonExt, 'new', 'new property'); }, + TypeError, + 'non-extensible object can not add a new property' + ); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/define-data-property/tsconfig.json b/node_modules/define-data-property/tsconfig.json new file mode 100644 index 0000000000000..69f060dccdff2 --- /dev/null +++ b/node_modules/define-data-property/tsconfig.json @@ -0,0 +1,59 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/define-properties/.editorconfig b/node_modules/define-properties/.editorconfig new file mode 100644 index 0000000000000..eaa214161f5cd --- /dev/null +++ b/node_modules/define-properties/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/define-properties/.eslintrc b/node_modules/define-properties/.eslintrc new file mode 100644 index 0000000000000..4297a97f636e0 --- /dev/null +++ b/node_modules/define-properties/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [2, { "min": 1, "max": 35 }], + "max-params": [2, 4], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + }, + }, + ], +} diff --git a/node_modules/define-properties/.github/FUNDING.yml b/node_modules/define-properties/.github/FUNDING.yml new file mode 100644 index 0000000000000..c70f264ad1937 --- /dev/null +++ b/node_modules/define-properties/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/define-properties +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/define-properties/.nycrc b/node_modules/define-properties/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/define-properties/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/define-properties/CHANGELOG.md b/node_modules/define-properties/CHANGELOG.md new file mode 100644 index 0000000000000..5bdf5f1cc7ca9 --- /dev/null +++ b/node_modules/define-properties/CHANGELOG.md @@ -0,0 +1,91 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.1](https://github.com/ljharb/define-properties/compare/v1.2.0...v1.2.1) - 2023-09-12 + +### Commits + +- [Refactor] use `define-data-property` [`e7782a7`](https://github.com/ljharb/define-properties/commit/e7782a7480a62f8b6e141b49371e6de4df176c97) +- [actions] use reusable rebase action [`cd249c3`](https://github.com/ljharb/define-properties/commit/cd249c3920607bc8eeb7c0cd5b672b810983cac5) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`8205f97`](https://github.com/ljharb/define-properties/commit/8205f9734a4da8ee5b3b29798788567a09b330e8) + +## [v1.2.0](https://github.com/ljharb/define-properties/compare/v1.1.4...v1.2.0) - 2023-02-10 + +### Commits + +- [New] if the predicate is boolean `true`, it compares the existing value with `===` as the predicate [`d8dd6fc`](https://github.com/ljharb/define-properties/commit/d8dd6fca40d7c5878a4b643b91e66ae5a513a194) +- [meta] add `auto-changelog` [`7ebe2b0`](https://github.com/ljharb/define-properties/commit/7ebe2b0a0f90e62b842942cd45e86864fe75d9f6) +- [meta] use `npmignore` to autogenerate an npmignore file [`647478a`](https://github.com/ljharb/define-properties/commit/647478a8401fbf053fb633c0a3a7c982da6bad74) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`e620d70`](https://github.com/ljharb/define-properties/commit/e620d707d2e1118a38796f22a862200eb0a53fff) +- [Dev Deps] update `aud`, `tape` [`f1e5072`](https://github.com/ljharb/define-properties/commit/f1e507225c2551a99ed4fe40d3fe71b0f44acf88) +- [actions] update checkout action [`628b3af`](https://github.com/ljharb/define-properties/commit/628b3af5c74b8f0963296d811a8f6fa657baf964) + + + +1.1.4 / 2022-04-14 +================= + * [Refactor] use `has-property-descriptors` + * [readme] add github actions/codecov badges + * [Docs] fix header parsing; remove testling + * [Deps] update `object-keys` + * [meta] use `prepublishOnly` script for npm 7+ + * [meta] add `funding` field; create FUNDING.yml + * [actions] add "Allow Edits" workflow; automatic rebasing / merge commit blocking + * [actions] reuse common workflows + * [actions] update codecov uploader + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests; use `tape` runner + * [Tests] use shared travis-ci config + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] remove `jscs` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape`; add `aud`, `safe-publish-latest` + +1.1.3 / 2018-08-14 +================= + * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes + * [Robustness] cache `Array.prototype.concat` and `Object.defineProperty` + * [Deps] update `object-keys` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape`, `jscs`; remove unused eccheck script + dep + * [Tests] use pretest/posttest for linting/security + * [Tests] fix npm upgrades on older nodes + +1.1.2 / 2015-10-14 +================= + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Deps] Update `object-keys` + * [Dev Deps] update `jscs`, `tape`, `eslint`, `@ljharb/eslint-config`, `nsp` + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + +1.1.1 / 2015-07-21 +================= + * [Deps] Update `object-keys` + * [Dev Deps] Update `tape`, `eslint` + * [Tests] Test on `io.js` `v2.4` + +1.1.0 / 2015-07-01 +================= + * [New] Add support for symbol-valued properties. + * [Dev Deps] Update `nsp`, `eslint` + * [Tests] Test up to `io.js` `v2.3` + +1.0.3 / 2015-05-30 +================= + * Using a more reliable check for supported property descriptors. + +1.0.2 / 2015-05-23 +================= + * Test up to `io.js` `v2.0` + * Update `tape`, `jscs`, `nsp`, `eslint`, `object-keys`, `editorconfig-tools`, `covert` + +1.0.1 / 2015-01-06 +================= + * Update `object-keys` to fix ES3 support + +1.0.0 / 2015-01-04 +================= + * v1.0.0 diff --git a/node_modules/define-properties/LICENSE b/node_modules/define-properties/LICENSE new file mode 100644 index 0000000000000..8c271c14b62fa --- /dev/null +++ b/node_modules/define-properties/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/define-properties/README.md b/node_modules/define-properties/README.md new file mode 100644 index 0000000000000..650adfa3abe49 --- /dev/null +++ b/node_modules/define-properties/README.md @@ -0,0 +1,84 @@ +# define-properties [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines. +Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides. + +## Example + +```js +var define = require('define-properties'); +var assert = require('assert'); + +var obj = define({ a: 1, b: 2 }, { + a: 10, + b: 20, + c: 30 +}); +assert(obj.a === 1); +assert(obj.b === 2); +assert(obj.c === 30); +if (define.supportsDescriptors) { + assert.deepEqual(Object.keys(obj), ['a', 'b']); + assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), { + configurable: true, + enumerable: false, + value: 30, + writable: false + }); +} +``` + +Then, with predicates: +```js +var define = require('define-properties'); +var assert = require('assert'); + +var obj = define({ a: 1, b: 2, c: 3 }, { + a: 10, + b: 20, + c: 30 +}, { + a: function () { return false; }, + b: function () { return true; } +}); +assert(obj.a === 1); +assert(obj.b === 20); +assert(obj.c === 3); +if (define.supportsDescriptors) { + assert.deepEqual(Object.keys(obj), ['a', 'c']); + assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), { + configurable: true, + enumerable: false, + value: 20, + writable: false + }); +} +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/define-properties +[npm-version-svg]: https://versionbadg.es/ljharb/define-properties.svg +[deps-svg]: https://david-dm.org/ljharb/define-properties.svg +[deps-url]: https://david-dm.org/ljharb/define-properties +[dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/define-properties.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/define-properties.svg +[downloads-url]: https://npm-stat.com/charts.html?package=define-properties +[codecov-image]: https://codecov.io/gh/ljharb/define-properties/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/define-properties/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-properties +[actions-url]: https://github.com/ljharb/define-properties/actions diff --git a/node_modules/define-properties/index.js b/node_modules/define-properties/index.js new file mode 100644 index 0000000000000..1860404e43936 --- /dev/null +++ b/node_modules/define-properties/index.js @@ -0,0 +1,47 @@ +'use strict'; + +var keys = require('object-keys'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var defineDataProperty = require('define-data-property'); + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var supportsDescriptors = require('has-property-descriptors')(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; diff --git a/node_modules/define-properties/package.json b/node_modules/define-properties/package.json new file mode 100644 index 0000000000000..577d8853b31ef --- /dev/null +++ b/node_modules/define-properties/package.json @@ -0,0 +1,88 @@ +{ + "name": "define-properties", + "version": "1.2.1", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/define-properties.git" + }, + "keywords": [ + "Object.defineProperty", + "Object.defineProperties", + "object", + "property descriptor", + "descriptor", + "define", + "ES5" + ], + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "1.1.5" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test/" + ] + } +} diff --git a/node_modules/define-property/CHANGELOG.md b/node_modules/define-property/CHANGELOG.md new file mode 100644 index 0000000000000..901c8aaee93c5 --- /dev/null +++ b/node_modules/define-property/CHANGELOG.md @@ -0,0 +1,82 @@ +# 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. + +
+ +## [2.0.0] - 2017-04-20 + +### Changed + +- Now supports data descriptors in addition to accessor descriptors. +- Now uses [Reflect.defineProperty][reflect] when available, otherwise falls back to [Object.defineProperty][object]. + +## [1.0.0] - 2017-04-20 + +- stable release + +## [0.2.5] - 2015-08-31 + +- use is-descriptor + +## [0.2.3] - 2015-08-29 + +- check keys length + +## [0.2.2] - 2015-08-27 + +- ensure val is an object + +## [0.2.1] - 2015-08-27 + +- support functions + +## [0.2.0] - 2015-08-27 + +- support get/set +- update docs + +## [0.1.0] - 2015-08-12 + +- first commit + +[2.0.0]: https://github.com/jonschlinkert/define-property/compare/1.0.0...2.0.0 +[1.0.0]: https://github.com/jonschlinkert/define-property/compare/0.2.5...1.0.0 +[0.2.5]: https://github.com/jonschlinkert/define-property/compare/0.2.3...0.2.5 +[0.2.3]: https://github.com/jonschlinkert/define-property/compare/0.2.2...0.2.3 +[0.2.2]: https://github.com/jonschlinkert/define-property/compare/0.2.1...0.2.2 +[0.2.1]: https://github.com/jonschlinkert/define-property/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/jonschlinkert/define-property/compare/0.1.3...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog + +[object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty +[reflect]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty diff --git a/node_modules/define-property/LICENSE b/node_modules/define-property/LICENSE new file mode 100644 index 0000000000000..f8de0630598b1 --- /dev/null +++ b/node_modules/define-property/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/define-property/README.md b/node_modules/define-property/README.md new file mode 100644 index 0000000000000..f1ee8f92e8be5 --- /dev/null +++ b/node_modules/define-property/README.md @@ -0,0 +1,117 @@ +# 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. Uses Reflect.defineProperty when available, otherwise Object.defineProperty. + +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 define-property +``` + +## Release history + +See [the CHANGELOG](changelog.md) for updates. + +## Usage + +**Params** + +* `object`: The object on which to define the property. +* `key`: The name of the property to be defined or modified. +* `value`: The value or descriptor of the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +// by default, defined properties are non-enumberable +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**defining setters/getters** + +Pass the same properties you would if using [Object.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) or [Reflect.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty). + +```js +define(obj, 'foo', { + set: function() {}, + get: function() {} +}); +``` + +## 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: + +* [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.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 28 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | + +### Author + +**Jon Schlinkert** + +* Connect with me on [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* Follow me on [github/jonschlinkert](https://github.com/jonschlinkert) +* Follow me on [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 January 25, 2018._ \ No newline at end of file diff --git a/node_modules/define-property/index.js b/node_modules/define-property/index.js new file mode 100644 index 0000000000000..0efa0a9e6498c --- /dev/null +++ b/node_modules/define-property/index.js @@ -0,0 +1,38 @@ +/*! + * define-property + * + * Copyright (c) 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isobject = require('isobject'); +var isDescriptor = require('is-descriptor'); +var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) + ? Reflect.defineProperty + : Object.defineProperty; + +module.exports = function defineProperty(obj, key, val) { + if (!isobject(obj) && typeof obj !== 'function' && !Array.isArray(obj)) { + throw new TypeError('expected an object, function, or array'); + } + + if (typeof key !== 'string') { + throw new TypeError('expected "key" to be a string'); + } + + if (isDescriptor(val)) { + define(obj, key, val); + return obj; + } + + define(obj, key, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); + + return obj; +}; diff --git a/node_modules/define-property/node_modules/isobject/LICENSE b/node_modules/define-property/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..943e71d05511e --- /dev/null +++ b/node_modules/define-property/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/define-property/node_modules/isobject/README.md b/node_modules/define-property/node_modules/isobject/README.md new file mode 100644 index 0000000000000..d01feaa40bc13 --- /dev/null +++ b/node_modules/define-property/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/define-property/node_modules/isobject/index.d.ts b/node_modules/define-property/node_modules/isobject/index.d.ts new file mode 100644 index 0000000000000..55f81c275f150 --- /dev/null +++ b/node_modules/define-property/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/define-property/node_modules/isobject/index.js b/node_modules/define-property/node_modules/isobject/index.js new file mode 100644 index 0000000000000..2d59958bf4eab --- /dev/null +++ b/node_modules/define-property/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/define-property/node_modules/isobject/package.json b/node_modules/define-property/node_modules/isobject/package.json new file mode 100644 index 0000000000000..62aa8c1b2feea --- /dev/null +++ b/node_modules/define-property/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "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" + ] + } +} diff --git a/node_modules/define-property/package.json b/node_modules/define-property/package.json new file mode 100644 index 0000000000000..f8fd21cbc97f0 --- /dev/null +++ b/node_modules/define-property/package.json @@ -0,0 +1,67 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object. Uses Reflect.defineProperty when available, otherwise Object.defineProperty.", + "version": "2.0.2", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assign-deep", + "extend-shallow", + "merge-deep", + "mixin-deep" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/duplexer/.travis.yml b/node_modules/duplexer/.travis.yml new file mode 100644 index 0000000000000..ed05f88d50029 --- /dev/null +++ b/node_modules/duplexer/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.11" + - "0.10" + - "0.8" + - "0.6" diff --git a/node_modules/duplexer/LICENCE b/node_modules/duplexer/LICENCE new file mode 100644 index 0000000000000..a23e08a85aeef --- /dev/null +++ b/node_modules/duplexer/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/duplexer/README.md b/node_modules/duplexer/README.md new file mode 100644 index 0000000000000..1dd3b896fd44b --- /dev/null +++ b/node_modules/duplexer/README.md @@ -0,0 +1,49 @@ +# duplexer + +[![build status][1]][2] [![dependency status][3]][4] + +[![browser support][5]][6] + +Creates a duplex stream + +Taken from [event-stream][7] + +## 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. + +## Example + +```js +var cp = require('child_process') + , duplex = require('duplexer') + , grep = cp.exec('grep Stream') + +duplex(grep.stdin, grep.stdout) +``` + +## Installation + +`npm install duplexer` + +## Tests + +`npm test` + +## Contributors + + - Dominictarr + - Raynos + - samccone + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Raynos/duplexer.png + [2]: https://travis-ci.org/Raynos/duplexer + [3]: https://david-dm.org/Raynos/duplexer.png + [4]: https://david-dm.org/Raynos/duplexer + [5]: https://ci.testling.com/Raynos/duplexer.png + [6]: https://ci.testling.com/Raynos/duplexer + [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream diff --git a/node_modules/duplexer/index.js b/node_modules/duplexer/index.js new file mode 100644 index 0000000000000..a188a2105dcd6 --- /dev/null +++ b/node_modules/duplexer/index.js @@ -0,0 +1,87 @@ +var Stream = require("stream") +var writeMethods = ["write", "end", "destroy"] +var readMethods = ["resume", "pause"] +var readEvents = ["data", "close"] +var slice = Array.prototype.slice + +module.exports = duplex + +function forEach (arr, fn) { + if (arr.forEach) { + return arr.forEach(fn) + } + + for (var i = 0; i < arr.length; i++) { + fn(arr[i], i) + } +} + +function duplex(writer, reader) { + var stream = new Stream() + var ended = false + + forEach(writeMethods, proxyWriter) + + forEach(readMethods, proxyReader) + + forEach(readEvents, proxyStream) + + reader.on("end", handleEnd) + + writer.on("drain", function() { + stream.emit("drain") + }) + + writer.on("error", reemit) + reader.on("error", reemit) + + stream.writable = writer.writable + stream.readable = reader.readable + + return stream + + function proxyWriter(methodName) { + stream[methodName] = method + + function method() { + return writer[methodName].apply(writer, arguments) + } + } + + function proxyReader(methodName) { + stream[methodName] = method + + function method() { + stream.emit(methodName) + var func = reader[methodName] + if (func) { + return func.apply(reader, arguments) + } + reader.emit(methodName) + } + } + + function proxyStream(methodName) { + reader.on(methodName, reemit) + + function reemit() { + var args = slice.call(arguments) + args.unshift(methodName) + stream.emit.apply(stream, args) + } + } + + function handleEnd() { + if (ended) { + return + } + ended = true + var args = slice.call(arguments) + args.unshift("end") + stream.emit.apply(stream, args) + } + + function reemit(err) { + stream.emit("error", err) + } +} diff --git a/node_modules/duplexer/package.json b/node_modules/duplexer/package.json new file mode 100644 index 0000000000000..015bd415b556b --- /dev/null +++ b/node_modules/duplexer/package.json @@ -0,0 +1,42 @@ +{ + "name": "duplexer", + "version": "0.1.2", + "description": "Creates a duplex stream", + "keywords": [], + "author": "Raynos ", + "repository": "git://github.com/Raynos/duplexer.git", + "main": "index", + "homepage": "https://github.com/Raynos/duplexer", + "contributors": [ + { + "name": "Jake Verbaten" + } + ], + "bugs": { + "url": "https://github.com/Raynos/duplexer/issues", + "email": "raynos2@gmail.com" + }, + "devDependencies": { + "tape": "0.3.3", + "through": "~0.1.4" + }, + "license": "MIT", + "scripts": { + "test": "node test" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..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" + ] + } +} diff --git a/node_modules/duplexer/test/index.js b/node_modules/duplexer/test/index.js new file mode 100644 index 0000000000000..a15456788d675 --- /dev/null +++ b/node_modules/duplexer/test/index.js @@ -0,0 +1,31 @@ +var through = require("through") +var test = require("tape") + +var duplex = require("../index") + +var readable = through() +var writable = through(write) +var written = 0 +var data = 0 + +var stream = duplex(writable, readable) + +function write() { + written++ +} + +stream.on("data", ondata) + +function ondata() { + data++ +} + +test("emit and write", function(t) { + t.plan(2) + + stream.write() + readable.emit("data") + + t.equal(written, 1, "should have written once") + t.equal(data, 1, "should have received once") +}) diff --git a/node_modules/error-ex/LICENSE b/node_modules/error-ex/LICENSE new file mode 100644 index 0000000000000..0a5f461a69303 --- /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 0000000000000..97f744af89725 --- /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 0000000000000..4fb20b4879fa3 --- /dev/null +++ b/node_modules/error-ex/index.js @@ -0,0 +1,141 @@ +'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 overwrittenStack = null; + + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + + stackDescriptor.set = function (newstack) { + overwrittenStack = newstack; + }; + + stackDescriptor.get = function () { + var stack = (overwrittenStack || ((stackGetter) + ? stackGetter.call(this) + : stackValue)).split(/\r?\n+/g); + + // starting in Node 7, the stack builder caches the message. + // just replace it. + if (!overwrittenStack) { + 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 0000000000000..f3d9ae0e3b921 --- /dev/null +++ b/node_modules/error-ex/package.json @@ -0,0 +1,46 @@ +{ + "name": "error-ex", + "description": "Easy error subclassing and stack customization", + "version": "1.3.2", + "maintainers": [ + "Josh Junon (github.com/qix-)", + "Sindre Sorhus (sindresorhus.com)" + ], + "keywords": [ + "error", + "errors", + "extend", + "extending", + "extension", + "subclass", + "stack", + "custom" + ], + "license": "MIT", + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "xo": { + "rules": { + "operator-linebreak": [ + 0 + ] + } + }, + "repository": "qix-/node-error-ex", + "files": [ + "index.js" + ], + "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" + }, + "dependencies": { + "is-arrayish": "^0.2.1" + } +} diff --git a/node_modules/es-abstract/.editorconfig b/node_modules/es-abstract/.editorconfig new file mode 100644 index 0000000000000..4598a381a859c --- /dev/null +++ b/node_modules/es-abstract/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + +[CHANGELOG.md] +indent_style = space diff --git a/node_modules/es-abstract/.eslintrc b/node_modules/es-abstract/.eslintrc new file mode 100644 index 0000000000000..d1c20db51d485 --- /dev/null +++ b/node_modules/es-abstract/.eslintrc @@ -0,0 +1,88 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "es6": true, + }, + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 40 }], + "max-params": [2, 5], + "max-lines-per-function": 1, + "max-statements": 1, + "max-statements-per-line": [2, { "max": 2 }], + "multiline-comment-style": 0, + "no-magic-numbers": 0, + "new-cap": 0, + "no-extra-parens": 1, + "sort-keys": 0, + }, + + "overrides": [ + { + "files": "GetIntrinsic.js", + "rules": { + "max-statements": 0, + } + }, + { + "files": "operations/*", + "rules": { + "max-lines": 0, + }, + }, + { + "files": [ + "operations/deltas.js", + "operations/getOps.js", + "operations/spackle.js", + "operations/years.js", + ], + "extends": "@ljharb/eslint-config/node/latest", + "rules": { + "complexity": 0, + "func-style": 0, + "max-lines-per-function": 0, + "max-nested-callbacks": 0, + "max-statements": 0, + "no-magic-numbers": 0, + "no-throw-literal": 0, + }, + }, + { + "files": "test/**", + "extends": "@ljharb/eslint-config/tests", + "rules": { + "max-len": 0, + "max-lines-per-function": 0, + "no-implicit-coercion": 0, + "no-invalid-this": 1, + "prefer-promise-reject-errors": 0, + }, + }, + { + "files": [ + "*/Num*ToRawBytes.js", + "*/RawBytesToNum*.js", + "helpers/bytesAs*.js", + "helpers/valueToFloat*.js", + ], + "rules": { + "max-lines-per-function": "off", + "max-statements": "off", + "no-redeclare": "warn", + "operator-linebreak": [2, "before", { + "overrides": { + "=": "none" + } + }], + }, + }, + ], +} diff --git a/node_modules/es-abstract/.nycrc b/node_modules/es-abstract/.nycrc new file mode 100644 index 0000000000000..9e5435f9d6400 --- /dev/null +++ b/node_modules/es-abstract/.nycrc @@ -0,0 +1,15 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "operations", + "test", + "helpers/callBind.js", + "helpers/callBound.js", + "helpers/getOwnPropertyDescriptor.js", + "helpers/getSymbolDescription.js", + "helpers/regexTester.js" + ] +} diff --git a/node_modules/es-abstract/2015/AbstractEqualityComparison.js b/node_modules/es-abstract/2015/AbstractEqualityComparison.js new file mode 100644 index 0000000000000..b56a506622447 --- /dev/null +++ b/node_modules/es-abstract/2015/AbstractEqualityComparison.js @@ -0,0 +1,37 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return x === y; // ES6+ specified this shortcut anyways. + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'Symbol') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + return false; +}; diff --git a/node_modules/es-abstract/2015/AbstractRelationalComparison.js b/node_modules/es-abstract/2015/AbstractRelationalComparison.js new file mode 100644 index 0000000000000..0dfed5ffe1c63 --- /dev/null +++ b/node_modules/es-abstract/2015/AbstractRelationalComparison.js @@ -0,0 +1,63 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var isPrefixOf = require('../helpers/isPrefixOf'); + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.8.5 + +// eslint-disable-next-line max-statements +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + var bothStrings = Type(px) === 'String' && Type(py) === 'String'; + if (!bothStrings) { + var nx = ToNumber(px); + var ny = ToNumber(py); + if ($isNaN(nx) || $isNaN(ny)) { + return undefined; + } + if ($isFinite(nx) && $isFinite(ny) && nx === ny) { + return false; + } + if (nx === Infinity) { + return false; + } + if (ny === Infinity) { + return true; + } + if (ny === -Infinity) { + return false; + } + if (nx === -Infinity) { + return true; + } + return nx < ny; // by now, these are both nonzero, finite, and not equal + } + if (isPrefixOf(py, px)) { + return false; + } + if (isPrefixOf(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f +}; diff --git a/node_modules/es-abstract/2015/AdvanceStringIndex.js b/node_modules/es-abstract/2015/AdvanceStringIndex.js new file mode 100644 index 0000000000000..831ea96ef9135 --- /dev/null +++ b/node_modules/es-abstract/2015/AdvanceStringIndex.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charCodeAt = require('call-bind/callBound')('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/6.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + + var first = $charCodeAt(S, index); + if (!isLeadingSurrogate(first)) { + return index + 1; + } + + var second = $charCodeAt(S, index + 1); + if (!isTrailingSurrogate(second)) { + return index + 1; + } + + return index + 2; +}; diff --git a/node_modules/es-abstract/2015/ArrayCreate.js b/node_modules/es-abstract/2015/ArrayCreate.js new file mode 100644 index 0000000000000..0d34db9beca45 --- /dev/null +++ b/node_modules/es-abstract/2015/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var hasProto = require('has-proto')(); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/6.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 5 - 7, and 9 + if (proto !== $ArrayPrototype) { // step 8 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 2 + A.length = length; + } + /* step 10, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2015/ArraySetLength.js b/node_modules/es-abstract/2015/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2015/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2015/ArraySpeciesCreate.js b/node_modules/es-abstract/2015/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..1944dfe7b8974 --- /dev/null +++ b/node_modules/es-abstract/2015/ArraySpeciesCreate.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Array = GetIntrinsic('%Array%'); +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + var len = length === 0 ? 0 : length; + var C; + var isArray = IsArray(originalArray); + if (isArray) { + C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + } + if (typeof C === 'undefined') { + return $Array(len); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(len); // Construct(C, len); +}; + diff --git a/node_modules/es-abstract/2015/Call.js b/node_modules/es-abstract/2015/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2015/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2015/CanonicalNumericIndexString.js b/node_modules/es-abstract/2015/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2015/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2015/Canonicalize.js b/node_modules/es-abstract/2015/Canonicalize.js new file mode 100644 index 0000000000000..49741831a618d --- /dev/null +++ b/node_modules/es-abstract/2015/Canonicalize.js @@ -0,0 +1,55 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(ch, IgnoreCase, Unicode) { + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + if (Unicode) { // step 2 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 2.b + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/2015/CharacterRange.js b/node_modules/es-abstract/2015/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2015/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2015/CompletePropertyDescriptor.js b/node_modules/es-abstract/2015/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2015/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2015/CompletionRecord.js b/node_modules/es-abstract/2015/CompletionRecord.js new file mode 100644 index 0000000000000..c0ad487c1f104 --- /dev/null +++ b/node_modules/es-abstract/2015/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/6.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[type]]', type); + SLOT.set(this, '[[value]]', value); + // [[target]] slot? +}; + +CompletionRecord.prototype.type = function type() { + return SLOT.get(this, '[[type]]'); +}; + +CompletionRecord.prototype.value = function value() { + return SLOT.get(this, '[[value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[type]]'); + var value = SLOT.get(this, '[[value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2015/CreateDataProperty.js b/node_modules/es-abstract/2015/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2015/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2015/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2015/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..c40e69368b91d --- /dev/null +++ b/node_modules/es-abstract/2015/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2015/CreateHTML.js b/node_modules/es-abstract/2015/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2015/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2015/CreateIterResultObject.js b/node_modules/es-abstract/2015/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2015/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2015/CreateListFromArrayLike.js b/node_modules/es-abstract/2015/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..4c34219206e1f --- /dev/null +++ b/node_modules/es-abstract/2015/CreateListFromArrayLike.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object']; + +// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = ToLength(Get(obj, 'length')); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2015/CreateMethodProperty.js b/node_modules/es-abstract/2015/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2015/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2015/DateFromTime.js b/node_modules/es-abstract/2015/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2015/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2015/Day.js b/node_modules/es-abstract/2015/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2015/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2015/DayFromYear.js b/node_modules/es-abstract/2015/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2015/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2015/DayWithinYear.js b/node_modules/es-abstract/2015/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2015/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2015/DaysInYear.js b/node_modules/es-abstract/2015/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2015/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2015/DefinePropertyOrThrow.js b/node_modules/es-abstract/2015/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2015/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2015/DeletePropertyOrThrow.js b/node_modules/es-abstract/2015/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2015/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2015/DetachArrayBuffer.js b/node_modules/es-abstract/2015/DetachArrayBuffer.js new file mode 100644 index 0000000000000..a7b89b36bbcad --- /dev/null +++ b/node_modules/es-abstract/2015/DetachArrayBuffer.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; // node 11.7+ +} catch (e) { /**/ } + +// https://262.ecma-international.org/6.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2015/EnumerableOwnNames.js b/node_modules/es-abstract/2015/EnumerableOwnNames.js new file mode 100644 index 0000000000000..b8235966aca93 --- /dev/null +++ b/node_modules/es-abstract/2015/EnumerableOwnNames.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var keys = require('object-keys'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-enumerableownnames + +module.exports = function EnumerableOwnNames(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return keys(O); +}; diff --git a/node_modules/es-abstract/2015/FromPropertyDescriptor.js b/node_modules/es-abstract/2015/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2015/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2015/Get.js b/node_modules/es-abstract/2015/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2015/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2015/GetGlobalObject.js b/node_modules/es-abstract/2015/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2015/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2015/GetIterator.js b/node_modules/es-abstract/2015/GetIterator.js new file mode 100644 index 0000000000000..145557da422e4 --- /dev/null +++ b/node_modules/es-abstract/2015/GetIterator.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getiterator + +module.exports = function GetIterator(obj, method) { + var actualMethod = method; + if (arguments.length < 2) { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; +}; diff --git a/node_modules/es-abstract/2015/GetMethod.js b/node_modules/es-abstract/2015/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2015/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2015/GetOwnPropertyKeys.js b/node_modules/es-abstract/2015/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2015/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2015/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2015/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2015/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2015/GetSubstitution.js b/node_modules/es-abstract/2015/GetSubstitution.js new file mode 100644 index 0000000000000..4eb827d5950b3 --- /dev/null +++ b/node_modules/es-abstract/2015/GetSubstitution.js @@ -0,0 +1,100 @@ + +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $parseInt = GetIntrinsic('%parseInt%'); + +var inspect = require('object-inspect'); + +var regexTester = require('safe-regex-test'); +var callBound = require('call-bind/callBound'); +var every = require('../helpers/every'); + +var isDigit = regexTester(/^[0-9]$/); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// https://262.ecma-international.org/6.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2015/GetV.js b/node_modules/es-abstract/2015/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2015/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2015/GetValueFromBuffer.js b/node_modules/es-abstract/2015/GetValueFromBuffer.js new file mode 100644 index 0000000000000..0295846c7cc4d --- /dev/null +++ b/node_modules/es-abstract/2015/GetValueFromBuffer.js @@ -0,0 +1,97 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $charAt = callBound('String.prototype.charAt'); +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var defaultEndianness = require('../helpers/defaultEndianness'); +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); + +var isArrayBuffer = require('is-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table49 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $Float32: 4, + $Float64: 8 +}; + +var isUnsignedElementType = function isUnsignedElementType(type) { return $charAt(type, 0) === 'U'; }; + +// https://262.ecma-international.org/6.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string') { + throw new $TypeError('Assertion failed: `type` must be a string'); + } + + if (arguments.length > 3 && typeof arguments[3] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = table49['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + // 6. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + var rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 3 ? arguments[3] : defaultEndianness === 'little'; // step 7 + + if (!isLittleEndian) { + $reverse(rawValue); // step 8 + } + + var bytes = $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize); + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(bytes, true); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(bytes, true); + } + + return bytesAsInteger(bytes, elementSize, isUnsignedElementType(type), false); +}; diff --git a/node_modules/es-abstract/2015/HasOwnProperty.js b/node_modules/es-abstract/2015/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2015/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2015/HasProperty.js b/node_modules/es-abstract/2015/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2015/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2015/HourFromTime.js b/node_modules/es-abstract/2015/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2015/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2015/InLeapYear.js b/node_modules/es-abstract/2015/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2015/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2015/InstanceofOperator.js b/node_modules/es-abstract/2015/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2015/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2015/Invoke.js b/node_modules/es-abstract/2015/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2015/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2015/IsAccessorDescriptor.js b/node_modules/es-abstract/2015/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2015/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2015/IsArray.js b/node_modules/es-abstract/2015/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2015/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2015/IsCallable.js b/node_modules/es-abstract/2015/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2015/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2015/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2015/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..8bdaf3eb45d24 --- /dev/null +++ b/node_modules/es-abstract/2015/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2015/IsConcatSpreadable.js b/node_modules/es-abstract/2015/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2015/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2015/IsConstructor.js b/node_modules/es-abstract/2015/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2015/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2015/IsDataDescriptor.js b/node_modules/es-abstract/2015/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2015/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2015/IsDetachedBuffer.js b/node_modules/es-abstract/2015/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2015/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2015/IsExtensible.js b/node_modules/es-abstract/2015/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2015/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2015/IsGenericDescriptor.js b/node_modules/es-abstract/2015/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2015/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2015/IsInteger.js b/node_modules/es-abstract/2015/IsInteger.js new file mode 100644 index 0000000000000..e3d25f38e3009 --- /dev/null +++ b/node_modules/es-abstract/2015/IsInteger.js @@ -0,0 +1,9 @@ +'use strict'; + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-isinteger + +module.exports = function IsInteger(argument) { + return isInteger(argument); +}; diff --git a/node_modules/es-abstract/2015/IsPromise.js b/node_modules/es-abstract/2015/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2015/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2015/IsPropertyDescriptor.js b/node_modules/es-abstract/2015/IsPropertyDescriptor.js new file mode 100644 index 0000000000000..4cfe79bbe5dbc --- /dev/null +++ b/node_modules/es-abstract/2015/IsPropertyDescriptor.js @@ -0,0 +1,19 @@ +'use strict'; + +// TODO, semver-major: delete this + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var Type = require('./Type'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type + +module.exports = function IsPropertyDescriptor(Desc) { + return isPropertyDescriptor({ + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor, + Type: Type + }, Desc); +}; diff --git a/node_modules/es-abstract/2015/IsPropertyKey.js b/node_modules/es-abstract/2015/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2015/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2015/IsRegExp.js b/node_modules/es-abstract/2015/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2015/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2015/IsWordChar.js b/node_modules/es-abstract/2015/IsWordChar.js new file mode 100644 index 0000000000000..49f42eccac00e --- /dev/null +++ b/node_modules/es-abstract/2015/IsWordChar.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); + +var every = require('../helpers/every'); +var regexTester = require('safe-regex-test'); + +var isChar = function isChar(c) { + return typeof c === 'string' && c.length === 1; +}; + +var isWordCharacter = regexTester(/^[a-zA-Z0-9_]$/); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(e, InputLength, Input) { + if (!IsInteger(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + if (!IsInteger(InputLength)) { + throw new $TypeError('Assertion failed: `InputLength` must be an integer'); + } + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + if (e === -1 || e === InputLength) { + return false; // step 1 + } + + var c = Input[e]; // step 2 + + return isWordCharacter(c); // steps 3-4 +}; diff --git a/node_modules/es-abstract/2015/IteratorClose.js b/node_modules/es-abstract/2015/IteratorClose.js new file mode 100644 index 0000000000000..7c1076082e1e2 --- /dev/null +++ b/node_modules/es-abstract/2015/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2015/IteratorComplete.js b/node_modules/es-abstract/2015/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2015/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2015/IteratorNext.js b/node_modules/es-abstract/2015/IteratorNext.js new file mode 100644 index 0000000000000..d84d66edb5fc2 --- /dev/null +++ b/node_modules/es-abstract/2015/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2015/IteratorStep.js b/node_modules/es-abstract/2015/IteratorStep.js new file mode 100644 index 0000000000000..85bcd95c0410f --- /dev/null +++ b/node_modules/es-abstract/2015/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://262.ecma-international.org/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2015/IteratorValue.js b/node_modules/es-abstract/2015/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2015/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2015/MakeDate.js b/node_modules/es-abstract/2015/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2015/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2015/MakeDay.js b/node_modules/es-abstract/2015/MakeDay.js new file mode 100644 index 0000000000000..13f568633a34a --- /dev/null +++ b/node_modules/es-abstract/2015/MakeDay.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToInteger = require('./ToInteger'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToInteger(year); + var m = ToInteger(month); + var dt = ToInteger(date); + var ym = y + floor(m / 12); + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2015/MakeTime.js b/node_modules/es-abstract/2015/MakeTime.js new file mode 100644 index 0000000000000..34cb4dcca3f84 --- /dev/null +++ b/node_modules/es-abstract/2015/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToInteger = require('./ToInteger'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToInteger(hour); + var m = ToInteger(min); + var s = ToInteger(sec); + var milli = ToInteger(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2015/MinFromTime.js b/node_modules/es-abstract/2015/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2015/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2015/MonthFromTime.js b/node_modules/es-abstract/2015/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2015/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2015/NewPromiseCapability.js b/node_modules/es-abstract/2015/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2015/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2015/NormalCompletion.js b/node_modules/es-abstract/2015/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2015/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2015/ObjectCreate.js b/node_modules/es-abstract/2015/ObjectCreate.js new file mode 100644 index 0000000000000..d7d2d04d92a78 --- /dev/null +++ b/node_modules/es-abstract/2015/ObjectCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/6.0/#sec-objectcreate + +module.exports = function ObjectCreate(proto, internalSlotsList) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); + } + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2015/ObjectDefineProperties.js b/node_modules/es-abstract/2015/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2015/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2015/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2015/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..ede44ed6b75ee --- /dev/null +++ b/node_modules/es-abstract/2015/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var ObjectCreate = require('./ObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return ObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2015/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2015/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2015/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2015/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2015/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2015/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2015/OrdinaryHasInstance.js b/node_modules/es-abstract/2015/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2015/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2015/OrdinaryHasProperty.js b/node_modules/es-abstract/2015/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2015/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2015/QuoteJSONString.js b/node_modules/es-abstract/2015/QuoteJSONString.js new file mode 100644 index 0000000000000..7dabf54bf2f02 --- /dev/null +++ b/node_modules/es-abstract/2015/QuoteJSONString.js @@ -0,0 +1,52 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); +var $strSlice = callBound('String.prototype.slice'); +var $strSplit = callBound('String.prototype.split'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-quotejsonstring + +var escapes = { + '\u0008': 'b', + '\u000C': 'f', + '\u000A': 'n', + '\u000D': 'r', + '\u0009': 't' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach($strSplit(value), function (C) { + if (C === '"' || C === '\\') { + product += '\u005C' + C; + } else if (C === '\u0008' || C === '\u000C' || C === '\u000A' || C === '\u000D' || C === '\u0009') { + var abbrev = escapes[C]; + product += '\u005C' + abbrev; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20) { + product += '\u005Cu' + $toLowerCase($strSlice('0000' + $numberToString(cCharCode, 16), -4)); + } else { + product += C; + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2015/RegExpCreate.js b/node_modules/es-abstract/2015/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2015/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2015/RegExpExec.js b/node_modules/es-abstract/2015/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2015/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2015/RequireObjectCoercible.js b/node_modules/es-abstract/2015/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2015/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2015/SameValue.js b/node_modules/es-abstract/2015/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2015/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2015/SameValueZero.js b/node_modules/es-abstract/2015/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2015/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2015/SecFromTime.js b/node_modules/es-abstract/2015/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2015/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2015/Set.js b/node_modules/es-abstract/2015/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2015/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2015/SetFunctionName.js b/node_modules/es-abstract/2015/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2015/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2015/SetIntegrityLevel.js b/node_modules/es-abstract/2015/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2015/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2015/SetValueInBuffer.js b/node_modules/es-abstract/2015/SetValueInBuffer.js new file mode 100644 index 0000000000000..d5c2fa479b951 --- /dev/null +++ b/node_modules/es-abstract/2015/SetValueInBuffer.js @@ -0,0 +1,120 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); + +var isArrayBuffer = require('is-array-buffer'); +var hasOwn = require('hasown'); + +var table49 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); +var integerToNBytes = require('../helpers/integerToNBytes'); +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); + +// https://262.ecma-international.org/6.0/#sec-setvalueinbuffer + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || !hasOwn(table49, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number') { + throw new $TypeError('Assertion failed: `value` must be a number'); + } + + if (arguments.length > 4 && typeof arguments[4] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Assert: Type(value) is Number. + + // 5. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + // 6. Assert: block is not undefined. + + var elementSize = table49[type]; // step 7 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 4 ? arguments[4] : defaultEndianness === 'little'; // step 8 + + var rawBytes; + if (type === 'Float32') { // step 1 + rawBytes = valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + rawBytes = valueToFloat64Bytes(value, isLittleEndian); + } else { + var n = table49[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + rawBytes = integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 + } + + // 12. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + + // 13. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2015/SpeciesConstructor.js b/node_modules/es-abstract/2015/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2015/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2015/SplitMatch.js b/node_modules/es-abstract/2015/SplitMatch.js new file mode 100644 index 0000000000000..d57fb691e5e91 --- /dev/null +++ b/node_modules/es-abstract/2015/SplitMatch.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $charAt = callBound('String.prototype.charAt'); + +// https://262.ecma-international.org/6.0/#sec-splitmatch + +module.exports = function SplitMatch(S, q, R) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(q)) { + throw new $TypeError('Assertion failed: `q` must be an integer'); + } + if (Type(R) !== 'String') { + throw new $TypeError('Assertion failed: `R` must be a String'); + } + var r = R.length; + var s = S.length; + if (q + r > s) { + return false; + } + + for (var i = 0; i < r; i += 1) { + if ($charAt(S, q + i) !== $charAt(R, i)) { + return false; + } + } + + return q + r; +}; diff --git a/node_modules/es-abstract/2015/StrictEqualityComparison.js b/node_modules/es-abstract/2015/StrictEqualityComparison.js new file mode 100644 index 0000000000000..f3435ba9d181e --- /dev/null +++ b/node_modules/es-abstract/2015/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/2015/StringCreate.js b/node_modules/es-abstract/2015/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2015/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2015/StringGetIndexProperty.js b/node_modules/es-abstract/2015/StringGetIndexProperty.js new file mode 100644 index 0000000000000..73043ddad82b8 --- /dev/null +++ b/node_modules/es-abstract/2015/StringGetIndexProperty.js @@ -0,0 +1,52 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charAt = callBound('String.prototype.charAt'); + +var isString = require('is-string'); +var isNegativeZero = require('is-negative-zero'); +var unbox = require('unbox-primitive'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsInteger = require('./IsInteger'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-stringgetindexproperty + +module.exports = function StringGetIndexProperty(S, P) { + if (typeof S === 'string' || !isString(S)) { + throw new $TypeError('Assertion failed: `S` must be a boxed String Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + + if (Type(P) !== 'String') { + return void undefined; + } + + var index = CanonicalNumericIndexString(P); + if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index)) { + return void undefined; + } + + var str = unbox(S); + var len = str.length; + if (index < 0 || len <= index) { + return void undefined; + } + + var resultStr = $charAt(str, index); + + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2015/SymbolDescriptiveString.js b/node_modules/es-abstract/2015/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2015/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2015/TestIntegrityLevel.js b/node_modules/es-abstract/2015/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2015/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2015/TimeClip.js b/node_modules/es-abstract/2015/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2015/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2015/TimeFromYear.js b/node_modules/es-abstract/2015/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2015/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2015/TimeWithinDay.js b/node_modules/es-abstract/2015/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2015/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2015/ToBoolean.js b/node_modules/es-abstract/2015/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2015/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2015/ToDateString.js b/node_modules/es-abstract/2015/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2015/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2015/ToInt16.js b/node_modules/es-abstract/2015/ToInt16.js new file mode 100644 index 0000000000000..21694bdeb923c --- /dev/null +++ b/node_modules/es-abstract/2015/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://262.ecma-international.org/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2015/ToInt32.js b/node_modules/es-abstract/2015/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/2015/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2015/ToInt8.js b/node_modules/es-abstract/2015/ToInt8.js new file mode 100644 index 0000000000000..e223b6c1d352a --- /dev/null +++ b/node_modules/es-abstract/2015/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://262.ecma-international.org/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2015/ToInteger.js b/node_modules/es-abstract/2015/ToInteger.js new file mode 100644 index 0000000000000..f6625796ebd22 --- /dev/null +++ b/node_modules/es-abstract/2015/ToInteger.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5ToInteger = require('../5/ToInteger'); + +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/6.0/#sec-tointeger + +module.exports = function ToInteger(value) { + var number = ToNumber(value); + return ES5ToInteger(number); +}; diff --git a/node_modules/es-abstract/2015/ToLength.js b/node_modules/es-abstract/2015/ToLength.js new file mode 100644 index 0000000000000..1bef9bed7b2f0 --- /dev/null +++ b/node_modules/es-abstract/2015/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToInteger = require('./ToInteger'); + +module.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2015/ToNumber.js b/node_modules/es-abstract/2015/ToNumber.js new file mode 100644 index 0000000000000..3abb6a68d228b --- /dev/null +++ b/node_modules/es-abstract/2015/ToNumber.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var isPrimitive = require('../helpers/isPrimitive'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2015/ToObject.js b/node_modules/es-abstract/2015/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2015/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2015/ToPrimitive.js b/node_modules/es-abstract/2015/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2015/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2015/ToPropertyDescriptor.js b/node_modules/es-abstract/2015/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2015/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2015/ToPropertyKey.js b/node_modules/es-abstract/2015/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2015/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2015/ToString.js b/node_modules/es-abstract/2015/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2015/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2015/ToUint16.js b/node_modules/es-abstract/2015/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/2015/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2015/ToUint32.js b/node_modules/es-abstract/2015/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/2015/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2015/ToUint8.js b/node_modules/es-abstract/2015/ToUint8.js new file mode 100644 index 0000000000000..6e4e4b5add2ab --- /dev/null +++ b/node_modules/es-abstract/2015/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2015/ToUint8Clamp.js b/node_modules/es-abstract/2015/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2015/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2015/Type.js b/node_modules/es-abstract/2015/Type.js new file mode 100644 index 0000000000000..da5cb762508f1 --- /dev/null +++ b/node_modules/es-abstract/2015/Type.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2015/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2015/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..134b2d5c367c4 --- /dev/null +++ b/node_modules/es-abstract/2015/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,170 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor +// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + if (oType !== 'Undefined' && !IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); + } + if (Type(current) === 'Undefined') { + if (!extensible) { + return false; + } + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': Desc['[[Configurable]]'], + '[[Enumerable]]': Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': Desc['[[Writable]]'] + } + ); + } + } else { + if (!IsAccessorDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + } + return true; + } + if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { + return true; + } + if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) { + return true; // removed by ES2017, but should still be correct + } + // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor + if (!current['[[Configurable]]']) { + if (Desc['[[Configurable]]']) { + return false; + } + if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { + return false; + } + } + if (IsGenericDescriptor(Desc)) { + // no further validation is required. + } else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + return false; + } + if (IsDataDescriptor(current)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Get]]': undefined + } + ); + } + } else if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Value]]': undefined + } + ); + } + } else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]'] && !current['[[Writable]]']) { + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + return true; + } + } else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + return true; + } + } else { + throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + return true; +}; diff --git a/node_modules/es-abstract/2015/ValidateTypedArray.js b/node_modules/es-abstract/2015/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2015/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2015/WeekDay.js b/node_modules/es-abstract/2015/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2015/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2015/YearFromTime.js b/node_modules/es-abstract/2015/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2015/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2015/abs.js b/node_modules/es-abstract/2015/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2015/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2015/floor.js b/node_modules/es-abstract/2015/floor.js new file mode 100644 index 0000000000000..8439df0649365 --- /dev/null +++ b/node_modules/es-abstract/2015/floor.js @@ -0,0 +1,11 @@ +'use strict'; + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function floor(x) { + // return x - modulo(x, 1); + return $floor(x); +}; diff --git a/node_modules/es-abstract/2015/max.js b/node_modules/es-abstract/2015/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2015/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2015/min.js b/node_modules/es-abstract/2015/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2015/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2015/modulo.js b/node_modules/es-abstract/2015/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2015/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2015/msFromTime.js b/node_modules/es-abstract/2015/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2015/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2015/thisBooleanValue.js b/node_modules/es-abstract/2015/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2015/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2015/thisNumberValue.js b/node_modules/es-abstract/2015/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2015/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2015/thisStringValue.js b/node_modules/es-abstract/2015/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2015/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2015/thisTimeValue.js b/node_modules/es-abstract/2015/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2015/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2016/AbstractEqualityComparison.js b/node_modules/es-abstract/2016/AbstractEqualityComparison.js new file mode 100644 index 0000000000000..b56a506622447 --- /dev/null +++ b/node_modules/es-abstract/2016/AbstractEqualityComparison.js @@ -0,0 +1,37 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return x === y; // ES6+ specified this shortcut anyways. + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'Symbol') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + return false; +}; diff --git a/node_modules/es-abstract/2016/AbstractRelationalComparison.js b/node_modules/es-abstract/2016/AbstractRelationalComparison.js new file mode 100644 index 0000000000000..0dfed5ffe1c63 --- /dev/null +++ b/node_modules/es-abstract/2016/AbstractRelationalComparison.js @@ -0,0 +1,63 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var isPrefixOf = require('../helpers/isPrefixOf'); + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.8.5 + +// eslint-disable-next-line max-statements +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + var bothStrings = Type(px) === 'String' && Type(py) === 'String'; + if (!bothStrings) { + var nx = ToNumber(px); + var ny = ToNumber(py); + if ($isNaN(nx) || $isNaN(ny)) { + return undefined; + } + if ($isFinite(nx) && $isFinite(ny) && nx === ny) { + return false; + } + if (nx === Infinity) { + return false; + } + if (ny === Infinity) { + return true; + } + if (ny === -Infinity) { + return false; + } + if (nx === -Infinity) { + return true; + } + return nx < ny; // by now, these are both nonzero, finite, and not equal + } + if (isPrefixOf(py, px)) { + return false; + } + if (isPrefixOf(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f +}; diff --git a/node_modules/es-abstract/2016/AdvanceStringIndex.js b/node_modules/es-abstract/2016/AdvanceStringIndex.js new file mode 100644 index 0000000000000..831ea96ef9135 --- /dev/null +++ b/node_modules/es-abstract/2016/AdvanceStringIndex.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charCodeAt = require('call-bind/callBound')('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/6.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + + var first = $charCodeAt(S, index); + if (!isLeadingSurrogate(first)) { + return index + 1; + } + + var second = $charCodeAt(S, index + 1); + if (!isTrailingSurrogate(second)) { + return index + 1; + } + + return index + 2; +}; diff --git a/node_modules/es-abstract/2016/ArrayCreate.js b/node_modules/es-abstract/2016/ArrayCreate.js new file mode 100644 index 0000000000000..0d34db9beca45 --- /dev/null +++ b/node_modules/es-abstract/2016/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var hasProto = require('has-proto')(); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/6.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 5 - 7, and 9 + if (proto !== $ArrayPrototype) { // step 8 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 2 + A.length = length; + } + /* step 10, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2016/ArraySetLength.js b/node_modules/es-abstract/2016/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2016/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2016/ArraySpeciesCreate.js b/node_modules/es-abstract/2016/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..1944dfe7b8974 --- /dev/null +++ b/node_modules/es-abstract/2016/ArraySpeciesCreate.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Array = GetIntrinsic('%Array%'); +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + var len = length === 0 ? 0 : length; + var C; + var isArray = IsArray(originalArray); + if (isArray) { + C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + } + if (typeof C === 'undefined') { + return $Array(len); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(len); // Construct(C, len); +}; + diff --git a/node_modules/es-abstract/2016/Call.js b/node_modules/es-abstract/2016/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2016/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2016/CanonicalNumericIndexString.js b/node_modules/es-abstract/2016/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2016/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2016/Canonicalize.js b/node_modules/es-abstract/2016/Canonicalize.js new file mode 100644 index 0000000000000..49741831a618d --- /dev/null +++ b/node_modules/es-abstract/2016/Canonicalize.js @@ -0,0 +1,55 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(ch, IgnoreCase, Unicode) { + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + if (Unicode) { // step 2 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 2.b + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/2016/CharacterRange.js b/node_modules/es-abstract/2016/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2016/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2016/CompletePropertyDescriptor.js b/node_modules/es-abstract/2016/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2016/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2016/CompletionRecord.js b/node_modules/es-abstract/2016/CompletionRecord.js new file mode 100644 index 0000000000000..370a5677f378e --- /dev/null +++ b/node_modules/es-abstract/2016/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2016/CreateDataProperty.js b/node_modules/es-abstract/2016/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2016/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2016/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2016/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..c40e69368b91d --- /dev/null +++ b/node_modules/es-abstract/2016/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2016/CreateHTML.js b/node_modules/es-abstract/2016/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2016/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2016/CreateIterResultObject.js b/node_modules/es-abstract/2016/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2016/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2016/CreateListFromArrayLike.js b/node_modules/es-abstract/2016/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..4c34219206e1f --- /dev/null +++ b/node_modules/es-abstract/2016/CreateListFromArrayLike.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object']; + +// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = ToLength(Get(obj, 'length')); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2016/CreateMethodProperty.js b/node_modules/es-abstract/2016/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2016/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2016/DateFromTime.js b/node_modules/es-abstract/2016/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2016/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2016/Day.js b/node_modules/es-abstract/2016/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2016/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2016/DayFromYear.js b/node_modules/es-abstract/2016/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2016/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2016/DayWithinYear.js b/node_modules/es-abstract/2016/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2016/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2016/DaysInYear.js b/node_modules/es-abstract/2016/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2016/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2016/DefinePropertyOrThrow.js b/node_modules/es-abstract/2016/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2016/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2016/DeletePropertyOrThrow.js b/node_modules/es-abstract/2016/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2016/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2016/DetachArrayBuffer.js b/node_modules/es-abstract/2016/DetachArrayBuffer.js new file mode 100644 index 0000000000000..a7b89b36bbcad --- /dev/null +++ b/node_modules/es-abstract/2016/DetachArrayBuffer.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; // node 11.7+ +} catch (e) { /**/ } + +// https://262.ecma-international.org/6.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2016/EnumerableOwnNames.js b/node_modules/es-abstract/2016/EnumerableOwnNames.js new file mode 100644 index 0000000000000..b8235966aca93 --- /dev/null +++ b/node_modules/es-abstract/2016/EnumerableOwnNames.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var keys = require('object-keys'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-enumerableownnames + +module.exports = function EnumerableOwnNames(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return keys(O); +}; diff --git a/node_modules/es-abstract/2016/FromPropertyDescriptor.js b/node_modules/es-abstract/2016/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2016/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2016/Get.js b/node_modules/es-abstract/2016/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2016/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2016/GetGlobalObject.js b/node_modules/es-abstract/2016/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2016/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2016/GetIterator.js b/node_modules/es-abstract/2016/GetIterator.js new file mode 100644 index 0000000000000..145557da422e4 --- /dev/null +++ b/node_modules/es-abstract/2016/GetIterator.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getiterator + +module.exports = function GetIterator(obj, method) { + var actualMethod = method; + if (arguments.length < 2) { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; +}; diff --git a/node_modules/es-abstract/2016/GetMethod.js b/node_modules/es-abstract/2016/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2016/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2016/GetOwnPropertyKeys.js b/node_modules/es-abstract/2016/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2016/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2016/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2016/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2016/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2016/GetSubstitution.js b/node_modules/es-abstract/2016/GetSubstitution.js new file mode 100644 index 0000000000000..4eb827d5950b3 --- /dev/null +++ b/node_modules/es-abstract/2016/GetSubstitution.js @@ -0,0 +1,100 @@ + +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $parseInt = GetIntrinsic('%parseInt%'); + +var inspect = require('object-inspect'); + +var regexTester = require('safe-regex-test'); +var callBound = require('call-bind/callBound'); +var every = require('../helpers/every'); + +var isDigit = regexTester(/^[0-9]$/); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// https://262.ecma-international.org/6.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2016/GetV.js b/node_modules/es-abstract/2016/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2016/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2016/GetValueFromBuffer.js b/node_modules/es-abstract/2016/GetValueFromBuffer.js new file mode 100644 index 0000000000000..0295846c7cc4d --- /dev/null +++ b/node_modules/es-abstract/2016/GetValueFromBuffer.js @@ -0,0 +1,97 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $charAt = callBound('String.prototype.charAt'); +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var defaultEndianness = require('../helpers/defaultEndianness'); +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); + +var isArrayBuffer = require('is-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table49 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $Float32: 4, + $Float64: 8 +}; + +var isUnsignedElementType = function isUnsignedElementType(type) { return $charAt(type, 0) === 'U'; }; + +// https://262.ecma-international.org/6.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string') { + throw new $TypeError('Assertion failed: `type` must be a string'); + } + + if (arguments.length > 3 && typeof arguments[3] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = table49['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + // 6. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + var rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 3 ? arguments[3] : defaultEndianness === 'little'; // step 7 + + if (!isLittleEndian) { + $reverse(rawValue); // step 8 + } + + var bytes = $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize); + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(bytes, true); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(bytes, true); + } + + return bytesAsInteger(bytes, elementSize, isUnsignedElementType(type), false); +}; diff --git a/node_modules/es-abstract/2016/HasOwnProperty.js b/node_modules/es-abstract/2016/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2016/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2016/HasProperty.js b/node_modules/es-abstract/2016/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2016/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2016/HourFromTime.js b/node_modules/es-abstract/2016/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2016/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2016/InLeapYear.js b/node_modules/es-abstract/2016/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2016/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2016/InstanceofOperator.js b/node_modules/es-abstract/2016/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2016/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2016/Invoke.js b/node_modules/es-abstract/2016/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2016/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2016/IsAccessorDescriptor.js b/node_modules/es-abstract/2016/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2016/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2016/IsArray.js b/node_modules/es-abstract/2016/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2016/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2016/IsCallable.js b/node_modules/es-abstract/2016/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2016/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2016/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2016/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..8bdaf3eb45d24 --- /dev/null +++ b/node_modules/es-abstract/2016/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2016/IsConcatSpreadable.js b/node_modules/es-abstract/2016/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2016/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2016/IsConstructor.js b/node_modules/es-abstract/2016/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2016/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2016/IsDataDescriptor.js b/node_modules/es-abstract/2016/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2016/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2016/IsDetachedBuffer.js b/node_modules/es-abstract/2016/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2016/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2016/IsExtensible.js b/node_modules/es-abstract/2016/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2016/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2016/IsGenericDescriptor.js b/node_modules/es-abstract/2016/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2016/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2016/IsInteger.js b/node_modules/es-abstract/2016/IsInteger.js new file mode 100644 index 0000000000000..e3d25f38e3009 --- /dev/null +++ b/node_modules/es-abstract/2016/IsInteger.js @@ -0,0 +1,9 @@ +'use strict'; + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-isinteger + +module.exports = function IsInteger(argument) { + return isInteger(argument); +}; diff --git a/node_modules/es-abstract/2016/IsPromise.js b/node_modules/es-abstract/2016/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2016/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2016/IsPropertyDescriptor.js b/node_modules/es-abstract/2016/IsPropertyDescriptor.js new file mode 100644 index 0000000000000..4cfe79bbe5dbc --- /dev/null +++ b/node_modules/es-abstract/2016/IsPropertyDescriptor.js @@ -0,0 +1,19 @@ +'use strict'; + +// TODO, semver-major: delete this + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var Type = require('./Type'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type + +module.exports = function IsPropertyDescriptor(Desc) { + return isPropertyDescriptor({ + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor, + Type: Type + }, Desc); +}; diff --git a/node_modules/es-abstract/2016/IsPropertyKey.js b/node_modules/es-abstract/2016/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2016/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2016/IsRegExp.js b/node_modules/es-abstract/2016/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2016/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2016/IsWordChar.js b/node_modules/es-abstract/2016/IsWordChar.js new file mode 100644 index 0000000000000..49f42eccac00e --- /dev/null +++ b/node_modules/es-abstract/2016/IsWordChar.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); + +var every = require('../helpers/every'); +var regexTester = require('safe-regex-test'); + +var isChar = function isChar(c) { + return typeof c === 'string' && c.length === 1; +}; + +var isWordCharacter = regexTester(/^[a-zA-Z0-9_]$/); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(e, InputLength, Input) { + if (!IsInteger(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + if (!IsInteger(InputLength)) { + throw new $TypeError('Assertion failed: `InputLength` must be an integer'); + } + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + if (e === -1 || e === InputLength) { + return false; // step 1 + } + + var c = Input[e]; // step 2 + + return isWordCharacter(c); // steps 3-4 +}; diff --git a/node_modules/es-abstract/2016/IterableToArrayLike.js b/node_modules/es-abstract/2016/IterableToArrayLike.js new file mode 100644 index 0000000000000..82c6c33d50bfc --- /dev/null +++ b/node_modules/es-abstract/2016/IterableToArrayLike.js @@ -0,0 +1,39 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var GetIterator = require('./GetIterator'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var ToObject = require('./ToObject'); +var ES = { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray +}; + +// https://262.ecma-international.org/7.0/#sec-iterabletoarraylike + +module.exports = function IterableToArrayLike(items) { + var usingIterator = getIteratorMethod(ES, items); + if (typeof usingIterator !== 'undefined') { + var iterator = GetIterator(items, usingIterator); + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; + } + + return ToObject(items); +}; diff --git a/node_modules/es-abstract/2016/IteratorClose.js b/node_modules/es-abstract/2016/IteratorClose.js new file mode 100644 index 0000000000000..7c1076082e1e2 --- /dev/null +++ b/node_modules/es-abstract/2016/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2016/IteratorComplete.js b/node_modules/es-abstract/2016/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2016/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2016/IteratorNext.js b/node_modules/es-abstract/2016/IteratorNext.js new file mode 100644 index 0000000000000..d84d66edb5fc2 --- /dev/null +++ b/node_modules/es-abstract/2016/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2016/IteratorStep.js b/node_modules/es-abstract/2016/IteratorStep.js new file mode 100644 index 0000000000000..85bcd95c0410f --- /dev/null +++ b/node_modules/es-abstract/2016/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://262.ecma-international.org/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2016/IteratorValue.js b/node_modules/es-abstract/2016/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2016/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2016/MakeDate.js b/node_modules/es-abstract/2016/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2016/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2016/MakeDay.js b/node_modules/es-abstract/2016/MakeDay.js new file mode 100644 index 0000000000000..13f568633a34a --- /dev/null +++ b/node_modules/es-abstract/2016/MakeDay.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToInteger = require('./ToInteger'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToInteger(year); + var m = ToInteger(month); + var dt = ToInteger(date); + var ym = y + floor(m / 12); + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2016/MakeTime.js b/node_modules/es-abstract/2016/MakeTime.js new file mode 100644 index 0000000000000..34cb4dcca3f84 --- /dev/null +++ b/node_modules/es-abstract/2016/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToInteger = require('./ToInteger'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToInteger(hour); + var m = ToInteger(min); + var s = ToInteger(sec); + var milli = ToInteger(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2016/MinFromTime.js b/node_modules/es-abstract/2016/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2016/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2016/MonthFromTime.js b/node_modules/es-abstract/2016/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2016/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2016/NewPromiseCapability.js b/node_modules/es-abstract/2016/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2016/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2016/NormalCompletion.js b/node_modules/es-abstract/2016/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2016/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2016/ObjectCreate.js b/node_modules/es-abstract/2016/ObjectCreate.js new file mode 100644 index 0000000000000..d7d2d04d92a78 --- /dev/null +++ b/node_modules/es-abstract/2016/ObjectCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/6.0/#sec-objectcreate + +module.exports = function ObjectCreate(proto, internalSlotsList) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); + } + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2016/ObjectDefineProperties.js b/node_modules/es-abstract/2016/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2016/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2016/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2016/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..ede44ed6b75ee --- /dev/null +++ b/node_modules/es-abstract/2016/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var ObjectCreate = require('./ObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return ObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2016/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2016/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2016/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2016/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2016/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2016/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2016/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2016/OrdinaryGetPrototypeOf.js new file mode 100644 index 0000000000000..ba17b98872933 --- /dev/null +++ b/node_modules/es-abstract/2016/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2016/OrdinaryHasInstance.js b/node_modules/es-abstract/2016/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2016/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2016/OrdinaryHasProperty.js b/node_modules/es-abstract/2016/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2016/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2016/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2016/OrdinarySetPrototypeOf.js new file mode 100644 index 0000000000000..d2b72306c187b --- /dev/null +++ b/node_modules/es-abstract/2016/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2016/QuoteJSONString.js b/node_modules/es-abstract/2016/QuoteJSONString.js new file mode 100644 index 0000000000000..7dabf54bf2f02 --- /dev/null +++ b/node_modules/es-abstract/2016/QuoteJSONString.js @@ -0,0 +1,52 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); +var $strSlice = callBound('String.prototype.slice'); +var $strSplit = callBound('String.prototype.split'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-quotejsonstring + +var escapes = { + '\u0008': 'b', + '\u000C': 'f', + '\u000A': 'n', + '\u000D': 'r', + '\u0009': 't' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach($strSplit(value), function (C) { + if (C === '"' || C === '\\') { + product += '\u005C' + C; + } else if (C === '\u0008' || C === '\u000C' || C === '\u000A' || C === '\u000D' || C === '\u0009') { + var abbrev = escapes[C]; + product += '\u005C' + abbrev; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20) { + product += '\u005Cu' + $toLowerCase($strSlice('0000' + $numberToString(cCharCode, 16), -4)); + } else { + product += C; + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2016/RegExpCreate.js b/node_modules/es-abstract/2016/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2016/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2016/RegExpExec.js b/node_modules/es-abstract/2016/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2016/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2016/RequireObjectCoercible.js b/node_modules/es-abstract/2016/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2016/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2016/SameValue.js b/node_modules/es-abstract/2016/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2016/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2016/SameValueNonNumber.js b/node_modules/es-abstract/2016/SameValueNonNumber.js new file mode 100644 index 0000000000000..b6d2c4e648c81 --- /dev/null +++ b/node_modules/es-abstract/2016/SameValueNonNumber.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); + +// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber + +module.exports = function SameValueNonNumber(x, y) { + if (typeof x === 'number' || typeof x !== typeof y) { + throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2016/SameValueZero.js b/node_modules/es-abstract/2016/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2016/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2016/SecFromTime.js b/node_modules/es-abstract/2016/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2016/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2016/Set.js b/node_modules/es-abstract/2016/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2016/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2016/SetFunctionName.js b/node_modules/es-abstract/2016/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2016/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2016/SetIntegrityLevel.js b/node_modules/es-abstract/2016/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2016/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2016/SetValueInBuffer.js b/node_modules/es-abstract/2016/SetValueInBuffer.js new file mode 100644 index 0000000000000..d5c2fa479b951 --- /dev/null +++ b/node_modules/es-abstract/2016/SetValueInBuffer.js @@ -0,0 +1,120 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); + +var isArrayBuffer = require('is-array-buffer'); +var hasOwn = require('hasown'); + +var table49 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); +var integerToNBytes = require('../helpers/integerToNBytes'); +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); + +// https://262.ecma-international.org/6.0/#sec-setvalueinbuffer + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || !hasOwn(table49, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number') { + throw new $TypeError('Assertion failed: `value` must be a number'); + } + + if (arguments.length > 4 && typeof arguments[4] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Assert: Type(value) is Number. + + // 5. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + // 6. Assert: block is not undefined. + + var elementSize = table49[type]; // step 7 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 4 ? arguments[4] : defaultEndianness === 'little'; // step 8 + + var rawBytes; + if (type === 'Float32') { // step 1 + rawBytes = valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + rawBytes = valueToFloat64Bytes(value, isLittleEndian); + } else { + var n = table49[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + rawBytes = integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 + } + + // 12. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + + // 13. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2016/SpeciesConstructor.js b/node_modules/es-abstract/2016/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2016/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2016/SplitMatch.js b/node_modules/es-abstract/2016/SplitMatch.js new file mode 100644 index 0000000000000..d57fb691e5e91 --- /dev/null +++ b/node_modules/es-abstract/2016/SplitMatch.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $charAt = callBound('String.prototype.charAt'); + +// https://262.ecma-international.org/6.0/#sec-splitmatch + +module.exports = function SplitMatch(S, q, R) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(q)) { + throw new $TypeError('Assertion failed: `q` must be an integer'); + } + if (Type(R) !== 'String') { + throw new $TypeError('Assertion failed: `R` must be a String'); + } + var r = R.length; + var s = S.length; + if (q + r > s) { + return false; + } + + for (var i = 0; i < r; i += 1) { + if ($charAt(S, q + i) !== $charAt(R, i)) { + return false; + } + } + + return q + r; +}; diff --git a/node_modules/es-abstract/2016/StrictEqualityComparison.js b/node_modules/es-abstract/2016/StrictEqualityComparison.js new file mode 100644 index 0000000000000..f3435ba9d181e --- /dev/null +++ b/node_modules/es-abstract/2016/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/2016/StringCreate.js b/node_modules/es-abstract/2016/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2016/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2016/SymbolDescriptiveString.js b/node_modules/es-abstract/2016/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2016/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2016/TestIntegrityLevel.js b/node_modules/es-abstract/2016/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2016/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2016/TimeClip.js b/node_modules/es-abstract/2016/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2016/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2016/TimeFromYear.js b/node_modules/es-abstract/2016/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2016/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2016/TimeWithinDay.js b/node_modules/es-abstract/2016/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2016/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2016/ToBoolean.js b/node_modules/es-abstract/2016/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2016/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2016/ToDateString.js b/node_modules/es-abstract/2016/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2016/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2016/ToInt16.js b/node_modules/es-abstract/2016/ToInt16.js new file mode 100644 index 0000000000000..21694bdeb923c --- /dev/null +++ b/node_modules/es-abstract/2016/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://262.ecma-international.org/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2016/ToInt32.js b/node_modules/es-abstract/2016/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/2016/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2016/ToInt8.js b/node_modules/es-abstract/2016/ToInt8.js new file mode 100644 index 0000000000000..e223b6c1d352a --- /dev/null +++ b/node_modules/es-abstract/2016/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://262.ecma-international.org/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2016/ToInteger.js b/node_modules/es-abstract/2016/ToInteger.js new file mode 100644 index 0000000000000..f6625796ebd22 --- /dev/null +++ b/node_modules/es-abstract/2016/ToInteger.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5ToInteger = require('../5/ToInteger'); + +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/6.0/#sec-tointeger + +module.exports = function ToInteger(value) { + var number = ToNumber(value); + return ES5ToInteger(number); +}; diff --git a/node_modules/es-abstract/2016/ToLength.js b/node_modules/es-abstract/2016/ToLength.js new file mode 100644 index 0000000000000..1bef9bed7b2f0 --- /dev/null +++ b/node_modules/es-abstract/2016/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToInteger = require('./ToInteger'); + +module.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2016/ToNumber.js b/node_modules/es-abstract/2016/ToNumber.js new file mode 100644 index 0000000000000..3abb6a68d228b --- /dev/null +++ b/node_modules/es-abstract/2016/ToNumber.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var isPrimitive = require('../helpers/isPrimitive'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2016/ToObject.js b/node_modules/es-abstract/2016/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2016/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2016/ToPrimitive.js b/node_modules/es-abstract/2016/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2016/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2016/ToPropertyDescriptor.js b/node_modules/es-abstract/2016/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2016/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2016/ToPropertyKey.js b/node_modules/es-abstract/2016/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2016/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2016/ToString.js b/node_modules/es-abstract/2016/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2016/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2016/ToUint16.js b/node_modules/es-abstract/2016/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/2016/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2016/ToUint32.js b/node_modules/es-abstract/2016/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/2016/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2016/ToUint8.js b/node_modules/es-abstract/2016/ToUint8.js new file mode 100644 index 0000000000000..6e4e4b5add2ab --- /dev/null +++ b/node_modules/es-abstract/2016/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2016/ToUint8Clamp.js b/node_modules/es-abstract/2016/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2016/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2016/Type.js b/node_modules/es-abstract/2016/Type.js new file mode 100644 index 0000000000000..da5cb762508f1 --- /dev/null +++ b/node_modules/es-abstract/2016/Type.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2016/TypedArrayCreate.js b/node_modules/es-abstract/2016/TypedArrayCreate.js new file mode 100644 index 0000000000000..ef9fbe2599495 --- /dev/null +++ b/node_modules/es-abstract/2016/TypedArrayCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var availableTypedArrays = require('available-typed-arrays')(); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/7.0/#typedarray-create + +module.exports = function TypedArrayCreate(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + ValidateTypedArray(newTypedArray); // step 2 + + if (argumentList.length === 1 && Type(argumentList[0]) === 'Number') { // step 3 + if (typedArrayLength(newTypedArray) < argumentList[0]) { + throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a + } + } + + return newTypedArray; // step 4 +}; diff --git a/node_modules/es-abstract/2016/TypedArraySpeciesCreate.js b/node_modules/es-abstract/2016/TypedArraySpeciesCreate.js new file mode 100644 index 0000000000000..2bfdff5eb705c --- /dev/null +++ b/node_modules/es-abstract/2016/TypedArraySpeciesCreate.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var SpeciesConstructor = require('./SpeciesConstructor'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/7.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreate(constructor, argumentList); // step 4 +}; diff --git a/node_modules/es-abstract/2016/UTF16Decode.js b/node_modules/es-abstract/2016/UTF16Decode.js new file mode 100644 index 0000000000000..86927b478ccdb --- /dev/null +++ b/node_modules/es-abstract/2016/UTF16Decode.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +// https://262.ecma-international.org/7.0/#sec-utf16decode + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair + +module.exports = function UTF16Decode(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2016/UTF16Encoding.js b/node_modules/es-abstract/2016/UTF16Encoding.js new file mode 100644 index 0000000000000..f381595fd70d6 --- /dev/null +++ b/node_modules/es-abstract/2016/UTF16Encoding.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/7.0/#sec-utf16encoding + +module.exports = function UTF16Encoding(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = floor((cp - 65536) / 1024) + 0xD800; + var cu2 = modulo(cp - 65536, 1024) + 0xDC00; + return $fromCharCode(cu1) + $fromCharCode(cu2); +}; diff --git a/node_modules/es-abstract/2016/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2016/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..134b2d5c367c4 --- /dev/null +++ b/node_modules/es-abstract/2016/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,170 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor +// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + if (oType !== 'Undefined' && !IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); + } + if (Type(current) === 'Undefined') { + if (!extensible) { + return false; + } + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': Desc['[[Configurable]]'], + '[[Enumerable]]': Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': Desc['[[Writable]]'] + } + ); + } + } else { + if (!IsAccessorDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + } + return true; + } + if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { + return true; + } + if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) { + return true; // removed by ES2017, but should still be correct + } + // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor + if (!current['[[Configurable]]']) { + if (Desc['[[Configurable]]']) { + return false; + } + if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { + return false; + } + } + if (IsGenericDescriptor(Desc)) { + // no further validation is required. + } else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + return false; + } + if (IsDataDescriptor(current)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Get]]': undefined + } + ); + } + } else if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Value]]': undefined + } + ); + } + } else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]'] && !current['[[Writable]]']) { + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + return true; + } + } else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + return true; + } + } else { + throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + return true; +}; diff --git a/node_modules/es-abstract/2016/ValidateTypedArray.js b/node_modules/es-abstract/2016/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2016/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2016/WeekDay.js b/node_modules/es-abstract/2016/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2016/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2016/YearFromTime.js b/node_modules/es-abstract/2016/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2016/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2016/abs.js b/node_modules/es-abstract/2016/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2016/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2016/floor.js b/node_modules/es-abstract/2016/floor.js new file mode 100644 index 0000000000000..8439df0649365 --- /dev/null +++ b/node_modules/es-abstract/2016/floor.js @@ -0,0 +1,11 @@ +'use strict'; + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function floor(x) { + // return x - modulo(x, 1); + return $floor(x); +}; diff --git a/node_modules/es-abstract/2016/max.js b/node_modules/es-abstract/2016/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2016/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2016/min.js b/node_modules/es-abstract/2016/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2016/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2016/modulo.js b/node_modules/es-abstract/2016/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2016/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2016/msFromTime.js b/node_modules/es-abstract/2016/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2016/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2016/thisBooleanValue.js b/node_modules/es-abstract/2016/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2016/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2016/thisNumberValue.js b/node_modules/es-abstract/2016/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2016/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2016/thisStringValue.js b/node_modules/es-abstract/2016/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2016/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2016/thisTimeValue.js b/node_modules/es-abstract/2016/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2016/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2017/AbstractEqualityComparison.js b/node_modules/es-abstract/2017/AbstractEqualityComparison.js new file mode 100644 index 0000000000000..b56a506622447 --- /dev/null +++ b/node_modules/es-abstract/2017/AbstractEqualityComparison.js @@ -0,0 +1,37 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return x === y; // ES6+ specified this shortcut anyways. + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'Symbol') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + return false; +}; diff --git a/node_modules/es-abstract/2017/AbstractRelationalComparison.js b/node_modules/es-abstract/2017/AbstractRelationalComparison.js new file mode 100644 index 0000000000000..0dfed5ffe1c63 --- /dev/null +++ b/node_modules/es-abstract/2017/AbstractRelationalComparison.js @@ -0,0 +1,63 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var isPrefixOf = require('../helpers/isPrefixOf'); + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.8.5 + +// eslint-disable-next-line max-statements +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + var bothStrings = Type(px) === 'String' && Type(py) === 'String'; + if (!bothStrings) { + var nx = ToNumber(px); + var ny = ToNumber(py); + if ($isNaN(nx) || $isNaN(ny)) { + return undefined; + } + if ($isFinite(nx) && $isFinite(ny) && nx === ny) { + return false; + } + if (nx === Infinity) { + return false; + } + if (ny === Infinity) { + return true; + } + if (ny === -Infinity) { + return false; + } + if (nx === -Infinity) { + return true; + } + return nx < ny; // by now, these are both nonzero, finite, and not equal + } + if (isPrefixOf(py, px)) { + return false; + } + if (isPrefixOf(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f +}; diff --git a/node_modules/es-abstract/2017/AdvanceStringIndex.js b/node_modules/es-abstract/2017/AdvanceStringIndex.js new file mode 100644 index 0000000000000..831ea96ef9135 --- /dev/null +++ b/node_modules/es-abstract/2017/AdvanceStringIndex.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charCodeAt = require('call-bind/callBound')('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/6.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + + var first = $charCodeAt(S, index); + if (!isLeadingSurrogate(first)) { + return index + 1; + } + + var second = $charCodeAt(S, index + 1); + if (!isTrailingSurrogate(second)) { + return index + 1; + } + + return index + 2; +}; diff --git a/node_modules/es-abstract/2017/ArrayCreate.js b/node_modules/es-abstract/2017/ArrayCreate.js new file mode 100644 index 0000000000000..0d34db9beca45 --- /dev/null +++ b/node_modules/es-abstract/2017/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var hasProto = require('has-proto')(); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/6.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 5 - 7, and 9 + if (proto !== $ArrayPrototype) { // step 8 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 2 + A.length = length; + } + /* step 10, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2017/ArraySetLength.js b/node_modules/es-abstract/2017/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2017/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2017/ArraySpeciesCreate.js b/node_modules/es-abstract/2017/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..1944dfe7b8974 --- /dev/null +++ b/node_modules/es-abstract/2017/ArraySpeciesCreate.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Array = GetIntrinsic('%Array%'); +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + var len = length === 0 ? 0 : length; + var C; + var isArray = IsArray(originalArray); + if (isArray) { + C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + } + if (typeof C === 'undefined') { + return $Array(len); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(len); // Construct(C, len); +}; + diff --git a/node_modules/es-abstract/2017/Call.js b/node_modules/es-abstract/2017/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2017/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2017/CanonicalNumericIndexString.js b/node_modules/es-abstract/2017/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2017/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2017/Canonicalize.js b/node_modules/es-abstract/2017/Canonicalize.js new file mode 100644 index 0000000000000..49741831a618d --- /dev/null +++ b/node_modules/es-abstract/2017/Canonicalize.js @@ -0,0 +1,55 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(ch, IgnoreCase, Unicode) { + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + if (Unicode) { // step 2 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 2.b + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/2017/CharacterRange.js b/node_modules/es-abstract/2017/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2017/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2017/CompletePropertyDescriptor.js b/node_modules/es-abstract/2017/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2017/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2017/CompletionRecord.js b/node_modules/es-abstract/2017/CompletionRecord.js new file mode 100644 index 0000000000000..370a5677f378e --- /dev/null +++ b/node_modules/es-abstract/2017/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2017/CreateDataProperty.js b/node_modules/es-abstract/2017/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2017/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2017/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2017/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..c40e69368b91d --- /dev/null +++ b/node_modules/es-abstract/2017/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2017/CreateHTML.js b/node_modules/es-abstract/2017/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2017/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2017/CreateIterResultObject.js b/node_modules/es-abstract/2017/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2017/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2017/CreateListFromArrayLike.js b/node_modules/es-abstract/2017/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..4c34219206e1f --- /dev/null +++ b/node_modules/es-abstract/2017/CreateListFromArrayLike.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object']; + +// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = ToLength(Get(obj, 'length')); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2017/CreateMethodProperty.js b/node_modules/es-abstract/2017/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2017/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2017/DateFromTime.js b/node_modules/es-abstract/2017/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2017/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2017/Day.js b/node_modules/es-abstract/2017/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2017/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2017/DayFromYear.js b/node_modules/es-abstract/2017/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2017/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2017/DayWithinYear.js b/node_modules/es-abstract/2017/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2017/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2017/DaysInYear.js b/node_modules/es-abstract/2017/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2017/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2017/DefinePropertyOrThrow.js b/node_modules/es-abstract/2017/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2017/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2017/DeletePropertyOrThrow.js b/node_modules/es-abstract/2017/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2017/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2017/DetachArrayBuffer.js b/node_modules/es-abstract/2017/DetachArrayBuffer.js new file mode 100644 index 0000000000000..db77a07ecacc8 --- /dev/null +++ b/node_modules/es-abstract/2017/DetachArrayBuffer.js @@ -0,0 +1,35 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; // node 11.7+ +} catch (e) { /**/ } + +// https://262.ecma-international.org/8.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2017/EnumerableOwnProperties.js b/node_modules/es-abstract/2017/EnumerableOwnProperties.js new file mode 100644 index 0000000000000..44171b9eb4d3e --- /dev/null +++ b/node_modules/es-abstract/2017/EnumerableOwnProperties.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/8.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnProperties(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2017/FromPropertyDescriptor.js b/node_modules/es-abstract/2017/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2017/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2017/Get.js b/node_modules/es-abstract/2017/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2017/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2017/GetGlobalObject.js b/node_modules/es-abstract/2017/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2017/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2017/GetIterator.js b/node_modules/es-abstract/2017/GetIterator.js new file mode 100644 index 0000000000000..145557da422e4 --- /dev/null +++ b/node_modules/es-abstract/2017/GetIterator.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getiterator + +module.exports = function GetIterator(obj, method) { + var actualMethod = method; + if (arguments.length < 2) { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; +}; diff --git a/node_modules/es-abstract/2017/GetMethod.js b/node_modules/es-abstract/2017/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2017/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2017/GetOwnPropertyKeys.js b/node_modules/es-abstract/2017/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2017/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2017/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2017/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2017/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2017/GetSubstitution.js b/node_modules/es-abstract/2017/GetSubstitution.js new file mode 100644 index 0000000000000..4eb827d5950b3 --- /dev/null +++ b/node_modules/es-abstract/2017/GetSubstitution.js @@ -0,0 +1,100 @@ + +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $parseInt = GetIntrinsic('%parseInt%'); + +var inspect = require('object-inspect'); + +var regexTester = require('safe-regex-test'); +var callBound = require('call-bind/callBound'); +var every = require('../helpers/every'); + +var isDigit = regexTester(/^[0-9]$/); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// https://262.ecma-international.org/6.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2017/GetV.js b/node_modules/es-abstract/2017/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2017/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2017/GetValueFromBuffer.js b/node_modules/es-abstract/2017/GetValueFromBuffer.js new file mode 100644 index 0000000000000..0a0d14dba7b57 --- /dev/null +++ b/node_modules/es-abstract/2017/GetValueFromBuffer.js @@ -0,0 +1,108 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var RawBytesToNumber = require('./RawBytesToNumber'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table50 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $Float32: 4, + $Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); + +// https://262.ecma-international.org/8.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string') { + throw new $TypeError('Assertion failed: `type` must be a string'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (typeof order !== 'string') { + throw new $TypeError('Assertion failed: `order` must be a string'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = table50['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('TODO: support SharedArrayBuffers'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumber(type, bytes, isLittleEndian); +}; diff --git a/node_modules/es-abstract/2017/HasOwnProperty.js b/node_modules/es-abstract/2017/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2017/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2017/HasProperty.js b/node_modules/es-abstract/2017/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2017/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2017/HourFromTime.js b/node_modules/es-abstract/2017/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2017/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2017/InLeapYear.js b/node_modules/es-abstract/2017/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2017/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2017/InstanceofOperator.js b/node_modules/es-abstract/2017/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2017/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2017/Invoke.js b/node_modules/es-abstract/2017/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2017/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2017/IsAccessorDescriptor.js b/node_modules/es-abstract/2017/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2017/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2017/IsArray.js b/node_modules/es-abstract/2017/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2017/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2017/IsCallable.js b/node_modules/es-abstract/2017/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2017/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2017/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2017/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..8bdaf3eb45d24 --- /dev/null +++ b/node_modules/es-abstract/2017/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2017/IsConcatSpreadable.js b/node_modules/es-abstract/2017/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2017/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2017/IsConstructor.js b/node_modules/es-abstract/2017/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2017/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2017/IsDataDescriptor.js b/node_modules/es-abstract/2017/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2017/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2017/IsDetachedBuffer.js b/node_modules/es-abstract/2017/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2017/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2017/IsExtensible.js b/node_modules/es-abstract/2017/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2017/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2017/IsGenericDescriptor.js b/node_modules/es-abstract/2017/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2017/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2017/IsInteger.js b/node_modules/es-abstract/2017/IsInteger.js new file mode 100644 index 0000000000000..e3d25f38e3009 --- /dev/null +++ b/node_modules/es-abstract/2017/IsInteger.js @@ -0,0 +1,9 @@ +'use strict'; + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-isinteger + +module.exports = function IsInteger(argument) { + return isInteger(argument); +}; diff --git a/node_modules/es-abstract/2017/IsPromise.js b/node_modules/es-abstract/2017/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2017/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2017/IsPropertyDescriptor.js b/node_modules/es-abstract/2017/IsPropertyDescriptor.js new file mode 100644 index 0000000000000..4cfe79bbe5dbc --- /dev/null +++ b/node_modules/es-abstract/2017/IsPropertyDescriptor.js @@ -0,0 +1,19 @@ +'use strict'; + +// TODO, semver-major: delete this + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var Type = require('./Type'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type + +module.exports = function IsPropertyDescriptor(Desc) { + return isPropertyDescriptor({ + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor, + Type: Type + }, Desc); +}; diff --git a/node_modules/es-abstract/2017/IsPropertyKey.js b/node_modules/es-abstract/2017/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2017/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2017/IsRegExp.js b/node_modules/es-abstract/2017/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2017/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2017/IsSharedArrayBuffer.js b/node_modules/es-abstract/2017/IsSharedArrayBuffer.js new file mode 100644 index 0000000000000..8e96e33f3c2dc --- /dev/null +++ b/node_modules/es-abstract/2017/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2017/IsWordChar.js b/node_modules/es-abstract/2017/IsWordChar.js new file mode 100644 index 0000000000000..5d61804925b6c --- /dev/null +++ b/node_modules/es-abstract/2017/IsWordChar.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); +var Type = require('./Type'); +var WordCharacters = require('./WordCharacters'); + +var every = require('../helpers/every'); + +var isChar = function isChar(c) { + return typeof c === 'string'; +}; + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) { + if (!IsInteger(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + if (!IsInteger(InputLength)) { + throw new $TypeError('Assertion failed: `InputLength` must be an integer'); + } + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + if (e === -1 || e === InputLength) { + return false; // step 1 + } + + var c = Input[e]; // step 2 + + var wordChars = WordCharacters(IgnoreCase, Unicode); + + return $indexOf(wordChars, c) > -1; // steps 3-4 +}; diff --git a/node_modules/es-abstract/2017/IterableToList.js b/node_modules/es-abstract/2017/IterableToList.js new file mode 100644 index 0000000000000..6a1a6be39f021 --- /dev/null +++ b/node_modules/es-abstract/2017/IterableToList.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var GetIterator = require('./GetIterator'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); + +// https://262.ecma-international.org/8.0/#sec-iterabletolist + +module.exports = function IterableToList(items, method) { + var iterator = GetIterator(items, method); + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; +}; diff --git a/node_modules/es-abstract/2017/IteratorClose.js b/node_modules/es-abstract/2017/IteratorClose.js new file mode 100644 index 0000000000000..7c1076082e1e2 --- /dev/null +++ b/node_modules/es-abstract/2017/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2017/IteratorComplete.js b/node_modules/es-abstract/2017/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2017/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2017/IteratorNext.js b/node_modules/es-abstract/2017/IteratorNext.js new file mode 100644 index 0000000000000..d84d66edb5fc2 --- /dev/null +++ b/node_modules/es-abstract/2017/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2017/IteratorStep.js b/node_modules/es-abstract/2017/IteratorStep.js new file mode 100644 index 0000000000000..85bcd95c0410f --- /dev/null +++ b/node_modules/es-abstract/2017/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://262.ecma-international.org/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2017/IteratorValue.js b/node_modules/es-abstract/2017/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2017/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2017/MakeDate.js b/node_modules/es-abstract/2017/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2017/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2017/MakeDay.js b/node_modules/es-abstract/2017/MakeDay.js new file mode 100644 index 0000000000000..13f568633a34a --- /dev/null +++ b/node_modules/es-abstract/2017/MakeDay.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToInteger = require('./ToInteger'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToInteger(year); + var m = ToInteger(month); + var dt = ToInteger(date); + var ym = y + floor(m / 12); + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2017/MakeTime.js b/node_modules/es-abstract/2017/MakeTime.js new file mode 100644 index 0000000000000..34cb4dcca3f84 --- /dev/null +++ b/node_modules/es-abstract/2017/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToInteger = require('./ToInteger'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToInteger(hour); + var m = ToInteger(min); + var s = ToInteger(sec); + var milli = ToInteger(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2017/MinFromTime.js b/node_modules/es-abstract/2017/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2017/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2017/MonthFromTime.js b/node_modules/es-abstract/2017/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2017/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2017/NewPromiseCapability.js b/node_modules/es-abstract/2017/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2017/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2017/NormalCompletion.js b/node_modules/es-abstract/2017/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2017/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2017/NumberToRawBytes.js b/node_modules/es-abstract/2017/NumberToRawBytes.js new file mode 100644 index 0000000000000..c85e97196201e --- /dev/null +++ b/node_modules/es-abstract/2017/NumberToRawBytes.js @@ -0,0 +1,74 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwnProperty = require('./HasOwnProperty'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); +var integerToNBytes = require('../helpers/integerToNBytes'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +// https://262.ecma-international.org/8.0/#sec-numbertorawbytes + +module.exports = function NumberToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number') { + throw new $TypeError('Assertion failed: `value` must be a Number'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'Float32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; diff --git a/node_modules/es-abstract/2017/ObjectCreate.js b/node_modules/es-abstract/2017/ObjectCreate.js new file mode 100644 index 0000000000000..d7d2d04d92a78 --- /dev/null +++ b/node_modules/es-abstract/2017/ObjectCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/6.0/#sec-objectcreate + +module.exports = function ObjectCreate(proto, internalSlotsList) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); + } + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2017/ObjectDefineProperties.js b/node_modules/es-abstract/2017/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2017/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2017/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2017/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..ede44ed6b75ee --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var ObjectCreate = require('./ObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return ObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2017/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2017/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2017/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2017/OrdinaryGetPrototypeOf.js new file mode 100644 index 0000000000000..ba17b98872933 --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2017/OrdinaryHasInstance.js b/node_modules/es-abstract/2017/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2017/OrdinaryHasProperty.js b/node_modules/es-abstract/2017/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2017/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2017/OrdinarySetPrototypeOf.js new file mode 100644 index 0000000000000..d2b72306c187b --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2017/OrdinaryToPrimitive.js b/node_modules/es-abstract/2017/OrdinaryToPrimitive.js new file mode 100644 index 0000000000000..e1dbe1427f8d8 --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2017/QuoteJSONString.js b/node_modules/es-abstract/2017/QuoteJSONString.js new file mode 100644 index 0000000000000..7dabf54bf2f02 --- /dev/null +++ b/node_modules/es-abstract/2017/QuoteJSONString.js @@ -0,0 +1,52 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); +var $strSlice = callBound('String.prototype.slice'); +var $strSplit = callBound('String.prototype.split'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-quotejsonstring + +var escapes = { + '\u0008': 'b', + '\u000C': 'f', + '\u000A': 'n', + '\u000D': 'r', + '\u0009': 't' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach($strSplit(value), function (C) { + if (C === '"' || C === '\\') { + product += '\u005C' + C; + } else if (C === '\u0008' || C === '\u000C' || C === '\u000A' || C === '\u000D' || C === '\u0009') { + var abbrev = escapes[C]; + product += '\u005C' + abbrev; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20) { + product += '\u005Cu' + $toLowerCase($strSlice('0000' + $numberToString(cCharCode, 16), -4)); + } else { + product += C; + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2017/RawBytesToNumber.js b/node_modules/es-abstract/2017/RawBytesToNumber.js new file mode 100644 index 0000000000000..652471623dee4 --- /dev/null +++ b/node_modules/es-abstract/2017/RawBytesToNumber.js @@ -0,0 +1,74 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charAt = callBound('String.prototype.charAt'); +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/8.0/#sec-rawbytestonumber + +module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, $charAt(type, 0) === 'U', false); +}; diff --git a/node_modules/es-abstract/2017/RegExpCreate.js b/node_modules/es-abstract/2017/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2017/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2017/RegExpExec.js b/node_modules/es-abstract/2017/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2017/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2017/RequireObjectCoercible.js b/node_modules/es-abstract/2017/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2017/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2017/SameValue.js b/node_modules/es-abstract/2017/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2017/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2017/SameValueNonNumber.js b/node_modules/es-abstract/2017/SameValueNonNumber.js new file mode 100644 index 0000000000000..b6d2c4e648c81 --- /dev/null +++ b/node_modules/es-abstract/2017/SameValueNonNumber.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); + +// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber + +module.exports = function SameValueNonNumber(x, y) { + if (typeof x === 'number' || typeof x !== typeof y) { + throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2017/SameValueZero.js b/node_modules/es-abstract/2017/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2017/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2017/SecFromTime.js b/node_modules/es-abstract/2017/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2017/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2017/Set.js b/node_modules/es-abstract/2017/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2017/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2017/SetFunctionName.js b/node_modules/es-abstract/2017/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2017/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2017/SetIntegrityLevel.js b/node_modules/es-abstract/2017/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2017/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2017/SetValueInBuffer.js b/node_modules/es-abstract/2017/SetValueInBuffer.js new file mode 100644 index 0000000000000..d5c2fa479b951 --- /dev/null +++ b/node_modules/es-abstract/2017/SetValueInBuffer.js @@ -0,0 +1,120 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); + +var isArrayBuffer = require('is-array-buffer'); +var hasOwn = require('hasown'); + +var table49 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); +var integerToNBytes = require('../helpers/integerToNBytes'); +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); + +// https://262.ecma-international.org/6.0/#sec-setvalueinbuffer + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || !hasOwn(table49, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number') { + throw new $TypeError('Assertion failed: `value` must be a number'); + } + + if (arguments.length > 4 && typeof arguments[4] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Assert: Type(value) is Number. + + // 5. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + // 6. Assert: block is not undefined. + + var elementSize = table49[type]; // step 7 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 4 ? arguments[4] : defaultEndianness === 'little'; // step 8 + + var rawBytes; + if (type === 'Float32') { // step 1 + rawBytes = valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + rawBytes = valueToFloat64Bytes(value, isLittleEndian); + } else { + var n = table49[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + rawBytes = integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 + } + + // 12. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + + // 13. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2017/SpeciesConstructor.js b/node_modules/es-abstract/2017/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2017/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2017/SplitMatch.js b/node_modules/es-abstract/2017/SplitMatch.js new file mode 100644 index 0000000000000..d57fb691e5e91 --- /dev/null +++ b/node_modules/es-abstract/2017/SplitMatch.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $charAt = callBound('String.prototype.charAt'); + +// https://262.ecma-international.org/6.0/#sec-splitmatch + +module.exports = function SplitMatch(S, q, R) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(q)) { + throw new $TypeError('Assertion failed: `q` must be an integer'); + } + if (Type(R) !== 'String') { + throw new $TypeError('Assertion failed: `R` must be a String'); + } + var r = R.length; + var s = S.length; + if (q + r > s) { + return false; + } + + for (var i = 0; i < r; i += 1) { + if ($charAt(S, q + i) !== $charAt(R, i)) { + return false; + } + } + + return q + r; +}; diff --git a/node_modules/es-abstract/2017/StrictEqualityComparison.js b/node_modules/es-abstract/2017/StrictEqualityComparison.js new file mode 100644 index 0000000000000..f3435ba9d181e --- /dev/null +++ b/node_modules/es-abstract/2017/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/2017/StringCreate.js b/node_modules/es-abstract/2017/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2017/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2017/StringGetOwnProperty.js b/node_modules/es-abstract/2017/StringGetOwnProperty.js new file mode 100644 index 0000000000000..b6f904ec3e667 --- /dev/null +++ b/node_modules/es-abstract/2017/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsInteger = require('./IsInteger'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://262.ecma-international.org/8.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2017/SymbolDescriptiveString.js b/node_modules/es-abstract/2017/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2017/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2017/TestIntegrityLevel.js b/node_modules/es-abstract/2017/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2017/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2017/TimeClip.js b/node_modules/es-abstract/2017/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2017/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2017/TimeFromYear.js b/node_modules/es-abstract/2017/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2017/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2017/TimeWithinDay.js b/node_modules/es-abstract/2017/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2017/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2017/ToBoolean.js b/node_modules/es-abstract/2017/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2017/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2017/ToDateString.js b/node_modules/es-abstract/2017/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2017/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2017/ToIndex.js b/node_modules/es-abstract/2017/ToIndex.js new file mode 100644 index 0000000000000..7c9d746d53954 --- /dev/null +++ b/node_modules/es-abstract/2017/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToInteger = require('./ToInteger'); +var ToLength = require('./ToLength'); +var SameValueZero = require('./SameValueZero'); + +// https://262.ecma-international.org/8.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToInteger(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValueZero(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2017/ToInt16.js b/node_modules/es-abstract/2017/ToInt16.js new file mode 100644 index 0000000000000..21694bdeb923c --- /dev/null +++ b/node_modules/es-abstract/2017/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://262.ecma-international.org/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2017/ToInt32.js b/node_modules/es-abstract/2017/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/2017/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2017/ToInt8.js b/node_modules/es-abstract/2017/ToInt8.js new file mode 100644 index 0000000000000..e223b6c1d352a --- /dev/null +++ b/node_modules/es-abstract/2017/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://262.ecma-international.org/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2017/ToInteger.js b/node_modules/es-abstract/2017/ToInteger.js new file mode 100644 index 0000000000000..f6625796ebd22 --- /dev/null +++ b/node_modules/es-abstract/2017/ToInteger.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5ToInteger = require('../5/ToInteger'); + +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/6.0/#sec-tointeger + +module.exports = function ToInteger(value) { + var number = ToNumber(value); + return ES5ToInteger(number); +}; diff --git a/node_modules/es-abstract/2017/ToLength.js b/node_modules/es-abstract/2017/ToLength.js new file mode 100644 index 0000000000000..1bef9bed7b2f0 --- /dev/null +++ b/node_modules/es-abstract/2017/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToInteger = require('./ToInteger'); + +module.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2017/ToNumber.js b/node_modules/es-abstract/2017/ToNumber.js new file mode 100644 index 0000000000000..3abb6a68d228b --- /dev/null +++ b/node_modules/es-abstract/2017/ToNumber.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var isPrimitive = require('../helpers/isPrimitive'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2017/ToObject.js b/node_modules/es-abstract/2017/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2017/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2017/ToPrimitive.js b/node_modules/es-abstract/2017/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2017/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2017/ToPropertyDescriptor.js b/node_modules/es-abstract/2017/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2017/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2017/ToPropertyKey.js b/node_modules/es-abstract/2017/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2017/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2017/ToString.js b/node_modules/es-abstract/2017/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2017/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2017/ToUint16.js b/node_modules/es-abstract/2017/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/2017/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2017/ToUint32.js b/node_modules/es-abstract/2017/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/2017/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2017/ToUint8.js b/node_modules/es-abstract/2017/ToUint8.js new file mode 100644 index 0000000000000..6e4e4b5add2ab --- /dev/null +++ b/node_modules/es-abstract/2017/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2017/ToUint8Clamp.js b/node_modules/es-abstract/2017/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2017/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2017/Type.js b/node_modules/es-abstract/2017/Type.js new file mode 100644 index 0000000000000..da5cb762508f1 --- /dev/null +++ b/node_modules/es-abstract/2017/Type.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2017/TypedArrayCreate.js b/node_modules/es-abstract/2017/TypedArrayCreate.js new file mode 100644 index 0000000000000..ef9fbe2599495 --- /dev/null +++ b/node_modules/es-abstract/2017/TypedArrayCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var availableTypedArrays = require('available-typed-arrays')(); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/7.0/#typedarray-create + +module.exports = function TypedArrayCreate(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + ValidateTypedArray(newTypedArray); // step 2 + + if (argumentList.length === 1 && Type(argumentList[0]) === 'Number') { // step 3 + if (typedArrayLength(newTypedArray) < argumentList[0]) { + throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a + } + } + + return newTypedArray; // step 4 +}; diff --git a/node_modules/es-abstract/2017/TypedArraySpeciesCreate.js b/node_modules/es-abstract/2017/TypedArraySpeciesCreate.js new file mode 100644 index 0000000000000..2bfdff5eb705c --- /dev/null +++ b/node_modules/es-abstract/2017/TypedArraySpeciesCreate.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var SpeciesConstructor = require('./SpeciesConstructor'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/7.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreate(constructor, argumentList); // step 4 +}; diff --git a/node_modules/es-abstract/2017/UTF16Decode.js b/node_modules/es-abstract/2017/UTF16Decode.js new file mode 100644 index 0000000000000..86927b478ccdb --- /dev/null +++ b/node_modules/es-abstract/2017/UTF16Decode.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +// https://262.ecma-international.org/7.0/#sec-utf16decode + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair + +module.exports = function UTF16Decode(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2017/UTF16Encoding.js b/node_modules/es-abstract/2017/UTF16Encoding.js new file mode 100644 index 0000000000000..f381595fd70d6 --- /dev/null +++ b/node_modules/es-abstract/2017/UTF16Encoding.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/7.0/#sec-utf16encoding + +module.exports = function UTF16Encoding(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = floor((cp - 65536) / 1024) + 0xD800; + var cu2 = modulo(cp - 65536, 1024) + 0xDC00; + return $fromCharCode(cu1) + $fromCharCode(cu2); +}; diff --git a/node_modules/es-abstract/2017/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2017/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..134b2d5c367c4 --- /dev/null +++ b/node_modules/es-abstract/2017/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,170 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor +// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + if (oType !== 'Undefined' && !IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); + } + if (Type(current) === 'Undefined') { + if (!extensible) { + return false; + } + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': Desc['[[Configurable]]'], + '[[Enumerable]]': Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': Desc['[[Writable]]'] + } + ); + } + } else { + if (!IsAccessorDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + } + return true; + } + if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { + return true; + } + if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) { + return true; // removed by ES2017, but should still be correct + } + // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor + if (!current['[[Configurable]]']) { + if (Desc['[[Configurable]]']) { + return false; + } + if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { + return false; + } + } + if (IsGenericDescriptor(Desc)) { + // no further validation is required. + } else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + return false; + } + if (IsDataDescriptor(current)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Get]]': undefined + } + ); + } + } else if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Value]]': undefined + } + ); + } + } else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]'] && !current['[[Writable]]']) { + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + return true; + } + } else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + return true; + } + } else { + throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + return true; +}; diff --git a/node_modules/es-abstract/2017/ValidateAtomicAccess.js b/node_modules/es-abstract/2017/ValidateAtomicAccess.js new file mode 100644 index 0000000000000..e1c51c7768df5 --- /dev/null +++ b/node_modules/es-abstract/2017/ValidateAtomicAccess.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/8.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var accessIndex = ToIndex(requestIndex); // step 2 + + var length = typedArrayLength(typedArray); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + return accessIndex; // step 6 +}; diff --git a/node_modules/es-abstract/2017/ValidateTypedArray.js b/node_modules/es-abstract/2017/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2017/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2017/WeekDay.js b/node_modules/es-abstract/2017/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2017/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2017/WordCharacters.js b/node_modules/es-abstract/2017/WordCharacters.js new file mode 100644 index 0000000000000..aeebc1e75cbc7 --- /dev/null +++ b/node_modules/es-abstract/2017/WordCharacters.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $indexOf = callBound('String.prototype.indexOf', true); + +var Canonicalize = require('./Canonicalize'); +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1 + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation + +module.exports = function WordCharacters(IgnoreCase, Unicode) { + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + var U = ''; + forEach(OwnPropertyKeys(caseFolding.C), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.C[c]; // step 3 + } + }); + forEach(OwnPropertyKeys(caseFolding.S), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.S[c]; // step 3 + } + }); + + if ((!Unicode || !IgnoreCase) && U.length > 0) { + throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4 + } + + return A + U; // step 5, 6 +}; diff --git a/node_modules/es-abstract/2017/YearFromTime.js b/node_modules/es-abstract/2017/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2017/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2017/abs.js b/node_modules/es-abstract/2017/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2017/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2017/floor.js b/node_modules/es-abstract/2017/floor.js new file mode 100644 index 0000000000000..8439df0649365 --- /dev/null +++ b/node_modules/es-abstract/2017/floor.js @@ -0,0 +1,11 @@ +'use strict'; + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function floor(x) { + // return x - modulo(x, 1); + return $floor(x); +}; diff --git a/node_modules/es-abstract/2017/max.js b/node_modules/es-abstract/2017/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2017/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2017/min.js b/node_modules/es-abstract/2017/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2017/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2017/modulo.js b/node_modules/es-abstract/2017/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2017/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2017/msFromTime.js b/node_modules/es-abstract/2017/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2017/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2017/thisBooleanValue.js b/node_modules/es-abstract/2017/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2017/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2017/thisNumberValue.js b/node_modules/es-abstract/2017/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2017/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2017/thisStringValue.js b/node_modules/es-abstract/2017/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2017/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2017/thisTimeValue.js b/node_modules/es-abstract/2017/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2017/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2018/AbstractEqualityComparison.js b/node_modules/es-abstract/2018/AbstractEqualityComparison.js new file mode 100644 index 0000000000000..b56a506622447 --- /dev/null +++ b/node_modules/es-abstract/2018/AbstractEqualityComparison.js @@ -0,0 +1,37 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return x === y; // ES6+ specified this shortcut anyways. + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'Symbol') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + return false; +}; diff --git a/node_modules/es-abstract/2018/AbstractRelationalComparison.js b/node_modules/es-abstract/2018/AbstractRelationalComparison.js new file mode 100644 index 0000000000000..7c6472f5666a4 --- /dev/null +++ b/node_modules/es-abstract/2018/AbstractRelationalComparison.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); + +var IsStringPrefix = require('./IsStringPrefix'); +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison + +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + if (Type(px) === 'String' && Type(py) === 'String') { + if (IsStringPrefix(py, px)) { + return false; + } + if (IsStringPrefix(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + var nx = ToNumber(px); + var ny = ToNumber(py); + if ($isNaN(nx) || $isNaN(ny)) { + return undefined; + } + if ($isFinite(nx) && $isFinite(ny) && nx === ny) { + return false; + } + if (nx === Infinity) { + return false; + } + if (ny === Infinity) { + return true; + } + if (ny === -Infinity) { + return false; + } + if (nx === -Infinity) { + return true; + } + return nx < ny; // by now, these are both nonzero, finite, and not equal +}; diff --git a/node_modules/es-abstract/2018/AdvanceStringIndex.js b/node_modules/es-abstract/2018/AdvanceStringIndex.js new file mode 100644 index 0000000000000..831ea96ef9135 --- /dev/null +++ b/node_modules/es-abstract/2018/AdvanceStringIndex.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charCodeAt = require('call-bind/callBound')('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/6.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + + var first = $charCodeAt(S, index); + if (!isLeadingSurrogate(first)) { + return index + 1; + } + + var second = $charCodeAt(S, index + 1); + if (!isTrailingSurrogate(second)) { + return index + 1; + } + + return index + 2; +}; diff --git a/node_modules/es-abstract/2018/ArrayCreate.js b/node_modules/es-abstract/2018/ArrayCreate.js new file mode 100644 index 0000000000000..0d34db9beca45 --- /dev/null +++ b/node_modules/es-abstract/2018/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var hasProto = require('has-proto')(); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/6.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 5 - 7, and 9 + if (proto !== $ArrayPrototype) { // step 8 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 2 + A.length = length; + } + /* step 10, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2018/ArraySetLength.js b/node_modules/es-abstract/2018/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2018/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2018/ArraySpeciesCreate.js b/node_modules/es-abstract/2018/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..1944dfe7b8974 --- /dev/null +++ b/node_modules/es-abstract/2018/ArraySpeciesCreate.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Array = GetIntrinsic('%Array%'); +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + var len = length === 0 ? 0 : length; + var C; + var isArray = IsArray(originalArray); + if (isArray) { + C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + } + if (typeof C === 'undefined') { + return $Array(len); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(len); // Construct(C, len); +}; + diff --git a/node_modules/es-abstract/2018/AsyncIteratorClose.js b/node_modules/es-abstract/2018/AsyncIteratorClose.js new file mode 100644 index 0000000000000..eb72ef938818d --- /dev/null +++ b/node_modules/es-abstract/2018/AsyncIteratorClose.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/9.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return new $Promise(function (resolve) { + var ret = GetMethod(iterator, 'return'); // step 4 + + if (typeof ret === 'undefined') { + resolve(completion); // step 5 + } else { + resolve($then( + new $Promise(function (resolve2) { + // process.exit(42); + resolve2(Call(ret, iterator, [])); // step 6 + }), + function (innerResult) { + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + }, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 8 + } else { + throw e; // step 9 + } + } + )); + } + }); +}; diff --git a/node_modules/es-abstract/2018/Call.js b/node_modules/es-abstract/2018/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2018/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2018/CanonicalNumericIndexString.js b/node_modules/es-abstract/2018/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2018/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2018/Canonicalize.js b/node_modules/es-abstract/2018/Canonicalize.js new file mode 100644 index 0000000000000..49741831a618d --- /dev/null +++ b/node_modules/es-abstract/2018/Canonicalize.js @@ -0,0 +1,55 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(ch, IgnoreCase, Unicode) { + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + if (Unicode) { // step 2 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 2.b + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/2018/CharacterRange.js b/node_modules/es-abstract/2018/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2018/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2018/CompletePropertyDescriptor.js b/node_modules/es-abstract/2018/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2018/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2018/CompletionRecord.js b/node_modules/es-abstract/2018/CompletionRecord.js new file mode 100644 index 0000000000000..370a5677f378e --- /dev/null +++ b/node_modules/es-abstract/2018/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2018/CopyDataProperties.js b/node_modules/es-abstract/2018/CopyDataProperties.js new file mode 100644 index 0000000000000..c267c3723d489 --- /dev/null +++ b/node_modules/es-abstract/2018/CopyDataProperties.js @@ -0,0 +1,68 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var CreateDataProperty = require('./CreateDataProperty'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-copydataproperties + +module.exports = function CopyDataProperties(target, source, excludedItems) { + if (Type(target) !== 'Object') { + throw new $TypeError('Assertion failed: "target" must be an Object'); + } + + if (!IsArray(excludedItems)) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + for (var i = 0; i < excludedItems.length; i += 1) { + if (!IsPropertyKey(excludedItems[i])) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + } + + if (typeof source === 'undefined' || source === null) { + return target; + } + + var fromObj = ToObject(source); + + var sourceKeys = OwnPropertyKeys(fromObj); + forEach(sourceKeys, function (nextKey) { + var excluded = false; + + forEach(excludedItems, function (e) { + if (SameValue(e, nextKey) === true) { + excluded = true; + } + }); + + var enumerable = $isEnumerable(fromObj, nextKey) || ( + // this is to handle string keys being non-enumerable in older engines + typeof source === 'string' + && nextKey >= 0 + && IsInteger(ToNumber(nextKey)) + ); + if (excluded === false && enumerable) { + var propValue = Get(fromObj, nextKey); + CreateDataProperty(target, nextKey, propValue); + } + }); + + return target; +}; diff --git a/node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js new file mode 100644 index 0000000000000..8f41b8d406382 --- /dev/null +++ b/node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js @@ -0,0 +1,155 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); +var IteratorValue = require('./IteratorValue'); +var ObjectCreate = require('./ObjectCreate'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +var assertRecord = require('../helpers/assertRecord'); + +var AsyncFromSyncIteratorContinuation = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $TypeError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://262.ecma-international.org/9.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = ObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = ObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2018/CreateDataProperty.js b/node_modules/es-abstract/2018/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2018/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2018/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2018/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..c40e69368b91d --- /dev/null +++ b/node_modules/es-abstract/2018/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2018/CreateHTML.js b/node_modules/es-abstract/2018/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2018/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2018/CreateIterResultObject.js b/node_modules/es-abstract/2018/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2018/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2018/CreateListFromArrayLike.js b/node_modules/es-abstract/2018/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..4c34219206e1f --- /dev/null +++ b/node_modules/es-abstract/2018/CreateListFromArrayLike.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object']; + +// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = ToLength(Get(obj, 'length')); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2018/CreateMethodProperty.js b/node_modules/es-abstract/2018/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2018/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2018/DateFromTime.js b/node_modules/es-abstract/2018/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2018/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2018/DateString.js b/node_modules/es-abstract/2018/DateString.js new file mode 100644 index 0000000000000..939c14c0c87ef --- /dev/null +++ b/node_modules/es-abstract/2018/DateString.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var Type = require('./Type'); +var WeekDay = require('./WeekDay'); +var MonthFromTime = require('./MonthFromTime'); +var YearFromTime = require('./YearFromTime'); +var DateFromTime = require('./DateFromTime'); + +// https://262.ecma-international.org/9.0/#sec-datestring + +module.exports = function DateString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var weekday = weekdays[WeekDay(tv)]; + var month = months[MonthFromTime(tv)]; + var day = padTimeComponent(DateFromTime(tv)); + var year = padTimeComponent(YearFromTime(tv), 4); + return weekday + '\x20' + month + '\x20' + day + '\x20' + year; +}; diff --git a/node_modules/es-abstract/2018/Day.js b/node_modules/es-abstract/2018/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2018/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2018/DayFromYear.js b/node_modules/es-abstract/2018/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2018/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2018/DayWithinYear.js b/node_modules/es-abstract/2018/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2018/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2018/DaysInYear.js b/node_modules/es-abstract/2018/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2018/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2018/DefinePropertyOrThrow.js b/node_modules/es-abstract/2018/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2018/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2018/DeletePropertyOrThrow.js b/node_modules/es-abstract/2018/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2018/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2018/DetachArrayBuffer.js b/node_modules/es-abstract/2018/DetachArrayBuffer.js new file mode 100644 index 0000000000000..03284729b3d4e --- /dev/null +++ b/node_modules/es-abstract/2018/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js new file mode 100644 index 0000000000000..8e3177b6a1631 --- /dev/null +++ b/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/8.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnPropertyNames(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2018/FromPropertyDescriptor.js b/node_modules/es-abstract/2018/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2018/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2018/Get.js b/node_modules/es-abstract/2018/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2018/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2018/GetGlobalObject.js b/node_modules/es-abstract/2018/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2018/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2018/GetIterator.js b/node_modules/es-abstract/2018/GetIterator.js new file mode 100644 index 0000000000000..145557da422e4 --- /dev/null +++ b/node_modules/es-abstract/2018/GetIterator.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getiterator + +module.exports = function GetIterator(obj, method) { + var actualMethod = method; + if (arguments.length < 2) { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; +}; diff --git a/node_modules/es-abstract/2018/GetMethod.js b/node_modules/es-abstract/2018/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2018/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2018/GetOwnPropertyKeys.js b/node_modules/es-abstract/2018/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2018/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2018/GetSubstitution.js b/node_modules/es-abstract/2018/GetSubstitution.js new file mode 100644 index 0000000000000..21aea1fd4fcee --- /dev/null +++ b/node_modules/es-abstract/2018/GetSubstitution.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var every = require('../helpers/every'); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); +var $indexOf = callBound('String.prototype.indexOf'); +var $parseInt = parseInt; + +var isDigit = regexTester(/^[0-9]$/); + +var inspect = require('object-inspect'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// http://262.ecma-international.org/9.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-params, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a List of Strings or `undefined`, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + if (Type(namedCaptures) !== 'Undefined') { + namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign + } + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else if (next === '<') { + // eslint-disable-next-line max-depth + if (Type(namedCaptures) === 'Undefined') { + result += '$<'; + i += 2; + } else { + var endIndex = $indexOf(replacement, '>', i); + // eslint-disable-next-line max-depth + if (endIndex > -1) { + var groupName = $strSlice(replacement, i + '$<'.length, endIndex); + var capture = Get(namedCaptures, groupName); + // eslint-disable-next-line max-depth + if (Type(capture) !== 'Undefined') { + result += ToString(capture); + } + i += ('<' + groupName + '>').length; + } + } + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2018/GetV.js b/node_modules/es-abstract/2018/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2018/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2018/GetValueFromBuffer.js b/node_modules/es-abstract/2018/GetValueFromBuffer.js new file mode 100644 index 0000000000000..0a0d14dba7b57 --- /dev/null +++ b/node_modules/es-abstract/2018/GetValueFromBuffer.js @@ -0,0 +1,108 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var RawBytesToNumber = require('./RawBytesToNumber'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table50 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $Float32: 4, + $Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); + +// https://262.ecma-international.org/8.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string') { + throw new $TypeError('Assertion failed: `type` must be a string'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (typeof order !== 'string') { + throw new $TypeError('Assertion failed: `order` must be a string'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = table50['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('TODO: support SharedArrayBuffers'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumber(type, bytes, isLittleEndian); +}; diff --git a/node_modules/es-abstract/2018/HasOwnProperty.js b/node_modules/es-abstract/2018/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2018/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2018/HasProperty.js b/node_modules/es-abstract/2018/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2018/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2018/HourFromTime.js b/node_modules/es-abstract/2018/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2018/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2018/InLeapYear.js b/node_modules/es-abstract/2018/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2018/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2018/InstanceofOperator.js b/node_modules/es-abstract/2018/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2018/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2018/Invoke.js b/node_modules/es-abstract/2018/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2018/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2018/IsAccessorDescriptor.js b/node_modules/es-abstract/2018/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2018/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2018/IsArray.js b/node_modules/es-abstract/2018/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2018/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2018/IsCallable.js b/node_modules/es-abstract/2018/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2018/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..8bdaf3eb45d24 --- /dev/null +++ b/node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2018/IsConcatSpreadable.js b/node_modules/es-abstract/2018/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2018/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2018/IsConstructor.js b/node_modules/es-abstract/2018/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2018/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2018/IsDataDescriptor.js b/node_modules/es-abstract/2018/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2018/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2018/IsDetachedBuffer.js b/node_modules/es-abstract/2018/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2018/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2018/IsExtensible.js b/node_modules/es-abstract/2018/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2018/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2018/IsGenericDescriptor.js b/node_modules/es-abstract/2018/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2018/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2018/IsInteger.js b/node_modules/es-abstract/2018/IsInteger.js new file mode 100644 index 0000000000000..e3d25f38e3009 --- /dev/null +++ b/node_modules/es-abstract/2018/IsInteger.js @@ -0,0 +1,9 @@ +'use strict'; + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-isinteger + +module.exports = function IsInteger(argument) { + return isInteger(argument); +}; diff --git a/node_modules/es-abstract/2018/IsPromise.js b/node_modules/es-abstract/2018/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2018/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2018/IsPropertyKey.js b/node_modules/es-abstract/2018/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2018/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2018/IsRegExp.js b/node_modules/es-abstract/2018/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2018/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2018/IsSharedArrayBuffer.js b/node_modules/es-abstract/2018/IsSharedArrayBuffer.js new file mode 100644 index 0000000000000..8e96e33f3c2dc --- /dev/null +++ b/node_modules/es-abstract/2018/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2018/IsStringPrefix.js b/node_modules/es-abstract/2018/IsStringPrefix.js new file mode 100644 index 0000000000000..4958544ce29f0 --- /dev/null +++ b/node_modules/es-abstract/2018/IsStringPrefix.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPrefixOf = require('../helpers/isPrefixOf'); + +// var callBound = require('call-bind/callBound'); + +// var $charAt = callBound('String.prototype.charAt'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-isstringprefix + +module.exports = function IsStringPrefix(p, q) { + if (Type(p) !== 'String') { + throw new $TypeError('Assertion failed: "p" must be a String'); + } + + if (Type(q) !== 'String') { + throw new $TypeError('Assertion failed: "q" must be a String'); + } + + return isPrefixOf(p, q); + /* + if (p === q || p === '') { + return true; + } + + var pLength = p.length; + var qLength = q.length; + if (pLength >= qLength) { + return false; + } + + // assert: pLength < qLength + + for (var i = 0; i < pLength; i += 1) { + if ($charAt(p, i) !== $charAt(q, i)) { + return false; + } + } + return true; + */ +}; diff --git a/node_modules/es-abstract/2018/IsWordChar.js b/node_modules/es-abstract/2018/IsWordChar.js new file mode 100644 index 0000000000000..5d61804925b6c --- /dev/null +++ b/node_modules/es-abstract/2018/IsWordChar.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); +var Type = require('./Type'); +var WordCharacters = require('./WordCharacters'); + +var every = require('../helpers/every'); + +var isChar = function isChar(c) { + return typeof c === 'string'; +}; + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) { + if (!IsInteger(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + if (!IsInteger(InputLength)) { + throw new $TypeError('Assertion failed: `InputLength` must be an integer'); + } + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + if (e === -1 || e === InputLength) { + return false; // step 1 + } + + var c = Input[e]; // step 2 + + var wordChars = WordCharacters(IgnoreCase, Unicode); + + return $indexOf(wordChars, c) > -1; // steps 3-4 +}; diff --git a/node_modules/es-abstract/2018/IterableToList.js b/node_modules/es-abstract/2018/IterableToList.js new file mode 100644 index 0000000000000..6a1a6be39f021 --- /dev/null +++ b/node_modules/es-abstract/2018/IterableToList.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var GetIterator = require('./GetIterator'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); + +// https://262.ecma-international.org/8.0/#sec-iterabletolist + +module.exports = function IterableToList(items, method) { + var iterator = GetIterator(items, method); + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; +}; diff --git a/node_modules/es-abstract/2018/IteratorClose.js b/node_modules/es-abstract/2018/IteratorClose.js new file mode 100644 index 0000000000000..7c1076082e1e2 --- /dev/null +++ b/node_modules/es-abstract/2018/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2018/IteratorComplete.js b/node_modules/es-abstract/2018/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2018/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2018/IteratorNext.js b/node_modules/es-abstract/2018/IteratorNext.js new file mode 100644 index 0000000000000..d84d66edb5fc2 --- /dev/null +++ b/node_modules/es-abstract/2018/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2018/IteratorStep.js b/node_modules/es-abstract/2018/IteratorStep.js new file mode 100644 index 0000000000000..85bcd95c0410f --- /dev/null +++ b/node_modules/es-abstract/2018/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://262.ecma-international.org/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2018/IteratorValue.js b/node_modules/es-abstract/2018/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2018/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2018/MakeDate.js b/node_modules/es-abstract/2018/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2018/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2018/MakeDay.js b/node_modules/es-abstract/2018/MakeDay.js new file mode 100644 index 0000000000000..13f568633a34a --- /dev/null +++ b/node_modules/es-abstract/2018/MakeDay.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToInteger = require('./ToInteger'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToInteger(year); + var m = ToInteger(month); + var dt = ToInteger(date); + var ym = y + floor(m / 12); + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2018/MakeTime.js b/node_modules/es-abstract/2018/MakeTime.js new file mode 100644 index 0000000000000..34cb4dcca3f84 --- /dev/null +++ b/node_modules/es-abstract/2018/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToInteger = require('./ToInteger'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToInteger(hour); + var m = ToInteger(min); + var s = ToInteger(sec); + var milli = ToInteger(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2018/MinFromTime.js b/node_modules/es-abstract/2018/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2018/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2018/MonthFromTime.js b/node_modules/es-abstract/2018/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2018/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2018/NewPromiseCapability.js b/node_modules/es-abstract/2018/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2018/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2018/NormalCompletion.js b/node_modules/es-abstract/2018/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2018/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2018/NumberToRawBytes.js b/node_modules/es-abstract/2018/NumberToRawBytes.js new file mode 100644 index 0000000000000..c85e97196201e --- /dev/null +++ b/node_modules/es-abstract/2018/NumberToRawBytes.js @@ -0,0 +1,74 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwnProperty = require('./HasOwnProperty'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); +var integerToNBytes = require('../helpers/integerToNBytes'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +// https://262.ecma-international.org/8.0/#sec-numbertorawbytes + +module.exports = function NumberToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number') { + throw new $TypeError('Assertion failed: `value` must be a Number'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'Float32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; diff --git a/node_modules/es-abstract/2018/NumberToString.js b/node_modules/es-abstract/2018/NumberToString.js new file mode 100644 index 0000000000000..b00c4bd59848c --- /dev/null +++ b/node_modules/es-abstract/2018/NumberToString.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-tostring-applied-to-the-number-type + +module.exports = function NumberToString(m) { + if (Type(m) !== 'Number') { + throw new $TypeError('Assertion failed: "m" must be a String'); + } + + return $String(m); +}; + diff --git a/node_modules/es-abstract/2018/ObjectCreate.js b/node_modules/es-abstract/2018/ObjectCreate.js new file mode 100644 index 0000000000000..d7d2d04d92a78 --- /dev/null +++ b/node_modules/es-abstract/2018/ObjectCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/6.0/#sec-objectcreate + +module.exports = function ObjectCreate(proto, internalSlotsList) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); + } + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2018/ObjectDefineProperties.js b/node_modules/es-abstract/2018/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2018/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2018/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2018/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..ede44ed6b75ee --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var ObjectCreate = require('./ObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return ObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2018/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2018/OrdinaryGetPrototypeOf.js new file mode 100644 index 0000000000000..ba17b98872933 --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2018/OrdinaryHasInstance.js b/node_modules/es-abstract/2018/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2018/OrdinaryHasProperty.js b/node_modules/es-abstract/2018/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js new file mode 100644 index 0000000000000..d2b72306c187b --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2018/OrdinaryToPrimitive.js b/node_modules/es-abstract/2018/OrdinaryToPrimitive.js new file mode 100644 index 0000000000000..e1dbe1427f8d8 --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2018/PromiseResolve.js b/node_modules/es-abstract/2018/PromiseResolve.js new file mode 100644 index 0000000000000..6474b79c40ae6 --- /dev/null +++ b/node_modules/es-abstract/2018/PromiseResolve.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBind = require('call-bind'); + +var $resolve = GetIntrinsic('%Promise.resolve%', true); +var $PromiseResolve = $resolve && callBind($resolve); + +// https://262.ecma-international.org/9.0/#sec-promise-resolve + +module.exports = function PromiseResolve(C, x) { + if (!$PromiseResolve) { + throw new SyntaxError('This environment does not support Promises.'); + } + return $PromiseResolve(C, x); +}; + diff --git a/node_modules/es-abstract/2018/QuoteJSONString.js b/node_modules/es-abstract/2018/QuoteJSONString.js new file mode 100644 index 0000000000000..2a570dc362f94 --- /dev/null +++ b/node_modules/es-abstract/2018/QuoteJSONString.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $strSplit = callBound('String.prototype.split'); + +var Type = require('./Type'); +var UnicodeEscape = require('./UnicodeEscape'); + +var hasOwn = require('hasown'); + +// https://262.ecma-international.org/9.0/#sec-quotejsonstring + +var escapes = { + '\u0008': '\\b', + '\u0009': '\\t', + '\u000A': '\\n', + '\u000C': '\\f', + '\u000D': '\\r', + '\u0022': '\\"', + '\u005c': '\\\\' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach($strSplit(value), function (C) { + if (hasOwn(escapes, C)) { + product += escapes[C]; + } else if ($charCodeAt(C, 0) < 0x20) { + product += UnicodeEscape(C); + } else { + product += C; + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2018/RawBytesToNumber.js b/node_modules/es-abstract/2018/RawBytesToNumber.js new file mode 100644 index 0000000000000..652471623dee4 --- /dev/null +++ b/node_modules/es-abstract/2018/RawBytesToNumber.js @@ -0,0 +1,74 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charAt = callBound('String.prototype.charAt'); +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/8.0/#sec-rawbytestonumber + +module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, $charAt(type, 0) === 'U', false); +}; diff --git a/node_modules/es-abstract/2018/RegExpCreate.js b/node_modules/es-abstract/2018/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2018/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2018/RegExpExec.js b/node_modules/es-abstract/2018/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2018/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2018/RequireObjectCoercible.js b/node_modules/es-abstract/2018/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2018/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2018/SameValue.js b/node_modules/es-abstract/2018/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2018/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2018/SameValueNonNumber.js b/node_modules/es-abstract/2018/SameValueNonNumber.js new file mode 100644 index 0000000000000..b6d2c4e648c81 --- /dev/null +++ b/node_modules/es-abstract/2018/SameValueNonNumber.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); + +// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber + +module.exports = function SameValueNonNumber(x, y) { + if (typeof x === 'number' || typeof x !== typeof y) { + throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2018/SameValueZero.js b/node_modules/es-abstract/2018/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2018/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2018/SecFromTime.js b/node_modules/es-abstract/2018/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2018/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2018/Set.js b/node_modules/es-abstract/2018/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2018/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2018/SetFunctionLength.js b/node_modules/es-abstract/2018/SetFunctionLength.js new file mode 100644 index 0000000000000..14228bf184d47 --- /dev/null +++ b/node_modules/es-abstract/2018/SetFunctionLength.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var HasOwnProperty = require('./HasOwnProperty'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/9.0/#sec-setfunctionlength + +module.exports = function SetFunctionLength(F, length) { + if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) { + throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property'); + } + if (Type(length) !== 'Number') { + throw new $TypeError('Assertion failed: `length` must be a Number'); + } + if (length < 0 || !isInteger(length)) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0'); + } + return DefinePropertyOrThrow(F, 'length', { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); +}; diff --git a/node_modules/es-abstract/2018/SetFunctionName.js b/node_modules/es-abstract/2018/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2018/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2018/SetIntegrityLevel.js b/node_modules/es-abstract/2018/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2018/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2018/SetValueInBuffer.js b/node_modules/es-abstract/2018/SetValueInBuffer.js new file mode 100644 index 0000000000000..d5c2fa479b951 --- /dev/null +++ b/node_modules/es-abstract/2018/SetValueInBuffer.js @@ -0,0 +1,120 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); + +var isArrayBuffer = require('is-array-buffer'); +var hasOwn = require('hasown'); + +var table49 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); +var integerToNBytes = require('../helpers/integerToNBytes'); +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); + +// https://262.ecma-international.org/6.0/#sec-setvalueinbuffer + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || !hasOwn(table49, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number') { + throw new $TypeError('Assertion failed: `value` must be a number'); + } + + if (arguments.length > 4 && typeof arguments[4] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Assert: Type(value) is Number. + + // 5. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + // 6. Assert: block is not undefined. + + var elementSize = table49[type]; // step 7 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 4 ? arguments[4] : defaultEndianness === 'little'; // step 8 + + var rawBytes; + if (type === 'Float32') { // step 1 + rawBytes = valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + rawBytes = valueToFloat64Bytes(value, isLittleEndian); + } else { + var n = table49[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + rawBytes = integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 + } + + // 12. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + + // 13. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2018/SpeciesConstructor.js b/node_modules/es-abstract/2018/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2018/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2018/SplitMatch.js b/node_modules/es-abstract/2018/SplitMatch.js new file mode 100644 index 0000000000000..d57fb691e5e91 --- /dev/null +++ b/node_modules/es-abstract/2018/SplitMatch.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $charAt = callBound('String.prototype.charAt'); + +// https://262.ecma-international.org/6.0/#sec-splitmatch + +module.exports = function SplitMatch(S, q, R) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(q)) { + throw new $TypeError('Assertion failed: `q` must be an integer'); + } + if (Type(R) !== 'String') { + throw new $TypeError('Assertion failed: `R` must be a String'); + } + var r = R.length; + var s = S.length; + if (q + r > s) { + return false; + } + + for (var i = 0; i < r; i += 1) { + if ($charAt(S, q + i) !== $charAt(R, i)) { + return false; + } + } + + return q + r; +}; diff --git a/node_modules/es-abstract/2018/StrictEqualityComparison.js b/node_modules/es-abstract/2018/StrictEqualityComparison.js new file mode 100644 index 0000000000000..f3435ba9d181e --- /dev/null +++ b/node_modules/es-abstract/2018/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/2018/StringCreate.js b/node_modules/es-abstract/2018/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2018/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2018/StringGetOwnProperty.js b/node_modules/es-abstract/2018/StringGetOwnProperty.js new file mode 100644 index 0000000000000..b6f904ec3e667 --- /dev/null +++ b/node_modules/es-abstract/2018/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsInteger = require('./IsInteger'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://262.ecma-international.org/8.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2018/SymbolDescriptiveString.js b/node_modules/es-abstract/2018/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2018/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2018/TestIntegrityLevel.js b/node_modules/es-abstract/2018/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2018/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2018/ThrowCompletion.js b/node_modules/es-abstract/2018/ThrowCompletion.js new file mode 100644 index 0000000000000..b7d388a35292e --- /dev/null +++ b/node_modules/es-abstract/2018/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2018/TimeClip.js b/node_modules/es-abstract/2018/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2018/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2018/TimeFromYear.js b/node_modules/es-abstract/2018/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2018/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2018/TimeString.js b/node_modules/es-abstract/2018/TimeString.js new file mode 100644 index 0000000000000..051c4728e2e49 --- /dev/null +++ b/node_modules/es-abstract/2018/TimeString.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var HourFromTime = require('./HourFromTime'); +var MinFromTime = require('./MinFromTime'); +var SecFromTime = require('./SecFromTime'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-timestring + +module.exports = function TimeString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var hour = HourFromTime(tv); + var minute = MinFromTime(tv); + var second = SecFromTime(tv); + return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; +}; diff --git a/node_modules/es-abstract/2018/TimeWithinDay.js b/node_modules/es-abstract/2018/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2018/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2018/ToBoolean.js b/node_modules/es-abstract/2018/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2018/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2018/ToDateString.js b/node_modules/es-abstract/2018/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2018/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2018/ToIndex.js b/node_modules/es-abstract/2018/ToIndex.js new file mode 100644 index 0000000000000..7c9d746d53954 --- /dev/null +++ b/node_modules/es-abstract/2018/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToInteger = require('./ToInteger'); +var ToLength = require('./ToLength'); +var SameValueZero = require('./SameValueZero'); + +// https://262.ecma-international.org/8.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToInteger(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValueZero(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2018/ToInt16.js b/node_modules/es-abstract/2018/ToInt16.js new file mode 100644 index 0000000000000..21694bdeb923c --- /dev/null +++ b/node_modules/es-abstract/2018/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://262.ecma-international.org/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2018/ToInt32.js b/node_modules/es-abstract/2018/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/2018/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2018/ToInt8.js b/node_modules/es-abstract/2018/ToInt8.js new file mode 100644 index 0000000000000..e223b6c1d352a --- /dev/null +++ b/node_modules/es-abstract/2018/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://262.ecma-international.org/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2018/ToInteger.js b/node_modules/es-abstract/2018/ToInteger.js new file mode 100644 index 0000000000000..f6625796ebd22 --- /dev/null +++ b/node_modules/es-abstract/2018/ToInteger.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5ToInteger = require('../5/ToInteger'); + +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/6.0/#sec-tointeger + +module.exports = function ToInteger(value) { + var number = ToNumber(value); + return ES5ToInteger(number); +}; diff --git a/node_modules/es-abstract/2018/ToLength.js b/node_modules/es-abstract/2018/ToLength.js new file mode 100644 index 0000000000000..1bef9bed7b2f0 --- /dev/null +++ b/node_modules/es-abstract/2018/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToInteger = require('./ToInteger'); + +module.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2018/ToNumber.js b/node_modules/es-abstract/2018/ToNumber.js new file mode 100644 index 0000000000000..3abb6a68d228b --- /dev/null +++ b/node_modules/es-abstract/2018/ToNumber.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var isPrimitive = require('../helpers/isPrimitive'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2018/ToObject.js b/node_modules/es-abstract/2018/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2018/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2018/ToPrimitive.js b/node_modules/es-abstract/2018/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2018/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2018/ToPropertyDescriptor.js b/node_modules/es-abstract/2018/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2018/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2018/ToPropertyKey.js b/node_modules/es-abstract/2018/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2018/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2018/ToString.js b/node_modules/es-abstract/2018/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2018/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2018/ToUint16.js b/node_modules/es-abstract/2018/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/2018/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2018/ToUint32.js b/node_modules/es-abstract/2018/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/2018/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2018/ToUint8.js b/node_modules/es-abstract/2018/ToUint8.js new file mode 100644 index 0000000000000..6e4e4b5add2ab --- /dev/null +++ b/node_modules/es-abstract/2018/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2018/ToUint8Clamp.js b/node_modules/es-abstract/2018/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2018/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2018/Type.js b/node_modules/es-abstract/2018/Type.js new file mode 100644 index 0000000000000..da5cb762508f1 --- /dev/null +++ b/node_modules/es-abstract/2018/Type.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2018/TypedArrayCreate.js b/node_modules/es-abstract/2018/TypedArrayCreate.js new file mode 100644 index 0000000000000..ef9fbe2599495 --- /dev/null +++ b/node_modules/es-abstract/2018/TypedArrayCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var availableTypedArrays = require('available-typed-arrays')(); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/7.0/#typedarray-create + +module.exports = function TypedArrayCreate(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + ValidateTypedArray(newTypedArray); // step 2 + + if (argumentList.length === 1 && Type(argumentList[0]) === 'Number') { // step 3 + if (typedArrayLength(newTypedArray) < argumentList[0]) { + throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a + } + } + + return newTypedArray; // step 4 +}; diff --git a/node_modules/es-abstract/2018/TypedArraySpeciesCreate.js b/node_modules/es-abstract/2018/TypedArraySpeciesCreate.js new file mode 100644 index 0000000000000..2bfdff5eb705c --- /dev/null +++ b/node_modules/es-abstract/2018/TypedArraySpeciesCreate.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var SpeciesConstructor = require('./SpeciesConstructor'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/7.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreate(constructor, argumentList); // step 4 +}; diff --git a/node_modules/es-abstract/2018/UTF16Decode.js b/node_modules/es-abstract/2018/UTF16Decode.js new file mode 100644 index 0000000000000..86927b478ccdb --- /dev/null +++ b/node_modules/es-abstract/2018/UTF16Decode.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +// https://262.ecma-international.org/7.0/#sec-utf16decode + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair + +module.exports = function UTF16Decode(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2018/UTF16Encoding.js b/node_modules/es-abstract/2018/UTF16Encoding.js new file mode 100644 index 0000000000000..f381595fd70d6 --- /dev/null +++ b/node_modules/es-abstract/2018/UTF16Encoding.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/7.0/#sec-utf16encoding + +module.exports = function UTF16Encoding(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = floor((cp - 65536) / 1024) + 0xD800; + var cu2 = modulo(cp - 65536, 1024) + 0xDC00; + return $fromCharCode(cu1) + $fromCharCode(cu2); +}; diff --git a/node_modules/es-abstract/2018/UnicodeEscape.js b/node_modules/es-abstract/2018/UnicodeEscape.js new file mode 100644 index 0000000000000..db7163f77ee22 --- /dev/null +++ b/node_modules/es-abstract/2018/UnicodeEscape.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); +var $strSlice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/9.0/#sec-unicodeescape + +module.exports = function UnicodeEscape(C) { + if (typeof C !== 'string' || C.length !== 1) { + throw new $TypeError('Assertion failed: `C` must be a single code unit'); + } + var n = $charCodeAt(C, 0); + if (n > 0xFFFF) { + throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF'); + } + + return '\\u' + $strSlice('0000' + $toLowerCase($numberToString(n, 16)), -4); +}; diff --git a/node_modules/es-abstract/2018/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2018/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..134b2d5c367c4 --- /dev/null +++ b/node_modules/es-abstract/2018/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,170 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor +// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + if (oType !== 'Undefined' && !IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); + } + if (Type(current) === 'Undefined') { + if (!extensible) { + return false; + } + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': Desc['[[Configurable]]'], + '[[Enumerable]]': Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': Desc['[[Writable]]'] + } + ); + } + } else { + if (!IsAccessorDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + } + return true; + } + if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { + return true; + } + if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) { + return true; // removed by ES2017, but should still be correct + } + // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor + if (!current['[[Configurable]]']) { + if (Desc['[[Configurable]]']) { + return false; + } + if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { + return false; + } + } + if (IsGenericDescriptor(Desc)) { + // no further validation is required. + } else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + return false; + } + if (IsDataDescriptor(current)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Get]]': undefined + } + ); + } + } else if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Value]]': undefined + } + ); + } + } else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]'] && !current['[[Writable]]']) { + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + return true; + } + } else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + return true; + } + } else { + throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + return true; +}; diff --git a/node_modules/es-abstract/2018/ValidateAtomicAccess.js b/node_modules/es-abstract/2018/ValidateAtomicAccess.js new file mode 100644 index 0000000000000..e1c51c7768df5 --- /dev/null +++ b/node_modules/es-abstract/2018/ValidateAtomicAccess.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/8.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var accessIndex = ToIndex(requestIndex); // step 2 + + var length = typedArrayLength(typedArray); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + return accessIndex; // step 6 +}; diff --git a/node_modules/es-abstract/2018/ValidateTypedArray.js b/node_modules/es-abstract/2018/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2018/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2018/WeekDay.js b/node_modules/es-abstract/2018/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2018/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2018/WordCharacters.js b/node_modules/es-abstract/2018/WordCharacters.js new file mode 100644 index 0000000000000..aeebc1e75cbc7 --- /dev/null +++ b/node_modules/es-abstract/2018/WordCharacters.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $indexOf = callBound('String.prototype.indexOf', true); + +var Canonicalize = require('./Canonicalize'); +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1 + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation + +module.exports = function WordCharacters(IgnoreCase, Unicode) { + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + var U = ''; + forEach(OwnPropertyKeys(caseFolding.C), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.C[c]; // step 3 + } + }); + forEach(OwnPropertyKeys(caseFolding.S), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.S[c]; // step 3 + } + }); + + if ((!Unicode || !IgnoreCase) && U.length > 0) { + throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4 + } + + return A + U; // step 5, 6 +}; diff --git a/node_modules/es-abstract/2018/YearFromTime.js b/node_modules/es-abstract/2018/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2018/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2018/abs.js b/node_modules/es-abstract/2018/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2018/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2018/floor.js b/node_modules/es-abstract/2018/floor.js new file mode 100644 index 0000000000000..8439df0649365 --- /dev/null +++ b/node_modules/es-abstract/2018/floor.js @@ -0,0 +1,11 @@ +'use strict'; + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function floor(x) { + // return x - modulo(x, 1); + return $floor(x); +}; diff --git a/node_modules/es-abstract/2018/max.js b/node_modules/es-abstract/2018/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2018/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2018/min.js b/node_modules/es-abstract/2018/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2018/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2018/modulo.js b/node_modules/es-abstract/2018/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2018/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2018/msFromTime.js b/node_modules/es-abstract/2018/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2018/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2018/thisBooleanValue.js b/node_modules/es-abstract/2018/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2018/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2018/thisNumberValue.js b/node_modules/es-abstract/2018/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2018/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2018/thisStringValue.js b/node_modules/es-abstract/2018/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2018/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2018/thisSymbolValue.js b/node_modules/es-abstract/2018/thisSymbolValue.js new file mode 100644 index 0000000000000..91a55254283b8 --- /dev/null +++ b/node_modules/es-abstract/2018/thisSymbolValue.js @@ -0,0 +1,19 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-thissymbolvalue + +module.exports = function thisSymbolValue(value) { + if (!$SymbolValueOf) { + throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); + } + if (Type(value) === 'Symbol') { + return value; + } + return $SymbolValueOf(value); +}; diff --git a/node_modules/es-abstract/2018/thisTimeValue.js b/node_modules/es-abstract/2018/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2018/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2019/AbstractEqualityComparison.js b/node_modules/es-abstract/2019/AbstractEqualityComparison.js new file mode 100644 index 0000000000000..b56a506622447 --- /dev/null +++ b/node_modules/es-abstract/2019/AbstractEqualityComparison.js @@ -0,0 +1,37 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return x === y; // ES6+ specified this shortcut anyways. + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'Symbol') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + return false; +}; diff --git a/node_modules/es-abstract/2019/AbstractRelationalComparison.js b/node_modules/es-abstract/2019/AbstractRelationalComparison.js new file mode 100644 index 0000000000000..7c6472f5666a4 --- /dev/null +++ b/node_modules/es-abstract/2019/AbstractRelationalComparison.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); + +var IsStringPrefix = require('./IsStringPrefix'); +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison + +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + if (Type(px) === 'String' && Type(py) === 'String') { + if (IsStringPrefix(py, px)) { + return false; + } + if (IsStringPrefix(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + var nx = ToNumber(px); + var ny = ToNumber(py); + if ($isNaN(nx) || $isNaN(ny)) { + return undefined; + } + if ($isFinite(nx) && $isFinite(ny) && nx === ny) { + return false; + } + if (nx === Infinity) { + return false; + } + if (ny === Infinity) { + return true; + } + if (ny === -Infinity) { + return false; + } + if (nx === -Infinity) { + return true; + } + return nx < ny; // by now, these are both nonzero, finite, and not equal +}; diff --git a/node_modules/es-abstract/2019/AddEntriesFromIterable.js b/node_modules/es-abstract/2019/AddEntriesFromIterable.js new file mode 100644 index 0000000000000..5bea627fb5160 --- /dev/null +++ b/node_modules/es-abstract/2019/AddEntriesFromIterable.js @@ -0,0 +1,47 @@ +'use strict'; + +var inspect = require('object-inspect'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var GetIterator = require('./GetIterator'); +var IsCallable = require('./IsCallable'); +var IteratorClose = require('./IteratorClose'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var ThrowCompletion = require('./ThrowCompletion'); +var Type = require('./Type'); + +// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable + +module.exports = function AddEntriesFromIterable(target, iterable, adder) { + if (!IsCallable(adder)) { + throw new $TypeError('Assertion failed: `adder` is not callable'); + } + if (iterable == null) { + throw new $TypeError('Assertion failed: `iterable` is present, and not nullish'); + } + var iteratorRecord = GetIterator(iterable); + while (true) { // eslint-disable-line no-constant-condition + var next = IteratorStep(iteratorRecord); + if (!next) { + return target; + } + var nextItem = IteratorValue(next); + if (Type(nextItem) !== 'Object') { + var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem))); + return IteratorClose(iteratorRecord, error); + } + try { + var k = Get(nextItem, '0'); + var v = Get(nextItem, '1'); + Call(adder, target, [k, v]); + } catch (e) { + return IteratorClose(iteratorRecord, ThrowCompletion(e)); + } + } +}; diff --git a/node_modules/es-abstract/2019/AdvanceStringIndex.js b/node_modules/es-abstract/2019/AdvanceStringIndex.js new file mode 100644 index 0000000000000..831ea96ef9135 --- /dev/null +++ b/node_modules/es-abstract/2019/AdvanceStringIndex.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charCodeAt = require('call-bind/callBound')('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/6.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + + var first = $charCodeAt(S, index); + if (!isLeadingSurrogate(first)) { + return index + 1; + } + + var second = $charCodeAt(S, index + 1); + if (!isTrailingSurrogate(second)) { + return index + 1; + } + + return index + 2; +}; diff --git a/node_modules/es-abstract/2019/ArrayCreate.js b/node_modules/es-abstract/2019/ArrayCreate.js new file mode 100644 index 0000000000000..0d34db9beca45 --- /dev/null +++ b/node_modules/es-abstract/2019/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var hasProto = require('has-proto')(); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/6.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 5 - 7, and 9 + if (proto !== $ArrayPrototype) { // step 8 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 2 + A.length = length; + } + /* step 10, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2019/ArraySetLength.js b/node_modules/es-abstract/2019/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2019/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2019/ArraySpeciesCreate.js b/node_modules/es-abstract/2019/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..1944dfe7b8974 --- /dev/null +++ b/node_modules/es-abstract/2019/ArraySpeciesCreate.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Array = GetIntrinsic('%Array%'); +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + var len = length === 0 ? 0 : length; + var C; + var isArray = IsArray(originalArray); + if (isArray) { + C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + } + if (typeof C === 'undefined') { + return $Array(len); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(len); // Construct(C, len); +}; + diff --git a/node_modules/es-abstract/2019/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2019/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 0000000000000..5618539dd6fb0 --- /dev/null +++ b/node_modules/es-abstract/2019/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2019/AsyncIteratorClose.js b/node_modules/es-abstract/2019/AsyncIteratorClose.js new file mode 100644 index 0000000000000..eb72ef938818d --- /dev/null +++ b/node_modules/es-abstract/2019/AsyncIteratorClose.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/9.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return new $Promise(function (resolve) { + var ret = GetMethod(iterator, 'return'); // step 4 + + if (typeof ret === 'undefined') { + resolve(completion); // step 5 + } else { + resolve($then( + new $Promise(function (resolve2) { + // process.exit(42); + resolve2(Call(ret, iterator, [])); // step 6 + }), + function (innerResult) { + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + }, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 8 + } else { + throw e; // step 9 + } + } + )); + } + }); +}; diff --git a/node_modules/es-abstract/2019/Call.js b/node_modules/es-abstract/2019/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2019/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2019/CanonicalNumericIndexString.js b/node_modules/es-abstract/2019/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2019/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2019/Canonicalize.js b/node_modules/es-abstract/2019/Canonicalize.js new file mode 100644 index 0000000000000..49741831a618d --- /dev/null +++ b/node_modules/es-abstract/2019/Canonicalize.js @@ -0,0 +1,55 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(ch, IgnoreCase, Unicode) { + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + if (Unicode) { // step 2 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 2.b + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/2019/CharacterRange.js b/node_modules/es-abstract/2019/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2019/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2019/CompletePropertyDescriptor.js b/node_modules/es-abstract/2019/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2019/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2019/CompletionRecord.js b/node_modules/es-abstract/2019/CompletionRecord.js new file mode 100644 index 0000000000000..370a5677f378e --- /dev/null +++ b/node_modules/es-abstract/2019/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2019/CopyDataProperties.js b/node_modules/es-abstract/2019/CopyDataProperties.js new file mode 100644 index 0000000000000..c267c3723d489 --- /dev/null +++ b/node_modules/es-abstract/2019/CopyDataProperties.js @@ -0,0 +1,68 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var CreateDataProperty = require('./CreateDataProperty'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-copydataproperties + +module.exports = function CopyDataProperties(target, source, excludedItems) { + if (Type(target) !== 'Object') { + throw new $TypeError('Assertion failed: "target" must be an Object'); + } + + if (!IsArray(excludedItems)) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + for (var i = 0; i < excludedItems.length; i += 1) { + if (!IsPropertyKey(excludedItems[i])) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + } + + if (typeof source === 'undefined' || source === null) { + return target; + } + + var fromObj = ToObject(source); + + var sourceKeys = OwnPropertyKeys(fromObj); + forEach(sourceKeys, function (nextKey) { + var excluded = false; + + forEach(excludedItems, function (e) { + if (SameValue(e, nextKey) === true) { + excluded = true; + } + }); + + var enumerable = $isEnumerable(fromObj, nextKey) || ( + // this is to handle string keys being non-enumerable in older engines + typeof source === 'string' + && nextKey >= 0 + && IsInteger(ToNumber(nextKey)) + ); + if (excluded === false && enumerable) { + var propValue = Get(fromObj, nextKey); + CreateDataProperty(target, nextKey, propValue); + } + }); + + return target; +}; diff --git a/node_modules/es-abstract/2019/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2019/CreateAsyncFromSyncIterator.js new file mode 100644 index 0000000000000..d6ec19bd1a482 --- /dev/null +++ b/node_modules/es-abstract/2019/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var ObjectCreate = require('./ObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://262.ecma-international.org/10.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = ObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = ObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2019/CreateDataProperty.js b/node_modules/es-abstract/2019/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2019/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2019/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2019/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..c40e69368b91d --- /dev/null +++ b/node_modules/es-abstract/2019/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2019/CreateHTML.js b/node_modules/es-abstract/2019/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2019/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2019/CreateIterResultObject.js b/node_modules/es-abstract/2019/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2019/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2019/CreateListFromArrayLike.js b/node_modules/es-abstract/2019/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..4c34219206e1f --- /dev/null +++ b/node_modules/es-abstract/2019/CreateListFromArrayLike.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object']; + +// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = ToLength(Get(obj, 'length')); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2019/CreateMethodProperty.js b/node_modules/es-abstract/2019/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2019/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2019/DateFromTime.js b/node_modules/es-abstract/2019/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2019/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2019/DateString.js b/node_modules/es-abstract/2019/DateString.js new file mode 100644 index 0000000000000..939c14c0c87ef --- /dev/null +++ b/node_modules/es-abstract/2019/DateString.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var Type = require('./Type'); +var WeekDay = require('./WeekDay'); +var MonthFromTime = require('./MonthFromTime'); +var YearFromTime = require('./YearFromTime'); +var DateFromTime = require('./DateFromTime'); + +// https://262.ecma-international.org/9.0/#sec-datestring + +module.exports = function DateString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var weekday = weekdays[WeekDay(tv)]; + var month = months[MonthFromTime(tv)]; + var day = padTimeComponent(DateFromTime(tv)); + var year = padTimeComponent(YearFromTime(tv), 4); + return weekday + '\x20' + month + '\x20' + day + '\x20' + year; +}; diff --git a/node_modules/es-abstract/2019/Day.js b/node_modules/es-abstract/2019/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2019/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2019/DayFromYear.js b/node_modules/es-abstract/2019/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2019/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2019/DayWithinYear.js b/node_modules/es-abstract/2019/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2019/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2019/DaysInYear.js b/node_modules/es-abstract/2019/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2019/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2019/DefinePropertyOrThrow.js b/node_modules/es-abstract/2019/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2019/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2019/DeletePropertyOrThrow.js b/node_modules/es-abstract/2019/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2019/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2019/DetachArrayBuffer.js b/node_modules/es-abstract/2019/DetachArrayBuffer.js new file mode 100644 index 0000000000000..03284729b3d4e --- /dev/null +++ b/node_modules/es-abstract/2019/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js new file mode 100644 index 0000000000000..8e3177b6a1631 --- /dev/null +++ b/node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/8.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnPropertyNames(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2019/FlattenIntoArray.js b/node_modules/es-abstract/2019/FlattenIntoArray.js new file mode 100644 index 0000000000000..f2a0837c601c0 --- /dev/null +++ b/node_modules/es-abstract/2019/FlattenIntoArray.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var Call = require('./Call'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var IsArray = require('./IsArray'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/10.0/#sec-flattenintoarray + +module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) { + var mapperFunction; + if (arguments.length > 5) { + mapperFunction = arguments[5]; + } + + var targetIndex = start; + var sourceIndex = 0; + while (sourceIndex < sourceLen) { + var P = ToString(sourceIndex); + var exists = HasProperty(source, P); + if (exists === true) { + var element = Get(source, P); + if (typeof mapperFunction !== 'undefined') { + if (arguments.length <= 6) { + throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); + } + element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]); + } + var shouldFlatten = false; + if (depth > 0) { + shouldFlatten = IsArray(element); + } + if (shouldFlatten) { + var elementLen = ToLength(Get(element, 'length')); + targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); + } else { + if (targetIndex >= MAX_SAFE_INTEGER) { + throw new $TypeError('index too large'); + } + CreateDataPropertyOrThrow(target, ToString(targetIndex), element); + targetIndex += 1; + } + } + sourceIndex += 1; + } + + return targetIndex; +}; diff --git a/node_modules/es-abstract/2019/FromPropertyDescriptor.js b/node_modules/es-abstract/2019/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2019/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2019/Get.js b/node_modules/es-abstract/2019/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2019/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2019/GetGlobalObject.js b/node_modules/es-abstract/2019/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2019/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2019/GetIterator.js b/node_modules/es-abstract/2019/GetIterator.js new file mode 100644 index 0000000000000..145557da422e4 --- /dev/null +++ b/node_modules/es-abstract/2019/GetIterator.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getiterator + +module.exports = function GetIterator(obj, method) { + var actualMethod = method; + if (arguments.length < 2) { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; +}; diff --git a/node_modules/es-abstract/2019/GetMethod.js b/node_modules/es-abstract/2019/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2019/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2019/GetOwnPropertyKeys.js b/node_modules/es-abstract/2019/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2019/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2019/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2019/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2019/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2019/GetSubstitution.js b/node_modules/es-abstract/2019/GetSubstitution.js new file mode 100644 index 0000000000000..21aea1fd4fcee --- /dev/null +++ b/node_modules/es-abstract/2019/GetSubstitution.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var every = require('../helpers/every'); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); +var $indexOf = callBound('String.prototype.indexOf'); +var $parseInt = parseInt; + +var isDigit = regexTester(/^[0-9]$/); + +var inspect = require('object-inspect'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// http://262.ecma-international.org/9.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-params, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a List of Strings or `undefined`, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + if (Type(namedCaptures) !== 'Undefined') { + namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign + } + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else if (next === '<') { + // eslint-disable-next-line max-depth + if (Type(namedCaptures) === 'Undefined') { + result += '$<'; + i += 2; + } else { + var endIndex = $indexOf(replacement, '>', i); + // eslint-disable-next-line max-depth + if (endIndex > -1) { + var groupName = $strSlice(replacement, i + '$<'.length, endIndex); + var capture = Get(namedCaptures, groupName); + // eslint-disable-next-line max-depth + if (Type(capture) !== 'Undefined') { + result += ToString(capture); + } + i += ('<' + groupName + '>').length; + } + } + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2019/GetV.js b/node_modules/es-abstract/2019/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2019/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2019/GetValueFromBuffer.js b/node_modules/es-abstract/2019/GetValueFromBuffer.js new file mode 100644 index 0000000000000..e6c7385c177da --- /dev/null +++ b/node_modules/es-abstract/2019/GetValueFromBuffer.js @@ -0,0 +1,106 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var RawBytesToNumber = require('./RawBytesToNumber'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table59 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $Float32: 4, + $Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); + +// https://262.ecma-international.org/10.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string') { + throw new $TypeError('Assertion failed: `type` must be a string'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (typeof order !== 'string') { + throw new $TypeError('Assertion failed: `order` must be a string'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = table59['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumber(type, bytes, isLittleEndian); +}; diff --git a/node_modules/es-abstract/2019/HasOwnProperty.js b/node_modules/es-abstract/2019/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2019/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2019/HasProperty.js b/node_modules/es-abstract/2019/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2019/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2019/HourFromTime.js b/node_modules/es-abstract/2019/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2019/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2019/InLeapYear.js b/node_modules/es-abstract/2019/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2019/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2019/InstanceofOperator.js b/node_modules/es-abstract/2019/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2019/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2019/Invoke.js b/node_modules/es-abstract/2019/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2019/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2019/IsAccessorDescriptor.js b/node_modules/es-abstract/2019/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2019/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2019/IsArray.js b/node_modules/es-abstract/2019/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2019/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2019/IsCallable.js b/node_modules/es-abstract/2019/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2019/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..8bdaf3eb45d24 --- /dev/null +++ b/node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2019/IsConcatSpreadable.js b/node_modules/es-abstract/2019/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2019/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2019/IsConstructor.js b/node_modules/es-abstract/2019/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2019/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2019/IsDataDescriptor.js b/node_modules/es-abstract/2019/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2019/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2019/IsDetachedBuffer.js b/node_modules/es-abstract/2019/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2019/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2019/IsExtensible.js b/node_modules/es-abstract/2019/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2019/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2019/IsGenericDescriptor.js b/node_modules/es-abstract/2019/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2019/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2019/IsInteger.js b/node_modules/es-abstract/2019/IsInteger.js new file mode 100644 index 0000000000000..e3d25f38e3009 --- /dev/null +++ b/node_modules/es-abstract/2019/IsInteger.js @@ -0,0 +1,9 @@ +'use strict'; + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-isinteger + +module.exports = function IsInteger(argument) { + return isInteger(argument); +}; diff --git a/node_modules/es-abstract/2019/IsPromise.js b/node_modules/es-abstract/2019/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2019/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2019/IsPropertyKey.js b/node_modules/es-abstract/2019/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2019/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2019/IsRegExp.js b/node_modules/es-abstract/2019/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2019/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2019/IsSharedArrayBuffer.js b/node_modules/es-abstract/2019/IsSharedArrayBuffer.js new file mode 100644 index 0000000000000..8e96e33f3c2dc --- /dev/null +++ b/node_modules/es-abstract/2019/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2019/IsStringPrefix.js b/node_modules/es-abstract/2019/IsStringPrefix.js new file mode 100644 index 0000000000000..4958544ce29f0 --- /dev/null +++ b/node_modules/es-abstract/2019/IsStringPrefix.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPrefixOf = require('../helpers/isPrefixOf'); + +// var callBound = require('call-bind/callBound'); + +// var $charAt = callBound('String.prototype.charAt'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-isstringprefix + +module.exports = function IsStringPrefix(p, q) { + if (Type(p) !== 'String') { + throw new $TypeError('Assertion failed: "p" must be a String'); + } + + if (Type(q) !== 'String') { + throw new $TypeError('Assertion failed: "q" must be a String'); + } + + return isPrefixOf(p, q); + /* + if (p === q || p === '') { + return true; + } + + var pLength = p.length; + var qLength = q.length; + if (pLength >= qLength) { + return false; + } + + // assert: pLength < qLength + + for (var i = 0; i < pLength; i += 1) { + if ($charAt(p, i) !== $charAt(q, i)) { + return false; + } + } + return true; + */ +}; diff --git a/node_modules/es-abstract/2019/IsWordChar.js b/node_modules/es-abstract/2019/IsWordChar.js new file mode 100644 index 0000000000000..5d61804925b6c --- /dev/null +++ b/node_modules/es-abstract/2019/IsWordChar.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); +var Type = require('./Type'); +var WordCharacters = require('./WordCharacters'); + +var every = require('../helpers/every'); + +var isChar = function isChar(c) { + return typeof c === 'string'; +}; + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) { + if (!IsInteger(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + if (!IsInteger(InputLength)) { + throw new $TypeError('Assertion failed: `InputLength` must be an integer'); + } + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + if (e === -1 || e === InputLength) { + return false; // step 1 + } + + var c = Input[e]; // step 2 + + var wordChars = WordCharacters(IgnoreCase, Unicode); + + return $indexOf(wordChars, c) > -1; // steps 3-4 +}; diff --git a/node_modules/es-abstract/2019/IterableToList.js b/node_modules/es-abstract/2019/IterableToList.js new file mode 100644 index 0000000000000..6a1a6be39f021 --- /dev/null +++ b/node_modules/es-abstract/2019/IterableToList.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var GetIterator = require('./GetIterator'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); + +// https://262.ecma-international.org/8.0/#sec-iterabletolist + +module.exports = function IterableToList(items, method) { + var iterator = GetIterator(items, method); + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; +}; diff --git a/node_modules/es-abstract/2019/IteratorClose.js b/node_modules/es-abstract/2019/IteratorClose.js new file mode 100644 index 0000000000000..7c1076082e1e2 --- /dev/null +++ b/node_modules/es-abstract/2019/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2019/IteratorComplete.js b/node_modules/es-abstract/2019/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2019/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2019/IteratorNext.js b/node_modules/es-abstract/2019/IteratorNext.js new file mode 100644 index 0000000000000..d84d66edb5fc2 --- /dev/null +++ b/node_modules/es-abstract/2019/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2019/IteratorStep.js b/node_modules/es-abstract/2019/IteratorStep.js new file mode 100644 index 0000000000000..85bcd95c0410f --- /dev/null +++ b/node_modules/es-abstract/2019/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://262.ecma-international.org/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2019/IteratorValue.js b/node_modules/es-abstract/2019/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2019/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2019/MakeDate.js b/node_modules/es-abstract/2019/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2019/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2019/MakeDay.js b/node_modules/es-abstract/2019/MakeDay.js new file mode 100644 index 0000000000000..13f568633a34a --- /dev/null +++ b/node_modules/es-abstract/2019/MakeDay.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToInteger = require('./ToInteger'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToInteger(year); + var m = ToInteger(month); + var dt = ToInteger(date); + var ym = y + floor(m / 12); + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2019/MakeTime.js b/node_modules/es-abstract/2019/MakeTime.js new file mode 100644 index 0000000000000..34cb4dcca3f84 --- /dev/null +++ b/node_modules/es-abstract/2019/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToInteger = require('./ToInteger'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToInteger(hour); + var m = ToInteger(min); + var s = ToInteger(sec); + var milli = ToInteger(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2019/MinFromTime.js b/node_modules/es-abstract/2019/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2019/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2019/MonthFromTime.js b/node_modules/es-abstract/2019/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2019/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2019/NewPromiseCapability.js b/node_modules/es-abstract/2019/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2019/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2019/NormalCompletion.js b/node_modules/es-abstract/2019/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2019/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2019/NumberToRawBytes.js b/node_modules/es-abstract/2019/NumberToRawBytes.js new file mode 100644 index 0000000000000..c85e97196201e --- /dev/null +++ b/node_modules/es-abstract/2019/NumberToRawBytes.js @@ -0,0 +1,74 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwnProperty = require('./HasOwnProperty'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); +var integerToNBytes = require('../helpers/integerToNBytes'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +// https://262.ecma-international.org/8.0/#sec-numbertorawbytes + +module.exports = function NumberToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number') { + throw new $TypeError('Assertion failed: `value` must be a Number'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'Float32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; diff --git a/node_modules/es-abstract/2019/NumberToString.js b/node_modules/es-abstract/2019/NumberToString.js new file mode 100644 index 0000000000000..b00c4bd59848c --- /dev/null +++ b/node_modules/es-abstract/2019/NumberToString.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-tostring-applied-to-the-number-type + +module.exports = function NumberToString(m) { + if (Type(m) !== 'Number') { + throw new $TypeError('Assertion failed: "m" must be a String'); + } + + return $String(m); +}; + diff --git a/node_modules/es-abstract/2019/ObjectCreate.js b/node_modules/es-abstract/2019/ObjectCreate.js new file mode 100644 index 0000000000000..d7d2d04d92a78 --- /dev/null +++ b/node_modules/es-abstract/2019/ObjectCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/6.0/#sec-objectcreate + +module.exports = function ObjectCreate(proto, internalSlotsList) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); + } + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2019/ObjectDefineProperties.js b/node_modules/es-abstract/2019/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2019/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2019/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2019/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..ede44ed6b75ee --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var ObjectCreate = require('./ObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return ObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2019/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2019/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2019/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2019/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2019/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2019/OrdinaryGetPrototypeOf.js new file mode 100644 index 0000000000000..ba17b98872933 --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2019/OrdinaryHasInstance.js b/node_modules/es-abstract/2019/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2019/OrdinaryHasProperty.js b/node_modules/es-abstract/2019/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2019/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2019/OrdinarySetPrototypeOf.js new file mode 100644 index 0000000000000..d2b72306c187b --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2019/OrdinaryToPrimitive.js b/node_modules/es-abstract/2019/OrdinaryToPrimitive.js new file mode 100644 index 0000000000000..e1dbe1427f8d8 --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2019/PromiseResolve.js b/node_modules/es-abstract/2019/PromiseResolve.js new file mode 100644 index 0000000000000..6474b79c40ae6 --- /dev/null +++ b/node_modules/es-abstract/2019/PromiseResolve.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBind = require('call-bind'); + +var $resolve = GetIntrinsic('%Promise.resolve%', true); +var $PromiseResolve = $resolve && callBind($resolve); + +// https://262.ecma-international.org/9.0/#sec-promise-resolve + +module.exports = function PromiseResolve(C, x) { + if (!$PromiseResolve) { + throw new SyntaxError('This environment does not support Promises.'); + } + return $PromiseResolve(C, x); +}; + diff --git a/node_modules/es-abstract/2019/QuoteJSONString.js b/node_modules/es-abstract/2019/QuoteJSONString.js new file mode 100644 index 0000000000000..5c2b6c9dcffec --- /dev/null +++ b/node_modules/es-abstract/2019/QuoteJSONString.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $strSplit = callBound('String.prototype.split'); + +var Type = require('./Type'); +var UnicodeEscape = require('./UnicodeEscape'); +var UTF16Encoding = require('./UTF16Encoding'); + +var hasOwn = require('hasown'); + +// https://262.ecma-international.org/10.0/#sec-quotejsonstring + +var escapes = { + '\u0008': '\\b', + '\u0009': '\\t', + '\u000A': '\\n', + '\u000C': '\\f', + '\u000D': '\\r', + '\u0022': '\\"', + '\u005c': '\\\\' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach($strSplit(value), function (C) { + if (hasOwn(escapes, C)) { + product += escapes[C]; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20 || isLeadingSurrogate(C) || isTrailingSurrogate(C)) { + product += UnicodeEscape(C); + } else { + product += UTF16Encoding(cCharCode); + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2019/RawBytesToNumber.js b/node_modules/es-abstract/2019/RawBytesToNumber.js new file mode 100644 index 0000000000000..652471623dee4 --- /dev/null +++ b/node_modules/es-abstract/2019/RawBytesToNumber.js @@ -0,0 +1,74 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charAt = callBound('String.prototype.charAt'); +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/8.0/#sec-rawbytestonumber + +module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, $charAt(type, 0) === 'U', false); +}; diff --git a/node_modules/es-abstract/2019/RegExpCreate.js b/node_modules/es-abstract/2019/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2019/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2019/RegExpExec.js b/node_modules/es-abstract/2019/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2019/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2019/RequireObjectCoercible.js b/node_modules/es-abstract/2019/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2019/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2019/SameValue.js b/node_modules/es-abstract/2019/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2019/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2019/SameValueNonNumber.js b/node_modules/es-abstract/2019/SameValueNonNumber.js new file mode 100644 index 0000000000000..b6d2c4e648c81 --- /dev/null +++ b/node_modules/es-abstract/2019/SameValueNonNumber.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); + +// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber + +module.exports = function SameValueNonNumber(x, y) { + if (typeof x === 'number' || typeof x !== typeof y) { + throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2019/SameValueZero.js b/node_modules/es-abstract/2019/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2019/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2019/SecFromTime.js b/node_modules/es-abstract/2019/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2019/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2019/Set.js b/node_modules/es-abstract/2019/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2019/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2019/SetFunctionLength.js b/node_modules/es-abstract/2019/SetFunctionLength.js new file mode 100644 index 0000000000000..14228bf184d47 --- /dev/null +++ b/node_modules/es-abstract/2019/SetFunctionLength.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var HasOwnProperty = require('./HasOwnProperty'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/9.0/#sec-setfunctionlength + +module.exports = function SetFunctionLength(F, length) { + if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) { + throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property'); + } + if (Type(length) !== 'Number') { + throw new $TypeError('Assertion failed: `length` must be a Number'); + } + if (length < 0 || !isInteger(length)) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0'); + } + return DefinePropertyOrThrow(F, 'length', { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); +}; diff --git a/node_modules/es-abstract/2019/SetFunctionName.js b/node_modules/es-abstract/2019/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2019/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2019/SetIntegrityLevel.js b/node_modules/es-abstract/2019/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2019/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2019/SetValueInBuffer.js b/node_modules/es-abstract/2019/SetValueInBuffer.js new file mode 100644 index 0000000000000..d5c2fa479b951 --- /dev/null +++ b/node_modules/es-abstract/2019/SetValueInBuffer.js @@ -0,0 +1,120 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); + +var isArrayBuffer = require('is-array-buffer'); +var hasOwn = require('hasown'); + +var table49 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); +var integerToNBytes = require('../helpers/integerToNBytes'); +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); + +// https://262.ecma-international.org/6.0/#sec-setvalueinbuffer + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || !hasOwn(table49, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number') { + throw new $TypeError('Assertion failed: `value` must be a number'); + } + + if (arguments.length > 4 && typeof arguments[4] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Assert: Type(value) is Number. + + // 5. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + // 6. Assert: block is not undefined. + + var elementSize = table49[type]; // step 7 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'); + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 4 ? arguments[4] : defaultEndianness === 'little'; // step 8 + + var rawBytes; + if (type === 'Float32') { // step 1 + rawBytes = valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + rawBytes = valueToFloat64Bytes(value, isLittleEndian); + } else { + var n = table49[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + rawBytes = integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 + } + + // 12. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + + // 13. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2019/SpeciesConstructor.js b/node_modules/es-abstract/2019/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2019/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2019/SplitMatch.js b/node_modules/es-abstract/2019/SplitMatch.js new file mode 100644 index 0000000000000..d57fb691e5e91 --- /dev/null +++ b/node_modules/es-abstract/2019/SplitMatch.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $charAt = callBound('String.prototype.charAt'); + +// https://262.ecma-international.org/6.0/#sec-splitmatch + +module.exports = function SplitMatch(S, q, R) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(q)) { + throw new $TypeError('Assertion failed: `q` must be an integer'); + } + if (Type(R) !== 'String') { + throw new $TypeError('Assertion failed: `R` must be a String'); + } + var r = R.length; + var s = S.length; + if (q + r > s) { + return false; + } + + for (var i = 0; i < r; i += 1) { + if ($charAt(S, q + i) !== $charAt(R, i)) { + return false; + } + } + + return q + r; +}; diff --git a/node_modules/es-abstract/2019/StrictEqualityComparison.js b/node_modules/es-abstract/2019/StrictEqualityComparison.js new file mode 100644 index 0000000000000..f3435ba9d181e --- /dev/null +++ b/node_modules/es-abstract/2019/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/2019/StringCreate.js b/node_modules/es-abstract/2019/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2019/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2019/StringGetOwnProperty.js b/node_modules/es-abstract/2019/StringGetOwnProperty.js new file mode 100644 index 0000000000000..b6f904ec3e667 --- /dev/null +++ b/node_modules/es-abstract/2019/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsInteger = require('./IsInteger'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://262.ecma-international.org/8.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2019/SymbolDescriptiveString.js b/node_modules/es-abstract/2019/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2019/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2019/TestIntegrityLevel.js b/node_modules/es-abstract/2019/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2019/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2019/ThrowCompletion.js b/node_modules/es-abstract/2019/ThrowCompletion.js new file mode 100644 index 0000000000000..b7d388a35292e --- /dev/null +++ b/node_modules/es-abstract/2019/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2019/TimeClip.js b/node_modules/es-abstract/2019/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2019/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2019/TimeFromYear.js b/node_modules/es-abstract/2019/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2019/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2019/TimeString.js b/node_modules/es-abstract/2019/TimeString.js new file mode 100644 index 0000000000000..051c4728e2e49 --- /dev/null +++ b/node_modules/es-abstract/2019/TimeString.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var HourFromTime = require('./HourFromTime'); +var MinFromTime = require('./MinFromTime'); +var SecFromTime = require('./SecFromTime'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-timestring + +module.exports = function TimeString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var hour = HourFromTime(tv); + var minute = MinFromTime(tv); + var second = SecFromTime(tv); + return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; +}; diff --git a/node_modules/es-abstract/2019/TimeWithinDay.js b/node_modules/es-abstract/2019/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2019/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2019/ToBoolean.js b/node_modules/es-abstract/2019/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2019/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2019/ToDateString.js b/node_modules/es-abstract/2019/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2019/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2019/ToIndex.js b/node_modules/es-abstract/2019/ToIndex.js new file mode 100644 index 0000000000000..7c9d746d53954 --- /dev/null +++ b/node_modules/es-abstract/2019/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToInteger = require('./ToInteger'); +var ToLength = require('./ToLength'); +var SameValueZero = require('./SameValueZero'); + +// https://262.ecma-international.org/8.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToInteger(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValueZero(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2019/ToInt16.js b/node_modules/es-abstract/2019/ToInt16.js new file mode 100644 index 0000000000000..21694bdeb923c --- /dev/null +++ b/node_modules/es-abstract/2019/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://262.ecma-international.org/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2019/ToInt32.js b/node_modules/es-abstract/2019/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/2019/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2019/ToInt8.js b/node_modules/es-abstract/2019/ToInt8.js new file mode 100644 index 0000000000000..e223b6c1d352a --- /dev/null +++ b/node_modules/es-abstract/2019/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://262.ecma-international.org/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2019/ToInteger.js b/node_modules/es-abstract/2019/ToInteger.js new file mode 100644 index 0000000000000..f6625796ebd22 --- /dev/null +++ b/node_modules/es-abstract/2019/ToInteger.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5ToInteger = require('../5/ToInteger'); + +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/6.0/#sec-tointeger + +module.exports = function ToInteger(value) { + var number = ToNumber(value); + return ES5ToInteger(number); +}; diff --git a/node_modules/es-abstract/2019/ToLength.js b/node_modules/es-abstract/2019/ToLength.js new file mode 100644 index 0000000000000..1bef9bed7b2f0 --- /dev/null +++ b/node_modules/es-abstract/2019/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToInteger = require('./ToInteger'); + +module.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2019/ToNumber.js b/node_modules/es-abstract/2019/ToNumber.js new file mode 100644 index 0000000000000..3abb6a68d228b --- /dev/null +++ b/node_modules/es-abstract/2019/ToNumber.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var isPrimitive = require('../helpers/isPrimitive'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2019/ToObject.js b/node_modules/es-abstract/2019/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2019/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2019/ToPrimitive.js b/node_modules/es-abstract/2019/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2019/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2019/ToPropertyDescriptor.js b/node_modules/es-abstract/2019/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2019/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2019/ToPropertyKey.js b/node_modules/es-abstract/2019/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2019/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2019/ToString.js b/node_modules/es-abstract/2019/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2019/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2019/ToUint16.js b/node_modules/es-abstract/2019/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/2019/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2019/ToUint32.js b/node_modules/es-abstract/2019/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/2019/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2019/ToUint8.js b/node_modules/es-abstract/2019/ToUint8.js new file mode 100644 index 0000000000000..6e4e4b5add2ab --- /dev/null +++ b/node_modules/es-abstract/2019/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2019/ToUint8Clamp.js b/node_modules/es-abstract/2019/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2019/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2019/TrimString.js b/node_modules/es-abstract/2019/TrimString.js new file mode 100644 index 0000000000000..113dcf82b82d8 --- /dev/null +++ b/node_modules/es-abstract/2019/TrimString.js @@ -0,0 +1,29 @@ +'use strict'; + +var trimStart = require('string.prototype.trimstart'); +var trimEnd = require('string.prototype.trimend'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/10.0/#sec-trimstring + +module.exports = function TrimString(string, where) { + var str = RequireObjectCoercible(string); + var S = ToString(str); + var T; + if (where === 'start') { + T = trimStart(S); + } else if (where === 'end') { + T = trimEnd(S); + } else if (where === 'start+end') { + T = trimStart(trimEnd(S)); + } else { + throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"'); + } + return T; +}; diff --git a/node_modules/es-abstract/2019/Type.js b/node_modules/es-abstract/2019/Type.js new file mode 100644 index 0000000000000..da5cb762508f1 --- /dev/null +++ b/node_modules/es-abstract/2019/Type.js @@ -0,0 +1,12 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2019/TypedArrayCreate.js b/node_modules/es-abstract/2019/TypedArrayCreate.js new file mode 100644 index 0000000000000..ef9fbe2599495 --- /dev/null +++ b/node_modules/es-abstract/2019/TypedArrayCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var availableTypedArrays = require('available-typed-arrays')(); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/7.0/#typedarray-create + +module.exports = function TypedArrayCreate(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + ValidateTypedArray(newTypedArray); // step 2 + + if (argumentList.length === 1 && Type(argumentList[0]) === 'Number') { // step 3 + if (typedArrayLength(newTypedArray) < argumentList[0]) { + throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a + } + } + + return newTypedArray; // step 4 +}; diff --git a/node_modules/es-abstract/2019/TypedArraySpeciesCreate.js b/node_modules/es-abstract/2019/TypedArraySpeciesCreate.js new file mode 100644 index 0000000000000..2bfdff5eb705c --- /dev/null +++ b/node_modules/es-abstract/2019/TypedArraySpeciesCreate.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var SpeciesConstructor = require('./SpeciesConstructor'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/7.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreate(constructor, argumentList); // step 4 +}; diff --git a/node_modules/es-abstract/2019/UTF16Decode.js b/node_modules/es-abstract/2019/UTF16Decode.js new file mode 100644 index 0000000000000..86927b478ccdb --- /dev/null +++ b/node_modules/es-abstract/2019/UTF16Decode.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +// https://262.ecma-international.org/7.0/#sec-utf16decode + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair + +module.exports = function UTF16Decode(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2019/UTF16Encoding.js b/node_modules/es-abstract/2019/UTF16Encoding.js new file mode 100644 index 0000000000000..f381595fd70d6 --- /dev/null +++ b/node_modules/es-abstract/2019/UTF16Encoding.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/7.0/#sec-utf16encoding + +module.exports = function UTF16Encoding(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = floor((cp - 65536) / 1024) + 0xD800; + var cu2 = modulo(cp - 65536, 1024) + 0xDC00; + return $fromCharCode(cu1) + $fromCharCode(cu2); +}; diff --git a/node_modules/es-abstract/2019/UnicodeEscape.js b/node_modules/es-abstract/2019/UnicodeEscape.js new file mode 100644 index 0000000000000..db7163f77ee22 --- /dev/null +++ b/node_modules/es-abstract/2019/UnicodeEscape.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); +var $strSlice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/9.0/#sec-unicodeescape + +module.exports = function UnicodeEscape(C) { + if (typeof C !== 'string' || C.length !== 1) { + throw new $TypeError('Assertion failed: `C` must be a single code unit'); + } + var n = $charCodeAt(C, 0); + if (n > 0xFFFF) { + throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF'); + } + + return '\\u' + $strSlice('0000' + $toLowerCase($numberToString(n, 16)), -4); +}; diff --git a/node_modules/es-abstract/2019/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2019/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..134b2d5c367c4 --- /dev/null +++ b/node_modules/es-abstract/2019/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,170 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor +// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + if (oType !== 'Undefined' && !IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); + } + if (Type(current) === 'Undefined') { + if (!extensible) { + return false; + } + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': Desc['[[Configurable]]'], + '[[Enumerable]]': Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': Desc['[[Writable]]'] + } + ); + } + } else { + if (!IsAccessorDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + } + return true; + } + if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { + return true; + } + if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) { + return true; // removed by ES2017, but should still be correct + } + // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor + if (!current['[[Configurable]]']) { + if (Desc['[[Configurable]]']) { + return false; + } + if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { + return false; + } + } + if (IsGenericDescriptor(Desc)) { + // no further validation is required. + } else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + return false; + } + if (IsDataDescriptor(current)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Get]]': undefined + } + ); + } + } else if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Value]]': undefined + } + ); + } + } else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]'] && !current['[[Writable]]']) { + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + return true; + } + } else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + return true; + } + } else { + throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + return true; +}; diff --git a/node_modules/es-abstract/2019/ValidateAtomicAccess.js b/node_modules/es-abstract/2019/ValidateAtomicAccess.js new file mode 100644 index 0000000000000..e1c51c7768df5 --- /dev/null +++ b/node_modules/es-abstract/2019/ValidateAtomicAccess.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/8.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var accessIndex = ToIndex(requestIndex); // step 2 + + var length = typedArrayLength(typedArray); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + return accessIndex; // step 6 +}; diff --git a/node_modules/es-abstract/2019/ValidateTypedArray.js b/node_modules/es-abstract/2019/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2019/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2019/WeekDay.js b/node_modules/es-abstract/2019/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2019/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2019/WordCharacters.js b/node_modules/es-abstract/2019/WordCharacters.js new file mode 100644 index 0000000000000..aeebc1e75cbc7 --- /dev/null +++ b/node_modules/es-abstract/2019/WordCharacters.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $indexOf = callBound('String.prototype.indexOf', true); + +var Canonicalize = require('./Canonicalize'); +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1 + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation + +module.exports = function WordCharacters(IgnoreCase, Unicode) { + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + var U = ''; + forEach(OwnPropertyKeys(caseFolding.C), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.C[c]; // step 3 + } + }); + forEach(OwnPropertyKeys(caseFolding.S), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.S[c]; // step 3 + } + }); + + if ((!Unicode || !IgnoreCase) && U.length > 0) { + throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4 + } + + return A + U; // step 5, 6 +}; diff --git a/node_modules/es-abstract/2019/YearFromTime.js b/node_modules/es-abstract/2019/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2019/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2019/abs.js b/node_modules/es-abstract/2019/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2019/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2019/floor.js b/node_modules/es-abstract/2019/floor.js new file mode 100644 index 0000000000000..8439df0649365 --- /dev/null +++ b/node_modules/es-abstract/2019/floor.js @@ -0,0 +1,11 @@ +'use strict'; + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function floor(x) { + // return x - modulo(x, 1); + return $floor(x); +}; diff --git a/node_modules/es-abstract/2019/max.js b/node_modules/es-abstract/2019/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2019/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2019/min.js b/node_modules/es-abstract/2019/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2019/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2019/modulo.js b/node_modules/es-abstract/2019/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2019/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2019/msFromTime.js b/node_modules/es-abstract/2019/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2019/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2019/thisBooleanValue.js b/node_modules/es-abstract/2019/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2019/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2019/thisNumberValue.js b/node_modules/es-abstract/2019/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2019/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2019/thisStringValue.js b/node_modules/es-abstract/2019/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2019/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2019/thisSymbolValue.js b/node_modules/es-abstract/2019/thisSymbolValue.js new file mode 100644 index 0000000000000..91a55254283b8 --- /dev/null +++ b/node_modules/es-abstract/2019/thisSymbolValue.js @@ -0,0 +1,19 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-thissymbolvalue + +module.exports = function thisSymbolValue(value) { + if (!$SymbolValueOf) { + throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); + } + if (Type(value) === 'Symbol') { + return value; + } + return $SymbolValueOf(value); +}; diff --git a/node_modules/es-abstract/2019/thisTimeValue.js b/node_modules/es-abstract/2019/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2019/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2020/AbstractEqualityComparison.js b/node_modules/es-abstract/2020/AbstractEqualityComparison.js new file mode 100644 index 0000000000000..871a84fa82232 --- /dev/null +++ b/node_modules/es-abstract/2020/AbstractEqualityComparison.js @@ -0,0 +1,57 @@ +'use strict'; + +var StrictEqualityComparison = require('./StrictEqualityComparison'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/11.0/#sec-abstract-equality-comparison + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return StrictEqualityComparison(x, y); + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'BigInt' && yType === 'String') { + var n = StringToBigInt(y); + if (isNaN(n)) { + return false; + } + return AbstractEqualityComparison(x, n); + } + if (xType === 'String' && yType === 'BigInt') { + return AbstractEqualityComparison(y, x); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'BigInt' || xType === 'Symbol') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'BigInt' || yType === 'Symbol')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + if ((xType === 'BigInt' && yType === 'Number') || (xType === 'Number' && yType === 'BigInt')) { + if (isNaN(x) || isNaN(y) || x === Infinity || y === Infinity || x === -Infinity || y === -Infinity) { + return false; + } + return x == y; // eslint-disable-line eqeqeq + } + return false; +}; diff --git a/node_modules/es-abstract/2020/AbstractRelationalComparison.js b/node_modules/es-abstract/2020/AbstractRelationalComparison.js new file mode 100644 index 0000000000000..9076d71e267f3 --- /dev/null +++ b/node_modules/es-abstract/2020/AbstractRelationalComparison.js @@ -0,0 +1,82 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); + +var IsStringPrefix = require('./IsStringPrefix'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var BigIntLessThan = require('./BigInt/lessThan'); +var NumberLessThan = require('./Number/lessThan'); + +// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + if (Type(px) === 'String' && Type(py) === 'String') { + if (IsStringPrefix(py, px)) { + return false; + } + if (IsStringPrefix(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + + var pxType = Type(px); + var pyType = Type(py); + var nx; + var ny; + if (pxType === 'BigInt' && pyType === 'String') { + ny = StringToBigInt(py); + if ($isNaN(ny)) { + return void undefined; + } + return BigIntLessThan(px, ny); + } + if (pxType === 'String' && pyType === 'BigInt') { + nx = StringToBigInt(px); + if ($isNaN(nx)) { + return void undefined; + } + return BigIntLessThan(nx, py); + } + + nx = ToNumeric(px); + ny = ToNumeric(py); + var nxType = Type(nx); + if (nxType === Type(ny)) { + return nxType === 'Number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); + } + + if ($isNaN(nx) || $isNaN(ny)) { + return void undefined; + } + if (nx === -Infinity || ny === Infinity) { + return true; + } + if (nx === Infinity || ny === -Infinity) { + return false; + } + + return nx < ny; // by now, these are both nonzero, finite, and not equal +}; diff --git a/node_modules/es-abstract/2020/AddEntriesFromIterable.js b/node_modules/es-abstract/2020/AddEntriesFromIterable.js new file mode 100644 index 0000000000000..5bea627fb5160 --- /dev/null +++ b/node_modules/es-abstract/2020/AddEntriesFromIterable.js @@ -0,0 +1,47 @@ +'use strict'; + +var inspect = require('object-inspect'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var GetIterator = require('./GetIterator'); +var IsCallable = require('./IsCallable'); +var IteratorClose = require('./IteratorClose'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var ThrowCompletion = require('./ThrowCompletion'); +var Type = require('./Type'); + +// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable + +module.exports = function AddEntriesFromIterable(target, iterable, adder) { + if (!IsCallable(adder)) { + throw new $TypeError('Assertion failed: `adder` is not callable'); + } + if (iterable == null) { + throw new $TypeError('Assertion failed: `iterable` is present, and not nullish'); + } + var iteratorRecord = GetIterator(iterable); + while (true) { // eslint-disable-line no-constant-condition + var next = IteratorStep(iteratorRecord); + if (!next) { + return target; + } + var nextItem = IteratorValue(next); + if (Type(nextItem) !== 'Object') { + var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem))); + return IteratorClose(iteratorRecord, error); + } + try { + var k = Get(nextItem, '0'); + var v = Get(nextItem, '1'); + Call(adder, target, [k, v]); + } catch (e) { + return IteratorClose(iteratorRecord, ThrowCompletion(e)); + } + } +}; diff --git a/node_modules/es-abstract/2020/AdvanceStringIndex.js b/node_modules/es-abstract/2020/AdvanceStringIndex.js new file mode 100644 index 0000000000000..b9460b4564116 --- /dev/null +++ b/node_modules/es-abstract/2020/AdvanceStringIndex.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + var cp = CodePointAt(S, index); + return index + cp['[[CodeUnitCount]]']; +}; diff --git a/node_modules/es-abstract/2020/ArrayCreate.js b/node_modules/es-abstract/2020/ArrayCreate.js new file mode 100644 index 0000000000000..0d34db9beca45 --- /dev/null +++ b/node_modules/es-abstract/2020/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var hasProto = require('has-proto')(); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/6.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 5 - 7, and 9 + if (proto !== $ArrayPrototype) { // step 8 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 2 + A.length = length; + } + /* step 10, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2020/ArraySetLength.js b/node_modules/es-abstract/2020/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2020/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2020/ArraySpeciesCreate.js b/node_modules/es-abstract/2020/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..1944dfe7b8974 --- /dev/null +++ b/node_modules/es-abstract/2020/ArraySpeciesCreate.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Array = GetIntrinsic('%Array%'); +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + var len = length === 0 ? 0 : length; + var C; + var isArray = IsArray(originalArray); + if (isArray) { + C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + } + if (typeof C === 'undefined') { + return $Array(len); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(len); // Construct(C, len); +}; + diff --git a/node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 0000000000000..5618539dd6fb0 --- /dev/null +++ b/node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2020/AsyncIteratorClose.js b/node_modules/es-abstract/2020/AsyncIteratorClose.js new file mode 100644 index 0000000000000..eb72ef938818d --- /dev/null +++ b/node_modules/es-abstract/2020/AsyncIteratorClose.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/9.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return new $Promise(function (resolve) { + var ret = GetMethod(iterator, 'return'); // step 4 + + if (typeof ret === 'undefined') { + resolve(completion); // step 5 + } else { + resolve($then( + new $Promise(function (resolve2) { + // process.exit(42); + resolve2(Call(ret, iterator, [])); // step 6 + }), + function (innerResult) { + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + }, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 8 + } else { + throw e; // step 9 + } + } + )); + } + }); +}; diff --git a/node_modules/es-abstract/2020/BigInt/add.js b/node_modules/es-abstract/2020/BigInt/add.js new file mode 100644 index 0000000000000..22b5db4b32d2c --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/add.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add + +module.exports = function BigIntAdd(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2020/BigInt/bitwiseAND.js b/node_modules/es-abstract/2020/BigInt/bitwiseAND.js new file mode 100644 index 0000000000000..83cd2c3ca9edc --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND + +module.exports = function BigIntBitwiseAND(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2020/BigInt/bitwiseNOT.js b/node_modules/es-abstract/2020/BigInt/bitwiseNOT.js new file mode 100644 index 0000000000000..9a444dfeab8d6 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/bitwiseNOT.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT + +module.exports = function BigIntBitwiseNOT(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + return -x - $BigInt(1); +}; diff --git a/node_modules/es-abstract/2020/BigInt/bitwiseOR.js b/node_modules/es-abstract/2020/BigInt/bitwiseOR.js new file mode 100644 index 0000000000000..3c1b57193ef48 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR + +module.exports = function BigIntBitwiseOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2020/BigInt/bitwiseXOR.js b/node_modules/es-abstract/2020/BigInt/bitwiseXOR.js new file mode 100644 index 0000000000000..45f8217efb83c --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR + +module.exports = function BigIntBitwiseXOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2020/BigInt/divide.js b/node_modules/es-abstract/2020/BigInt/divide.js new file mode 100644 index 0000000000000..5706e7d72e424 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide + +module.exports = function BigIntDivide(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + if (y === $BigInt(0)) { + throw new $RangeError('Division by zero'); + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2020/BigInt/equal.js b/node_modules/es-abstract/2020/BigInt/equal.js new file mode 100644 index 0000000000000..a28826d67ff75 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/equal.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal + +module.exports = function BigIntEqual(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2020/BigInt/exponentiate.js b/node_modules/es-abstract/2020/BigInt/exponentiate.js new file mode 100644 index 0000000000000..2365838c269b6 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/exponentiate.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate + +module.exports = function BigIntExponentiate(base, exponent) { + if (Type(base) !== 'BigInt' || Type(exponent) !== 'BigInt') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts'); + } + if (exponent < $BigInt(0)) { + throw new $RangeError('Exponent must be positive'); + } + if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) { + return $BigInt(1); + } + + var square = base; + var remaining = exponent; + while (remaining > $BigInt(0)) { + square += exponent; + --remaining; // eslint-disable-line no-plusplus + } + return square; +}; diff --git a/node_modules/es-abstract/2020/BigInt/index.js b/node_modules/es-abstract/2020/BigInt/index.js new file mode 100644 index 0000000000000..63ec52da69e28 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2020/BigInt/leftShift.js b/node_modules/es-abstract/2020/BigInt/leftShift.js new file mode 100644 index 0000000000000..d2a570223e22c --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/leftShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift + +module.exports = function BigIntLeftShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x << y; +}; diff --git a/node_modules/es-abstract/2020/BigInt/lessThan.js b/node_modules/es-abstract/2020/BigInt/lessThan.js new file mode 100644 index 0000000000000..0b3cd6ba029e8 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/lessThan.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan + +module.exports = function BigIntLessThan(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2020/BigInt/multiply.js b/node_modules/es-abstract/2020/BigInt/multiply.js new file mode 100644 index 0000000000000..6e5d56c83ea0b --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/multiply.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply + +module.exports = function BigIntMultiply(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2020/BigInt/remainder.js b/node_modules/es-abstract/2020/BigInt/remainder.js new file mode 100644 index 0000000000000..d2dc678caf6bd --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/remainder.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (Type(n) !== 'BigInt' || Type(d) !== 'BigInt') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; diff --git a/node_modules/es-abstract/2020/BigInt/sameValue.js b/node_modules/es-abstract/2020/BigInt/sameValue.js new file mode 100644 index 0000000000000..63ff06393bba6 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/sameValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue + +module.exports = function BigIntSameValue(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2020/BigInt/sameValueZero.js b/node_modules/es-abstract/2020/BigInt/sameValueZero.js new file mode 100644 index 0000000000000..39f262c6da2f2 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/sameValueZero.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero + +module.exports = function BigIntSameValueZero(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2020/BigInt/signedRightShift.js b/node_modules/es-abstract/2020/BigInt/signedRightShift.js new file mode 100644 index 0000000000000..f63c642f0cda7 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/signedRightShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntLeftShift = require('./leftShift'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift + +module.exports = function BigIntSignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntLeftShift(x, -y); +}; diff --git a/node_modules/es-abstract/2020/BigInt/subtract.js b/node_modules/es-abstract/2020/BigInt/subtract.js new file mode 100644 index 0000000000000..0490784f679cd --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/subtract.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract + +module.exports = function BigIntSubtract(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x - y; +}; diff --git a/node_modules/es-abstract/2020/BigInt/toString.js b/node_modules/es-abstract/2020/BigInt/toString.js new file mode 100644 index 0000000000000..858d95545475e --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring + +module.exports = function BigIntToString(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` must be a BigInt'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2020/BigInt/unaryMinus.js b/node_modules/es-abstract/2020/BigInt/unaryMinus.js new file mode 100644 index 0000000000000..ee0f7ef1962c3 --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/unaryMinus.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus + +module.exports = function BigIntUnaryMinus(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + + if (x === zero) { + return zero; + } + + return -x; +}; diff --git a/node_modules/es-abstract/2020/BigInt/unsignedRightShift.js b/node_modules/es-abstract/2020/BigInt/unsignedRightShift.js new file mode 100644 index 0000000000000..7ad94f7a88d5f --- /dev/null +++ b/node_modules/es-abstract/2020/BigInt/unsignedRightShift.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift + +module.exports = function BigIntUnsignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + throw new $TypeError('BigInts have no unsigned right shift, use >> instead'); +}; diff --git a/node_modules/es-abstract/2020/BigIntBitwiseOp.js b/node_modules/es-abstract/2020/BigIntBitwiseOp.js new file mode 100644 index 0000000000000..0b1c03a911b68 --- /dev/null +++ b/node_modules/es-abstract/2020/BigIntBitwiseOp.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +// var $BigInt = GetIntrinsic('%BigInt%', true); +// var $pow = GetIntrinsic('%Math.pow%'); + +// var BinaryAnd = require('./BinaryAnd'); +// var BinaryOr = require('./BinaryOr'); +// var BinaryXor = require('./BinaryXor'); +var Type = require('./Type'); +// var modulo = require('./modulo'); + +// var zero = $BigInt && $BigInt(0); +// var negOne = $BigInt && $BigInt(-1); +// var two = $BigInt && $BigInt(2); + +// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop + +module.exports = function BigIntBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('`x` and `y` must be BigInts'); + } + + if (op === '&') { + return x & y; + } + if (op === '|') { + return x | y; + } + return x ^ y; + /* + var result = zero; + var shift = 0; + while (x !== zero && x !== negOne && y !== zero && y !== negOne) { + var xDigit = modulo(x, two); + var yDigit = modulo(y, two); + if (op === '&') { + result += $pow(2, shift) * BinaryAnd(xDigit, yDigit); + } else if (op === '|') { + result += $pow(2, shift) * BinaryOr(xDigit, yDigit); + } else if (op === '^') { + result += $pow(2, shift) * BinaryXor(xDigit, yDigit); + } + shift += 1; + x = (x - xDigit) / two; + y = (y - yDigit) / two; + } + var tmp; + if (op === '&') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else if (op === '|') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else { + tmp = BinaryXor(modulo(x, two), modulo(y, two)); + } + if (tmp !== 0) { + result -= $pow(2, shift); + } + return result; + */ +}; diff --git a/node_modules/es-abstract/2020/BinaryAnd.js b/node_modules/es-abstract/2020/BinaryAnd.js new file mode 100644 index 0000000000000..c617f388dea72 --- /dev/null +++ b/node_modules/es-abstract/2020/BinaryAnd.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryand + +module.exports = function BinaryAnd(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x & y; +}; diff --git a/node_modules/es-abstract/2020/BinaryOr.js b/node_modules/es-abstract/2020/BinaryOr.js new file mode 100644 index 0000000000000..6de0955f1a6d3 --- /dev/null +++ b/node_modules/es-abstract/2020/BinaryOr.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryor + +module.exports = function BinaryOr(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x | y; +}; diff --git a/node_modules/es-abstract/2020/BinaryXor.js b/node_modules/es-abstract/2020/BinaryXor.js new file mode 100644 index 0000000000000..189d7d8469ce1 --- /dev/null +++ b/node_modules/es-abstract/2020/BinaryXor.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryxor + +module.exports = function BinaryXor(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x ^ y; +}; diff --git a/node_modules/es-abstract/2020/Call.js b/node_modules/es-abstract/2020/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2020/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2020/CanonicalNumericIndexString.js b/node_modules/es-abstract/2020/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2020/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2020/Canonicalize.js b/node_modules/es-abstract/2020/Canonicalize.js new file mode 100644 index 0000000000000..49741831a618d --- /dev/null +++ b/node_modules/es-abstract/2020/Canonicalize.js @@ -0,0 +1,55 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(ch, IgnoreCase, Unicode) { + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + if (Unicode) { // step 2 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 2.b + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/2020/CharacterRange.js b/node_modules/es-abstract/2020/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2020/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2020/CodePointAt.js b/node_modules/es-abstract/2020/CodePointAt.js new file mode 100644 index 0000000000000..b887631bc15e5 --- /dev/null +++ b/node_modules/es-abstract/2020/CodePointAt.js @@ -0,0 +1,58 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var callBound = require('call-bind/callBound'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var Type = require('./Type'); +var UTF16DecodeSurrogatePair = require('./UTF16DecodeSurrogatePair'); + +var $charAt = callBound('String.prototype.charAt'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/11.0/#sec-codepointat + +module.exports = function CodePointAt(string, position) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var size = string.length; + if (position < 0 || position >= size) { + throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`'); + } + var first = $charCodeAt(string, position); + var cp = $charAt(string, position); + var firstIsLeading = isLeadingSurrogate(first); + var firstIsTrailing = isTrailingSurrogate(first); + if (!firstIsLeading && !firstIsTrailing) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': false + }; + } + if (firstIsTrailing || (position + 1 === size)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + var second = $charCodeAt(string, position + 1); + if (!isTrailingSurrogate(second)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + + return { + '[[CodePoint]]': UTF16DecodeSurrogatePair(first, second), + '[[CodeUnitCount]]': 2, + '[[IsUnpairedSurrogate]]': false + }; +}; diff --git a/node_modules/es-abstract/2020/CompletePropertyDescriptor.js b/node_modules/es-abstract/2020/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2020/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2020/CompletionRecord.js b/node_modules/es-abstract/2020/CompletionRecord.js new file mode 100644 index 0000000000000..370a5677f378e --- /dev/null +++ b/node_modules/es-abstract/2020/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2020/CopyDataProperties.js b/node_modules/es-abstract/2020/CopyDataProperties.js new file mode 100644 index 0000000000000..47a426c0c4918 --- /dev/null +++ b/node_modules/es-abstract/2020/CopyDataProperties.js @@ -0,0 +1,64 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-copydataproperties + +module.exports = function CopyDataProperties(target, source, excludedItems) { + if (Type(target) !== 'Object') { + throw new $TypeError('Assertion failed: "target" must be an Object'); + } + + if (!IsArray(excludedItems) || !every(excludedItems, IsPropertyKey)) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + + if (typeof source === 'undefined' || source === null) { + return target; + } + + var from = ToObject(source); + + var sourceKeys = OwnPropertyKeys(from); + forEach(sourceKeys, function (nextKey) { + var excluded = false; + + forEach(excludedItems, function (e) { + if (SameValue(e, nextKey) === true) { + excluded = true; + } + }); + + var enumerable = $isEnumerable(from, nextKey) || ( + // this is to handle string keys being non-enumerable in older engines + typeof source === 'string' + && nextKey >= 0 + && IsInteger(ToNumber(nextKey)) + ); + if (excluded === false && enumerable) { + var propValue = Get(from, nextKey); + CreateDataPropertyOrThrow(target, nextKey, propValue); + } + }); + + return target; +}; diff --git a/node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js new file mode 100644 index 0000000000000..64540dd6e3d71 --- /dev/null +++ b/node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2020/CreateDataProperty.js b/node_modules/es-abstract/2020/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2020/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2020/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2020/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..c40e69368b91d --- /dev/null +++ b/node_modules/es-abstract/2020/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2020/CreateHTML.js b/node_modules/es-abstract/2020/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2020/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2020/CreateIterResultObject.js b/node_modules/es-abstract/2020/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2020/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2020/CreateListFromArrayLike.js b/node_modules/es-abstract/2020/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..7592307eb13a4 --- /dev/null +++ b/node_modules/es-abstract/2020/CreateListFromArrayLike.js @@ -0,0 +1,46 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object']; + +// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike + +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = LengthOfArrayLike(obj); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2020/CreateMethodProperty.js b/node_modules/es-abstract/2020/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2020/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2020/CreateRegExpStringIterator.js b/node_modules/es-abstract/2020/CreateRegExpStringIterator.js new file mode 100644 index 0000000000000..cdfae56216ba7 --- /dev/null +++ b/node_modules/es-abstract/2020/CreateRegExpStringIterator.js @@ -0,0 +1,100 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); +var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true); + +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var CreateMethodProperty = require('./CreateMethodProperty'); +var Get = require('./Get'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var RegExpExec = require('./RegExpExec'); +var Set = require('./Set'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); +var setToStringTag = require('es-set-tostringtag'); + +var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) { + if (Type(S) !== 'String') { + throw new $TypeError('`S` must be a string'); + } + if (Type(global) !== 'Boolean') { + throw new $TypeError('`global` must be a boolean'); + } + if (Type(fullUnicode) !== 'Boolean') { + throw new $TypeError('`fullUnicode` must be a boolean'); + } + SLOT.set(this, '[[IteratingRegExp]]', R); + SLOT.set(this, '[[IteratedString]]', S); + SLOT.set(this, '[[Global]]', global); + SLOT.set(this, '[[Unicode]]', fullUnicode); + SLOT.set(this, '[[Done]]', false); +}; + +if (IteratorPrototype) { + RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype); +} + +var RegExpStringIteratorNext = function next() { + var O = this; // eslint-disable-line no-invalid-this + if (Type(O) !== 'Object') { + throw new $TypeError('receiver must be an object'); + } + if ( + !(O instanceof RegExpStringIterator) + || !SLOT.has(O, '[[IteratingRegExp]]') + || !SLOT.has(O, '[[IteratedString]]') + || !SLOT.has(O, '[[Global]]') + || !SLOT.has(O, '[[Unicode]]') + || !SLOT.has(O, '[[Done]]') + ) { + throw new $TypeError('"this" value must be a RegExpStringIterator instance'); + } + if (SLOT.get(O, '[[Done]]')) { + return CreateIterResultObject(undefined, true); + } + var R = SLOT.get(O, '[[IteratingRegExp]]'); + var S = SLOT.get(O, '[[IteratedString]]'); + var global = SLOT.get(O, '[[Global]]'); + var fullUnicode = SLOT.get(O, '[[Unicode]]'); + var match = RegExpExec(R, S); + if (match === null) { + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(undefined, true); + } + if (global) { + var matchStr = ToString(Get(match, '0')); + if (matchStr === '') { + var thisIndex = ToLength(Get(R, 'lastIndex')); + var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode); + Set(R, 'lastIndex', nextIndex, true); + } + return CreateIterResultObject(match, false); + } + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(match, false); +}; +CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext); + +if (hasSymbols) { + setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator'); + + if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') { + var iteratorFn = function SymbolIterator() { + return this; + }; + CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn); + } +} + +// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator +module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) { + // assert R.global === global && R.unicode === fullUnicode? + return new RegExpStringIterator(R, S, global, fullUnicode); +}; diff --git a/node_modules/es-abstract/2020/DateFromTime.js b/node_modules/es-abstract/2020/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2020/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2020/DateString.js b/node_modules/es-abstract/2020/DateString.js new file mode 100644 index 0000000000000..939c14c0c87ef --- /dev/null +++ b/node_modules/es-abstract/2020/DateString.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var Type = require('./Type'); +var WeekDay = require('./WeekDay'); +var MonthFromTime = require('./MonthFromTime'); +var YearFromTime = require('./YearFromTime'); +var DateFromTime = require('./DateFromTime'); + +// https://262.ecma-international.org/9.0/#sec-datestring + +module.exports = function DateString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var weekday = weekdays[WeekDay(tv)]; + var month = months[MonthFromTime(tv)]; + var day = padTimeComponent(DateFromTime(tv)); + var year = padTimeComponent(YearFromTime(tv), 4); + return weekday + '\x20' + month + '\x20' + day + '\x20' + year; +}; diff --git a/node_modules/es-abstract/2020/Day.js b/node_modules/es-abstract/2020/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2020/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2020/DayFromYear.js b/node_modules/es-abstract/2020/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2020/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2020/DayWithinYear.js b/node_modules/es-abstract/2020/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2020/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2020/DaysInYear.js b/node_modules/es-abstract/2020/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2020/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2020/DefinePropertyOrThrow.js b/node_modules/es-abstract/2020/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2020/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2020/DeletePropertyOrThrow.js b/node_modules/es-abstract/2020/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2020/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2020/DetachArrayBuffer.js b/node_modules/es-abstract/2020/DetachArrayBuffer.js new file mode 100644 index 0000000000000..03284729b3d4e --- /dev/null +++ b/node_modules/es-abstract/2020/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2020/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2020/EnumerableOwnPropertyNames.js new file mode 100644 index 0000000000000..8e3177b6a1631 --- /dev/null +++ b/node_modules/es-abstract/2020/EnumerableOwnPropertyNames.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/8.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnPropertyNames(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2020/FlattenIntoArray.js b/node_modules/es-abstract/2020/FlattenIntoArray.js new file mode 100644 index 0000000000000..0fb87bc6a39b0 --- /dev/null +++ b/node_modules/es-abstract/2020/FlattenIntoArray.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var Call = require('./Call'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/11.0/#sec-flattenintoarray + +module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) { + var mapperFunction; + if (arguments.length > 5) { + mapperFunction = arguments[5]; + } + + var targetIndex = start; + var sourceIndex = 0; + while (sourceIndex < sourceLen) { + var P = ToString(sourceIndex); + var exists = HasProperty(source, P); + if (exists === true) { + var element = Get(source, P); + if (typeof mapperFunction !== 'undefined') { + if (arguments.length <= 6) { + throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); + } + element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]); + } + var shouldFlatten = false; + if (depth > 0) { + shouldFlatten = IsArray(element); + } + if (shouldFlatten) { + var elementLen = LengthOfArrayLike(element); + targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); + } else { + if (targetIndex >= MAX_SAFE_INTEGER) { + throw new $TypeError('index too large'); + } + CreateDataPropertyOrThrow(target, ToString(targetIndex), element); + targetIndex += 1; + } + } + sourceIndex += 1; + } + + return targetIndex; +}; diff --git a/node_modules/es-abstract/2020/FromPropertyDescriptor.js b/node_modules/es-abstract/2020/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2020/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2020/Get.js b/node_modules/es-abstract/2020/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2020/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2020/GetGlobalObject.js b/node_modules/es-abstract/2020/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2020/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2020/GetIterator.js b/node_modules/es-abstract/2020/GetIterator.js new file mode 100644 index 0000000000000..672454abdbff3 --- /dev/null +++ b/node_modules/es-abstract/2020/GetIterator.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true); + +var inspect = require('object-inspect'); +var hasSymbols = require('has-symbols')(); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-getiterator + +module.exports = function GetIterator(obj, hint, method) { + var actualHint = hint; + if (arguments.length < 2) { + actualHint = 'sync'; + } + if (actualHint !== 'sync' && actualHint !== 'async') { + throw new $TypeError("Assertion failed: `hint` must be one of 'sync' or 'async', got " + inspect(hint)); + } + + var actualMethod = method; + if (arguments.length < 3) { + if (actualHint === 'async') { + if (hasSymbols && $asyncIterator) { + actualMethod = GetMethod(obj, $asyncIterator); + } + if (actualMethod === undefined) { + throw new $SyntaxError("async from sync iterators aren't currently supported"); + } + } else { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; + + // TODO: This should return an IteratorRecord + /* + var nextMethod = GetV(iterator, 'next'); + return { + '[[Iterator]]': iterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; + */ +}; diff --git a/node_modules/es-abstract/2020/GetMethod.js b/node_modules/es-abstract/2020/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2020/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2020/GetOwnPropertyKeys.js b/node_modules/es-abstract/2020/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2020/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2020/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2020/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2020/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2020/GetSubstitution.js b/node_modules/es-abstract/2020/GetSubstitution.js new file mode 100644 index 0000000000000..21aea1fd4fcee --- /dev/null +++ b/node_modules/es-abstract/2020/GetSubstitution.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var every = require('../helpers/every'); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); +var $indexOf = callBound('String.prototype.indexOf'); +var $parseInt = parseInt; + +var isDigit = regexTester(/^[0-9]$/); + +var inspect = require('object-inspect'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// http://262.ecma-international.org/9.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-params, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a List of Strings or `undefined`, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + if (Type(namedCaptures) !== 'Undefined') { + namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign + } + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else if (next === '<') { + // eslint-disable-next-line max-depth + if (Type(namedCaptures) === 'Undefined') { + result += '$<'; + i += 2; + } else { + var endIndex = $indexOf(replacement, '>', i); + // eslint-disable-next-line max-depth + if (endIndex > -1) { + var groupName = $strSlice(replacement, i + '$<'.length, endIndex); + var capture = Get(namedCaptures, groupName); + // eslint-disable-next-line max-depth + if (Type(capture) !== 'Undefined') { + result += ToString(capture); + } + i += ('<' + groupName + '>').length; + } + } + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2020/GetV.js b/node_modules/es-abstract/2020/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2020/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2020/GetValueFromBuffer.js b/node_modules/es-abstract/2020/GetValueFromBuffer.js new file mode 100644 index 0000000000000..8d3a2f4fc5423 --- /dev/null +++ b/node_modules/es-abstract/2020/GetValueFromBuffer.js @@ -0,0 +1,110 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var RawBytesToNumeric = require('./RawBytesToNumeric'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table61 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $BigInt64: 8, + $BigUint64: 8, + $Float32: 4, + $Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); + +// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || typeof table61['$' + type] !== 'number') { + throw new $TypeError('Assertion failed: `type` must be a Typed Array element type'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (order !== 'SeqCst' && order !== 'Unordered') { + throw new $TypeError('Assertion failed: `order` must be either `SeqCst` or `Unordered`'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = table61['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "BigInt64", "BigUint64", "Float32", or "Float64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumeric(type, bytes, isLittleEndian); +}; diff --git a/node_modules/es-abstract/2020/HasOwnProperty.js b/node_modules/es-abstract/2020/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2020/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2020/HasProperty.js b/node_modules/es-abstract/2020/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2020/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2020/HourFromTime.js b/node_modules/es-abstract/2020/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2020/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2020/InLeapYear.js b/node_modules/es-abstract/2020/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2020/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2020/InstanceofOperator.js b/node_modules/es-abstract/2020/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2020/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2020/Invoke.js b/node_modules/es-abstract/2020/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2020/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2020/IsAccessorDescriptor.js b/node_modules/es-abstract/2020/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2020/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2020/IsArray.js b/node_modules/es-abstract/2020/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2020/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2020/IsBigIntElementType.js b/node_modules/es-abstract/2020/IsBigIntElementType.js new file mode 100644 index 0000000000000..e3f58a949b3ca --- /dev/null +++ b/node_modules/es-abstract/2020/IsBigIntElementType.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BigUint64' || type === 'BigInt64'; +}; diff --git a/node_modules/es-abstract/2020/IsCallable.js b/node_modules/es-abstract/2020/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2020/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2020/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2020/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..8bdaf3eb45d24 --- /dev/null +++ b/node_modules/es-abstract/2020/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2020/IsConcatSpreadable.js b/node_modules/es-abstract/2020/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2020/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2020/IsConstructor.js b/node_modules/es-abstract/2020/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2020/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2020/IsDataDescriptor.js b/node_modules/es-abstract/2020/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2020/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2020/IsDetachedBuffer.js b/node_modules/es-abstract/2020/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2020/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2020/IsExtensible.js b/node_modules/es-abstract/2020/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2020/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2020/IsGenericDescriptor.js b/node_modules/es-abstract/2020/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2020/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2020/IsInteger.js b/node_modules/es-abstract/2020/IsInteger.js new file mode 100644 index 0000000000000..e3d25f38e3009 --- /dev/null +++ b/node_modules/es-abstract/2020/IsInteger.js @@ -0,0 +1,9 @@ +'use strict'; + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/6.0/#sec-isinteger + +module.exports = function IsInteger(argument) { + return isInteger(argument); +}; diff --git a/node_modules/es-abstract/2020/IsNoTearConfiguration.js b/node_modules/es-abstract/2020/IsNoTearConfiguration.js new file mode 100644 index 0000000000000..f0d2808737ac6 --- /dev/null +++ b/node_modules/es-abstract/2020/IsNoTearConfiguration.js @@ -0,0 +1,16 @@ +'use strict'; + +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var IsBigIntElementType = require('./IsBigIntElementType'); + +// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration + +module.exports = function IsNoTearConfiguration(type, order) { + if (IsUnclampedIntegerElementType(type)) { + return true; + } + if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') { + return true; + } + return false; +}; diff --git a/node_modules/es-abstract/2020/IsNonNegativeInteger.js b/node_modules/es-abstract/2020/IsNonNegativeInteger.js new file mode 100644 index 0000000000000..ae1f69c96449e --- /dev/null +++ b/node_modules/es-abstract/2020/IsNonNegativeInteger.js @@ -0,0 +1,9 @@ +'use strict'; + +var IsInteger = require('./IsInteger'); + +// https://262.ecma-international.org/11.0/#sec-isnonnegativeinteger + +module.exports = function IsNonNegativeInteger(argument) { + return !!IsInteger(argument) && argument >= 0; +}; diff --git a/node_modules/es-abstract/2020/IsPromise.js b/node_modules/es-abstract/2020/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2020/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2020/IsPropertyKey.js b/node_modules/es-abstract/2020/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2020/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2020/IsRegExp.js b/node_modules/es-abstract/2020/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2020/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2020/IsSharedArrayBuffer.js b/node_modules/es-abstract/2020/IsSharedArrayBuffer.js new file mode 100644 index 0000000000000..8e96e33f3c2dc --- /dev/null +++ b/node_modules/es-abstract/2020/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2020/IsStringPrefix.js b/node_modules/es-abstract/2020/IsStringPrefix.js new file mode 100644 index 0000000000000..4958544ce29f0 --- /dev/null +++ b/node_modules/es-abstract/2020/IsStringPrefix.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPrefixOf = require('../helpers/isPrefixOf'); + +// var callBound = require('call-bind/callBound'); + +// var $charAt = callBound('String.prototype.charAt'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-isstringprefix + +module.exports = function IsStringPrefix(p, q) { + if (Type(p) !== 'String') { + throw new $TypeError('Assertion failed: "p" must be a String'); + } + + if (Type(q) !== 'String') { + throw new $TypeError('Assertion failed: "q" must be a String'); + } + + return isPrefixOf(p, q); + /* + if (p === q || p === '') { + return true; + } + + var pLength = p.length; + var qLength = q.length; + if (pLength >= qLength) { + return false; + } + + // assert: pLength < qLength + + for (var i = 0; i < pLength; i += 1) { + if ($charAt(p, i) !== $charAt(q, i)) { + return false; + } + } + return true; + */ +}; diff --git a/node_modules/es-abstract/2020/IsUnclampedIntegerElementType.js b/node_modules/es-abstract/2020/IsUnclampedIntegerElementType.js new file mode 100644 index 0000000000000..4e3a38425d65f --- /dev/null +++ b/node_modules/es-abstract/2020/IsUnclampedIntegerElementType.js @@ -0,0 +1,12 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype + +module.exports = function IsUnclampedIntegerElementType(type) { + return type === 'Int8' + || type === 'Uint8' + || type === 'Int16' + || type === 'Uint16' + || type === 'Int32' + || type === 'Uint32'; +}; diff --git a/node_modules/es-abstract/2020/IsUnsignedElementType.js b/node_modules/es-abstract/2020/IsUnsignedElementType.js new file mode 100644 index 0000000000000..b1ff194d73916 --- /dev/null +++ b/node_modules/es-abstract/2020/IsUnsignedElementType.js @@ -0,0 +1,11 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'Uint8' + || type === 'Uint8C' + || type === 'Uint16' + || type === 'Uint32' + || type === 'BigUint64'; +}; diff --git a/node_modules/es-abstract/2020/IsValidIntegerIndex.js b/node_modules/es-abstract/2020/IsValidIntegerIndex.js new file mode 100644 index 0000000000000..e2e9af5d83e45 --- /dev/null +++ b/node_modules/es-abstract/2020/IsValidIntegerIndex.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsInteger = require('./IsInteger'); + +var isNegativeZero = require('../helpers/isNegativeZero'); + +var typedArrayBuffer = require('typed-array-buffer'); + +// https://262.ecma-international.org/11.0/#sec-isvalidintegerindex + +module.exports = function IsValidIntegerIndex(O, index) { + // Assert: O is an Integer-Indexed exotic object. + typedArrayBuffer(O); // step 1 + + if (typeof index !== 'number') { + throw new $TypeError('Assertion failed: Type(index) is not Number'); // step 2 + } + + if (!IsInteger(index)) { return false; } // step 3 + + if (isNegativeZero(index)) { return false; } // step 4 + + if (index < 0 || index >= O.length) { return false; } // step 5 + + return true; // step 6 +}; diff --git a/node_modules/es-abstract/2020/IsWordChar.js b/node_modules/es-abstract/2020/IsWordChar.js new file mode 100644 index 0000000000000..5d61804925b6c --- /dev/null +++ b/node_modules/es-abstract/2020/IsWordChar.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var IsArray = require('./IsArray'); +var IsInteger = require('./IsInteger'); +var Type = require('./Type'); +var WordCharacters = require('./WordCharacters'); + +var every = require('../helpers/every'); + +var isChar = function isChar(c) { + return typeof c === 'string'; +}; + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) { + if (!IsInteger(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + if (!IsInteger(InputLength)) { + throw new $TypeError('Assertion failed: `InputLength` must be an integer'); + } + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + if (e === -1 || e === InputLength) { + return false; // step 1 + } + + var c = Input[e]; // step 2 + + var wordChars = WordCharacters(IgnoreCase, Unicode); + + return $indexOf(wordChars, c) > -1; // steps 3-4 +}; diff --git a/node_modules/es-abstract/2020/IterableToList.js b/node_modules/es-abstract/2020/IterableToList.js new file mode 100644 index 0000000000000..d994d741aec86 --- /dev/null +++ b/node_modules/es-abstract/2020/IterableToList.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var GetIterator = require('./GetIterator'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); + +// https://262.ecma-international.org/9.0/#sec-iterabletolist + +module.exports = function IterableToList(items, method) { + var iterator = GetIterator(items, 'sync', method); + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; +}; diff --git a/node_modules/es-abstract/2020/IteratorClose.js b/node_modules/es-abstract/2020/IteratorClose.js new file mode 100644 index 0000000000000..7c1076082e1e2 --- /dev/null +++ b/node_modules/es-abstract/2020/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2020/IteratorComplete.js b/node_modules/es-abstract/2020/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2020/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2020/IteratorNext.js b/node_modules/es-abstract/2020/IteratorNext.js new file mode 100644 index 0000000000000..d84d66edb5fc2 --- /dev/null +++ b/node_modules/es-abstract/2020/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2020/IteratorStep.js b/node_modules/es-abstract/2020/IteratorStep.js new file mode 100644 index 0000000000000..85bcd95c0410f --- /dev/null +++ b/node_modules/es-abstract/2020/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://262.ecma-international.org/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2020/IteratorValue.js b/node_modules/es-abstract/2020/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2020/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2020/LengthOfArrayLike.js b/node_modules/es-abstract/2020/LengthOfArrayLike.js new file mode 100644 index 0000000000000..132c4d58480f7 --- /dev/null +++ b/node_modules/es-abstract/2020/LengthOfArrayLike.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToLength = require('./ToLength'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-lengthofarraylike + +module.exports = function LengthOfArrayLike(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + return ToLength(Get(obj, 'length')); +}; + +// TODO: use this all over diff --git a/node_modules/es-abstract/2020/MakeDate.js b/node_modules/es-abstract/2020/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2020/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2020/MakeDay.js b/node_modules/es-abstract/2020/MakeDay.js new file mode 100644 index 0000000000000..13f568633a34a --- /dev/null +++ b/node_modules/es-abstract/2020/MakeDay.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToInteger = require('./ToInteger'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToInteger(year); + var m = ToInteger(month); + var dt = ToInteger(date); + var ym = y + floor(m / 12); + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2020/MakeTime.js b/node_modules/es-abstract/2020/MakeTime.js new file mode 100644 index 0000000000000..34cb4dcca3f84 --- /dev/null +++ b/node_modules/es-abstract/2020/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToInteger = require('./ToInteger'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToInteger(hour); + var m = ToInteger(min); + var s = ToInteger(sec); + var milli = ToInteger(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2020/MinFromTime.js b/node_modules/es-abstract/2020/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2020/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2020/MonthFromTime.js b/node_modules/es-abstract/2020/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2020/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2020/NewPromiseCapability.js b/node_modules/es-abstract/2020/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2020/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2020/NormalCompletion.js b/node_modules/es-abstract/2020/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2020/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2020/Number/add.js b/node_modules/es-abstract/2020/Number/add.js new file mode 100644 index 0000000000000..c2c2063184247 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/add.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-add + +module.exports = function NumberAdd(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) { + return NaN; + } + + if ((x === Infinity && y === Infinity) || (x === -Infinity && y === -Infinity)) { + return x; + } + + if (x === Infinity) { + return x; + } + + if (y === Infinity) { + return y; + } + + if (x === y && x === 0) { + return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0; + } + + if (x === -y || -x === y) { + return +0; + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2020/Number/bitwiseAND.js b/node_modules/es-abstract/2020/Number/bitwiseAND.js new file mode 100644 index 0000000000000..a7159802ded72 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND + +module.exports = function NumberBitwiseAND(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2020/Number/bitwiseNOT.js b/node_modules/es-abstract/2020/Number/bitwiseNOT.js new file mode 100644 index 0000000000000..ae8032a785327 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/bitwiseNOT.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT + +module.exports = function NumberBitwiseNOT(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + var oldValue = ToInt32(x); + // Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer. + return ~oldValue; +}; diff --git a/node_modules/es-abstract/2020/Number/bitwiseOR.js b/node_modules/es-abstract/2020/Number/bitwiseOR.js new file mode 100644 index 0000000000000..c5e67b96802f0 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR + +module.exports = function NumberBitwiseOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2020/Number/bitwiseXOR.js b/node_modules/es-abstract/2020/Number/bitwiseXOR.js new file mode 100644 index 0000000000000..a4030e9a4b07c --- /dev/null +++ b/node_modules/es-abstract/2020/Number/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR + +module.exports = function NumberBitwiseXOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2020/Number/divide.js b/node_modules/es-abstract/2020/Number/divide.js new file mode 100644 index 0000000000000..65244625d300d --- /dev/null +++ b/node_modules/es-abstract/2020/Number/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide + +module.exports = function NumberDivide(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) { + return NaN; + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2020/Number/equal.js b/node_modules/es-abstract/2020/Number/equal.js new file mode 100644 index 0000000000000..db68afa464d2e --- /dev/null +++ b/node_modules/es-abstract/2020/Number/equal.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal + +module.exports = function NumberEqual(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y)) { + return false; + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2020/Number/exponentiate.js b/node_modules/es-abstract/2020/Number/exponentiate.js new file mode 100644 index 0000000000000..2568651032514 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/exponentiate.js @@ -0,0 +1,77 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +// var isNegativeZero = require('is-negative-zero'); + +var $pow = GetIntrinsic('%Math.pow%'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +/* +var abs = require('../../helpers/abs'); +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var IsInteger = require('../IsInteger'); +*/ +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate + +/* eslint max-lines-per-function: 0, max-statements: 0 */ + +module.exports = function NumberExponentiate(base, exponent) { + if (Type(base) !== 'Number' || Type(exponent) !== 'Number') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers'); + } + return $pow(base, exponent); + /* + if (isNaN(exponent)) { + return NaN; + } + if (exponent === 0) { + return 1; + } + if (isNaN(base)) { + return NaN; + } + var aB = abs(base); + if (aB > 1 && exponent === Infinity) { + return Infinity; + } + if (aB > 1 && exponent === -Infinity) { + return 0; + } + if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) { + return NaN; + } + if (aB < 1 && exponent === Infinity) { + return +0; + } + if (aB < 1 && exponent === -Infinity) { + return Infinity; + } + if (base === Infinity) { + return exponent > 0 ? Infinity : 0; + } + if (base === -Infinity) { + var isOdd = true; + if (exponent > 0) { + return isOdd ? -Infinity : Infinity; + } + return isOdd ? -0 : 0; + } + if (exponent > 0) { + return isNegativeZero(base) ? Infinity : 0; + } + if (isNegativeZero(base)) { + if (exponent > 0) { + return isOdd ? -0 : 0; + } + return isOdd ? -Infinity : Infinity; + } + if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) { + return NaN; + } + */ +}; diff --git a/node_modules/es-abstract/2020/Number/index.js b/node_modules/es-abstract/2020/Number/index.js new file mode 100644 index 0000000000000..63ec52da69e28 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2020/Number/leftShift.js b/node_modules/es-abstract/2020/Number/leftShift.js new file mode 100644 index 0000000000000..804fde4cd45ee --- /dev/null +++ b/node_modules/es-abstract/2020/Number/leftShift.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-leftShift + +module.exports = function NumberLeftShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = rnum & 0x1F; + + return lnum << shiftCount; +}; diff --git a/node_modules/es-abstract/2020/Number/lessThan.js b/node_modules/es-abstract/2020/Number/lessThan.js new file mode 100644 index 0000000000000..5fcac24e9d958 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/lessThan.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan + +module.exports = function NumberLessThan(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + // If x is NaN, return undefined. + // If y is NaN, return undefined. + if (isNaN(x) || isNaN(y)) { + return void undefined; + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2020/Number/multiply.js b/node_modules/es-abstract/2020/Number/multiply.js new file mode 100644 index 0000000000000..2a6c478a5bcaf --- /dev/null +++ b/node_modules/es-abstract/2020/Number/multiply.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply + +module.exports = function NumberMultiply(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) { + return NaN; + } + if (!isFinite(x) && !isFinite(y)) { + return x === y ? Infinity : -Infinity; + } + if (!isFinite(x) && y !== 0) { + return x > 0 ? Infinity : -Infinity; + } + if (!isFinite(y) && x !== 0) { + return y > 0 ? Infinity : -Infinity; + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2020/Number/remainder.js b/node_modules/es-abstract/2020/Number/remainder.js new file mode 100644 index 0000000000000..bc6106402d280 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/remainder.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-remainder + +module.exports = function NumberRemainder(n, d) { + if (Type(n) !== 'Number' || Type(d) !== 'Number') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers'); + } + + // If either operand is NaN, the result is NaN. + // If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN. + if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) { + return NaN; + } + + // If the dividend is finite and the divisor is an infinity, the result equals the dividend. + // If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend. + if (!isFinite(d) || (n === 0 && d !== 0)) { + return n; + } + + // In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved… + return n % d; +}; diff --git a/node_modules/es-abstract/2020/Number/sameValue.js b/node_modules/es-abstract/2020/Number/sameValue.js new file mode 100644 index 0000000000000..19efc379d1d8c --- /dev/null +++ b/node_modules/es-abstract/2020/Number/sameValue.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var isNegativeZero = require('is-negative-zero'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var NumberSameValueZero = require('./sameValueZero'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue + +module.exports = function NumberSameValue(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (x === 0 && y === 0) { + return !(isNegativeZero(x) ^ isNegativeZero(y)); + } + return NumberSameValueZero(x, y); +}; diff --git a/node_modules/es-abstract/2020/Number/sameValueZero.js b/node_modules/es-abstract/2020/Number/sameValueZero.js new file mode 100644 index 0000000000000..5688198fe88aa --- /dev/null +++ b/node_modules/es-abstract/2020/Number/sameValueZero.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero + +module.exports = function NumberSameValueZero(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var xNaN = isNaN(x); + var yNaN = isNaN(y); + if (xNaN || yNaN) { + return xNaN === yNaN; + } + return x === y; +}; diff --git a/node_modules/es-abstract/2020/Number/signedRightShift.js b/node_modules/es-abstract/2020/Number/signedRightShift.js new file mode 100644 index 0000000000000..043ca8934b775 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/signedRightShift.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-signedRightShift + +module.exports = function NumberSignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = rnum & 0x1F; + + return lnum >> shiftCount; +}; diff --git a/node_modules/es-abstract/2020/Number/subtract.js b/node_modules/es-abstract/2020/Number/subtract.js new file mode 100644 index 0000000000000..3ff2dd24c621e --- /dev/null +++ b/node_modules/es-abstract/2020/Number/subtract.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-subtract + +module.exports = function NumberSubtract(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return x - y; +}; diff --git a/node_modules/es-abstract/2020/Number/toString.js b/node_modules/es-abstract/2020/Number/toString.js new file mode 100644 index 0000000000000..4f133160abb57 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring + +module.exports = function NumberToString(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` must be a Number'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2020/Number/unaryMinus.js b/node_modules/es-abstract/2020/Number/unaryMinus.js new file mode 100644 index 0000000000000..794582ad8d42b --- /dev/null +++ b/node_modules/es-abstract/2020/Number/unaryMinus.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus + +module.exports = function NumberUnaryMinus(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + if (isNaN(x)) { + return NaN; + } + return -x; +}; diff --git a/node_modules/es-abstract/2020/Number/unsignedRightShift.js b/node_modules/es-abstract/2020/Number/unsignedRightShift.js new file mode 100644 index 0000000000000..874439eeaeb12 --- /dev/null +++ b/node_modules/es-abstract/2020/Number/unsignedRightShift.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unsignedRightShift + +module.exports = function NumberUnsignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = rnum & 0x1F; + + return lnum >>> shiftCount; +}; diff --git a/node_modules/es-abstract/2020/NumberBitwiseOp.js b/node_modules/es-abstract/2020/NumberBitwiseOp.js new file mode 100644 index 0000000000000..11425ffded076 --- /dev/null +++ b/node_modules/es-abstract/2020/NumberBitwiseOp.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('./ToInt32'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-numberbitwiseop + +module.exports = function NumberBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + var lnum = ToInt32(x); + var rnum = ToUint32(y); + if (op === '&') { + return lnum & rnum; + } + if (op === '|') { + return lnum | rnum; + } + return lnum ^ rnum; +}; diff --git a/node_modules/es-abstract/2020/NumberToBigInt.js b/node_modules/es-abstract/2020/NumberToBigInt.js new file mode 100644 index 0000000000000..7d13b69db2149 --- /dev/null +++ b/node_modules/es-abstract/2020/NumberToBigInt.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/11.0/#sec-numbertobigint + +module.exports = function NumberToBigInt(number) { + if (Type(number) !== 'Number') { + throw new $TypeError('Assertion failed: `number` must be a String'); + } + if (!isInteger(number)) { + throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + return $BigInt(number); +}; diff --git a/node_modules/es-abstract/2020/NumericToRawBytes.js b/node_modules/es-abstract/2020/NumericToRawBytes.js new file mode 100644 index 0000000000000..cc671159f4cb7 --- /dev/null +++ b/node_modules/es-abstract/2020/NumericToRawBytes.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwnProperty = require('./HasOwnProperty'); +var ToBigInt64 = require('./ToBigInt64'); +var ToBigUint64 = require('./ToBigUint64'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); +var integerToNBytes = require('../helpers/integerToNBytes'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32, + BigInt64: ToBigInt64, + BigUint64: ToBigUint64 +}; + +// https://262.ecma-international.org/11.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number' && Type(value) !== 'BigInt') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'Float32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; diff --git a/node_modules/es-abstract/2020/ObjectDefineProperties.js b/node_modules/es-abstract/2020/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2020/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2020/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2020/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..8f3bb829df950 --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return OrdinaryObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2020/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2020/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2020/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2020/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2020/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2020/OrdinaryGetPrototypeOf.js new file mode 100644 index 0000000000000..ba17b98872933 --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2020/OrdinaryHasInstance.js b/node_modules/es-abstract/2020/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2020/OrdinaryHasProperty.js b/node_modules/es-abstract/2020/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2020/OrdinaryObjectCreate.js b/node_modules/es-abstract/2020/OrdinaryObjectCreate.js new file mode 100644 index 0000000000000..140534083c5c7 --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryObjectCreate.js @@ -0,0 +1,56 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/11.0/#sec-objectcreate + +module.exports = function OrdinaryObjectCreate(proto) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1]; + if (!IsArray(additionalInternalSlotsList)) { + throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array'); + } + + // var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1 + // internalSlotsList.push(...additionalInternalSlotsList); // step 2 + // var O = MakeBasicObject(internalSlotsList); // step 3 + // setProto(O, proto); // step 4 + // return O; // step 5 + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (additionalInternalSlotsList.length > 0) { + forEach(additionalInternalSlotsList, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; +}; diff --git a/node_modules/es-abstract/2020/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2020/OrdinarySetPrototypeOf.js new file mode 100644 index 0000000000000..d2b72306c187b --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2020/OrdinaryToPrimitive.js b/node_modules/es-abstract/2020/OrdinaryToPrimitive.js new file mode 100644 index 0000000000000..e1dbe1427f8d8 --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2020/PromiseResolve.js b/node_modules/es-abstract/2020/PromiseResolve.js new file mode 100644 index 0000000000000..6474b79c40ae6 --- /dev/null +++ b/node_modules/es-abstract/2020/PromiseResolve.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBind = require('call-bind'); + +var $resolve = GetIntrinsic('%Promise.resolve%', true); +var $PromiseResolve = $resolve && callBind($resolve); + +// https://262.ecma-international.org/9.0/#sec-promise-resolve + +module.exports = function PromiseResolve(C, x) { + if (!$PromiseResolve) { + throw new SyntaxError('This environment does not support Promises.'); + } + return $PromiseResolve(C, x); +}; + diff --git a/node_modules/es-abstract/2020/QuoteJSONString.js b/node_modules/es-abstract/2020/QuoteJSONString.js new file mode 100644 index 0000000000000..3b6ec40a41dad --- /dev/null +++ b/node_modules/es-abstract/2020/QuoteJSONString.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +var Type = require('./Type'); +var UnicodeEscape = require('./UnicodeEscape'); +var UTF16Encoding = require('./UTF16Encoding'); +var UTF16DecodeString = require('./UTF16DecodeString'); + +var hasOwn = require('hasown'); + +// https://262.ecma-international.org/11.0/#sec-quotejsonstring + +var escapes = { + '\u0008': '\\b', + '\u0009': '\\t', + '\u000A': '\\n', + '\u000C': '\\f', + '\u000D': '\\r', + '\u0022': '\\"', + '\u005c': '\\\\' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach(UTF16DecodeString(value), function (C) { + if (hasOwn(escapes, C)) { + product += escapes[C]; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20 || isLeadingSurrogate(C) || isTrailingSurrogate(C)) { + product += UnicodeEscape(C); + } else { + product += UTF16Encoding(cCharCode); + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2020/RawBytesToNumeric.js b/node_modules/es-abstract/2020/RawBytesToNumeric.js new file mode 100644 index 0000000000000..d14705cdcc0de --- /dev/null +++ b/node_modules/es-abstract/2020/RawBytesToNumeric.js @@ -0,0 +1,84 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnsignedElementType = require('./IsUnsignedElementType'); +var Type = require('./Type'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt); +}; diff --git a/node_modules/es-abstract/2020/RegExpCreate.js b/node_modules/es-abstract/2020/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2020/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2020/RegExpExec.js b/node_modules/es-abstract/2020/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2020/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2020/RequireObjectCoercible.js b/node_modules/es-abstract/2020/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2020/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2020/SameValue.js b/node_modules/es-abstract/2020/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2020/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2020/SameValueNonNumeric.js b/node_modules/es-abstract/2020/SameValueNonNumeric.js new file mode 100644 index 0000000000000..04f6cbfbe3594 --- /dev/null +++ b/node_modules/es-abstract/2020/SameValueNonNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric + +module.exports = function SameValueNonNumeric(x, y) { + var xType = Type(x); + if (xType === 'Number' || xType === 'BigInt') { + throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); + } + if (xType !== Type(y)) { + throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2020/SameValueZero.js b/node_modules/es-abstract/2020/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2020/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2020/SecFromTime.js b/node_modules/es-abstract/2020/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2020/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2020/Set.js b/node_modules/es-abstract/2020/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2020/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2020/SetFunctionLength.js b/node_modules/es-abstract/2020/SetFunctionLength.js new file mode 100644 index 0000000000000..a471b0c479c75 --- /dev/null +++ b/node_modules/es-abstract/2020/SetFunctionLength.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var HasOwnProperty = require('./HasOwnProperty'); +var IsExtensible = require('./IsExtensible'); +var IsNonNegativeInteger = require('./IsNonNegativeInteger'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-setfunctionlength + +module.exports = function SetFunctionLength(F, length) { + if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) { + throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property'); + } + if (Type(length) !== 'Number') { + throw new $TypeError('Assertion failed: `length` must be a Number'); + } + if (!IsNonNegativeInteger(length)) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0'); + } + return DefinePropertyOrThrow(F, 'length', { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); +}; diff --git a/node_modules/es-abstract/2020/SetFunctionName.js b/node_modules/es-abstract/2020/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2020/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2020/SetIntegrityLevel.js b/node_modules/es-abstract/2020/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2020/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2020/SetValueInBuffer.js b/node_modules/es-abstract/2020/SetValueInBuffer.js new file mode 100644 index 0000000000000..4039c142f479a --- /dev/null +++ b/node_modules/es-abstract/2020/SetValueInBuffer.js @@ -0,0 +1,109 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var NumericToRawBytes = require('./NumericToRawBytes'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var hasOwn = require('hasown'); + +var table61 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); + +// https://262.ecma-international.org/11.0/#sec-setvalueinbuffer + +/* eslint max-params: 0 */ + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || !hasOwn(table61, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') { + throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`'); + } + + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 4 + throw new $TypeError('Assertion failed: `value` must be a BigInt if type is BigInt64 or BigUint64, otherwise a Number'); + } + + // 5. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = table61[type]; // step 6 + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 8 + + var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 8 + + if (isSAB) { // step 9 + /* + Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). + If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false. + Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 10. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + } + + // 11. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2020/SpeciesConstructor.js b/node_modules/es-abstract/2020/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2020/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2020/SplitMatch.js b/node_modules/es-abstract/2020/SplitMatch.js new file mode 100644 index 0000000000000..d57fb691e5e91 --- /dev/null +++ b/node_modules/es-abstract/2020/SplitMatch.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $charAt = callBound('String.prototype.charAt'); + +// https://262.ecma-international.org/6.0/#sec-splitmatch + +module.exports = function SplitMatch(S, q, R) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(q)) { + throw new $TypeError('Assertion failed: `q` must be an integer'); + } + if (Type(R) !== 'String') { + throw new $TypeError('Assertion failed: `R` must be a String'); + } + var r = R.length; + var s = S.length; + if (q + r > s) { + return false; + } + + for (var i = 0; i < r; i += 1) { + if ($charAt(S, q + i) !== $charAt(R, i)) { + return false; + } + } + + return q + r; +}; diff --git a/node_modules/es-abstract/2020/StrictEqualityComparison.js b/node_modules/es-abstract/2020/StrictEqualityComparison.js new file mode 100644 index 0000000000000..f3435ba9d181e --- /dev/null +++ b/node_modules/es-abstract/2020/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/2020/StringCreate.js b/node_modules/es-abstract/2020/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2020/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2020/StringGetOwnProperty.js b/node_modules/es-abstract/2020/StringGetOwnProperty.js new file mode 100644 index 0000000000000..b6f904ec3e667 --- /dev/null +++ b/node_modules/es-abstract/2020/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsInteger = require('./IsInteger'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://262.ecma-international.org/8.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2020/StringPad.js b/node_modules/es-abstract/2020/StringPad.js new file mode 100644 index 0000000000000..cdf69001bb5bd --- /dev/null +++ b/node_modules/es-abstract/2020/StringPad.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); + +var $strSlice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/11.0/#sec-stringpad + +module.exports = function StringPad(O, maxLength, fillString, placement) { + if (placement !== 'start' && placement !== 'end') { + throw new $TypeError('Assertion failed: `placement` must be "start" or "end"'); + } + var S = ToString(O); + var intMaxLength = ToLength(maxLength); + var stringLength = S.length; + if (intMaxLength <= stringLength) { + return S; + } + var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString); + if (filler === '') { + return S; + } + var fillLen = intMaxLength - stringLength; + + // the String value consisting of repeated concatenations of filler truncated to length fillLen. + var truncatedStringFiller = ''; + while (truncatedStringFiller.length < fillLen) { + truncatedStringFiller += filler; + } + truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen); + + if (placement === 'start') { + return truncatedStringFiller + S; + } + return S + truncatedStringFiller; +}; diff --git a/node_modules/es-abstract/2020/StringToBigInt.js b/node_modules/es-abstract/2020/StringToBigInt.js new file mode 100644 index 0000000000000..0bc3cec01c863 --- /dev/null +++ b/node_modules/es-abstract/2020/StringToBigInt.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +// https://262.ecma-international.org/11.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return NaN; + } +}; diff --git a/node_modules/es-abstract/2020/SymbolDescriptiveString.js b/node_modules/es-abstract/2020/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2020/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2020/TestIntegrityLevel.js b/node_modules/es-abstract/2020/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2020/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2020/ThrowCompletion.js b/node_modules/es-abstract/2020/ThrowCompletion.js new file mode 100644 index 0000000000000..b7d388a35292e --- /dev/null +++ b/node_modules/es-abstract/2020/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2020/TimeClip.js b/node_modules/es-abstract/2020/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2020/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2020/TimeFromYear.js b/node_modules/es-abstract/2020/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2020/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2020/TimeString.js b/node_modules/es-abstract/2020/TimeString.js new file mode 100644 index 0000000000000..051c4728e2e49 --- /dev/null +++ b/node_modules/es-abstract/2020/TimeString.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var HourFromTime = require('./HourFromTime'); +var MinFromTime = require('./MinFromTime'); +var SecFromTime = require('./SecFromTime'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-timestring + +module.exports = function TimeString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var hour = HourFromTime(tv); + var minute = MinFromTime(tv); + var second = SecFromTime(tv); + return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; +}; diff --git a/node_modules/es-abstract/2020/TimeWithinDay.js b/node_modules/es-abstract/2020/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2020/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2020/ToBigInt.js b/node_modules/es-abstract/2020/ToBigInt.js new file mode 100644 index 0000000000000..d24e0fff091e3 --- /dev/null +++ b/node_modules/es-abstract/2020/ToBigInt.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var StringToBigInt = require('./StringToBigInt'); +var ToPrimitive = require('./ToPrimitive'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/11.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (prim == null) { + throw new $TypeError('Cannot convert null or undefined to a BigInt'); + } + + if (typeof prim === 'boolean') { + return prim ? $BigInt(1) : $BigInt(0); + } + + if (typeof prim === 'number') { + throw new $TypeError('Cannot convert a Number value to a BigInt'); + } + + if (typeof prim === 'string') { + var n = StringToBigInt(prim); + if (isNaN(n)) { + throw new $TypeError('Failed to parse String to BigInt'); + } + return n; + } + + if (typeof prim === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a BigInt'); + } + + if (typeof prim !== 'bigint') { + throw new $SyntaxError('Assertion failed: unknown primitive type'); + } + + return prim; +}; diff --git a/node_modules/es-abstract/2020/ToBigInt64.js b/node_modules/es-abstract/2020/ToBigInt64.js new file mode 100644 index 0000000000000..65c1c55d92b18 --- /dev/null +++ b/node_modules/es-abstract/2020/ToBigInt64.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; diff --git a/node_modules/es-abstract/2020/ToBigUint64.js b/node_modules/es-abstract/2020/ToBigUint64.js new file mode 100644 index 0000000000000..ff68236a8c88f --- /dev/null +++ b/node_modules/es-abstract/2020/ToBigUint64.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; diff --git a/node_modules/es-abstract/2020/ToBoolean.js b/node_modules/es-abstract/2020/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2020/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2020/ToDateString.js b/node_modules/es-abstract/2020/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2020/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2020/ToIndex.js b/node_modules/es-abstract/2020/ToIndex.js new file mode 100644 index 0000000000000..c0185d151d419 --- /dev/null +++ b/node_modules/es-abstract/2020/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToInteger = require('./ToInteger'); +var ToLength = require('./ToLength'); +var SameValue = require('./SameValue'); + +// https://262.ecma-international.org/12.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToInteger(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValue(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2020/ToInt16.js b/node_modules/es-abstract/2020/ToInt16.js new file mode 100644 index 0000000000000..21694bdeb923c --- /dev/null +++ b/node_modules/es-abstract/2020/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://262.ecma-international.org/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2020/ToInt32.js b/node_modules/es-abstract/2020/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/2020/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2020/ToInt8.js b/node_modules/es-abstract/2020/ToInt8.js new file mode 100644 index 0000000000000..e223b6c1d352a --- /dev/null +++ b/node_modules/es-abstract/2020/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://262.ecma-international.org/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2020/ToInteger.js b/node_modules/es-abstract/2020/ToInteger.js new file mode 100644 index 0000000000000..9210af89e918a --- /dev/null +++ b/node_modules/es-abstract/2020/ToInteger.js @@ -0,0 +1,15 @@ +'use strict'; + +var ES5ToInteger = require('../5/ToInteger'); + +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/11.0/#sec-tointeger + +module.exports = function ToInteger(value) { + var number = ToNumber(value); + if (number !== 0) { + number = ES5ToInteger(number); + } + return number === 0 ? 0 : number; +}; diff --git a/node_modules/es-abstract/2020/ToLength.js b/node_modules/es-abstract/2020/ToLength.js new file mode 100644 index 0000000000000..1bef9bed7b2f0 --- /dev/null +++ b/node_modules/es-abstract/2020/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToInteger = require('./ToInteger'); + +module.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2020/ToNumber.js b/node_modules/es-abstract/2020/ToNumber.js new file mode 100644 index 0000000000000..72853a986ef2f --- /dev/null +++ b/node_modules/es-abstract/2020/ToNumber.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var isPrimitive = require('../helpers/isPrimitive'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2020/ToNumeric.js b/node_modules/es-abstract/2020/ToNumeric.js new file mode 100644 index 0000000000000..140adb3975b21 --- /dev/null +++ b/node_modules/es-abstract/2020/ToNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); + +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var ToNumber = require('./ToNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-tonumeric + +module.exports = function ToNumeric(argument) { + var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (Type(primValue) === 'BigInt') { + return primValue; + } + return ToNumber(primValue); +}; diff --git a/node_modules/es-abstract/2020/ToObject.js b/node_modules/es-abstract/2020/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2020/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2020/ToPrimitive.js b/node_modules/es-abstract/2020/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2020/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2020/ToPropertyDescriptor.js b/node_modules/es-abstract/2020/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2020/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2020/ToPropertyKey.js b/node_modules/es-abstract/2020/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2020/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2020/ToString.js b/node_modules/es-abstract/2020/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2020/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2020/ToUint16.js b/node_modules/es-abstract/2020/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/2020/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2020/ToUint32.js b/node_modules/es-abstract/2020/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/2020/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2020/ToUint8.js b/node_modules/es-abstract/2020/ToUint8.js new file mode 100644 index 0000000000000..6e4e4b5add2ab --- /dev/null +++ b/node_modules/es-abstract/2020/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2020/ToUint8Clamp.js b/node_modules/es-abstract/2020/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2020/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2020/TrimString.js b/node_modules/es-abstract/2020/TrimString.js new file mode 100644 index 0000000000000..113dcf82b82d8 --- /dev/null +++ b/node_modules/es-abstract/2020/TrimString.js @@ -0,0 +1,29 @@ +'use strict'; + +var trimStart = require('string.prototype.trimstart'); +var trimEnd = require('string.prototype.trimend'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/10.0/#sec-trimstring + +module.exports = function TrimString(string, where) { + var str = RequireObjectCoercible(string); + var S = ToString(str); + var T; + if (where === 'start') { + T = trimStart(S); + } else if (where === 'end') { + T = trimEnd(S); + } else if (where === 'start+end') { + T = trimStart(trimEnd(S)); + } else { + throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"'); + } + return T; +}; diff --git a/node_modules/es-abstract/2020/Type.js b/node_modules/es-abstract/2020/Type.js new file mode 100644 index 0000000000000..555ca74ea5196 --- /dev/null +++ b/node_modules/es-abstract/2020/Type.js @@ -0,0 +1,15 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2020/TypedArrayCreate.js b/node_modules/es-abstract/2020/TypedArrayCreate.js new file mode 100644 index 0000000000000..ef9fbe2599495 --- /dev/null +++ b/node_modules/es-abstract/2020/TypedArrayCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var availableTypedArrays = require('available-typed-arrays')(); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/7.0/#typedarray-create + +module.exports = function TypedArrayCreate(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + ValidateTypedArray(newTypedArray); // step 2 + + if (argumentList.length === 1 && Type(argumentList[0]) === 'Number') { // step 3 + if (typedArrayLength(newTypedArray) < argumentList[0]) { + throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a + } + } + + return newTypedArray; // step 4 +}; diff --git a/node_modules/es-abstract/2020/TypedArraySpeciesCreate.js b/node_modules/es-abstract/2020/TypedArraySpeciesCreate.js new file mode 100644 index 0000000000000..2bfdff5eb705c --- /dev/null +++ b/node_modules/es-abstract/2020/TypedArraySpeciesCreate.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var SpeciesConstructor = require('./SpeciesConstructor'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/7.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreate(constructor, argumentList); // step 4 +}; diff --git a/node_modules/es-abstract/2020/UTF16DecodeString.js b/node_modules/es-abstract/2020/UTF16DecodeString.js new file mode 100644 index 0000000000000..8e27a21e81058 --- /dev/null +++ b/node_modules/es-abstract/2020/UTF16DecodeString.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $push = callBound('Array.prototype.push'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-utf16decodestring + +module.exports = function UTF16DecodeString(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var codePoints = []; + var size = string.length; + var position = 0; + while (position < size) { + var cp = CodePointAt(string, position); + $push(codePoints, cp['[[CodePoint]]']); + position += cp['[[CodeUnitCount]]']; + } + return codePoints; +}; diff --git a/node_modules/es-abstract/2020/UTF16DecodeSurrogatePair.js b/node_modules/es-abstract/2020/UTF16DecodeSurrogatePair.js new file mode 100644 index 0000000000000..2632e654cb8a6 --- /dev/null +++ b/node_modules/es-abstract/2020/UTF16DecodeSurrogatePair.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair + +module.exports = function UTF16DecodeSurrogatePair(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2020/UTF16Encoding.js b/node_modules/es-abstract/2020/UTF16Encoding.js new file mode 100644 index 0000000000000..f381595fd70d6 --- /dev/null +++ b/node_modules/es-abstract/2020/UTF16Encoding.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/7.0/#sec-utf16encoding + +module.exports = function UTF16Encoding(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = floor((cp - 65536) / 1024) + 0xD800; + var cu2 = modulo(cp - 65536, 1024) + 0xDC00; + return $fromCharCode(cu1) + $fromCharCode(cu2); +}; diff --git a/node_modules/es-abstract/2020/UnicodeEscape.js b/node_modules/es-abstract/2020/UnicodeEscape.js new file mode 100644 index 0000000000000..b708c90df0a05 --- /dev/null +++ b/node_modules/es-abstract/2020/UnicodeEscape.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); + +var StringPad = require('./StringPad'); + +// https://262.ecma-international.org/11.0/#sec-unicodeescape + +module.exports = function UnicodeEscape(C) { + if (typeof C !== 'string' || C.length !== 1) { + throw new $TypeError('Assertion failed: `C` must be a single code unit'); + } + var n = $charCodeAt(C, 0); + if (n > 0xFFFF) { + throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF'); + } + + return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2020/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2020/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..134b2d5c367c4 --- /dev/null +++ b/node_modules/es-abstract/2020/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,170 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor +// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + if (oType !== 'Undefined' && !IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); + } + if (Type(current) === 'Undefined') { + if (!extensible) { + return false; + } + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': Desc['[[Configurable]]'], + '[[Enumerable]]': Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': Desc['[[Writable]]'] + } + ); + } + } else { + if (!IsAccessorDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + } + return true; + } + if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { + return true; + } + if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) { + return true; // removed by ES2017, but should still be correct + } + // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor + if (!current['[[Configurable]]']) { + if (Desc['[[Configurable]]']) { + return false; + } + if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { + return false; + } + } + if (IsGenericDescriptor(Desc)) { + // no further validation is required. + } else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + return false; + } + if (IsDataDescriptor(current)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Get]]': undefined + } + ); + } + } else if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Value]]': undefined + } + ); + } + } else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]'] && !current['[[Writable]]']) { + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + return true; + } + } else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + return true; + } + } else { + throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + return true; +}; diff --git a/node_modules/es-abstract/2020/ValidateAtomicAccess.js b/node_modules/es-abstract/2020/ValidateAtomicAccess.js new file mode 100644 index 0000000000000..e1c51c7768df5 --- /dev/null +++ b/node_modules/es-abstract/2020/ValidateAtomicAccess.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/8.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var accessIndex = ToIndex(requestIndex); // step 2 + + var length = typedArrayLength(typedArray); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + return accessIndex; // step 6 +}; diff --git a/node_modules/es-abstract/2020/ValidateTypedArray.js b/node_modules/es-abstract/2020/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2020/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2020/WeekDay.js b/node_modules/es-abstract/2020/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2020/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2020/WordCharacters.js b/node_modules/es-abstract/2020/WordCharacters.js new file mode 100644 index 0000000000000..aeebc1e75cbc7 --- /dev/null +++ b/node_modules/es-abstract/2020/WordCharacters.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $indexOf = callBound('String.prototype.indexOf', true); + +var Canonicalize = require('./Canonicalize'); +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1 + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation + +module.exports = function WordCharacters(IgnoreCase, Unicode) { + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + var U = ''; + forEach(OwnPropertyKeys(caseFolding.C), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.C[c]; // step 3 + } + }); + forEach(OwnPropertyKeys(caseFolding.S), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.S[c]; // step 3 + } + }); + + if ((!Unicode || !IgnoreCase) && U.length > 0) { + throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4 + } + + return A + U; // step 5, 6 +}; diff --git a/node_modules/es-abstract/2020/YearFromTime.js b/node_modules/es-abstract/2020/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2020/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2020/abs.js b/node_modules/es-abstract/2020/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2020/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2020/floor.js b/node_modules/es-abstract/2020/floor.js new file mode 100644 index 0000000000000..625548e936b95 --- /dev/null +++ b/node_modules/es-abstract/2020/floor.js @@ -0,0 +1,16 @@ +'use strict'; + +var Type = require('./Type'); + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (Type(x) === 'BigInt') { + return x; + } + return $floor(x); +}; diff --git a/node_modules/es-abstract/2020/max.js b/node_modules/es-abstract/2020/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2020/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2020/min.js b/node_modules/es-abstract/2020/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2020/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2020/modulo.js b/node_modules/es-abstract/2020/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2020/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2020/msFromTime.js b/node_modules/es-abstract/2020/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2020/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2020/thisBigIntValue.js b/node_modules/es-abstract/2020/thisBigIntValue.js new file mode 100644 index 0000000000000..d03b4a43c3c51 --- /dev/null +++ b/node_modules/es-abstract/2020/thisBigIntValue.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-thisbigintvalue + +module.exports = function thisBigIntValue(value) { + var type = Type(value); + if (type === 'BigInt') { + return value; + } + if (!$bigIntValueOf) { + throw new $SyntaxError('BigInt is not supported'); + } + return $bigIntValueOf(value); +}; diff --git a/node_modules/es-abstract/2020/thisBooleanValue.js b/node_modules/es-abstract/2020/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2020/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2020/thisNumberValue.js b/node_modules/es-abstract/2020/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2020/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2020/thisStringValue.js b/node_modules/es-abstract/2020/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2020/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2020/thisSymbolValue.js b/node_modules/es-abstract/2020/thisSymbolValue.js new file mode 100644 index 0000000000000..91a55254283b8 --- /dev/null +++ b/node_modules/es-abstract/2020/thisSymbolValue.js @@ -0,0 +1,19 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-thissymbolvalue + +module.exports = function thisSymbolValue(value) { + if (!$SymbolValueOf) { + throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); + } + if (Type(value) === 'Symbol') { + return value; + } + return $SymbolValueOf(value); +}; diff --git a/node_modules/es-abstract/2020/thisTimeValue.js b/node_modules/es-abstract/2020/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2020/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2021/AbstractEqualityComparison.js b/node_modules/es-abstract/2021/AbstractEqualityComparison.js new file mode 100644 index 0000000000000..871a84fa82232 --- /dev/null +++ b/node_modules/es-abstract/2021/AbstractEqualityComparison.js @@ -0,0 +1,57 @@ +'use strict'; + +var StrictEqualityComparison = require('./StrictEqualityComparison'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/11.0/#sec-abstract-equality-comparison + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return StrictEqualityComparison(x, y); + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'BigInt' && yType === 'String') { + var n = StringToBigInt(y); + if (isNaN(n)) { + return false; + } + return AbstractEqualityComparison(x, n); + } + if (xType === 'String' && yType === 'BigInt') { + return AbstractEqualityComparison(y, x); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'BigInt' || xType === 'Symbol') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'BigInt' || yType === 'Symbol')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + if ((xType === 'BigInt' && yType === 'Number') || (xType === 'Number' && yType === 'BigInt')) { + if (isNaN(x) || isNaN(y) || x === Infinity || y === Infinity || x === -Infinity || y === -Infinity) { + return false; + } + return x == y; // eslint-disable-line eqeqeq + } + return false; +}; diff --git a/node_modules/es-abstract/2021/AbstractRelationalComparison.js b/node_modules/es-abstract/2021/AbstractRelationalComparison.js new file mode 100644 index 0000000000000..9076d71e267f3 --- /dev/null +++ b/node_modules/es-abstract/2021/AbstractRelationalComparison.js @@ -0,0 +1,82 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); + +var IsStringPrefix = require('./IsStringPrefix'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var BigIntLessThan = require('./BigInt/lessThan'); +var NumberLessThan = require('./Number/lessThan'); + +// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + if (Type(px) === 'String' && Type(py) === 'String') { + if (IsStringPrefix(py, px)) { + return false; + } + if (IsStringPrefix(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + + var pxType = Type(px); + var pyType = Type(py); + var nx; + var ny; + if (pxType === 'BigInt' && pyType === 'String') { + ny = StringToBigInt(py); + if ($isNaN(ny)) { + return void undefined; + } + return BigIntLessThan(px, ny); + } + if (pxType === 'String' && pyType === 'BigInt') { + nx = StringToBigInt(px); + if ($isNaN(nx)) { + return void undefined; + } + return BigIntLessThan(nx, py); + } + + nx = ToNumeric(px); + ny = ToNumeric(py); + var nxType = Type(nx); + if (nxType === Type(ny)) { + return nxType === 'Number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); + } + + if ($isNaN(nx) || $isNaN(ny)) { + return void undefined; + } + if (nx === -Infinity || ny === Infinity) { + return true; + } + if (nx === Infinity || ny === -Infinity) { + return false; + } + + return nx < ny; // by now, these are both nonzero, finite, and not equal +}; diff --git a/node_modules/es-abstract/2021/AddEntriesFromIterable.js b/node_modules/es-abstract/2021/AddEntriesFromIterable.js new file mode 100644 index 0000000000000..5bea627fb5160 --- /dev/null +++ b/node_modules/es-abstract/2021/AddEntriesFromIterable.js @@ -0,0 +1,47 @@ +'use strict'; + +var inspect = require('object-inspect'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var GetIterator = require('./GetIterator'); +var IsCallable = require('./IsCallable'); +var IteratorClose = require('./IteratorClose'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var ThrowCompletion = require('./ThrowCompletion'); +var Type = require('./Type'); + +// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable + +module.exports = function AddEntriesFromIterable(target, iterable, adder) { + if (!IsCallable(adder)) { + throw new $TypeError('Assertion failed: `adder` is not callable'); + } + if (iterable == null) { + throw new $TypeError('Assertion failed: `iterable` is present, and not nullish'); + } + var iteratorRecord = GetIterator(iterable); + while (true) { // eslint-disable-line no-constant-condition + var next = IteratorStep(iteratorRecord); + if (!next) { + return target; + } + var nextItem = IteratorValue(next); + if (Type(nextItem) !== 'Object') { + var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem))); + return IteratorClose(iteratorRecord, error); + } + try { + var k = Get(nextItem, '0'); + var v = Get(nextItem, '1'); + Call(adder, target, [k, v]); + } catch (e) { + return IteratorClose(iteratorRecord, ThrowCompletion(e)); + } + } +}; diff --git a/node_modules/es-abstract/2021/AddToKeptObjects.js b/node_modules/es-abstract/2021/AddToKeptObjects.js new file mode 100644 index 0000000000000..a2495ba8faba0 --- /dev/null +++ b/node_modules/es-abstract/2021/AddToKeptObjects.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var SLOT = require('internal-slot'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ClearKeptObjects = require('./ClearKeptObjects'); +var Type = require('./Type'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/12.0/#sec-addtokeptobjects + +module.exports = function AddToKeptObjects(object) { + if (Type(object) !== 'Object') { + throw new $TypeError('Assertion failed: `object` must be an Object'); + } + $push(SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]'), object); +}; diff --git a/node_modules/es-abstract/2021/AdvanceStringIndex.js b/node_modules/es-abstract/2021/AdvanceStringIndex.js new file mode 100644 index 0000000000000..4a0f499aa592d --- /dev/null +++ b/node_modules/es-abstract/2021/AdvanceStringIndex.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/12.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + var cp = CodePointAt(S, index); + return index + cp['[[CodeUnitCount]]']; +}; diff --git a/node_modules/es-abstract/2021/ApplyStringOrNumericBinaryOperator.js b/node_modules/es-abstract/2021/ApplyStringOrNumericBinaryOperator.js new file mode 100644 index 0000000000000..e5f997a39d09a --- /dev/null +++ b/node_modules/es-abstract/2021/ApplyStringOrNumericBinaryOperator.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var HasOwnProperty = require('./HasOwnProperty'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var NumberAdd = require('./Number/add'); +var NumberBitwiseAND = require('./Number/bitwiseAND'); +var NumberBitwiseOR = require('./Number/bitwiseOR'); +var NumberBitwiseXOR = require('./Number/bitwiseXOR'); +var NumberDivide = require('./Number/divide'); +var NumberExponentiate = require('./Number/exponentiate'); +var NumberLeftShift = require('./Number/leftShift'); +var NumberMultiply = require('./Number/multiply'); +var NumberRemainder = require('./Number/remainder'); +var NumberSignedRightShift = require('./Number/signedRightShift'); +var NumberSubtract = require('./Number/subtract'); +var NumberUnsignedRightShift = require('./Number/unsignedRightShift'); +var BigIntAdd = require('./BigInt/add'); +var BigIntBitwiseAND = require('./BigInt/bitwiseAND'); +var BigIntBitwiseOR = require('./BigInt/bitwiseOR'); +var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR'); +var BigIntDivide = require('./BigInt/divide'); +var BigIntExponentiate = require('./BigInt/exponentiate'); +var BigIntLeftShift = require('./BigInt/leftShift'); +var BigIntMultiply = require('./BigInt/multiply'); +var BigIntRemainder = require('./BigInt/remainder'); +var BigIntSignedRightShift = require('./BigInt/signedRightShift'); +var BigIntSubtract = require('./BigInt/subtract'); +var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift'); + +// https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator + +// https://262.ecma-international.org/12.0/#step-applystringornumericbinaryoperator-operations-table +var table = { + '**': [NumberExponentiate, BigIntExponentiate], + '*': [NumberMultiply, BigIntMultiply], + '/': [NumberDivide, BigIntDivide], + '%': [NumberRemainder, BigIntRemainder], + '+': [NumberAdd, BigIntAdd], + '-': [NumberSubtract, BigIntSubtract], + '<<': [NumberLeftShift, BigIntLeftShift], + '>>': [NumberSignedRightShift, BigIntSignedRightShift], + '>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift], + '&': [NumberBitwiseAND, BigIntBitwiseAND], + '^': [NumberBitwiseXOR, BigIntBitwiseXOR], + '|': [NumberBitwiseOR, BigIntBitwiseOR] +}; + +module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) { + if (Type(opText) !== 'String' || !HasOwnProperty(table, opText)) { + throw new $TypeError('Assertion failed: `opText` must be a valid operation string'); + } + if (opText === '+') { + var lprim = ToPrimitive(lval); + var rprim = ToPrimitive(rval); + if (Type(lprim) === 'String' || Type(rprim) === 'String') { + var lstr = ToString(lprim); + var rstr = ToString(rprim); + return lstr + rstr; + } + /* eslint no-param-reassign: 1 */ + lval = lprim; + rval = rprim; + } + var lnum = ToNumeric(lval); + var rnum = ToNumeric(rval); + var T = Type(lnum); + if (T !== Type(rnum)) { + throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ'); + } + var Operation = table[opText][T === 'BigInt' ? 1 : 0]; + return Operation(lnum, rnum); +}; diff --git a/node_modules/es-abstract/2021/ArrayCreate.js b/node_modules/es-abstract/2021/ArrayCreate.js new file mode 100644 index 0000000000000..e33224517e289 --- /dev/null +++ b/node_modules/es-abstract/2021/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var hasProto = require('has-proto')(); + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/12.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 3, 5 + if (proto !== $ArrayPrototype) { // step 4 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 6 + A.length = length; + } + /* step 6, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2021/ArraySetLength.js b/node_modules/es-abstract/2021/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2021/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2021/ArraySpeciesCreate.js b/node_modules/es-abstract/2021/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..7b1fd1d27a754 --- /dev/null +++ b/node_modules/es-abstract/2021/ArraySpeciesCreate.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ArrayCreate = require('./ArrayCreate'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/12.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + + var isArray = IsArray(originalArray); + if (!isArray) { + return ArrayCreate(length); + } + + var C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + + if (typeof C === 'undefined') { + return ArrayCreate(length); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(length); // Construct(C, length); +}; + diff --git a/node_modules/es-abstract/2021/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2021/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 0000000000000..5618539dd6fb0 --- /dev/null +++ b/node_modules/es-abstract/2021/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2021/AsyncIteratorClose.js b/node_modules/es-abstract/2021/AsyncIteratorClose.js new file mode 100644 index 0000000000000..1ae42c0c5f76e --- /dev/null +++ b/node_modules/es-abstract/2021/AsyncIteratorClose.js @@ -0,0 +1,68 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/12.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return $then( + $then( + $then( + new $Promise(function (resolve) { + resolve(GetMethod(iterator, 'return')); // step 4 + // resolve(Call(ret, iterator, [])); // step 6 + }), + function (returnV) { // step 5.a + if (typeof returnV === 'undefined') { + return completion; // step 5.b + } + return Call(returnV, iterator); // step 5.c, 5.d. + } + ), + null, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } else { + throw e; // step 7 + } + } + ), + function (innerResult) { // step 8 + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + } + ); +}; diff --git a/node_modules/es-abstract/2021/BigInt/add.js b/node_modules/es-abstract/2021/BigInt/add.js new file mode 100644 index 0000000000000..22b5db4b32d2c --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/add.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add + +module.exports = function BigIntAdd(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/bitwiseAND.js b/node_modules/es-abstract/2021/BigInt/bitwiseAND.js new file mode 100644 index 0000000000000..83cd2c3ca9edc --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND + +module.exports = function BigIntBitwiseAND(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/bitwiseNOT.js b/node_modules/es-abstract/2021/BigInt/bitwiseNOT.js new file mode 100644 index 0000000000000..9a444dfeab8d6 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/bitwiseNOT.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT + +module.exports = function BigIntBitwiseNOT(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + return -x - $BigInt(1); +}; diff --git a/node_modules/es-abstract/2021/BigInt/bitwiseOR.js b/node_modules/es-abstract/2021/BigInt/bitwiseOR.js new file mode 100644 index 0000000000000..3c1b57193ef48 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR + +module.exports = function BigIntBitwiseOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/bitwiseXOR.js b/node_modules/es-abstract/2021/BigInt/bitwiseXOR.js new file mode 100644 index 0000000000000..45f8217efb83c --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR + +module.exports = function BigIntBitwiseXOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/divide.js b/node_modules/es-abstract/2021/BigInt/divide.js new file mode 100644 index 0000000000000..5706e7d72e424 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide + +module.exports = function BigIntDivide(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + if (y === $BigInt(0)) { + throw new $RangeError('Division by zero'); + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/equal.js b/node_modules/es-abstract/2021/BigInt/equal.js new file mode 100644 index 0000000000000..a28826d67ff75 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/equal.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal + +module.exports = function BigIntEqual(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/exponentiate.js b/node_modules/es-abstract/2021/BigInt/exponentiate.js new file mode 100644 index 0000000000000..2365838c269b6 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/exponentiate.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate + +module.exports = function BigIntExponentiate(base, exponent) { + if (Type(base) !== 'BigInt' || Type(exponent) !== 'BigInt') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts'); + } + if (exponent < $BigInt(0)) { + throw new $RangeError('Exponent must be positive'); + } + if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) { + return $BigInt(1); + } + + var square = base; + var remaining = exponent; + while (remaining > $BigInt(0)) { + square += exponent; + --remaining; // eslint-disable-line no-plusplus + } + return square; +}; diff --git a/node_modules/es-abstract/2021/BigInt/index.js b/node_modules/es-abstract/2021/BigInt/index.js new file mode 100644 index 0000000000000..63ec52da69e28 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2021/BigInt/leftShift.js b/node_modules/es-abstract/2021/BigInt/leftShift.js new file mode 100644 index 0000000000000..d2a570223e22c --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/leftShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift + +module.exports = function BigIntLeftShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x << y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/lessThan.js b/node_modules/es-abstract/2021/BigInt/lessThan.js new file mode 100644 index 0000000000000..0b3cd6ba029e8 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/lessThan.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan + +module.exports = function BigIntLessThan(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/multiply.js b/node_modules/es-abstract/2021/BigInt/multiply.js new file mode 100644 index 0000000000000..6e5d56c83ea0b --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/multiply.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply + +module.exports = function BigIntMultiply(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/remainder.js b/node_modules/es-abstract/2021/BigInt/remainder.js new file mode 100644 index 0000000000000..d2dc678caf6bd --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/remainder.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (Type(n) !== 'BigInt' || Type(d) !== 'BigInt') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; diff --git a/node_modules/es-abstract/2021/BigInt/sameValue.js b/node_modules/es-abstract/2021/BigInt/sameValue.js new file mode 100644 index 0000000000000..63ff06393bba6 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/sameValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue + +module.exports = function BigIntSameValue(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/sameValueZero.js b/node_modules/es-abstract/2021/BigInt/sameValueZero.js new file mode 100644 index 0000000000000..39f262c6da2f2 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/sameValueZero.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero + +module.exports = function BigIntSameValueZero(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/signedRightShift.js b/node_modules/es-abstract/2021/BigInt/signedRightShift.js new file mode 100644 index 0000000000000..f63c642f0cda7 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/signedRightShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntLeftShift = require('./leftShift'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift + +module.exports = function BigIntSignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntLeftShift(x, -y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/subtract.js b/node_modules/es-abstract/2021/BigInt/subtract.js new file mode 100644 index 0000000000000..0490784f679cd --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/subtract.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract + +module.exports = function BigIntSubtract(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x - y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/toString.js b/node_modules/es-abstract/2021/BigInt/toString.js new file mode 100644 index 0000000000000..858d95545475e --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring + +module.exports = function BigIntToString(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` must be a BigInt'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2021/BigInt/unaryMinus.js b/node_modules/es-abstract/2021/BigInt/unaryMinus.js new file mode 100644 index 0000000000000..ee0f7ef1962c3 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/unaryMinus.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus + +module.exports = function BigIntUnaryMinus(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + + if (x === zero) { + return zero; + } + + return -x; +}; diff --git a/node_modules/es-abstract/2021/BigInt/unsignedRightShift.js b/node_modules/es-abstract/2021/BigInt/unsignedRightShift.js new file mode 100644 index 0000000000000..7ad94f7a88d5f --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/unsignedRightShift.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift + +module.exports = function BigIntUnsignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + throw new $TypeError('BigInts have no unsigned right shift, use >> instead'); +}; diff --git a/node_modules/es-abstract/2021/BigIntBitwiseOp.js b/node_modules/es-abstract/2021/BigIntBitwiseOp.js new file mode 100644 index 0000000000000..0b1c03a911b68 --- /dev/null +++ b/node_modules/es-abstract/2021/BigIntBitwiseOp.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +// var $BigInt = GetIntrinsic('%BigInt%', true); +// var $pow = GetIntrinsic('%Math.pow%'); + +// var BinaryAnd = require('./BinaryAnd'); +// var BinaryOr = require('./BinaryOr'); +// var BinaryXor = require('./BinaryXor'); +var Type = require('./Type'); +// var modulo = require('./modulo'); + +// var zero = $BigInt && $BigInt(0); +// var negOne = $BigInt && $BigInt(-1); +// var two = $BigInt && $BigInt(2); + +// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop + +module.exports = function BigIntBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('`x` and `y` must be BigInts'); + } + + if (op === '&') { + return x & y; + } + if (op === '|') { + return x | y; + } + return x ^ y; + /* + var result = zero; + var shift = 0; + while (x !== zero && x !== negOne && y !== zero && y !== negOne) { + var xDigit = modulo(x, two); + var yDigit = modulo(y, two); + if (op === '&') { + result += $pow(2, shift) * BinaryAnd(xDigit, yDigit); + } else if (op === '|') { + result += $pow(2, shift) * BinaryOr(xDigit, yDigit); + } else if (op === '^') { + result += $pow(2, shift) * BinaryXor(xDigit, yDigit); + } + shift += 1; + x = (x - xDigit) / two; + y = (y - yDigit) / two; + } + var tmp; + if (op === '&') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else if (op === '|') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else { + tmp = BinaryXor(modulo(x, two), modulo(y, two)); + } + if (tmp !== 0) { + result -= $pow(2, shift); + } + return result; + */ +}; diff --git a/node_modules/es-abstract/2021/BinaryAnd.js b/node_modules/es-abstract/2021/BinaryAnd.js new file mode 100644 index 0000000000000..c617f388dea72 --- /dev/null +++ b/node_modules/es-abstract/2021/BinaryAnd.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryand + +module.exports = function BinaryAnd(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x & y; +}; diff --git a/node_modules/es-abstract/2021/BinaryOr.js b/node_modules/es-abstract/2021/BinaryOr.js new file mode 100644 index 0000000000000..6de0955f1a6d3 --- /dev/null +++ b/node_modules/es-abstract/2021/BinaryOr.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryor + +module.exports = function BinaryOr(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x | y; +}; diff --git a/node_modules/es-abstract/2021/BinaryXor.js b/node_modules/es-abstract/2021/BinaryXor.js new file mode 100644 index 0000000000000..189d7d8469ce1 --- /dev/null +++ b/node_modules/es-abstract/2021/BinaryXor.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryxor + +module.exports = function BinaryXor(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x ^ y; +}; diff --git a/node_modules/es-abstract/2021/ByteListBitwiseOp.js b/node_modules/es-abstract/2021/ByteListBitwiseOp.js new file mode 100644 index 0000000000000..67f4cecb59bac --- /dev/null +++ b/node_modules/es-abstract/2021/ByteListBitwiseOp.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $push = callBound('Array.prototype.push'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop + +module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) { + if (op !== '&' && op !== '^' && op !== '|') { + throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`'); + } + if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + + var result = []; + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + var resultByte; + if (op === '&') { + resultByte = xByte & yByte; + } else if (op === '^') { + resultByte = xByte ^ yByte; + } else { + resultByte = xByte | yByte; + } + $push(result, resultByte); + } + + return result; +}; diff --git a/node_modules/es-abstract/2021/ByteListEqual.js b/node_modules/es-abstract/2021/ByteListEqual.js new file mode 100644 index 0000000000000..489ddc224e667 --- /dev/null +++ b/node_modules/es-abstract/2021/ByteListEqual.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://262.ecma-international.org/12.0/#sec-bytelistequal + +module.exports = function ByteListEqual(xBytes, yBytes) { + if (!IsArray(xBytes) || !IsArray(yBytes)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + + if (xBytes.length !== yBytes.length) { + return false; + } + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + if (xByte !== yByte) { + return false; + } + } + return true; +}; diff --git a/node_modules/es-abstract/2021/Call.js b/node_modules/es-abstract/2021/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2021/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2021/CanonicalNumericIndexString.js b/node_modules/es-abstract/2021/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2021/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2021/Canonicalize.js b/node_modules/es-abstract/2021/Canonicalize.js new file mode 100644 index 0000000000000..49741831a618d --- /dev/null +++ b/node_modules/es-abstract/2021/Canonicalize.js @@ -0,0 +1,55 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(ch, IgnoreCase, Unicode) { + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + if (Unicode) { // step 2 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 2.b + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/2021/CharacterRange.js b/node_modules/es-abstract/2021/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2021/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2021/ClearKeptObjects.js b/node_modules/es-abstract/2021/ClearKeptObjects.js new file mode 100644 index 0000000000000..50bd4a5da4199 --- /dev/null +++ b/node_modules/es-abstract/2021/ClearKeptObjects.js @@ -0,0 +1,12 @@ +'use strict'; + +var SLOT = require('internal-slot'); +var keptObjects = []; + +// https://262.ecma-international.org/12.0/#sec-clear-kept-objects + +module.exports = function ClearKeptObjects() { + keptObjects.length = 0; +}; + +SLOT.set(module.exports, '[[es-abstract internal: KeptAlive]]', keptObjects); diff --git a/node_modules/es-abstract/2021/CloneArrayBuffer.js b/node_modules/es-abstract/2021/CloneArrayBuffer.js new file mode 100644 index 0000000000000..d03e91f86470f --- /dev/null +++ b/node_modules/es-abstract/2021/CloneArrayBuffer.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsConstructor = require('./IsConstructor'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var OrdinarySetPrototypeOf = require('./OrdinarySetPrototypeOf'); + +var isInteger = require('../helpers/isInteger'); + +var isArrayBuffer = require('is-array-buffer'); +var arrayBufferSlice = require('arraybuffer.prototype.slice'); + +// https://262.ecma-international.org/12.0/#sec-clonearraybuffer + +module.exports = function CloneArrayBuffer(srcBuffer, srcByteOffset, srcLength, cloneConstructor) { + if (!isArrayBuffer(srcBuffer)) { + throw new $TypeError('Assertion failed: `srcBuffer` must be an ArrayBuffer instance'); + } + if (!isInteger(srcByteOffset) || srcByteOffset < 0) { + throw new $TypeError('Assertion failed: `srcByteOffset` must be a non-negative integer'); + } + if (!isInteger(srcLength) || srcLength < 0) { + throw new $TypeError('Assertion failed: `srcLength` must be a non-negative integer'); + } + if (!IsConstructor(cloneConstructor)) { + throw new $TypeError('Assertion failed: `cloneConstructor` must be a constructor'); + } + + // 3. Let targetBuffer be ? AllocateArrayBuffer(cloneConstructor, srcLength). + var proto = GetPrototypeFromConstructor(cloneConstructor, '%ArrayBufferPrototype%'); // step 3, kinda + + if (IsDetachedBuffer(srcBuffer)) { + throw new $TypeError('`srcBuffer` must not be a detached ArrayBuffer'); // step 4 + } + + /* + 5. Let srcBlock be srcBuffer.[[ArrayBufferData]]. + 6. Let targetBlock be targetBuffer.[[ArrayBufferData]]. + 7. Perform CopyDataBlockBytes(targetBlock, 0, srcBlock, srcByteOffset, srcLength). + */ + var targetBuffer = arrayBufferSlice(srcBuffer, srcByteOffset, srcByteOffset + srcLength); // steps 5-7 + OrdinarySetPrototypeOf(targetBuffer, proto); // step 3 + + return targetBuffer; // step 8 +}; diff --git a/node_modules/es-abstract/2021/CodePointAt.js b/node_modules/es-abstract/2021/CodePointAt.js new file mode 100644 index 0000000000000..e1e22905a4f92 --- /dev/null +++ b/node_modules/es-abstract/2021/CodePointAt.js @@ -0,0 +1,58 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var callBound = require('call-bind/callBound'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var Type = require('./Type'); +var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint'); + +var $charAt = callBound('String.prototype.charAt'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/12.0/#sec-codepointat + +module.exports = function CodePointAt(string, position) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var size = string.length; + if (position < 0 || position >= size) { + throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`'); + } + var first = $charCodeAt(string, position); + var cp = $charAt(string, position); + var firstIsLeading = isLeadingSurrogate(first); + var firstIsTrailing = isTrailingSurrogate(first); + if (!firstIsLeading && !firstIsTrailing) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': false + }; + } + if (firstIsTrailing || (position + 1 === size)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + var second = $charCodeAt(string, position + 1); + if (!isTrailingSurrogate(second)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + + return { + '[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second), + '[[CodeUnitCount]]': 2, + '[[IsUnpairedSurrogate]]': false + }; +}; diff --git a/node_modules/es-abstract/2021/CodePointsToString.js b/node_modules/es-abstract/2021/CodePointsToString.js new file mode 100644 index 0000000000000..6d7cd854b9d85 --- /dev/null +++ b/node_modules/es-abstract/2021/CodePointsToString.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); +var IsArray = require('./IsArray'); + +var forEach = require('../helpers/forEach'); +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/12.0/#sec-codepointstostring + +module.exports = function CodePointsToString(text) { + if (!IsArray(text)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + var result = ''; + forEach(text, function (cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + result += UTF16EncodeCodePoint(cp); + }); + return result; +}; diff --git a/node_modules/es-abstract/2021/CompletePropertyDescriptor.js b/node_modules/es-abstract/2021/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2021/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2021/CompletionRecord.js b/node_modules/es-abstract/2021/CompletionRecord.js new file mode 100644 index 0000000000000..370a5677f378e --- /dev/null +++ b/node_modules/es-abstract/2021/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2021/CopyDataProperties.js b/node_modules/es-abstract/2021/CopyDataProperties.js new file mode 100644 index 0000000000000..18723f9d0d22d --- /dev/null +++ b/node_modules/es-abstract/2021/CopyDataProperties.js @@ -0,0 +1,70 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var every = require('../helpers/every'); +var some = require('../helpers/some'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-copydataproperties + +module.exports = function CopyDataProperties(target, source, excludedItems) { + if (Type(target) !== 'Object') { + throw new $TypeError('Assertion failed: "target" must be an Object'); + } + + if (!IsArray(excludedItems) || !every(excludedItems, IsPropertyKey)) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + + if (typeof source === 'undefined' || source === null) { + return target; + } + + var from = ToObject(source); + + var keys = OwnPropertyKeys(from); + forEach(keys, function (nextKey) { + var excluded = some(excludedItems, function (e) { + return SameValue(e, nextKey) === true; + }); + /* + var excluded = false; + + forEach(excludedItems, function (e) { + if (SameValue(e, nextKey) === true) { + excluded = true; + } + }); + */ + + var enumerable = $isEnumerable(from, nextKey) || ( + // this is to handle string keys being non-enumerable in older engines + typeof source === 'string' + && nextKey >= 0 + && IsIntegralNumber(ToNumber(nextKey)) + ); + if (excluded === false && enumerable) { + var propValue = Get(from, nextKey); + CreateDataPropertyOrThrow(target, nextKey, propValue); + } + }); + + return target; +}; diff --git a/node_modules/es-abstract/2021/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2021/CreateAsyncFromSyncIterator.js new file mode 100644 index 0000000000000..64540dd6e3d71 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2021/CreateDataProperty.js b/node_modules/es-abstract/2021/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2021/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2021/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..c40e69368b91d --- /dev/null +++ b/node_modules/es-abstract/2021/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2021/CreateHTML.js b/node_modules/es-abstract/2021/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2021/CreateIterResultObject.js b/node_modules/es-abstract/2021/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2021/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2021/CreateListFromArrayLike.js b/node_modules/es-abstract/2021/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..7592307eb13a4 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateListFromArrayLike.js @@ -0,0 +1,46 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object']; + +// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike + +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = LengthOfArrayLike(obj); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2021/CreateMethodProperty.js b/node_modules/es-abstract/2021/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2021/CreateRegExpStringIterator.js b/node_modules/es-abstract/2021/CreateRegExpStringIterator.js new file mode 100644 index 0000000000000..cdfae56216ba7 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateRegExpStringIterator.js @@ -0,0 +1,100 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); +var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true); + +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var CreateMethodProperty = require('./CreateMethodProperty'); +var Get = require('./Get'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var RegExpExec = require('./RegExpExec'); +var Set = require('./Set'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); +var setToStringTag = require('es-set-tostringtag'); + +var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) { + if (Type(S) !== 'String') { + throw new $TypeError('`S` must be a string'); + } + if (Type(global) !== 'Boolean') { + throw new $TypeError('`global` must be a boolean'); + } + if (Type(fullUnicode) !== 'Boolean') { + throw new $TypeError('`fullUnicode` must be a boolean'); + } + SLOT.set(this, '[[IteratingRegExp]]', R); + SLOT.set(this, '[[IteratedString]]', S); + SLOT.set(this, '[[Global]]', global); + SLOT.set(this, '[[Unicode]]', fullUnicode); + SLOT.set(this, '[[Done]]', false); +}; + +if (IteratorPrototype) { + RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype); +} + +var RegExpStringIteratorNext = function next() { + var O = this; // eslint-disable-line no-invalid-this + if (Type(O) !== 'Object') { + throw new $TypeError('receiver must be an object'); + } + if ( + !(O instanceof RegExpStringIterator) + || !SLOT.has(O, '[[IteratingRegExp]]') + || !SLOT.has(O, '[[IteratedString]]') + || !SLOT.has(O, '[[Global]]') + || !SLOT.has(O, '[[Unicode]]') + || !SLOT.has(O, '[[Done]]') + ) { + throw new $TypeError('"this" value must be a RegExpStringIterator instance'); + } + if (SLOT.get(O, '[[Done]]')) { + return CreateIterResultObject(undefined, true); + } + var R = SLOT.get(O, '[[IteratingRegExp]]'); + var S = SLOT.get(O, '[[IteratedString]]'); + var global = SLOT.get(O, '[[Global]]'); + var fullUnicode = SLOT.get(O, '[[Unicode]]'); + var match = RegExpExec(R, S); + if (match === null) { + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(undefined, true); + } + if (global) { + var matchStr = ToString(Get(match, '0')); + if (matchStr === '') { + var thisIndex = ToLength(Get(R, 'lastIndex')); + var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode); + Set(R, 'lastIndex', nextIndex, true); + } + return CreateIterResultObject(match, false); + } + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(match, false); +}; +CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext); + +if (hasSymbols) { + setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator'); + + if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') { + var iteratorFn = function SymbolIterator() { + return this; + }; + CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn); + } +} + +// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator +module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) { + // assert R.global === global && R.unicode === fullUnicode? + return new RegExpStringIterator(R, S, global, fullUnicode); +}; diff --git a/node_modules/es-abstract/2021/DateFromTime.js b/node_modules/es-abstract/2021/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2021/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2021/DateString.js b/node_modules/es-abstract/2021/DateString.js new file mode 100644 index 0000000000000..939c14c0c87ef --- /dev/null +++ b/node_modules/es-abstract/2021/DateString.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var Type = require('./Type'); +var WeekDay = require('./WeekDay'); +var MonthFromTime = require('./MonthFromTime'); +var YearFromTime = require('./YearFromTime'); +var DateFromTime = require('./DateFromTime'); + +// https://262.ecma-international.org/9.0/#sec-datestring + +module.exports = function DateString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var weekday = weekdays[WeekDay(tv)]; + var month = months[MonthFromTime(tv)]; + var day = padTimeComponent(DateFromTime(tv)); + var year = padTimeComponent(YearFromTime(tv), 4); + return weekday + '\x20' + month + '\x20' + day + '\x20' + year; +}; diff --git a/node_modules/es-abstract/2021/Day.js b/node_modules/es-abstract/2021/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2021/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2021/DayFromYear.js b/node_modules/es-abstract/2021/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2021/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2021/DayWithinYear.js b/node_modules/es-abstract/2021/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2021/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2021/DaysInYear.js b/node_modules/es-abstract/2021/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2021/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2021/DefinePropertyOrThrow.js b/node_modules/es-abstract/2021/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2021/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2021/DeletePropertyOrThrow.js b/node_modules/es-abstract/2021/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2021/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2021/DetachArrayBuffer.js b/node_modules/es-abstract/2021/DetachArrayBuffer.js new file mode 100644 index 0000000000000..03284729b3d4e --- /dev/null +++ b/node_modules/es-abstract/2021/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2021/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2021/EnumerableOwnPropertyNames.js new file mode 100644 index 0000000000000..8e3177b6a1631 --- /dev/null +++ b/node_modules/es-abstract/2021/EnumerableOwnPropertyNames.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/8.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnPropertyNames(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2021/FlattenIntoArray.js b/node_modules/es-abstract/2021/FlattenIntoArray.js new file mode 100644 index 0000000000000..0fb87bc6a39b0 --- /dev/null +++ b/node_modules/es-abstract/2021/FlattenIntoArray.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var Call = require('./Call'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/11.0/#sec-flattenintoarray + +module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) { + var mapperFunction; + if (arguments.length > 5) { + mapperFunction = arguments[5]; + } + + var targetIndex = start; + var sourceIndex = 0; + while (sourceIndex < sourceLen) { + var P = ToString(sourceIndex); + var exists = HasProperty(source, P); + if (exists === true) { + var element = Get(source, P); + if (typeof mapperFunction !== 'undefined') { + if (arguments.length <= 6) { + throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); + } + element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]); + } + var shouldFlatten = false; + if (depth > 0) { + shouldFlatten = IsArray(element); + } + if (shouldFlatten) { + var elementLen = LengthOfArrayLike(element); + targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); + } else { + if (targetIndex >= MAX_SAFE_INTEGER) { + throw new $TypeError('index too large'); + } + CreateDataPropertyOrThrow(target, ToString(targetIndex), element); + targetIndex += 1; + } + } + sourceIndex += 1; + } + + return targetIndex; +}; diff --git a/node_modules/es-abstract/2021/FromPropertyDescriptor.js b/node_modules/es-abstract/2021/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2021/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2021/Get.js b/node_modules/es-abstract/2021/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2021/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2021/GetGlobalObject.js b/node_modules/es-abstract/2021/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2021/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2021/GetIterator.js b/node_modules/es-abstract/2021/GetIterator.js new file mode 100644 index 0000000000000..672454abdbff3 --- /dev/null +++ b/node_modules/es-abstract/2021/GetIterator.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true); + +var inspect = require('object-inspect'); +var hasSymbols = require('has-symbols')(); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-getiterator + +module.exports = function GetIterator(obj, hint, method) { + var actualHint = hint; + if (arguments.length < 2) { + actualHint = 'sync'; + } + if (actualHint !== 'sync' && actualHint !== 'async') { + throw new $TypeError("Assertion failed: `hint` must be one of 'sync' or 'async', got " + inspect(hint)); + } + + var actualMethod = method; + if (arguments.length < 3) { + if (actualHint === 'async') { + if (hasSymbols && $asyncIterator) { + actualMethod = GetMethod(obj, $asyncIterator); + } + if (actualMethod === undefined) { + throw new $SyntaxError("async from sync iterators aren't currently supported"); + } + } else { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; + + // TODO: This should return an IteratorRecord + /* + var nextMethod = GetV(iterator, 'next'); + return { + '[[Iterator]]': iterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; + */ +}; diff --git a/node_modules/es-abstract/2021/GetMethod.js b/node_modules/es-abstract/2021/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2021/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2021/GetOwnPropertyKeys.js b/node_modules/es-abstract/2021/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2021/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2021/GetPromiseResolve.js b/node_modules/es-abstract/2021/GetPromiseResolve.js new file mode 100644 index 0000000000000..f0db02617bc79 --- /dev/null +++ b/node_modules/es-abstract/2021/GetPromiseResolve.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/12.0/#sec-getpromiseresolve + +module.exports = function GetPromiseResolve(promiseConstructor) { + if (!IsConstructor(promiseConstructor)) { + throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor'); + } + var promiseResolve = Get(promiseConstructor, 'resolve'); + if (IsCallable(promiseResolve) === false) { + throw new $TypeError('`resolve` method is not callable'); + } + return promiseResolve; +}; diff --git a/node_modules/es-abstract/2021/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2021/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2021/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2021/GetSubstitution.js b/node_modules/es-abstract/2021/GetSubstitution.js new file mode 100644 index 0000000000000..9f2a02561850f --- /dev/null +++ b/node_modules/es-abstract/2021/GetSubstitution.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var every = require('../helpers/every'); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); +var $indexOf = callBound('String.prototype.indexOf'); +var $parseInt = parseInt; + +var isDigit = regexTester(/^[0-9]$/); + +var inspect = require('object-inspect'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// http://www.ecma-international.org/ecma-262/12.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-params, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + if (Type(namedCaptures) !== 'Undefined') { + namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign + } + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else if (next === '<') { + // eslint-disable-next-line max-depth + if (Type(namedCaptures) === 'Undefined') { + result += '$<'; + i += 2; + } else { + var endIndex = $indexOf(replacement, '>', i); + // eslint-disable-next-line max-depth + if (endIndex > -1) { + var groupName = $strSlice(replacement, i + '$<'.length, endIndex); + var capture = Get(namedCaptures, groupName); + // eslint-disable-next-line max-depth + if (Type(capture) !== 'Undefined') { + result += ToString(capture); + } + i += ('<' + groupName + '>').length; + } + } + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2021/GetV.js b/node_modules/es-abstract/2021/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2021/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2021/GetValueFromBuffer.js b/node_modules/es-abstract/2021/GetValueFromBuffer.js new file mode 100644 index 0000000000000..8d3a2f4fc5423 --- /dev/null +++ b/node_modules/es-abstract/2021/GetValueFromBuffer.js @@ -0,0 +1,110 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var RawBytesToNumeric = require('./RawBytesToNumeric'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table61 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $BigInt64: 8, + $BigUint64: 8, + $Float32: 4, + $Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); + +// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || typeof table61['$' + type] !== 'number') { + throw new $TypeError('Assertion failed: `type` must be a Typed Array element type'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (order !== 'SeqCst' && order !== 'Unordered') { + throw new $TypeError('Assertion failed: `order` must be either `SeqCst` or `Unordered`'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = table61['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "BigInt64", "BigUint64", "Float32", or "Float64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumeric(type, bytes, isLittleEndian); +}; diff --git a/node_modules/es-abstract/2021/HasOwnProperty.js b/node_modules/es-abstract/2021/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2021/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2021/HasProperty.js b/node_modules/es-abstract/2021/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2021/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2021/HourFromTime.js b/node_modules/es-abstract/2021/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2021/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2021/InLeapYear.js b/node_modules/es-abstract/2021/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2021/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2021/InstanceofOperator.js b/node_modules/es-abstract/2021/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2021/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2021/Invoke.js b/node_modules/es-abstract/2021/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2021/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2021/IsAccessorDescriptor.js b/node_modules/es-abstract/2021/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2021/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2021/IsArray.js b/node_modules/es-abstract/2021/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2021/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2021/IsBigIntElementType.js b/node_modules/es-abstract/2021/IsBigIntElementType.js new file mode 100644 index 0000000000000..e3f58a949b3ca --- /dev/null +++ b/node_modules/es-abstract/2021/IsBigIntElementType.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BigUint64' || type === 'BigInt64'; +}; diff --git a/node_modules/es-abstract/2021/IsCallable.js b/node_modules/es-abstract/2021/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2021/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2021/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2021/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..8bdaf3eb45d24 --- /dev/null +++ b/node_modules/es-abstract/2021/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2021/IsConcatSpreadable.js b/node_modules/es-abstract/2021/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2021/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2021/IsConstructor.js b/node_modules/es-abstract/2021/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2021/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2021/IsDataDescriptor.js b/node_modules/es-abstract/2021/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2021/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2021/IsDetachedBuffer.js b/node_modules/es-abstract/2021/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2021/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2021/IsExtensible.js b/node_modules/es-abstract/2021/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2021/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2021/IsGenericDescriptor.js b/node_modules/es-abstract/2021/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2021/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2021/IsIntegralNumber.js b/node_modules/es-abstract/2021/IsIntegralNumber.js new file mode 100644 index 0000000000000..644b936d91075 --- /dev/null +++ b/node_modules/es-abstract/2021/IsIntegralNumber.js @@ -0,0 +1,9 @@ +'use strict'; + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/12.0/#sec-isinteger + +module.exports = function IsIntegralNumber(argument) { + return isInteger(argument); +}; diff --git a/node_modules/es-abstract/2021/IsNoTearConfiguration.js b/node_modules/es-abstract/2021/IsNoTearConfiguration.js new file mode 100644 index 0000000000000..f0d2808737ac6 --- /dev/null +++ b/node_modules/es-abstract/2021/IsNoTearConfiguration.js @@ -0,0 +1,16 @@ +'use strict'; + +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var IsBigIntElementType = require('./IsBigIntElementType'); + +// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration + +module.exports = function IsNoTearConfiguration(type, order) { + if (IsUnclampedIntegerElementType(type)) { + return true; + } + if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') { + return true; + } + return false; +}; diff --git a/node_modules/es-abstract/2021/IsPromise.js b/node_modules/es-abstract/2021/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2021/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2021/IsPropertyKey.js b/node_modules/es-abstract/2021/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2021/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2021/IsRegExp.js b/node_modules/es-abstract/2021/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2021/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2021/IsSharedArrayBuffer.js b/node_modules/es-abstract/2021/IsSharedArrayBuffer.js new file mode 100644 index 0000000000000..8e96e33f3c2dc --- /dev/null +++ b/node_modules/es-abstract/2021/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2021/IsStringPrefix.js b/node_modules/es-abstract/2021/IsStringPrefix.js new file mode 100644 index 0000000000000..4958544ce29f0 --- /dev/null +++ b/node_modules/es-abstract/2021/IsStringPrefix.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPrefixOf = require('../helpers/isPrefixOf'); + +// var callBound = require('call-bind/callBound'); + +// var $charAt = callBound('String.prototype.charAt'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-isstringprefix + +module.exports = function IsStringPrefix(p, q) { + if (Type(p) !== 'String') { + throw new $TypeError('Assertion failed: "p" must be a String'); + } + + if (Type(q) !== 'String') { + throw new $TypeError('Assertion failed: "q" must be a String'); + } + + return isPrefixOf(p, q); + /* + if (p === q || p === '') { + return true; + } + + var pLength = p.length; + var qLength = q.length; + if (pLength >= qLength) { + return false; + } + + // assert: pLength < qLength + + for (var i = 0; i < pLength; i += 1) { + if ($charAt(p, i) !== $charAt(q, i)) { + return false; + } + } + return true; + */ +}; diff --git a/node_modules/es-abstract/2021/IsUnclampedIntegerElementType.js b/node_modules/es-abstract/2021/IsUnclampedIntegerElementType.js new file mode 100644 index 0000000000000..4e3a38425d65f --- /dev/null +++ b/node_modules/es-abstract/2021/IsUnclampedIntegerElementType.js @@ -0,0 +1,12 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype + +module.exports = function IsUnclampedIntegerElementType(type) { + return type === 'Int8' + || type === 'Uint8' + || type === 'Int16' + || type === 'Uint16' + || type === 'Int32' + || type === 'Uint32'; +}; diff --git a/node_modules/es-abstract/2021/IsUnsignedElementType.js b/node_modules/es-abstract/2021/IsUnsignedElementType.js new file mode 100644 index 0000000000000..b1ff194d73916 --- /dev/null +++ b/node_modules/es-abstract/2021/IsUnsignedElementType.js @@ -0,0 +1,11 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'Uint8' + || type === 'Uint8C' + || type === 'Uint16' + || type === 'Uint32' + || type === 'BigUint64'; +}; diff --git a/node_modules/es-abstract/2021/IsValidIntegerIndex.js b/node_modules/es-abstract/2021/IsValidIntegerIndex.js new file mode 100644 index 0000000000000..830416312dad6 --- /dev/null +++ b/node_modules/es-abstract/2021/IsValidIntegerIndex.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var IsIntegralNumber = require('./IsIntegralNumber'); + +var isNegativeZero = require('../helpers/isNegativeZero'); + +var typedArrayBuffer = require('typed-array-buffer'); + +// https://262.ecma-international.org/12.0/#sec-isvalidintegerindex + +module.exports = function IsValidIntegerIndex(O, index) { + // Assert: O is an Integer-Indexed exotic object. + var buffer = typedArrayBuffer(O); // step 1 + + if (typeof index !== 'number') { + throw new $TypeError('Assertion failed: Type(index) is not Number'); + } + + if (IsDetachedBuffer(buffer)) { return false; } // step 2 + + if (!IsIntegralNumber(index)) { return false; } // step 3 + + if (isNegativeZero(index)) { return false; } // step 4 + + if (index < 0 || index >= O.length) { return false; } // step 5 + + return true; // step 6 +}; diff --git a/node_modules/es-abstract/2021/IsWordChar.js b/node_modules/es-abstract/2021/IsWordChar.js new file mode 100644 index 0000000000000..0df6b20249c34 --- /dev/null +++ b/node_modules/es-abstract/2021/IsWordChar.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); +var WordCharacters = require('./WordCharacters'); + +var every = require('../helpers/every'); + +var isChar = function isChar(c) { + return typeof c === 'string'; +}; + +// https://262.ecma-international.org/12.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) { + if (!IsIntegralNumber(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + if (!IsIntegralNumber(InputLength)) { + throw new $TypeError('Assertion failed: `InputLength` must be an integer'); + } + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + if (e === -1 || e === InputLength) { + return false; // step 1 + } + + var c = Input[e]; // step 2 + + var wordChars = WordCharacters(IgnoreCase, Unicode); + + return $indexOf(wordChars, c) > -1; // steps 3-4 +}; diff --git a/node_modules/es-abstract/2021/IterableToList.js b/node_modules/es-abstract/2021/IterableToList.js new file mode 100644 index 0000000000000..320ab47128e2e --- /dev/null +++ b/node_modules/es-abstract/2021/IterableToList.js @@ -0,0 +1,29 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var GetIterator = require('./GetIterator'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); + +// https://262.ecma-international.org/12.0/#sec-iterabletolist + +module.exports = function IterableToList(items) { + var iterator; + if (arguments.length > 1) { + iterator = GetIterator(items, 'sync', arguments[1]); + } else { + iterator = GetIterator(items, 'sync'); + } + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; +}; diff --git a/node_modules/es-abstract/2021/IteratorClose.js b/node_modules/es-abstract/2021/IteratorClose.js new file mode 100644 index 0000000000000..7c1076082e1e2 --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2021/IteratorComplete.js b/node_modules/es-abstract/2021/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2021/IteratorNext.js b/node_modules/es-abstract/2021/IteratorNext.js new file mode 100644 index 0000000000000..d84d66edb5fc2 --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2021/IteratorStep.js b/node_modules/es-abstract/2021/IteratorStep.js new file mode 100644 index 0000000000000..85bcd95c0410f --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://262.ecma-international.org/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2021/IteratorValue.js b/node_modules/es-abstract/2021/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2021/LengthOfArrayLike.js b/node_modules/es-abstract/2021/LengthOfArrayLike.js new file mode 100644 index 0000000000000..132c4d58480f7 --- /dev/null +++ b/node_modules/es-abstract/2021/LengthOfArrayLike.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToLength = require('./ToLength'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-lengthofarraylike + +module.exports = function LengthOfArrayLike(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + return ToLength(Get(obj, 'length')); +}; + +// TODO: use this all over diff --git a/node_modules/es-abstract/2021/MakeDate.js b/node_modules/es-abstract/2021/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2021/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2021/MakeDay.js b/node_modules/es-abstract/2021/MakeDay.js new file mode 100644 index 0000000000000..161ccaf23daf6 --- /dev/null +++ b/node_modules/es-abstract/2021/MakeDay.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToIntegerOrInfinity(year); + var m = ToIntegerOrInfinity(month); + var dt = ToIntegerOrInfinity(date); + var ym = y + floor(m / 12); + if (!$isFinite(ym)) { + return NaN; + } + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2021/MakeTime.js b/node_modules/es-abstract/2021/MakeTime.js new file mode 100644 index 0000000000000..a11d07ef83131 --- /dev/null +++ b/node_modules/es-abstract/2021/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +// https://262.ecma-international.org/12.0/#sec-maketime + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToIntegerOrInfinity(hour); + var m = ToIntegerOrInfinity(min); + var s = ToIntegerOrInfinity(sec); + var milli = ToIntegerOrInfinity(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2021/MinFromTime.js b/node_modules/es-abstract/2021/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2021/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2021/MonthFromTime.js b/node_modules/es-abstract/2021/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2021/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2021/NewPromiseCapability.js b/node_modules/es-abstract/2021/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2021/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2021/NormalCompletion.js b/node_modules/es-abstract/2021/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2021/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2021/Number/add.js b/node_modules/es-abstract/2021/Number/add.js new file mode 100644 index 0000000000000..8d6271f545a1a --- /dev/null +++ b/node_modules/es-abstract/2021/Number/add.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add + +module.exports = function NumberAdd(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) { + return NaN; + } + + if (!isFinite(x)) { + return x; + } + if (!isFinite(y)) { + return y; + } + + if (x === y && x === 0) { // both zeroes + return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0; + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2021/Number/bitwiseAND.js b/node_modules/es-abstract/2021/Number/bitwiseAND.js new file mode 100644 index 0000000000000..a7159802ded72 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND + +module.exports = function NumberBitwiseAND(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2021/Number/bitwiseNOT.js b/node_modules/es-abstract/2021/Number/bitwiseNOT.js new file mode 100644 index 0000000000000..ae8032a785327 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/bitwiseNOT.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT + +module.exports = function NumberBitwiseNOT(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + var oldValue = ToInt32(x); + // Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer. + return ~oldValue; +}; diff --git a/node_modules/es-abstract/2021/Number/bitwiseOR.js b/node_modules/es-abstract/2021/Number/bitwiseOR.js new file mode 100644 index 0000000000000..c5e67b96802f0 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR + +module.exports = function NumberBitwiseOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2021/Number/bitwiseXOR.js b/node_modules/es-abstract/2021/Number/bitwiseXOR.js new file mode 100644 index 0000000000000..a4030e9a4b07c --- /dev/null +++ b/node_modules/es-abstract/2021/Number/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR + +module.exports = function NumberBitwiseXOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2021/Number/divide.js b/node_modules/es-abstract/2021/Number/divide.js new file mode 100644 index 0000000000000..65244625d300d --- /dev/null +++ b/node_modules/es-abstract/2021/Number/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide + +module.exports = function NumberDivide(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) { + return NaN; + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2021/Number/equal.js b/node_modules/es-abstract/2021/Number/equal.js new file mode 100644 index 0000000000000..db68afa464d2e --- /dev/null +++ b/node_modules/es-abstract/2021/Number/equal.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal + +module.exports = function NumberEqual(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y)) { + return false; + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2021/Number/exponentiate.js b/node_modules/es-abstract/2021/Number/exponentiate.js new file mode 100644 index 0000000000000..2568651032514 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/exponentiate.js @@ -0,0 +1,77 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +// var isNegativeZero = require('is-negative-zero'); + +var $pow = GetIntrinsic('%Math.pow%'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +/* +var abs = require('../../helpers/abs'); +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var IsInteger = require('../IsInteger'); +*/ +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate + +/* eslint max-lines-per-function: 0, max-statements: 0 */ + +module.exports = function NumberExponentiate(base, exponent) { + if (Type(base) !== 'Number' || Type(exponent) !== 'Number') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers'); + } + return $pow(base, exponent); + /* + if (isNaN(exponent)) { + return NaN; + } + if (exponent === 0) { + return 1; + } + if (isNaN(base)) { + return NaN; + } + var aB = abs(base); + if (aB > 1 && exponent === Infinity) { + return Infinity; + } + if (aB > 1 && exponent === -Infinity) { + return 0; + } + if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) { + return NaN; + } + if (aB < 1 && exponent === Infinity) { + return +0; + } + if (aB < 1 && exponent === -Infinity) { + return Infinity; + } + if (base === Infinity) { + return exponent > 0 ? Infinity : 0; + } + if (base === -Infinity) { + var isOdd = true; + if (exponent > 0) { + return isOdd ? -Infinity : Infinity; + } + return isOdd ? -0 : 0; + } + if (exponent > 0) { + return isNegativeZero(base) ? Infinity : 0; + } + if (isNegativeZero(base)) { + if (exponent > 0) { + return isOdd ? -0 : 0; + } + return isOdd ? -Infinity : Infinity; + } + if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) { + return NaN; + } + */ +}; diff --git a/node_modules/es-abstract/2021/Number/index.js b/node_modules/es-abstract/2021/Number/index.js new file mode 100644 index 0000000000000..63ec52da69e28 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2021/Number/leftShift.js b/node_modules/es-abstract/2021/Number/leftShift.js new file mode 100644 index 0000000000000..023b3390f3f37 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/leftShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift + +module.exports = function NumberLeftShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum << shiftCount; +}; diff --git a/node_modules/es-abstract/2021/Number/lessThan.js b/node_modules/es-abstract/2021/Number/lessThan.js new file mode 100644 index 0000000000000..5fcac24e9d958 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/lessThan.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan + +module.exports = function NumberLessThan(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + // If x is NaN, return undefined. + // If y is NaN, return undefined. + if (isNaN(x) || isNaN(y)) { + return void undefined; + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2021/Number/multiply.js b/node_modules/es-abstract/2021/Number/multiply.js new file mode 100644 index 0000000000000..2a6c478a5bcaf --- /dev/null +++ b/node_modules/es-abstract/2021/Number/multiply.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply + +module.exports = function NumberMultiply(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) { + return NaN; + } + if (!isFinite(x) && !isFinite(y)) { + return x === y ? Infinity : -Infinity; + } + if (!isFinite(x) && y !== 0) { + return x > 0 ? Infinity : -Infinity; + } + if (!isFinite(y) && x !== 0) { + return y > 0 ? Infinity : -Infinity; + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2021/Number/remainder.js b/node_modules/es-abstract/2021/Number/remainder.js new file mode 100644 index 0000000000000..c9a7c2d7d3519 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/remainder.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-remainder + +module.exports = function NumberRemainder(n, d) { + if (Type(n) !== 'Number' || Type(d) !== 'Number') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers'); + } + + // If either operand is NaN, the result is NaN. + // If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN. + if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) { + return NaN; + } + + // If the dividend is finite and the divisor is an infinity, the result equals the dividend. + // If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend. + if (!isFinite(d) || n === 0) { + return n; + } + + // In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved… + return n % d; +}; diff --git a/node_modules/es-abstract/2021/Number/sameValue.js b/node_modules/es-abstract/2021/Number/sameValue.js new file mode 100644 index 0000000000000..19efc379d1d8c --- /dev/null +++ b/node_modules/es-abstract/2021/Number/sameValue.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var isNegativeZero = require('is-negative-zero'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var NumberSameValueZero = require('./sameValueZero'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue + +module.exports = function NumberSameValue(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (x === 0 && y === 0) { + return !(isNegativeZero(x) ^ isNegativeZero(y)); + } + return NumberSameValueZero(x, y); +}; diff --git a/node_modules/es-abstract/2021/Number/sameValueZero.js b/node_modules/es-abstract/2021/Number/sameValueZero.js new file mode 100644 index 0000000000000..5688198fe88aa --- /dev/null +++ b/node_modules/es-abstract/2021/Number/sameValueZero.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero + +module.exports = function NumberSameValueZero(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var xNaN = isNaN(x); + var yNaN = isNaN(y); + if (xNaN || yNaN) { + return xNaN === yNaN; + } + return x === y; +}; diff --git a/node_modules/es-abstract/2021/Number/signedRightShift.js b/node_modules/es-abstract/2021/Number/signedRightShift.js new file mode 100644 index 0000000000000..025f39a1c4ef8 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/signedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift + +module.exports = function NumberSignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >> shiftCount; +}; diff --git a/node_modules/es-abstract/2021/Number/subtract.js b/node_modules/es-abstract/2021/Number/subtract.js new file mode 100644 index 0000000000000..29a29e6198ba2 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/subtract.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var NumberAdd = require('./add'); +var NumberUnaryMinus = require('./unaryMinus'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract + +module.exports = function NumberSubtract(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberAdd(x, NumberUnaryMinus(y)); +}; diff --git a/node_modules/es-abstract/2021/Number/toString.js b/node_modules/es-abstract/2021/Number/toString.js new file mode 100644 index 0000000000000..4f133160abb57 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring + +module.exports = function NumberToString(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` must be a Number'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2021/Number/unaryMinus.js b/node_modules/es-abstract/2021/Number/unaryMinus.js new file mode 100644 index 0000000000000..794582ad8d42b --- /dev/null +++ b/node_modules/es-abstract/2021/Number/unaryMinus.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus + +module.exports = function NumberUnaryMinus(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + if (isNaN(x)) { + return NaN; + } + return -x; +}; diff --git a/node_modules/es-abstract/2021/Number/unsignedRightShift.js b/node_modules/es-abstract/2021/Number/unsignedRightShift.js new file mode 100644 index 0000000000000..2eb967ac2828b --- /dev/null +++ b/node_modules/es-abstract/2021/Number/unsignedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift + +module.exports = function NumberUnsignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >>> shiftCount; +}; diff --git a/node_modules/es-abstract/2021/NumberBitwiseOp.js b/node_modules/es-abstract/2021/NumberBitwiseOp.js new file mode 100644 index 0000000000000..11425ffded076 --- /dev/null +++ b/node_modules/es-abstract/2021/NumberBitwiseOp.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('./ToInt32'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-numberbitwiseop + +module.exports = function NumberBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + var lnum = ToInt32(x); + var rnum = ToUint32(y); + if (op === '&') { + return lnum & rnum; + } + if (op === '|') { + return lnum | rnum; + } + return lnum ^ rnum; +}; diff --git a/node_modules/es-abstract/2021/NumberToBigInt.js b/node_modules/es-abstract/2021/NumberToBigInt.js new file mode 100644 index 0000000000000..9ed8ed9a9be5d --- /dev/null +++ b/node_modules/es-abstract/2021/NumberToBigInt.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-numbertobigint + +module.exports = function NumberToBigInt(number) { + if (Type(number) !== 'Number') { + throw new $TypeError('Assertion failed: `number` must be a String'); + } + if (!IsIntegralNumber(number)) { + throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + return $BigInt(number); +}; diff --git a/node_modules/es-abstract/2021/NumericToRawBytes.js b/node_modules/es-abstract/2021/NumericToRawBytes.js new file mode 100644 index 0000000000000..cc671159f4cb7 --- /dev/null +++ b/node_modules/es-abstract/2021/NumericToRawBytes.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwnProperty = require('./HasOwnProperty'); +var ToBigInt64 = require('./ToBigInt64'); +var ToBigUint64 = require('./ToBigUint64'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); +var integerToNBytes = require('../helpers/integerToNBytes'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32, + BigInt64: ToBigInt64, + BigUint64: ToBigUint64 +}; + +// https://262.ecma-international.org/11.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number' && Type(value) !== 'BigInt') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'Float32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; diff --git a/node_modules/es-abstract/2021/ObjectDefineProperties.js b/node_modules/es-abstract/2021/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2021/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2021/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2021/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..8f3bb829df950 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return OrdinaryObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2021/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2021/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2021/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2021/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2021/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2021/OrdinaryGetPrototypeOf.js new file mode 100644 index 0000000000000..ba17b98872933 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2021/OrdinaryHasInstance.js b/node_modules/es-abstract/2021/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2021/OrdinaryHasProperty.js b/node_modules/es-abstract/2021/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2021/OrdinaryObjectCreate.js b/node_modules/es-abstract/2021/OrdinaryObjectCreate.js new file mode 100644 index 0000000000000..140534083c5c7 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryObjectCreate.js @@ -0,0 +1,56 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/11.0/#sec-objectcreate + +module.exports = function OrdinaryObjectCreate(proto) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1]; + if (!IsArray(additionalInternalSlotsList)) { + throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array'); + } + + // var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1 + // internalSlotsList.push(...additionalInternalSlotsList); // step 2 + // var O = MakeBasicObject(internalSlotsList); // step 3 + // setProto(O, proto); // step 4 + // return O; // step 5 + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (additionalInternalSlotsList.length > 0) { + forEach(additionalInternalSlotsList, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; +}; diff --git a/node_modules/es-abstract/2021/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2021/OrdinarySetPrototypeOf.js new file mode 100644 index 0000000000000..d2b72306c187b --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2021/OrdinaryToPrimitive.js b/node_modules/es-abstract/2021/OrdinaryToPrimitive.js new file mode 100644 index 0000000000000..e1dbe1427f8d8 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2021/PromiseResolve.js b/node_modules/es-abstract/2021/PromiseResolve.js new file mode 100644 index 0000000000000..6474b79c40ae6 --- /dev/null +++ b/node_modules/es-abstract/2021/PromiseResolve.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBind = require('call-bind'); + +var $resolve = GetIntrinsic('%Promise.resolve%', true); +var $PromiseResolve = $resolve && callBind($resolve); + +// https://262.ecma-international.org/9.0/#sec-promise-resolve + +module.exports = function PromiseResolve(C, x) { + if (!$PromiseResolve) { + throw new SyntaxError('This environment does not support Promises.'); + } + return $PromiseResolve(C, x); +}; + diff --git a/node_modules/es-abstract/2021/QuoteJSONString.js b/node_modules/es-abstract/2021/QuoteJSONString.js new file mode 100644 index 0000000000000..1a7fae1824357 --- /dev/null +++ b/node_modules/es-abstract/2021/QuoteJSONString.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +var StringToCodePoints = require('./StringToCodePoints'); +var Type = require('./Type'); +var UnicodeEscape = require('./UnicodeEscape'); +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); + +var hasOwn = require('hasown'); + +// https://262.ecma-international.org/12.0/#sec-quotejsonstring + +var escapes = { + '\u0008': '\\b', + '\u0009': '\\t', + '\u000A': '\\n', + '\u000C': '\\f', + '\u000D': '\\r', + '\u0022': '\\"', + '\u005c': '\\\\' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach(StringToCodePoints(value), function (C) { + if (hasOwn(escapes, C)) { + product += escapes[C]; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20 || isLeadingSurrogate(C) || isTrailingSurrogate(C)) { + product += UnicodeEscape(C); + } else { + product += UTF16EncodeCodePoint(cCharCode); + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2021/RawBytesToNumeric.js b/node_modules/es-abstract/2021/RawBytesToNumeric.js new file mode 100644 index 0000000000000..d14705cdcc0de --- /dev/null +++ b/node_modules/es-abstract/2021/RawBytesToNumeric.js @@ -0,0 +1,84 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnsignedElementType = require('./IsUnsignedElementType'); +var Type = require('./Type'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt); +}; diff --git a/node_modules/es-abstract/2021/RegExpCreate.js b/node_modules/es-abstract/2021/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2021/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2021/RegExpExec.js b/node_modules/es-abstract/2021/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2021/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2021/RequireObjectCoercible.js b/node_modules/es-abstract/2021/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2021/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2021/SameValue.js b/node_modules/es-abstract/2021/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2021/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2021/SameValueNonNumeric.js b/node_modules/es-abstract/2021/SameValueNonNumeric.js new file mode 100644 index 0000000000000..04f6cbfbe3594 --- /dev/null +++ b/node_modules/es-abstract/2021/SameValueNonNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric + +module.exports = function SameValueNonNumeric(x, y) { + var xType = Type(x); + if (xType === 'Number' || xType === 'BigInt') { + throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); + } + if (xType !== Type(y)) { + throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2021/SameValueZero.js b/node_modules/es-abstract/2021/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2021/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2021/SecFromTime.js b/node_modules/es-abstract/2021/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2021/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2021/Set.js b/node_modules/es-abstract/2021/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2021/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2021/SetFunctionLength.js b/node_modules/es-abstract/2021/SetFunctionLength.js new file mode 100644 index 0000000000000..fbf9f2352ab66 --- /dev/null +++ b/node_modules/es-abstract/2021/SetFunctionLength.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var HasOwnProperty = require('./HasOwnProperty'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/12.0/#sec-setfunctionlength + +module.exports = function SetFunctionLength(F, length) { + if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) { + throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property'); + } + if (Type(length) !== 'Number') { + throw new $TypeError('Assertion failed: `length` must be a Number'); + } + if (length !== Infinity && (!isInteger(length) || length < 0)) { + throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0'); + } + return DefinePropertyOrThrow(F, 'length', { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); +}; diff --git a/node_modules/es-abstract/2021/SetFunctionName.js b/node_modules/es-abstract/2021/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2021/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2021/SetIntegrityLevel.js b/node_modules/es-abstract/2021/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2021/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2021/SetTypedArrayFromArrayLike.js b/node_modules/es-abstract/2021/SetTypedArrayFromArrayLike.js new file mode 100644 index 0000000000000..2d3f1e89c5b58 --- /dev/null +++ b/node_modules/es-abstract/2021/SetTypedArrayFromArrayLike.js @@ -0,0 +1,127 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isTypedArray = require('is-typed-array'); +var typedArrayBuffer = require('typed-array-buffer'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); +var whichTypedArray = require('which-typed-array'); + +var isInteger = require('../helpers/isInteger'); + +var Get = require('./Get'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var SetValueInBuffer = require('./SetValueInBuffer'); +var ToBigInt = require('./ToBigInt'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); + +var table60Sizes = { + __proto__: null, + $Int8Array: 1, + $Uint8Array: 1, + $Uint8ClampedArray: 1, + $Int16Array: 2, + $Uint16Array: 2, + $Int32Array: 4, + $Uint32Array: 4, + $BigInt64Array: 8, + $BigUint64Array: 8, + $Float32Array: 4, + $Float64Array: 8 +}; + +var table60Types = { + __proto__: null, + $Int8Array: 'Int8', + $Uint8Array: 'Uint8', + $Uint8ClampedArray: 'Uint8C', + $Int16Array: 'Int16', + $Uint16Array: 'Uint16', + $Int32Array: 'Int32', + $Uint32Array: 'Uint32', + $BigInt64Array: 'BigInt64', + $BigUint64Array: 'BigUint64', + $Float32Array: 'Float32', + $Float64Array: 'Float64' +}; + +// https://262.ecma-international.org/12.0/#sec-settypedarrayfromarraylike + +module.exports = function SetTypedArrayFromArrayLike(target, targetOffset, source) { + var whichTarget = whichTypedArray(target); + if (!whichTarget) { + throw new $TypeError('Assertion failed: target must be a TypedArray instance'); + } + + if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) { + throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity'); + } + + if (isTypedArray(source)) { + throw new $TypeError('Assertion failed: source must not be a TypedArray instance'); // step 1 + } + + var targetBuffer = typedArrayBuffer(target); // step 2 + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 3 + } + + var targetLength = typedArrayLength(target); // step 4 + + var targetName = whichTarget; // step 5 + + var targetElementSize = table60Sizes['$' + targetName]; // step 6 + + var targetType = table60Types['$' + targetName]; // step 7 + + var targetByteOffset = typedArrayByteOffset(target); // step 8 + + var src = ToObject(source); // step 9 + + var srcLength = LengthOfArrayLike(src); // step 10 + + if (targetOffset === Infinity) { + throw new $RangeError('targetOffset must be a finite integer'); // step 11 + } + + if (srcLength + targetOffset > targetLength) { + throw new $RangeError('targetOffset + srcLength must be <= target.length'); // step 12 + } + + var targetByteIndex = (targetOffset * targetElementSize) + targetByteOffset; // step 13 + + var k = 0; // step 14 + + var limit = targetByteIndex + (targetElementSize * srcLength); // step 15 + + while (targetByteIndex < limit) { // step 16 + var Pk = ToString(k); // step 16.a + + var value = Get(src, Pk); // step 16.b + + if (IsBigIntElementType(targetType)) { + value = ToBigInt(value); // step 16.c + } else { + value = ToNumber(value); // step 16.d + } + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 16.e + } + + SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value, true, 'Unordered'); // step 16.f + + k += 1; // step 16.g + + targetByteIndex += targetElementSize; // step 16.h + } +}; diff --git a/node_modules/es-abstract/2021/SetTypedArrayFromTypedArray.js b/node_modules/es-abstract/2021/SetTypedArrayFromTypedArray.js new file mode 100644 index 0000000000000..a22891ef1c217 --- /dev/null +++ b/node_modules/es-abstract/2021/SetTypedArrayFromTypedArray.js @@ -0,0 +1,167 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true); + +var typedArrayBuffer = require('typed-array-buffer'); +var typedArrayByteLength = require('typed-array-byte-length'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); +var whichTypedArray = require('which-typed-array'); + +var isInteger = require('../helpers/isInteger'); + +var CloneArrayBuffer = require('./CloneArrayBuffer'); +var GetValueFromBuffer = require('./GetValueFromBuffer'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var IsSharedArrayBuffer = require('./IsSharedArrayBuffer'); +var SameValue = require('./SameValue'); +var SetValueInBuffer = require('./SetValueInBuffer'); + +var table60Sizes = { + __proto__: null, + $Int8Array: 1, + $Uint8Array: 1, + $Uint8ClampedArray: 1, + $Int16Array: 2, + $Uint16Array: 2, + $Int32Array: 4, + $Uint32Array: 4, + $BigInt64Array: 8, + $BigUint64Array: 8, + $Float32Array: 4, + $Float64Array: 8 +}; + +var table60Types = { + __proto__: null, + $Int8Array: 'Int8', + $Uint8Array: 'Uint8', + $Uint8ClampedArray: 'Uint8C', + $Int16Array: 'Int16', + $Uint16Array: 'Uint16', + $Int32Array: 'Int32', + $Uint32Array: 'Uint32', + $BigInt64Array: 'BigInt64', + $BigUint64Array: 'BigUint64', + $Float32Array: 'Float32', + $Float64Array: 'Float64' +}; + +// https://262.ecma-international.org/12.0/#sec-settypedarrayfromtypedarray + +module.exports = function SetTypedArrayFromTypedArray(target, targetOffset, source) { + var whichTarget = whichTypedArray(target); + if (!whichTarget) { + throw new $TypeError('Assertion failed: target must be a TypedArray instance'); + } + + if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) { + throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity'); + } + + var whichSource = whichTypedArray(source); + if (!whichSource) { + throw new $TypeError('Assertion failed: source must be a TypedArray instance'); // step 1 + } + + var targetBuffer = typedArrayBuffer(target); // step 2 + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 3 + } + + var targetLength = typedArrayLength(target); // step 4 + + var srcBuffer = typedArrayBuffer(source); // step 5 + + if (IsDetachedBuffer(srcBuffer)) { + throw new $TypeError('source’s buffer is detached'); // step 6 + } + + var targetName = whichTarget; // step 7 + + var targetType = table60Types['$' + targetName]; // step 8 + + var targetElementSize = table60Sizes['$' + targetName]; // step 9 + + var targetByteOffset = typedArrayByteOffset(target); // step 10 + + var srcName = whichSource; // step 11 + + var srcType = table60Types['$' + srcName]; // step 12 + + var srcElementSize = table60Sizes['$' + srcName]; // step 13 + + var srcLength = typedArrayLength(source); // step 14 + + var srcByteOffset = typedArrayByteOffset(source); // step 15 + + if (targetOffset === Infinity) { + throw new $RangeError('targetOffset must be a non-negative integer or +Infinity'); // step 16 + } + + if (srcLength + targetOffset > targetLength) { + throw new $RangeError('targetOffset + source.length must not be greater than target.length'); // step 17 + } + + var targetContentType = whichTarget === 'BigInt64Array' || whichTarget === 'BigUint64Array' ? 'BigInt' : 'Number'; + var sourceContentType = whichSource === 'BigInt64Array' || whichSource === 'BigUint64Array' ? 'BigInt' : 'Number'; + if (targetContentType !== sourceContentType) { + throw new $TypeError('source and target must have the same content type'); // step 18 + } + + var same; + if (IsSharedArrayBuffer(srcBuffer) && IsSharedArrayBuffer(targetBuffer)) { // step 19 + // a. If srcBuffer.[[ArrayBufferData]] and targetBuffer.[[ArrayBufferData]] are the same Shared Data Block values, let same be true; else let same be false. + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + same = SameValue(srcBuffer, targetBuffer); // step 20 + } + + var srcByteIndex; + if (same) { // step 21 + var srcByteLength = typedArrayByteLength(source); // step 21.a + + srcBuffer = CloneArrayBuffer(srcBuffer, srcByteOffset, srcByteLength, $ArrayBuffer); // step 21.b + + // c. NOTE: %ArrayBuffer% is used to clone srcBuffer because is it known to not have any observable side-effects. + + srcByteIndex = 0; // step 21.d + } else { + srcByteIndex = srcByteOffset; // step 22 + } + + var targetByteIndex = (targetOffset * targetElementSize) + targetByteOffset; // step 23 + + var limit = targetByteIndex + (targetElementSize * srcLength); // step 24 + + var value; + if (srcType === targetType) { // step 25 + // a. NOTE: If srcType and targetType are the same, the transfer must be performed in a manner that preserves the bit-level encoding of the source data. + + while (targetByteIndex < limit) { // step 25.b + value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'Uint8', true, 'Unordered'); // step 25.b.i + + SetValueInBuffer(targetBuffer, targetByteIndex, 'Uint8', value, true, 'Unordered'); // step 25.b.ii + + srcByteIndex += 1; // step 25.b.iii + + targetByteIndex += 1; // step 25.b.iv + } + } else { // step 26 + while (targetByteIndex < limit) { // step 26.a + value = GetValueFromBuffer(srcBuffer, srcByteIndex, srcType, true, 'Unordered'); // step 26.a.i + + SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value, true, 'Unordered'); // step 26.a.ii + + srcByteIndex += srcElementSize; // step 26.a.iii + + targetByteIndex += targetElementSize; // step 26.a.iv + } + } +}; diff --git a/node_modules/es-abstract/2021/SetValueInBuffer.js b/node_modules/es-abstract/2021/SetValueInBuffer.js new file mode 100644 index 0000000000000..ff9de36ca2c75 --- /dev/null +++ b/node_modules/es-abstract/2021/SetValueInBuffer.js @@ -0,0 +1,105 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var NumericToRawBytes = require('./NumericToRawBytes'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var hasOwn = require('hasown'); + +var table60 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); + +// https://262.ecma-international.org/12.0/#sec-setvalueinbuffer + +/* eslint max-params: 0 */ + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex) || byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer'); + } + + if (typeof type !== 'string' || !hasOwn(table60, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') { + throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`'); + } + + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3 + throw new $TypeError('Assertion failed: `value` must be a BigInt if type is BigInt64 or BigUint64, otherwise a Number'); + } + + // 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = table60[type]; // step 5 + + // 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6 + + var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7 + + if (isSAB) { // step 8 + /* + Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). + If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false. + Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + } + + // 10. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2021/SpeciesConstructor.js b/node_modules/es-abstract/2021/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2021/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2021/SplitMatch.js b/node_modules/es-abstract/2021/SplitMatch.js new file mode 100644 index 0000000000000..a21cde6450617 --- /dev/null +++ b/node_modules/es-abstract/2021/SplitMatch.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $charAt = callBound('String.prototype.charAt'); + +// https://262.ecma-international.org/12.0/#sec-splitmatch + +module.exports = function SplitMatch(S, q, R) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(q)) { + throw new $TypeError('Assertion failed: `q` must be an integer'); + } + if (Type(R) !== 'String') { + throw new $TypeError('Assertion failed: `R` must be a String'); + } + var r = R.length; + var s = S.length; + if (q + r > s) { + return 'not-matched'; + } + + for (var i = 0; i < r; i += 1) { + if ($charAt(S, q + i) !== $charAt(R, i)) { + return 'not-matched'; + } + } + + return q + r; +}; diff --git a/node_modules/es-abstract/2021/StrictEqualityComparison.js b/node_modules/es-abstract/2021/StrictEqualityComparison.js new file mode 100644 index 0000000000000..f3435ba9d181e --- /dev/null +++ b/node_modules/es-abstract/2021/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/2021/StringCreate.js b/node_modules/es-abstract/2021/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2021/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2021/StringGetOwnProperty.js b/node_modules/es-abstract/2021/StringGetOwnProperty.js new file mode 100644 index 0000000000000..579bb9556dbc7 --- /dev/null +++ b/node_modules/es-abstract/2021/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://262.ecma-international.org/12.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsIntegralNumber(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2021/StringIndexOf.js b/node_modules/es-abstract/2021/StringIndexOf.js new file mode 100644 index 0000000000000..2f6944d156bce --- /dev/null +++ b/node_modules/es-abstract/2021/StringIndexOf.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $slice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/12.0/#sec-stringindexof + +module.exports = function StringIndexOf(string, searchValue, fromIndex) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + if (Type(searchValue) !== 'String') { + throw new $TypeError('Assertion failed: `searchValue` must be a String'); + } + if (!isInteger(fromIndex) || fromIndex < 0) { + throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer'); + } + + var len = string.length; + if (searchValue === '' && fromIndex <= len) { + return fromIndex; + } + + var searchLen = searchValue.length; + for (var i = fromIndex; i <= (len - searchLen); i += 1) { + var candidate = $slice(string, i, i + searchLen); + if (candidate === searchValue) { + return i; + } + } + return -1; +}; diff --git a/node_modules/es-abstract/2021/StringPad.js b/node_modules/es-abstract/2021/StringPad.js new file mode 100644 index 0000000000000..cdf69001bb5bd --- /dev/null +++ b/node_modules/es-abstract/2021/StringPad.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); + +var $strSlice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/11.0/#sec-stringpad + +module.exports = function StringPad(O, maxLength, fillString, placement) { + if (placement !== 'start' && placement !== 'end') { + throw new $TypeError('Assertion failed: `placement` must be "start" or "end"'); + } + var S = ToString(O); + var intMaxLength = ToLength(maxLength); + var stringLength = S.length; + if (intMaxLength <= stringLength) { + return S; + } + var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString); + if (filler === '') { + return S; + } + var fillLen = intMaxLength - stringLength; + + // the String value consisting of repeated concatenations of filler truncated to length fillLen. + var truncatedStringFiller = ''; + while (truncatedStringFiller.length < fillLen) { + truncatedStringFiller += filler; + } + truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen); + + if (placement === 'start') { + return truncatedStringFiller + S; + } + return S + truncatedStringFiller; +}; diff --git a/node_modules/es-abstract/2021/StringToBigInt.js b/node_modules/es-abstract/2021/StringToBigInt.js new file mode 100644 index 0000000000000..0bc3cec01c863 --- /dev/null +++ b/node_modules/es-abstract/2021/StringToBigInt.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +// https://262.ecma-international.org/11.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return NaN; + } +}; diff --git a/node_modules/es-abstract/2021/StringToCodePoints.js b/node_modules/es-abstract/2021/StringToCodePoints.js new file mode 100644 index 0000000000000..f503ce1b47933 --- /dev/null +++ b/node_modules/es-abstract/2021/StringToCodePoints.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $push = callBound('Array.prototype.push'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-stringtocodepoints + +module.exports = function StringToCodePoints(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var codePoints = []; + var size = string.length; + var position = 0; + while (position < size) { + var cp = CodePointAt(string, position); + $push(codePoints, cp['[[CodePoint]]']); + position += cp['[[CodeUnitCount]]']; + } + return codePoints; +}; diff --git a/node_modules/es-abstract/2021/SymbolDescriptiveString.js b/node_modules/es-abstract/2021/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2021/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2021/TestIntegrityLevel.js b/node_modules/es-abstract/2021/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2021/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2021/ThrowCompletion.js b/node_modules/es-abstract/2021/ThrowCompletion.js new file mode 100644 index 0000000000000..b7d388a35292e --- /dev/null +++ b/node_modules/es-abstract/2021/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2021/TimeClip.js b/node_modules/es-abstract/2021/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2021/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2021/TimeFromYear.js b/node_modules/es-abstract/2021/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2021/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2021/TimeString.js b/node_modules/es-abstract/2021/TimeString.js new file mode 100644 index 0000000000000..051c4728e2e49 --- /dev/null +++ b/node_modules/es-abstract/2021/TimeString.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var HourFromTime = require('./HourFromTime'); +var MinFromTime = require('./MinFromTime'); +var SecFromTime = require('./SecFromTime'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-timestring + +module.exports = function TimeString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var hour = HourFromTime(tv); + var minute = MinFromTime(tv); + var second = SecFromTime(tv); + return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; +}; diff --git a/node_modules/es-abstract/2021/TimeWithinDay.js b/node_modules/es-abstract/2021/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2021/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2021/ToBigInt.js b/node_modules/es-abstract/2021/ToBigInt.js new file mode 100644 index 0000000000000..d24e0fff091e3 --- /dev/null +++ b/node_modules/es-abstract/2021/ToBigInt.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var StringToBigInt = require('./StringToBigInt'); +var ToPrimitive = require('./ToPrimitive'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/11.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (prim == null) { + throw new $TypeError('Cannot convert null or undefined to a BigInt'); + } + + if (typeof prim === 'boolean') { + return prim ? $BigInt(1) : $BigInt(0); + } + + if (typeof prim === 'number') { + throw new $TypeError('Cannot convert a Number value to a BigInt'); + } + + if (typeof prim === 'string') { + var n = StringToBigInt(prim); + if (isNaN(n)) { + throw new $TypeError('Failed to parse String to BigInt'); + } + return n; + } + + if (typeof prim === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a BigInt'); + } + + if (typeof prim !== 'bigint') { + throw new $SyntaxError('Assertion failed: unknown primitive type'); + } + + return prim; +}; diff --git a/node_modules/es-abstract/2021/ToBigInt64.js b/node_modules/es-abstract/2021/ToBigInt64.js new file mode 100644 index 0000000000000..65c1c55d92b18 --- /dev/null +++ b/node_modules/es-abstract/2021/ToBigInt64.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; diff --git a/node_modules/es-abstract/2021/ToBigUint64.js b/node_modules/es-abstract/2021/ToBigUint64.js new file mode 100644 index 0000000000000..ff68236a8c88f --- /dev/null +++ b/node_modules/es-abstract/2021/ToBigUint64.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; diff --git a/node_modules/es-abstract/2021/ToBoolean.js b/node_modules/es-abstract/2021/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2021/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2021/ToDateString.js b/node_modules/es-abstract/2021/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2021/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2021/ToIndex.js b/node_modules/es-abstract/2021/ToIndex.js new file mode 100644 index 0000000000000..2343b44f32192 --- /dev/null +++ b/node_modules/es-abstract/2021/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var ToLength = require('./ToLength'); +var SameValue = require('./SameValue'); + +// https://262.ecma-international.org/8.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToIntegerOrInfinity(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValue(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2021/ToInt16.js b/node_modules/es-abstract/2021/ToInt16.js new file mode 100644 index 0000000000000..21694bdeb923c --- /dev/null +++ b/node_modules/es-abstract/2021/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://262.ecma-international.org/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2021/ToInt32.js b/node_modules/es-abstract/2021/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/2021/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2021/ToInt8.js b/node_modules/es-abstract/2021/ToInt8.js new file mode 100644 index 0000000000000..e223b6c1d352a --- /dev/null +++ b/node_modules/es-abstract/2021/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://262.ecma-international.org/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2021/ToIntegerOrInfinity.js b/node_modules/es-abstract/2021/ToIntegerOrInfinity.js new file mode 100644 index 0000000000000..5f55e1ea0cadf --- /dev/null +++ b/node_modules/es-abstract/2021/ToIntegerOrInfinity.js @@ -0,0 +1,20 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + var integer = floor(abs(number)); + if (integer === 0) { return 0; } + return $sign(number) * integer; +}; diff --git a/node_modules/es-abstract/2021/ToLength.js b/node_modules/es-abstract/2021/ToLength.js new file mode 100644 index 0000000000000..0468c3e71f305 --- /dev/null +++ b/node_modules/es-abstract/2021/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +module.exports = function ToLength(argument) { + var len = ToIntegerOrInfinity(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2021/ToNumber.js b/node_modules/es-abstract/2021/ToNumber.js new file mode 100644 index 0000000000000..72853a986ef2f --- /dev/null +++ b/node_modules/es-abstract/2021/ToNumber.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var isPrimitive = require('../helpers/isPrimitive'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2021/ToNumeric.js b/node_modules/es-abstract/2021/ToNumeric.js new file mode 100644 index 0000000000000..140adb3975b21 --- /dev/null +++ b/node_modules/es-abstract/2021/ToNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); + +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var ToNumber = require('./ToNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-tonumeric + +module.exports = function ToNumeric(argument) { + var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (Type(primValue) === 'BigInt') { + return primValue; + } + return ToNumber(primValue); +}; diff --git a/node_modules/es-abstract/2021/ToObject.js b/node_modules/es-abstract/2021/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2021/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2021/ToPrimitive.js b/node_modules/es-abstract/2021/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2021/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2021/ToPropertyDescriptor.js b/node_modules/es-abstract/2021/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2021/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2021/ToPropertyKey.js b/node_modules/es-abstract/2021/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2021/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2021/ToString.js b/node_modules/es-abstract/2021/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2021/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2021/ToUint16.js b/node_modules/es-abstract/2021/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/2021/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2021/ToUint32.js b/node_modules/es-abstract/2021/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/2021/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2021/ToUint8.js b/node_modules/es-abstract/2021/ToUint8.js new file mode 100644 index 0000000000000..6e4e4b5add2ab --- /dev/null +++ b/node_modules/es-abstract/2021/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2021/ToUint8Clamp.js b/node_modules/es-abstract/2021/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2021/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2021/TrimString.js b/node_modules/es-abstract/2021/TrimString.js new file mode 100644 index 0000000000000..113dcf82b82d8 --- /dev/null +++ b/node_modules/es-abstract/2021/TrimString.js @@ -0,0 +1,29 @@ +'use strict'; + +var trimStart = require('string.prototype.trimstart'); +var trimEnd = require('string.prototype.trimend'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/10.0/#sec-trimstring + +module.exports = function TrimString(string, where) { + var str = RequireObjectCoercible(string); + var S = ToString(str); + var T; + if (where === 'start') { + T = trimStart(S); + } else if (where === 'end') { + T = trimEnd(S); + } else if (where === 'start+end') { + T = trimStart(trimEnd(S)); + } else { + throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"'); + } + return T; +}; diff --git a/node_modules/es-abstract/2021/Type.js b/node_modules/es-abstract/2021/Type.js new file mode 100644 index 0000000000000..555ca74ea5196 --- /dev/null +++ b/node_modules/es-abstract/2021/Type.js @@ -0,0 +1,15 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2021/TypedArrayCreate.js b/node_modules/es-abstract/2021/TypedArrayCreate.js new file mode 100644 index 0000000000000..ef9fbe2599495 --- /dev/null +++ b/node_modules/es-abstract/2021/TypedArrayCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var availableTypedArrays = require('available-typed-arrays')(); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/7.0/#typedarray-create + +module.exports = function TypedArrayCreate(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + ValidateTypedArray(newTypedArray); // step 2 + + if (argumentList.length === 1 && Type(argumentList[0]) === 'Number') { // step 3 + if (typedArrayLength(newTypedArray) < argumentList[0]) { + throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a + } + } + + return newTypedArray; // step 4 +}; diff --git a/node_modules/es-abstract/2021/TypedArraySpeciesCreate.js b/node_modules/es-abstract/2021/TypedArraySpeciesCreate.js new file mode 100644 index 0000000000000..2bfdff5eb705c --- /dev/null +++ b/node_modules/es-abstract/2021/TypedArraySpeciesCreate.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var SpeciesConstructor = require('./SpeciesConstructor'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/7.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreate(constructor, argumentList); // step 4 +}; diff --git a/node_modules/es-abstract/2021/UTF16EncodeCodePoint.js b/node_modules/es-abstract/2021/UTF16EncodeCodePoint.js new file mode 100644 index 0000000000000..0af67bc12e7b9 --- /dev/null +++ b/node_modules/es-abstract/2021/UTF16EncodeCodePoint.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/12.0/#sec-utf16encoding + +module.exports = function UTF16EncodeCodePoint(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800); + var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00); + return cu1 + cu2; +}; diff --git a/node_modules/es-abstract/2021/UTF16SurrogatePairToCodePoint.js b/node_modules/es-abstract/2021/UTF16SurrogatePairToCodePoint.js new file mode 100644 index 0000000000000..6a247a239d96b --- /dev/null +++ b/node_modules/es-abstract/2021/UTF16SurrogatePairToCodePoint.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair + +module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2021/UnicodeEscape.js b/node_modules/es-abstract/2021/UnicodeEscape.js new file mode 100644 index 0000000000000..b708c90df0a05 --- /dev/null +++ b/node_modules/es-abstract/2021/UnicodeEscape.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); + +var StringPad = require('./StringPad'); + +// https://262.ecma-international.org/11.0/#sec-unicodeescape + +module.exports = function UnicodeEscape(C) { + if (typeof C !== 'string' || C.length !== 1) { + throw new $TypeError('Assertion failed: `C` must be a single code unit'); + } + var n = $charCodeAt(C, 0); + if (n > 0xFFFF) { + throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF'); + } + + return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2021/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2021/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..134b2d5c367c4 --- /dev/null +++ b/node_modules/es-abstract/2021/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,170 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor +// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + if (oType !== 'Undefined' && !IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); + } + if (Type(current) === 'Undefined') { + if (!extensible) { + return false; + } + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': Desc['[[Configurable]]'], + '[[Enumerable]]': Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': Desc['[[Writable]]'] + } + ); + } + } else { + if (!IsAccessorDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + } + return true; + } + if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { + return true; + } + if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) { + return true; // removed by ES2017, but should still be correct + } + // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor + if (!current['[[Configurable]]']) { + if (Desc['[[Configurable]]']) { + return false; + } + if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { + return false; + } + } + if (IsGenericDescriptor(Desc)) { + // no further validation is required. + } else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + return false; + } + if (IsDataDescriptor(current)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Get]]': undefined + } + ); + } + } else if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Value]]': undefined + } + ); + } + } else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]'] && !current['[[Writable]]']) { + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + return true; + } + } else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + return true; + } + } else { + throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + return true; +}; diff --git a/node_modules/es-abstract/2021/ValidateAtomicAccess.js b/node_modules/es-abstract/2021/ValidateAtomicAccess.js new file mode 100644 index 0000000000000..34015a45d7623 --- /dev/null +++ b/node_modules/es-abstract/2021/ValidateAtomicAccess.js @@ -0,0 +1,59 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); +var whichTypedArray = require('which-typed-array'); + +var table60 = { + __proto__: null, + $Int8Array: 1, + $Uint8Array: 1, + $Uint8ClampedArray: 1, + $Int16Array: 2, + $Uint16Array: 2, + $Int32Array: 4, + $Uint32Array: 4, + $BigInt64Array: 8, + $BigUint64Array: 8, + $Float32Array: 4, + $Float64Array: 8 +}; + +// https://262.ecma-international.org/12.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var length = typedArrayLength(typedArray); // step 2 + + var accessIndex = ToIndex(requestIndex); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + var arrayTypeName = whichTypedArray(typedArray); // step 6 + + var elementSize = table60['$' + arrayTypeName]; // step 7 + + var offset = typedArrayByteOffset(typedArray); // step 8 + + return (accessIndex * elementSize) + offset; // step 9 +}; diff --git a/node_modules/es-abstract/2021/ValidateIntegerTypedArray.js b/node_modules/es-abstract/2021/ValidateIntegerTypedArray.js new file mode 100644 index 0000000000000..0bcc0aff4aa88 --- /dev/null +++ b/node_modules/es-abstract/2021/ValidateIntegerTypedArray.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/12.0/#sec-validateintegertypedarray + +var table60 = { + __proto__: null, + $Int8Array: 'Int8', + $Uint8Array: 'Uint8', + $Uint8ClampedArray: 'Uint8C', + $Int16Array: 'Int16', + $Uint16Array: 'Uint16', + $Int32Array: 'Int32', + $Uint32Array: 'Uint32', + $BigInt64Array: 'BigInt64', + $BigUint64Array: 'BigUint64', + $Float32Array: 'Float32', + $Float64Array: 'Float64' +}; + +module.exports = function ValidateIntegerTypedArray(typedArray) { + var waitable = arguments.length > 1 ? arguments[1] : false; // step 1 + + if (Type(waitable) !== 'Boolean') { + throw new $TypeError('Assertion failed: `waitable` must be a Boolean'); + } + + var buffer = ValidateTypedArray(typedArray); // step 2 + + var typeName = whichTypedArray(typedArray); // step 3 + + var type = table60['$' + typeName]; // step 4 + + if (waitable) { // step 5 + if (typeName !== 'Int32Array' && typeName !== 'BigInt64Array') { + throw new $TypeError('Assertion failed: `typedArray` must be an Int32Array or BigInt64Array when `waitable` is true'); // step 5.a + } + } else if (!IsUnclampedIntegerElementType(type) && !IsBigIntElementType(type)) { + throw new $TypeError('Assertion failed: `typedArray` must be an integer TypedArray'); // step 6.a + } + + return buffer; // step 7 +}; diff --git a/node_modules/es-abstract/2021/ValidateTypedArray.js b/node_modules/es-abstract/2021/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2021/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2021/WeakRefDeref.js b/node_modules/es-abstract/2021/WeakRefDeref.js new file mode 100644 index 0000000000000..6b9921f37be92 --- /dev/null +++ b/node_modules/es-abstract/2021/WeakRefDeref.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $deref = callBound('WeakRef.prototype.deref', true); + +var isWeakRef = require('is-weakref'); + +var AddToKeptObjects = require('./AddToKeptObjects'); + +// https://262.ecma-international.org/12.0/#sec-weakrefderef + +module.exports = function WeakRefDeref(weakRef) { + if (!isWeakRef(weakRef)) { + throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef'); + } + var target = $deref(weakRef); + if (target) { + AddToKeptObjects(target); + } + return target; +}; diff --git a/node_modules/es-abstract/2021/WeekDay.js b/node_modules/es-abstract/2021/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2021/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2021/WordCharacters.js b/node_modules/es-abstract/2021/WordCharacters.js new file mode 100644 index 0000000000000..aeebc1e75cbc7 --- /dev/null +++ b/node_modules/es-abstract/2021/WordCharacters.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $indexOf = callBound('String.prototype.indexOf', true); + +var Canonicalize = require('./Canonicalize'); +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1 + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation + +module.exports = function WordCharacters(IgnoreCase, Unicode) { + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + var U = ''; + forEach(OwnPropertyKeys(caseFolding.C), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.C[c]; // step 3 + } + }); + forEach(OwnPropertyKeys(caseFolding.S), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.S[c]; // step 3 + } + }); + + if ((!Unicode || !IgnoreCase) && U.length > 0) { + throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4 + } + + return A + U; // step 5, 6 +}; diff --git a/node_modules/es-abstract/2021/YearFromTime.js b/node_modules/es-abstract/2021/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2021/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2021/abs.js b/node_modules/es-abstract/2021/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2021/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2021/clamp.js b/node_modules/es-abstract/2021/clamp.js new file mode 100644 index 0000000000000..8da1394845973 --- /dev/null +++ b/node_modules/es-abstract/2021/clamp.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var max = GetIntrinsic('%Math.max%'); +var min = GetIntrinsic('%Math.min%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#clamping + +module.exports = function clamp(x, lower, upper) { + if (Type(x) !== 'Number' || Type(lower) !== 'Number' || Type(upper) !== 'Number' || !(lower <= upper)) { + throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`'); + } + return min(max(lower, x), upper); +}; diff --git a/node_modules/es-abstract/2021/floor.js b/node_modules/es-abstract/2021/floor.js new file mode 100644 index 0000000000000..625548e936b95 --- /dev/null +++ b/node_modules/es-abstract/2021/floor.js @@ -0,0 +1,16 @@ +'use strict'; + +var Type = require('./Type'); + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (Type(x) === 'BigInt') { + return x; + } + return $floor(x); +}; diff --git a/node_modules/es-abstract/2021/max.js b/node_modules/es-abstract/2021/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2021/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2021/min.js b/node_modules/es-abstract/2021/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2021/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2021/modulo.js b/node_modules/es-abstract/2021/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2021/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2021/msFromTime.js b/node_modules/es-abstract/2021/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2021/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2021/substring.js b/node_modules/es-abstract/2021/substring.js new file mode 100644 index 0000000000000..0c7e0203d596c --- /dev/null +++ b/node_modules/es-abstract/2021/substring.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/12.0/#substring +module.exports = function substring(S, inclusiveStart, exclusiveEnd) { + if (Type(S) !== 'String' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) { + throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers'); + } + return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length); +}; diff --git a/node_modules/es-abstract/2021/thisBigIntValue.js b/node_modules/es-abstract/2021/thisBigIntValue.js new file mode 100644 index 0000000000000..d03b4a43c3c51 --- /dev/null +++ b/node_modules/es-abstract/2021/thisBigIntValue.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-thisbigintvalue + +module.exports = function thisBigIntValue(value) { + var type = Type(value); + if (type === 'BigInt') { + return value; + } + if (!$bigIntValueOf) { + throw new $SyntaxError('BigInt is not supported'); + } + return $bigIntValueOf(value); +}; diff --git a/node_modules/es-abstract/2021/thisBooleanValue.js b/node_modules/es-abstract/2021/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2021/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2021/thisNumberValue.js b/node_modules/es-abstract/2021/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2021/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2021/thisStringValue.js b/node_modules/es-abstract/2021/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2021/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2021/thisSymbolValue.js b/node_modules/es-abstract/2021/thisSymbolValue.js new file mode 100644 index 0000000000000..91a55254283b8 --- /dev/null +++ b/node_modules/es-abstract/2021/thisSymbolValue.js @@ -0,0 +1,19 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-thissymbolvalue + +module.exports = function thisSymbolValue(value) { + if (!$SymbolValueOf) { + throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); + } + if (Type(value) === 'Symbol') { + return value; + } + return $SymbolValueOf(value); +}; diff --git a/node_modules/es-abstract/2021/thisTimeValue.js b/node_modules/es-abstract/2021/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2021/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2022/AddEntriesFromIterable.js b/node_modules/es-abstract/2022/AddEntriesFromIterable.js new file mode 100644 index 0000000000000..5bea627fb5160 --- /dev/null +++ b/node_modules/es-abstract/2022/AddEntriesFromIterable.js @@ -0,0 +1,47 @@ +'use strict'; + +var inspect = require('object-inspect'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var GetIterator = require('./GetIterator'); +var IsCallable = require('./IsCallable'); +var IteratorClose = require('./IteratorClose'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var ThrowCompletion = require('./ThrowCompletion'); +var Type = require('./Type'); + +// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable + +module.exports = function AddEntriesFromIterable(target, iterable, adder) { + if (!IsCallable(adder)) { + throw new $TypeError('Assertion failed: `adder` is not callable'); + } + if (iterable == null) { + throw new $TypeError('Assertion failed: `iterable` is present, and not nullish'); + } + var iteratorRecord = GetIterator(iterable); + while (true) { // eslint-disable-line no-constant-condition + var next = IteratorStep(iteratorRecord); + if (!next) { + return target; + } + var nextItem = IteratorValue(next); + if (Type(nextItem) !== 'Object') { + var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem))); + return IteratorClose(iteratorRecord, error); + } + try { + var k = Get(nextItem, '0'); + var v = Get(nextItem, '1'); + Call(adder, target, [k, v]); + } catch (e) { + return IteratorClose(iteratorRecord, ThrowCompletion(e)); + } + } +}; diff --git a/node_modules/es-abstract/2022/AddToKeptObjects.js b/node_modules/es-abstract/2022/AddToKeptObjects.js new file mode 100644 index 0000000000000..a2495ba8faba0 --- /dev/null +++ b/node_modules/es-abstract/2022/AddToKeptObjects.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var SLOT = require('internal-slot'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ClearKeptObjects = require('./ClearKeptObjects'); +var Type = require('./Type'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/12.0/#sec-addtokeptobjects + +module.exports = function AddToKeptObjects(object) { + if (Type(object) !== 'Object') { + throw new $TypeError('Assertion failed: `object` must be an Object'); + } + $push(SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]'), object); +}; diff --git a/node_modules/es-abstract/2022/AdvanceStringIndex.js b/node_modules/es-abstract/2022/AdvanceStringIndex.js new file mode 100644 index 0000000000000..4a0f499aa592d --- /dev/null +++ b/node_modules/es-abstract/2022/AdvanceStringIndex.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/12.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + var cp = CodePointAt(S, index); + return index + cp['[[CodeUnitCount]]']; +}; diff --git a/node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js b/node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js new file mode 100644 index 0000000000000..e5f997a39d09a --- /dev/null +++ b/node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var HasOwnProperty = require('./HasOwnProperty'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var NumberAdd = require('./Number/add'); +var NumberBitwiseAND = require('./Number/bitwiseAND'); +var NumberBitwiseOR = require('./Number/bitwiseOR'); +var NumberBitwiseXOR = require('./Number/bitwiseXOR'); +var NumberDivide = require('./Number/divide'); +var NumberExponentiate = require('./Number/exponentiate'); +var NumberLeftShift = require('./Number/leftShift'); +var NumberMultiply = require('./Number/multiply'); +var NumberRemainder = require('./Number/remainder'); +var NumberSignedRightShift = require('./Number/signedRightShift'); +var NumberSubtract = require('./Number/subtract'); +var NumberUnsignedRightShift = require('./Number/unsignedRightShift'); +var BigIntAdd = require('./BigInt/add'); +var BigIntBitwiseAND = require('./BigInt/bitwiseAND'); +var BigIntBitwiseOR = require('./BigInt/bitwiseOR'); +var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR'); +var BigIntDivide = require('./BigInt/divide'); +var BigIntExponentiate = require('./BigInt/exponentiate'); +var BigIntLeftShift = require('./BigInt/leftShift'); +var BigIntMultiply = require('./BigInt/multiply'); +var BigIntRemainder = require('./BigInt/remainder'); +var BigIntSignedRightShift = require('./BigInt/signedRightShift'); +var BigIntSubtract = require('./BigInt/subtract'); +var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift'); + +// https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator + +// https://262.ecma-international.org/12.0/#step-applystringornumericbinaryoperator-operations-table +var table = { + '**': [NumberExponentiate, BigIntExponentiate], + '*': [NumberMultiply, BigIntMultiply], + '/': [NumberDivide, BigIntDivide], + '%': [NumberRemainder, BigIntRemainder], + '+': [NumberAdd, BigIntAdd], + '-': [NumberSubtract, BigIntSubtract], + '<<': [NumberLeftShift, BigIntLeftShift], + '>>': [NumberSignedRightShift, BigIntSignedRightShift], + '>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift], + '&': [NumberBitwiseAND, BigIntBitwiseAND], + '^': [NumberBitwiseXOR, BigIntBitwiseXOR], + '|': [NumberBitwiseOR, BigIntBitwiseOR] +}; + +module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) { + if (Type(opText) !== 'String' || !HasOwnProperty(table, opText)) { + throw new $TypeError('Assertion failed: `opText` must be a valid operation string'); + } + if (opText === '+') { + var lprim = ToPrimitive(lval); + var rprim = ToPrimitive(rval); + if (Type(lprim) === 'String' || Type(rprim) === 'String') { + var lstr = ToString(lprim); + var rstr = ToString(rprim); + return lstr + rstr; + } + /* eslint no-param-reassign: 1 */ + lval = lprim; + rval = rprim; + } + var lnum = ToNumeric(lval); + var rnum = ToNumeric(rval); + var T = Type(lnum); + if (T !== Type(rnum)) { + throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ'); + } + var Operation = table[opText][T === 'BigInt' ? 1 : 0]; + return Operation(lnum, rnum); +}; diff --git a/node_modules/es-abstract/2022/ArrayCreate.js b/node_modules/es-abstract/2022/ArrayCreate.js new file mode 100644 index 0000000000000..e33224517e289 --- /dev/null +++ b/node_modules/es-abstract/2022/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var hasProto = require('has-proto')(); + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/12.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 3, 5 + if (proto !== $ArrayPrototype) { // step 4 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 6 + A.length = length; + } + /* step 6, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2022/ArraySetLength.js b/node_modules/es-abstract/2022/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2022/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2022/ArraySpeciesCreate.js b/node_modules/es-abstract/2022/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..7b1fd1d27a754 --- /dev/null +++ b/node_modules/es-abstract/2022/ArraySpeciesCreate.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ArrayCreate = require('./ArrayCreate'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/12.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + + var isArray = IsArray(originalArray); + if (!isArray) { + return ArrayCreate(length); + } + + var C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + + if (typeof C === 'undefined') { + return ArrayCreate(length); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(length); // Construct(C, length); +}; + diff --git a/node_modules/es-abstract/2022/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2022/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 0000000000000..5618539dd6fb0 --- /dev/null +++ b/node_modules/es-abstract/2022/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2022/AsyncIteratorClose.js b/node_modules/es-abstract/2022/AsyncIteratorClose.js new file mode 100644 index 0000000000000..1ae42c0c5f76e --- /dev/null +++ b/node_modules/es-abstract/2022/AsyncIteratorClose.js @@ -0,0 +1,68 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/12.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return $then( + $then( + $then( + new $Promise(function (resolve) { + resolve(GetMethod(iterator, 'return')); // step 4 + // resolve(Call(ret, iterator, [])); // step 6 + }), + function (returnV) { // step 5.a + if (typeof returnV === 'undefined') { + return completion; // step 5.b + } + return Call(returnV, iterator); // step 5.c, 5.d. + } + ), + null, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } else { + throw e; // step 7 + } + } + ), + function (innerResult) { // step 8 + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + } + ); +}; diff --git a/node_modules/es-abstract/2022/BigInt/add.js b/node_modules/es-abstract/2022/BigInt/add.js new file mode 100644 index 0000000000000..22b5db4b32d2c --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/add.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add + +module.exports = function BigIntAdd(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/bitwiseAND.js b/node_modules/es-abstract/2022/BigInt/bitwiseAND.js new file mode 100644 index 0000000000000..83cd2c3ca9edc --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND + +module.exports = function BigIntBitwiseAND(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/bitwiseNOT.js b/node_modules/es-abstract/2022/BigInt/bitwiseNOT.js new file mode 100644 index 0000000000000..9a444dfeab8d6 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/bitwiseNOT.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT + +module.exports = function BigIntBitwiseNOT(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + return -x - $BigInt(1); +}; diff --git a/node_modules/es-abstract/2022/BigInt/bitwiseOR.js b/node_modules/es-abstract/2022/BigInt/bitwiseOR.js new file mode 100644 index 0000000000000..3c1b57193ef48 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR + +module.exports = function BigIntBitwiseOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/bitwiseXOR.js b/node_modules/es-abstract/2022/BigInt/bitwiseXOR.js new file mode 100644 index 0000000000000..45f8217efb83c --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR + +module.exports = function BigIntBitwiseXOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/divide.js b/node_modules/es-abstract/2022/BigInt/divide.js new file mode 100644 index 0000000000000..5706e7d72e424 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide + +module.exports = function BigIntDivide(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + if (y === $BigInt(0)) { + throw new $RangeError('Division by zero'); + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/equal.js b/node_modules/es-abstract/2022/BigInt/equal.js new file mode 100644 index 0000000000000..a28826d67ff75 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/equal.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal + +module.exports = function BigIntEqual(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/exponentiate.js b/node_modules/es-abstract/2022/BigInt/exponentiate.js new file mode 100644 index 0000000000000..2365838c269b6 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/exponentiate.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate + +module.exports = function BigIntExponentiate(base, exponent) { + if (Type(base) !== 'BigInt' || Type(exponent) !== 'BigInt') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts'); + } + if (exponent < $BigInt(0)) { + throw new $RangeError('Exponent must be positive'); + } + if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) { + return $BigInt(1); + } + + var square = base; + var remaining = exponent; + while (remaining > $BigInt(0)) { + square += exponent; + --remaining; // eslint-disable-line no-plusplus + } + return square; +}; diff --git a/node_modules/es-abstract/2022/BigInt/index.js b/node_modules/es-abstract/2022/BigInt/index.js new file mode 100644 index 0000000000000..63ec52da69e28 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2022/BigInt/leftShift.js b/node_modules/es-abstract/2022/BigInt/leftShift.js new file mode 100644 index 0000000000000..d2a570223e22c --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/leftShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift + +module.exports = function BigIntLeftShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x << y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/lessThan.js b/node_modules/es-abstract/2022/BigInt/lessThan.js new file mode 100644 index 0000000000000..0b3cd6ba029e8 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/lessThan.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan + +module.exports = function BigIntLessThan(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/multiply.js b/node_modules/es-abstract/2022/BigInt/multiply.js new file mode 100644 index 0000000000000..6e5d56c83ea0b --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/multiply.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply + +module.exports = function BigIntMultiply(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/remainder.js b/node_modules/es-abstract/2022/BigInt/remainder.js new file mode 100644 index 0000000000000..d2dc678caf6bd --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/remainder.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (Type(n) !== 'BigInt' || Type(d) !== 'BigInt') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; diff --git a/node_modules/es-abstract/2022/BigInt/sameValue.js b/node_modules/es-abstract/2022/BigInt/sameValue.js new file mode 100644 index 0000000000000..63ff06393bba6 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/sameValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue + +module.exports = function BigIntSameValue(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/sameValueZero.js b/node_modules/es-abstract/2022/BigInt/sameValueZero.js new file mode 100644 index 0000000000000..39f262c6da2f2 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/sameValueZero.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero + +module.exports = function BigIntSameValueZero(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/signedRightShift.js b/node_modules/es-abstract/2022/BigInt/signedRightShift.js new file mode 100644 index 0000000000000..f63c642f0cda7 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/signedRightShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntLeftShift = require('./leftShift'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift + +module.exports = function BigIntSignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntLeftShift(x, -y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/subtract.js b/node_modules/es-abstract/2022/BigInt/subtract.js new file mode 100644 index 0000000000000..0490784f679cd --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/subtract.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract + +module.exports = function BigIntSubtract(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x - y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/toString.js b/node_modules/es-abstract/2022/BigInt/toString.js new file mode 100644 index 0000000000000..858d95545475e --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring + +module.exports = function BigIntToString(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` must be a BigInt'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2022/BigInt/unaryMinus.js b/node_modules/es-abstract/2022/BigInt/unaryMinus.js new file mode 100644 index 0000000000000..ee0f7ef1962c3 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/unaryMinus.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus + +module.exports = function BigIntUnaryMinus(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + + if (x === zero) { + return zero; + } + + return -x; +}; diff --git a/node_modules/es-abstract/2022/BigInt/unsignedRightShift.js b/node_modules/es-abstract/2022/BigInt/unsignedRightShift.js new file mode 100644 index 0000000000000..7ad94f7a88d5f --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/unsignedRightShift.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift + +module.exports = function BigIntUnsignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + throw new $TypeError('BigInts have no unsigned right shift, use >> instead'); +}; diff --git a/node_modules/es-abstract/2022/BigIntBitwiseOp.js b/node_modules/es-abstract/2022/BigIntBitwiseOp.js new file mode 100644 index 0000000000000..0b1c03a911b68 --- /dev/null +++ b/node_modules/es-abstract/2022/BigIntBitwiseOp.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +// var $BigInt = GetIntrinsic('%BigInt%', true); +// var $pow = GetIntrinsic('%Math.pow%'); + +// var BinaryAnd = require('./BinaryAnd'); +// var BinaryOr = require('./BinaryOr'); +// var BinaryXor = require('./BinaryXor'); +var Type = require('./Type'); +// var modulo = require('./modulo'); + +// var zero = $BigInt && $BigInt(0); +// var negOne = $BigInt && $BigInt(-1); +// var two = $BigInt && $BigInt(2); + +// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop + +module.exports = function BigIntBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('`x` and `y` must be BigInts'); + } + + if (op === '&') { + return x & y; + } + if (op === '|') { + return x | y; + } + return x ^ y; + /* + var result = zero; + var shift = 0; + while (x !== zero && x !== negOne && y !== zero && y !== negOne) { + var xDigit = modulo(x, two); + var yDigit = modulo(y, two); + if (op === '&') { + result += $pow(2, shift) * BinaryAnd(xDigit, yDigit); + } else if (op === '|') { + result += $pow(2, shift) * BinaryOr(xDigit, yDigit); + } else if (op === '^') { + result += $pow(2, shift) * BinaryXor(xDigit, yDigit); + } + shift += 1; + x = (x - xDigit) / two; + y = (y - yDigit) / two; + } + var tmp; + if (op === '&') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else if (op === '|') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else { + tmp = BinaryXor(modulo(x, two), modulo(y, two)); + } + if (tmp !== 0) { + result -= $pow(2, shift); + } + return result; + */ +}; diff --git a/node_modules/es-abstract/2022/BinaryAnd.js b/node_modules/es-abstract/2022/BinaryAnd.js new file mode 100644 index 0000000000000..c617f388dea72 --- /dev/null +++ b/node_modules/es-abstract/2022/BinaryAnd.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryand + +module.exports = function BinaryAnd(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x & y; +}; diff --git a/node_modules/es-abstract/2022/BinaryOr.js b/node_modules/es-abstract/2022/BinaryOr.js new file mode 100644 index 0000000000000..6de0955f1a6d3 --- /dev/null +++ b/node_modules/es-abstract/2022/BinaryOr.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryor + +module.exports = function BinaryOr(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x | y; +}; diff --git a/node_modules/es-abstract/2022/BinaryXor.js b/node_modules/es-abstract/2022/BinaryXor.js new file mode 100644 index 0000000000000..189d7d8469ce1 --- /dev/null +++ b/node_modules/es-abstract/2022/BinaryXor.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryxor + +module.exports = function BinaryXor(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x ^ y; +}; diff --git a/node_modules/es-abstract/2022/ByteListBitwiseOp.js b/node_modules/es-abstract/2022/ByteListBitwiseOp.js new file mode 100644 index 0000000000000..67f4cecb59bac --- /dev/null +++ b/node_modules/es-abstract/2022/ByteListBitwiseOp.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $push = callBound('Array.prototype.push'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop + +module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) { + if (op !== '&' && op !== '^' && op !== '|') { + throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`'); + } + if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + + var result = []; + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + var resultByte; + if (op === '&') { + resultByte = xByte & yByte; + } else if (op === '^') { + resultByte = xByte ^ yByte; + } else { + resultByte = xByte | yByte; + } + $push(result, resultByte); + } + + return result; +}; diff --git a/node_modules/es-abstract/2022/ByteListEqual.js b/node_modules/es-abstract/2022/ByteListEqual.js new file mode 100644 index 0000000000000..489ddc224e667 --- /dev/null +++ b/node_modules/es-abstract/2022/ByteListEqual.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://262.ecma-international.org/12.0/#sec-bytelistequal + +module.exports = function ByteListEqual(xBytes, yBytes) { + if (!IsArray(xBytes) || !IsArray(yBytes)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + + if (xBytes.length !== yBytes.length) { + return false; + } + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + if (xByte !== yByte) { + return false; + } + } + return true; +}; diff --git a/node_modules/es-abstract/2022/Call.js b/node_modules/es-abstract/2022/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2022/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2022/CanonicalNumericIndexString.js b/node_modules/es-abstract/2022/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2022/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2022/Canonicalize.js b/node_modules/es-abstract/2022/Canonicalize.js new file mode 100644 index 0000000000000..49741831a618d --- /dev/null +++ b/node_modules/es-abstract/2022/Canonicalize.js @@ -0,0 +1,55 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(ch, IgnoreCase, Unicode) { + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + if (Unicode) { // step 2 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 2.b + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/2022/CharacterRange.js b/node_modules/es-abstract/2022/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2022/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2022/ClearKeptObjects.js b/node_modules/es-abstract/2022/ClearKeptObjects.js new file mode 100644 index 0000000000000..50bd4a5da4199 --- /dev/null +++ b/node_modules/es-abstract/2022/ClearKeptObjects.js @@ -0,0 +1,12 @@ +'use strict'; + +var SLOT = require('internal-slot'); +var keptObjects = []; + +// https://262.ecma-international.org/12.0/#sec-clear-kept-objects + +module.exports = function ClearKeptObjects() { + keptObjects.length = 0; +}; + +SLOT.set(module.exports, '[[es-abstract internal: KeptAlive]]', keptObjects); diff --git a/node_modules/es-abstract/2022/CloneArrayBuffer.js b/node_modules/es-abstract/2022/CloneArrayBuffer.js new file mode 100644 index 0000000000000..d03e91f86470f --- /dev/null +++ b/node_modules/es-abstract/2022/CloneArrayBuffer.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsConstructor = require('./IsConstructor'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var OrdinarySetPrototypeOf = require('./OrdinarySetPrototypeOf'); + +var isInteger = require('../helpers/isInteger'); + +var isArrayBuffer = require('is-array-buffer'); +var arrayBufferSlice = require('arraybuffer.prototype.slice'); + +// https://262.ecma-international.org/12.0/#sec-clonearraybuffer + +module.exports = function CloneArrayBuffer(srcBuffer, srcByteOffset, srcLength, cloneConstructor) { + if (!isArrayBuffer(srcBuffer)) { + throw new $TypeError('Assertion failed: `srcBuffer` must be an ArrayBuffer instance'); + } + if (!isInteger(srcByteOffset) || srcByteOffset < 0) { + throw new $TypeError('Assertion failed: `srcByteOffset` must be a non-negative integer'); + } + if (!isInteger(srcLength) || srcLength < 0) { + throw new $TypeError('Assertion failed: `srcLength` must be a non-negative integer'); + } + if (!IsConstructor(cloneConstructor)) { + throw new $TypeError('Assertion failed: `cloneConstructor` must be a constructor'); + } + + // 3. Let targetBuffer be ? AllocateArrayBuffer(cloneConstructor, srcLength). + var proto = GetPrototypeFromConstructor(cloneConstructor, '%ArrayBufferPrototype%'); // step 3, kinda + + if (IsDetachedBuffer(srcBuffer)) { + throw new $TypeError('`srcBuffer` must not be a detached ArrayBuffer'); // step 4 + } + + /* + 5. Let srcBlock be srcBuffer.[[ArrayBufferData]]. + 6. Let targetBlock be targetBuffer.[[ArrayBufferData]]. + 7. Perform CopyDataBlockBytes(targetBlock, 0, srcBlock, srcByteOffset, srcLength). + */ + var targetBuffer = arrayBufferSlice(srcBuffer, srcByteOffset, srcByteOffset + srcLength); // steps 5-7 + OrdinarySetPrototypeOf(targetBuffer, proto); // step 3 + + return targetBuffer; // step 8 +}; diff --git a/node_modules/es-abstract/2022/CodePointAt.js b/node_modules/es-abstract/2022/CodePointAt.js new file mode 100644 index 0000000000000..e1e22905a4f92 --- /dev/null +++ b/node_modules/es-abstract/2022/CodePointAt.js @@ -0,0 +1,58 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var callBound = require('call-bind/callBound'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var Type = require('./Type'); +var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint'); + +var $charAt = callBound('String.prototype.charAt'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/12.0/#sec-codepointat + +module.exports = function CodePointAt(string, position) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var size = string.length; + if (position < 0 || position >= size) { + throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`'); + } + var first = $charCodeAt(string, position); + var cp = $charAt(string, position); + var firstIsLeading = isLeadingSurrogate(first); + var firstIsTrailing = isTrailingSurrogate(first); + if (!firstIsLeading && !firstIsTrailing) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': false + }; + } + if (firstIsTrailing || (position + 1 === size)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + var second = $charCodeAt(string, position + 1); + if (!isTrailingSurrogate(second)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + + return { + '[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second), + '[[CodeUnitCount]]': 2, + '[[IsUnpairedSurrogate]]': false + }; +}; diff --git a/node_modules/es-abstract/2022/CodePointsToString.js b/node_modules/es-abstract/2022/CodePointsToString.js new file mode 100644 index 0000000000000..6d7cd854b9d85 --- /dev/null +++ b/node_modules/es-abstract/2022/CodePointsToString.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); +var IsArray = require('./IsArray'); + +var forEach = require('../helpers/forEach'); +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/12.0/#sec-codepointstostring + +module.exports = function CodePointsToString(text) { + if (!IsArray(text)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + var result = ''; + forEach(text, function (cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + result += UTF16EncodeCodePoint(cp); + }); + return result; +}; diff --git a/node_modules/es-abstract/2022/CompletePropertyDescriptor.js b/node_modules/es-abstract/2022/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2022/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2022/CompletionRecord.js b/node_modules/es-abstract/2022/CompletionRecord.js new file mode 100644 index 0000000000000..370a5677f378e --- /dev/null +++ b/node_modules/es-abstract/2022/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2022/CopyDataProperties.js b/node_modules/es-abstract/2022/CopyDataProperties.js new file mode 100644 index 0000000000000..18723f9d0d22d --- /dev/null +++ b/node_modules/es-abstract/2022/CopyDataProperties.js @@ -0,0 +1,70 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var every = require('../helpers/every'); +var some = require('../helpers/some'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-copydataproperties + +module.exports = function CopyDataProperties(target, source, excludedItems) { + if (Type(target) !== 'Object') { + throw new $TypeError('Assertion failed: "target" must be an Object'); + } + + if (!IsArray(excludedItems) || !every(excludedItems, IsPropertyKey)) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + + if (typeof source === 'undefined' || source === null) { + return target; + } + + var from = ToObject(source); + + var keys = OwnPropertyKeys(from); + forEach(keys, function (nextKey) { + var excluded = some(excludedItems, function (e) { + return SameValue(e, nextKey) === true; + }); + /* + var excluded = false; + + forEach(excludedItems, function (e) { + if (SameValue(e, nextKey) === true) { + excluded = true; + } + }); + */ + + var enumerable = $isEnumerable(from, nextKey) || ( + // this is to handle string keys being non-enumerable in older engines + typeof source === 'string' + && nextKey >= 0 + && IsIntegralNumber(ToNumber(nextKey)) + ); + if (excluded === false && enumerable) { + var propValue = Get(from, nextKey); + CreateDataPropertyOrThrow(target, nextKey, propValue); + } + }); + + return target; +}; diff --git a/node_modules/es-abstract/2022/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2022/CreateAsyncFromSyncIterator.js new file mode 100644 index 0000000000000..64540dd6e3d71 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2022/CreateDataProperty.js b/node_modules/es-abstract/2022/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2022/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2022/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..c40e69368b91d --- /dev/null +++ b/node_modules/es-abstract/2022/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2022/CreateHTML.js b/node_modules/es-abstract/2022/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2022/CreateIterResultObject.js b/node_modules/es-abstract/2022/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2022/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2022/CreateListFromArrayLike.js b/node_modules/es-abstract/2022/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..7592307eb13a4 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateListFromArrayLike.js @@ -0,0 +1,46 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object']; + +// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike + +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = LengthOfArrayLike(obj); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2022/CreateMethodProperty.js b/node_modules/es-abstract/2022/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2022/CreateNonEnumerableDataPropertyOrThrow.js b/node_modules/es-abstract/2022/CreateNonEnumerableDataPropertyOrThrow.js new file mode 100644 index 0000000000000..59a16ef00455b --- /dev/null +++ b/node_modules/es-abstract/2022/CreateNonEnumerableDataPropertyOrThrow.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-createnonenumerabledatapropertyorthrow + +module.exports = function CreateNonEnumerableDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefinePropertyOrThrow(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2022/CreateRegExpStringIterator.js b/node_modules/es-abstract/2022/CreateRegExpStringIterator.js new file mode 100644 index 0000000000000..cdfae56216ba7 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateRegExpStringIterator.js @@ -0,0 +1,100 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); +var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true); + +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var CreateMethodProperty = require('./CreateMethodProperty'); +var Get = require('./Get'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var RegExpExec = require('./RegExpExec'); +var Set = require('./Set'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); +var setToStringTag = require('es-set-tostringtag'); + +var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) { + if (Type(S) !== 'String') { + throw new $TypeError('`S` must be a string'); + } + if (Type(global) !== 'Boolean') { + throw new $TypeError('`global` must be a boolean'); + } + if (Type(fullUnicode) !== 'Boolean') { + throw new $TypeError('`fullUnicode` must be a boolean'); + } + SLOT.set(this, '[[IteratingRegExp]]', R); + SLOT.set(this, '[[IteratedString]]', S); + SLOT.set(this, '[[Global]]', global); + SLOT.set(this, '[[Unicode]]', fullUnicode); + SLOT.set(this, '[[Done]]', false); +}; + +if (IteratorPrototype) { + RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype); +} + +var RegExpStringIteratorNext = function next() { + var O = this; // eslint-disable-line no-invalid-this + if (Type(O) !== 'Object') { + throw new $TypeError('receiver must be an object'); + } + if ( + !(O instanceof RegExpStringIterator) + || !SLOT.has(O, '[[IteratingRegExp]]') + || !SLOT.has(O, '[[IteratedString]]') + || !SLOT.has(O, '[[Global]]') + || !SLOT.has(O, '[[Unicode]]') + || !SLOT.has(O, '[[Done]]') + ) { + throw new $TypeError('"this" value must be a RegExpStringIterator instance'); + } + if (SLOT.get(O, '[[Done]]')) { + return CreateIterResultObject(undefined, true); + } + var R = SLOT.get(O, '[[IteratingRegExp]]'); + var S = SLOT.get(O, '[[IteratedString]]'); + var global = SLOT.get(O, '[[Global]]'); + var fullUnicode = SLOT.get(O, '[[Unicode]]'); + var match = RegExpExec(R, S); + if (match === null) { + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(undefined, true); + } + if (global) { + var matchStr = ToString(Get(match, '0')); + if (matchStr === '') { + var thisIndex = ToLength(Get(R, 'lastIndex')); + var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode); + Set(R, 'lastIndex', nextIndex, true); + } + return CreateIterResultObject(match, false); + } + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(match, false); +}; +CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext); + +if (hasSymbols) { + setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator'); + + if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') { + var iteratorFn = function SymbolIterator() { + return this; + }; + CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn); + } +} + +// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator +module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) { + // assert R.global === global && R.unicode === fullUnicode? + return new RegExpStringIterator(R, S, global, fullUnicode); +}; diff --git a/node_modules/es-abstract/2022/DateFromTime.js b/node_modules/es-abstract/2022/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2022/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2022/DateString.js b/node_modules/es-abstract/2022/DateString.js new file mode 100644 index 0000000000000..939c14c0c87ef --- /dev/null +++ b/node_modules/es-abstract/2022/DateString.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var Type = require('./Type'); +var WeekDay = require('./WeekDay'); +var MonthFromTime = require('./MonthFromTime'); +var YearFromTime = require('./YearFromTime'); +var DateFromTime = require('./DateFromTime'); + +// https://262.ecma-international.org/9.0/#sec-datestring + +module.exports = function DateString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var weekday = weekdays[WeekDay(tv)]; + var month = months[MonthFromTime(tv)]; + var day = padTimeComponent(DateFromTime(tv)); + var year = padTimeComponent(YearFromTime(tv), 4); + return weekday + '\x20' + month + '\x20' + day + '\x20' + year; +}; diff --git a/node_modules/es-abstract/2022/Day.js b/node_modules/es-abstract/2022/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2022/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2022/DayFromYear.js b/node_modules/es-abstract/2022/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2022/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2022/DayWithinYear.js b/node_modules/es-abstract/2022/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2022/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2022/DaysInYear.js b/node_modules/es-abstract/2022/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2022/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2022/DefinePropertyOrThrow.js b/node_modules/es-abstract/2022/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2022/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2022/DeletePropertyOrThrow.js b/node_modules/es-abstract/2022/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2022/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2022/DetachArrayBuffer.js b/node_modules/es-abstract/2022/DetachArrayBuffer.js new file mode 100644 index 0000000000000..03284729b3d4e --- /dev/null +++ b/node_modules/es-abstract/2022/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2022/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2022/EnumerableOwnPropertyNames.js new file mode 100644 index 0000000000000..8e3177b6a1631 --- /dev/null +++ b/node_modules/es-abstract/2022/EnumerableOwnPropertyNames.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/8.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnPropertyNames(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2022/FlattenIntoArray.js b/node_modules/es-abstract/2022/FlattenIntoArray.js new file mode 100644 index 0000000000000..0fb87bc6a39b0 --- /dev/null +++ b/node_modules/es-abstract/2022/FlattenIntoArray.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var Call = require('./Call'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/11.0/#sec-flattenintoarray + +module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) { + var mapperFunction; + if (arguments.length > 5) { + mapperFunction = arguments[5]; + } + + var targetIndex = start; + var sourceIndex = 0; + while (sourceIndex < sourceLen) { + var P = ToString(sourceIndex); + var exists = HasProperty(source, P); + if (exists === true) { + var element = Get(source, P); + if (typeof mapperFunction !== 'undefined') { + if (arguments.length <= 6) { + throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); + } + element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]); + } + var shouldFlatten = false; + if (depth > 0) { + shouldFlatten = IsArray(element); + } + if (shouldFlatten) { + var elementLen = LengthOfArrayLike(element); + targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); + } else { + if (targetIndex >= MAX_SAFE_INTEGER) { + throw new $TypeError('index too large'); + } + CreateDataPropertyOrThrow(target, ToString(targetIndex), element); + targetIndex += 1; + } + } + sourceIndex += 1; + } + + return targetIndex; +}; diff --git a/node_modules/es-abstract/2022/FromPropertyDescriptor.js b/node_modules/es-abstract/2022/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2022/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2022/Get.js b/node_modules/es-abstract/2022/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2022/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2022/GetGlobalObject.js b/node_modules/es-abstract/2022/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2022/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2022/GetIterator.js b/node_modules/es-abstract/2022/GetIterator.js new file mode 100644 index 0000000000000..672454abdbff3 --- /dev/null +++ b/node_modules/es-abstract/2022/GetIterator.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true); + +var inspect = require('object-inspect'); +var hasSymbols = require('has-symbols')(); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-getiterator + +module.exports = function GetIterator(obj, hint, method) { + var actualHint = hint; + if (arguments.length < 2) { + actualHint = 'sync'; + } + if (actualHint !== 'sync' && actualHint !== 'async') { + throw new $TypeError("Assertion failed: `hint` must be one of 'sync' or 'async', got " + inspect(hint)); + } + + var actualMethod = method; + if (arguments.length < 3) { + if (actualHint === 'async') { + if (hasSymbols && $asyncIterator) { + actualMethod = GetMethod(obj, $asyncIterator); + } + if (actualMethod === undefined) { + throw new $SyntaxError("async from sync iterators aren't currently supported"); + } + } else { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; + + // TODO: This should return an IteratorRecord + /* + var nextMethod = GetV(iterator, 'next'); + return { + '[[Iterator]]': iterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; + */ +}; diff --git a/node_modules/es-abstract/2022/GetMatchIndexPair.js b/node_modules/es-abstract/2022/GetMatchIndexPair.js new file mode 100644 index 0000000000000..c72d311a9502e --- /dev/null +++ b/node_modules/es-abstract/2022/GetMatchIndexPair.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/13.0/#sec-getmatchindexpair + +module.exports = function GetMatchIndexPair(S, match) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + assertRecord(Type, 'Match Record', 'match', match); + + if (!(match['[[StartIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S'); + } + if (!(match['[[EndIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive'); + } + return [match['[[StartIndex]]'], match['[[EndIndex]]']]; +}; diff --git a/node_modules/es-abstract/2022/GetMatchString.js b/node_modules/es-abstract/2022/GetMatchString.js new file mode 100644 index 0000000000000..bfac4c43c5f56 --- /dev/null +++ b/node_modules/es-abstract/2022/GetMatchString.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var substring = require('./substring'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/13.0/#sec-getmatchstring + +module.exports = function GetMatchString(S, match) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + assertRecord(Type, 'Match Record', 'match', match); + + if (!(match['[[StartIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S'); + } + if (!(match['[[EndIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive'); + } + return substring(S, match['[[StartIndex]]'], match['[[EndIndex]]']); +}; diff --git a/node_modules/es-abstract/2022/GetMethod.js b/node_modules/es-abstract/2022/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2022/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2022/GetOwnPropertyKeys.js b/node_modules/es-abstract/2022/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2022/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2022/GetPromiseResolve.js b/node_modules/es-abstract/2022/GetPromiseResolve.js new file mode 100644 index 0000000000000..f0db02617bc79 --- /dev/null +++ b/node_modules/es-abstract/2022/GetPromiseResolve.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/12.0/#sec-getpromiseresolve + +module.exports = function GetPromiseResolve(promiseConstructor) { + if (!IsConstructor(promiseConstructor)) { + throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor'); + } + var promiseResolve = Get(promiseConstructor, 'resolve'); + if (IsCallable(promiseResolve) === false) { + throw new $TypeError('`resolve` method is not callable'); + } + return promiseResolve; +}; diff --git a/node_modules/es-abstract/2022/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2022/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2022/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2022/GetStringIndex.js b/node_modules/es-abstract/2022/GetStringIndex.js new file mode 100644 index 0000000000000..9c796d86b8cd5 --- /dev/null +++ b/node_modules/es-abstract/2022/GetStringIndex.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var StringToCodePoints = require('./StringToCodePoints'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $indexOf = callBound('String.prototype.indexOf'); + +// https://262.ecma-international.org/13.0/#sec-getstringindex + +module.exports = function GetStringIndex(S, e) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(e) || e < 0) { + throw new $TypeError('Assertion failed: `e` must be a non-negative integer'); + } + + if (S === '') { + return 0; + } + var codepoints = StringToCodePoints(S); + var eUTF = e >= codepoints.length ? S.length : $indexOf(S, codepoints[e]); + return eUTF; +}; diff --git a/node_modules/es-abstract/2022/GetSubstitution.js b/node_modules/es-abstract/2022/GetSubstitution.js new file mode 100644 index 0000000000000..9f2a02561850f --- /dev/null +++ b/node_modules/es-abstract/2022/GetSubstitution.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var every = require('../helpers/every'); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); +var $indexOf = callBound('String.prototype.indexOf'); +var $parseInt = parseInt; + +var isDigit = regexTester(/^[0-9]$/); + +var inspect = require('object-inspect'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// http://www.ecma-international.org/ecma-262/12.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-params, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + if (Type(namedCaptures) !== 'Undefined') { + namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign + } + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else if (next === '<') { + // eslint-disable-next-line max-depth + if (Type(namedCaptures) === 'Undefined') { + result += '$<'; + i += 2; + } else { + var endIndex = $indexOf(replacement, '>', i); + // eslint-disable-next-line max-depth + if (endIndex > -1) { + var groupName = $strSlice(replacement, i + '$<'.length, endIndex); + var capture = Get(namedCaptures, groupName); + // eslint-disable-next-line max-depth + if (Type(capture) !== 'Undefined') { + result += ToString(capture); + } + i += ('<' + groupName + '>').length; + } + } + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2022/GetV.js b/node_modules/es-abstract/2022/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2022/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2022/GetValueFromBuffer.js b/node_modules/es-abstract/2022/GetValueFromBuffer.js new file mode 100644 index 0000000000000..8d3a2f4fc5423 --- /dev/null +++ b/node_modules/es-abstract/2022/GetValueFromBuffer.js @@ -0,0 +1,110 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var RawBytesToNumeric = require('./RawBytesToNumeric'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table61 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $BigInt64: 8, + $BigUint64: 8, + $Float32: 4, + $Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); + +// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || typeof table61['$' + type] !== 'number') { + throw new $TypeError('Assertion failed: `type` must be a Typed Array element type'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (order !== 'SeqCst' && order !== 'Unordered') { + throw new $TypeError('Assertion failed: `order` must be either `SeqCst` or `Unordered`'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = table61['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "BigInt64", "BigUint64", "Float32", or "Float64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumeric(type, bytes, isLittleEndian); +}; diff --git a/node_modules/es-abstract/2022/HasOwnProperty.js b/node_modules/es-abstract/2022/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2022/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2022/HasProperty.js b/node_modules/es-abstract/2022/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2022/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2022/HourFromTime.js b/node_modules/es-abstract/2022/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2022/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2022/InLeapYear.js b/node_modules/es-abstract/2022/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2022/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2022/InstallErrorCause.js b/node_modules/es-abstract/2022/InstallErrorCause.js new file mode 100644 index 0000000000000..949ecc77eebbb --- /dev/null +++ b/node_modules/es-abstract/2022/InstallErrorCause.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateNonEnumerableDataPropertyOrThrow = require('./CreateNonEnumerableDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-installerrorcause + +module.exports = function InstallErrorCause(O, options) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (Type(options) === 'Object' && HasProperty(options, 'cause')) { + var cause = Get(options, 'cause'); + CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause); + } +}; diff --git a/node_modules/es-abstract/2022/InstanceofOperator.js b/node_modules/es-abstract/2022/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2022/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2022/Invoke.js b/node_modules/es-abstract/2022/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2022/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2022/IsAccessorDescriptor.js b/node_modules/es-abstract/2022/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2022/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2022/IsArray.js b/node_modules/es-abstract/2022/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2022/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2022/IsBigIntElementType.js b/node_modules/es-abstract/2022/IsBigIntElementType.js new file mode 100644 index 0000000000000..e3f58a949b3ca --- /dev/null +++ b/node_modules/es-abstract/2022/IsBigIntElementType.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BigUint64' || type === 'BigInt64'; +}; diff --git a/node_modules/es-abstract/2022/IsCallable.js b/node_modules/es-abstract/2022/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2022/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2022/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2022/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..48e719f3c1e51 --- /dev/null +++ b/node_modules/es-abstract/2022/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/13.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, '', Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2022/IsConcatSpreadable.js b/node_modules/es-abstract/2022/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2022/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2022/IsConstructor.js b/node_modules/es-abstract/2022/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2022/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2022/IsDataDescriptor.js b/node_modules/es-abstract/2022/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2022/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2022/IsDetachedBuffer.js b/node_modules/es-abstract/2022/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2022/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2022/IsExtensible.js b/node_modules/es-abstract/2022/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2022/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2022/IsGenericDescriptor.js b/node_modules/es-abstract/2022/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2022/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2022/IsIntegralNumber.js b/node_modules/es-abstract/2022/IsIntegralNumber.js new file mode 100644 index 0000000000000..644b936d91075 --- /dev/null +++ b/node_modules/es-abstract/2022/IsIntegralNumber.js @@ -0,0 +1,9 @@ +'use strict'; + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/12.0/#sec-isinteger + +module.exports = function IsIntegralNumber(argument) { + return isInteger(argument); +}; diff --git a/node_modules/es-abstract/2022/IsLessThan.js b/node_modules/es-abstract/2022/IsLessThan.js new file mode 100644 index 0000000000000..72cf2533de452 --- /dev/null +++ b/node_modules/es-abstract/2022/IsLessThan.js @@ -0,0 +1,90 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); + +var IsStringPrefix = require('./IsStringPrefix'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var BigIntLessThan = require('./BigInt/lessThan'); +var NumberLessThan = require('./Number/lessThan'); + +// https://262.ecma-international.org/13.0/#sec-islessthan + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function IsLessThan(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + var pxType = Type(px); + var pyType = Type(py); + if (pxType === 'String' && pyType === 'String') { + if (IsStringPrefix(py, px)) { + return false; + } + if (IsStringPrefix(px, py)) { + return true; + } + /* + c. Let k be the smallest non-negative integer such that the code unit at index k within px is different from the code unit at index k within py. (There must be such a k, for neither String is a prefix of the other.) + d. Let m be the integer that is the numeric value of the code unit at index k within px. + e. Let n be the integer that is the numeric value of the code unit at index k within py. + f. If m < n, return true. Otherwise, return false. + */ + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + + var nx; + var ny; + if (pxType === 'BigInt' && pyType === 'String') { + ny = StringToBigInt(py); + if (typeof ny === 'undefined') { + return void undefined; + } + return BigIntLessThan(px, ny); + } + if (pxType === 'String' && pyType === 'BigInt') { + nx = StringToBigInt(px); + if (typeof nx === 'undefined') { + return void undefined; + } + return BigIntLessThan(nx, py); + } + + nx = ToNumeric(px); + ny = ToNumeric(py); + + var nxType = Type(nx); + if (nxType === Type(ny)) { + return nxType === 'Number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); + } + + if ($isNaN(nx) || $isNaN(ny)) { + return void undefined; + } + + if (nx === -Infinity || ny === Infinity) { + return true; + } + if (nx === Infinity || ny === -Infinity) { + return false; + } + + return nx < ny; // by now, these are both finite, and the same type +}; diff --git a/node_modules/es-abstract/2022/IsLooselyEqual.js b/node_modules/es-abstract/2022/IsLooselyEqual.js new file mode 100644 index 0000000000000..9d254ba68cfaa --- /dev/null +++ b/node_modules/es-abstract/2022/IsLooselyEqual.js @@ -0,0 +1,58 @@ +'use strict'; + +var isFinite = require('../helpers/isFinite'); + +var IsStrictlyEqual = require('./IsStrictlyEqual'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-islooselyequal + +module.exports = function IsLooselyEqual(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return IsStrictlyEqual(x, y); + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return IsLooselyEqual(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return IsLooselyEqual(ToNumber(x), y); + } + if (xType === 'BigInt' && yType === 'String') { + var n = StringToBigInt(y); + if (typeof n === 'undefined') { + return false; + } + return IsLooselyEqual(x, n); + } + if (xType === 'String' && yType === 'BigInt') { + return IsLooselyEqual(y, x); + } + if (xType === 'Boolean') { + return IsLooselyEqual(ToNumber(x), y); + } + if (yType === 'Boolean') { + return IsLooselyEqual(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'Symbol' || xType === 'BigInt') && yType === 'Object') { + return IsLooselyEqual(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol' || yType === 'BigInt')) { + return IsLooselyEqual(ToPrimitive(x), y); + } + if ((xType === 'BigInt' && yType === 'Number') || (xType === 'Number' && yType === 'BigInt')) { + if (!isFinite(x) || !isFinite(y)) { + return false; + } + // eslint-disable-next-line eqeqeq + return x == y; // shortcut for step 13.b. + } + return false; +}; diff --git a/node_modules/es-abstract/2022/IsNoTearConfiguration.js b/node_modules/es-abstract/2022/IsNoTearConfiguration.js new file mode 100644 index 0000000000000..f0d2808737ac6 --- /dev/null +++ b/node_modules/es-abstract/2022/IsNoTearConfiguration.js @@ -0,0 +1,16 @@ +'use strict'; + +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var IsBigIntElementType = require('./IsBigIntElementType'); + +// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration + +module.exports = function IsNoTearConfiguration(type, order) { + if (IsUnclampedIntegerElementType(type)) { + return true; + } + if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') { + return true; + } + return false; +}; diff --git a/node_modules/es-abstract/2022/IsPromise.js b/node_modules/es-abstract/2022/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2022/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2022/IsPropertyKey.js b/node_modules/es-abstract/2022/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2022/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2022/IsRegExp.js b/node_modules/es-abstract/2022/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2022/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2022/IsSharedArrayBuffer.js b/node_modules/es-abstract/2022/IsSharedArrayBuffer.js new file mode 100644 index 0000000000000..8e96e33f3c2dc --- /dev/null +++ b/node_modules/es-abstract/2022/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2022/IsStrictlyEqual.js b/node_modules/es-abstract/2022/IsStrictlyEqual.js new file mode 100644 index 0000000000000..6f5e86a2f3331 --- /dev/null +++ b/node_modules/es-abstract/2022/IsStrictlyEqual.js @@ -0,0 +1,20 @@ +'use strict'; + +var SameValueNonNumeric = require('./SameValueNonNumeric'); +var Type = require('./Type'); +var BigIntEqual = require('./BigInt/equal'); +var NumberEqual = require('./Number/equal'); + +// https://262.ecma-international.org/13.0/#sec-isstrictlyequal + +module.exports = function IsStrictlyEqual(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Number' || xType === 'BigInt') { + return xType === 'Number' ? NumberEqual(x, y) : BigIntEqual(x, y); + } + return SameValueNonNumeric(x, y); +}; diff --git a/node_modules/es-abstract/2022/IsStringPrefix.js b/node_modules/es-abstract/2022/IsStringPrefix.js new file mode 100644 index 0000000000000..bb99c944e1d17 --- /dev/null +++ b/node_modules/es-abstract/2022/IsStringPrefix.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var StringIndexOf = require('./StringIndexOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-isstringprefix + +module.exports = function IsStringPrefix(p, q) { + if (Type(p) !== 'String') { + throw new $TypeError('Assertion failed: "p" must be a String'); + } + + if (Type(q) !== 'String') { + throw new $TypeError('Assertion failed: "q" must be a String'); + } + + return StringIndexOf(q, p, 0) === 0; +}; diff --git a/node_modules/es-abstract/2022/IsStringWellFormedUnicode.js b/node_modules/es-abstract/2022/IsStringWellFormedUnicode.js new file mode 100644 index 0000000000000..72213f659f67a --- /dev/null +++ b/node_modules/es-abstract/2022/IsStringWellFormedUnicode.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var CodePointAt = require('./CodePointAt'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-isstringwellformedunicode + +module.exports = function IsStringWellFormedUnicode(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var strLen = string.length; // step 1 + var k = 0; // step 2 + while (k !== strLen) { // step 3 + var cp = CodePointAt(string, k); // step 3.a + if (cp['[[IsUnpairedSurrogate]]']) { + return false; // step 3.b + } + k += cp['[[CodeUnitCount]]']; // step 3.c + } + return true; // step 4 +}; diff --git a/node_modules/es-abstract/2022/IsUnclampedIntegerElementType.js b/node_modules/es-abstract/2022/IsUnclampedIntegerElementType.js new file mode 100644 index 0000000000000..4e3a38425d65f --- /dev/null +++ b/node_modules/es-abstract/2022/IsUnclampedIntegerElementType.js @@ -0,0 +1,12 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype + +module.exports = function IsUnclampedIntegerElementType(type) { + return type === 'Int8' + || type === 'Uint8' + || type === 'Int16' + || type === 'Uint16' + || type === 'Int32' + || type === 'Uint32'; +}; diff --git a/node_modules/es-abstract/2022/IsUnsignedElementType.js b/node_modules/es-abstract/2022/IsUnsignedElementType.js new file mode 100644 index 0000000000000..b1ff194d73916 --- /dev/null +++ b/node_modules/es-abstract/2022/IsUnsignedElementType.js @@ -0,0 +1,11 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'Uint8' + || type === 'Uint8C' + || type === 'Uint16' + || type === 'Uint32' + || type === 'BigUint64'; +}; diff --git a/node_modules/es-abstract/2022/IsValidIntegerIndex.js b/node_modules/es-abstract/2022/IsValidIntegerIndex.js new file mode 100644 index 0000000000000..830416312dad6 --- /dev/null +++ b/node_modules/es-abstract/2022/IsValidIntegerIndex.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var IsIntegralNumber = require('./IsIntegralNumber'); + +var isNegativeZero = require('../helpers/isNegativeZero'); + +var typedArrayBuffer = require('typed-array-buffer'); + +// https://262.ecma-international.org/12.0/#sec-isvalidintegerindex + +module.exports = function IsValidIntegerIndex(O, index) { + // Assert: O is an Integer-Indexed exotic object. + var buffer = typedArrayBuffer(O); // step 1 + + if (typeof index !== 'number') { + throw new $TypeError('Assertion failed: Type(index) is not Number'); + } + + if (IsDetachedBuffer(buffer)) { return false; } // step 2 + + if (!IsIntegralNumber(index)) { return false; } // step 3 + + if (isNegativeZero(index)) { return false; } // step 4 + + if (index < 0 || index >= O.length) { return false; } // step 5 + + return true; // step 6 +}; diff --git a/node_modules/es-abstract/2022/IsWordChar.js b/node_modules/es-abstract/2022/IsWordChar.js new file mode 100644 index 0000000000000..0df6b20249c34 --- /dev/null +++ b/node_modules/es-abstract/2022/IsWordChar.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); +var WordCharacters = require('./WordCharacters'); + +var every = require('../helpers/every'); + +var isChar = function isChar(c) { + return typeof c === 'string'; +}; + +// https://262.ecma-international.org/12.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) { + if (!IsIntegralNumber(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + if (!IsIntegralNumber(InputLength)) { + throw new $TypeError('Assertion failed: `InputLength` must be an integer'); + } + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + if (e === -1 || e === InputLength) { + return false; // step 1 + } + + var c = Input[e]; // step 2 + + var wordChars = WordCharacters(IgnoreCase, Unicode); + + return $indexOf(wordChars, c) > -1; // steps 3-4 +}; diff --git a/node_modules/es-abstract/2022/IterableToList.js b/node_modules/es-abstract/2022/IterableToList.js new file mode 100644 index 0000000000000..320ab47128e2e --- /dev/null +++ b/node_modules/es-abstract/2022/IterableToList.js @@ -0,0 +1,29 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var GetIterator = require('./GetIterator'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); + +// https://262.ecma-international.org/12.0/#sec-iterabletolist + +module.exports = function IterableToList(items) { + var iterator; + if (arguments.length > 1) { + iterator = GetIterator(items, 'sync', arguments[1]); + } else { + iterator = GetIterator(items, 'sync'); + } + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; +}; diff --git a/node_modules/es-abstract/2022/IteratorClose.js b/node_modules/es-abstract/2022/IteratorClose.js new file mode 100644 index 0000000000000..7c1076082e1e2 --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2022/IteratorComplete.js b/node_modules/es-abstract/2022/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2022/IteratorNext.js b/node_modules/es-abstract/2022/IteratorNext.js new file mode 100644 index 0000000000000..d84d66edb5fc2 --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2022/IteratorStep.js b/node_modules/es-abstract/2022/IteratorStep.js new file mode 100644 index 0000000000000..85bcd95c0410f --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://262.ecma-international.org/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2022/IteratorValue.js b/node_modules/es-abstract/2022/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2022/LengthOfArrayLike.js b/node_modules/es-abstract/2022/LengthOfArrayLike.js new file mode 100644 index 0000000000000..132c4d58480f7 --- /dev/null +++ b/node_modules/es-abstract/2022/LengthOfArrayLike.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToLength = require('./ToLength'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-lengthofarraylike + +module.exports = function LengthOfArrayLike(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + return ToLength(Get(obj, 'length')); +}; + +// TODO: use this all over diff --git a/node_modules/es-abstract/2022/MakeDate.js b/node_modules/es-abstract/2022/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2022/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2022/MakeDay.js b/node_modules/es-abstract/2022/MakeDay.js new file mode 100644 index 0000000000000..161ccaf23daf6 --- /dev/null +++ b/node_modules/es-abstract/2022/MakeDay.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToIntegerOrInfinity(year); + var m = ToIntegerOrInfinity(month); + var dt = ToIntegerOrInfinity(date); + var ym = y + floor(m / 12); + if (!$isFinite(ym)) { + return NaN; + } + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2022/MakeMatchIndicesIndexPairArray.js b/node_modules/es-abstract/2022/MakeMatchIndicesIndexPairArray.js new file mode 100644 index 0000000000000..962f5d8be8411 --- /dev/null +++ b/node_modules/es-abstract/2022/MakeMatchIndicesIndexPairArray.js @@ -0,0 +1,69 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ArrayCreate = require('./ArrayCreate'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var GetMatchIndexPair = require('./GetMatchIndexPair'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isMatchRecord = require('../helpers/isMatchRecord'); + +var isStringOrUndefined = function isStringOrUndefined(s) { + return typeof s === 'undefined' || typeof s === 'string'; +}; + +var isMatchRecordOrUndefined = function isMatchRecordOrUndefined(m) { + return typeof m === 'undefined' || isMatchRecord(m); +}; + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +// https://262.ecma-international.org/13.0/#sec-getmatchindexpair + +module.exports = function MakeMatchIndicesIndexPairArray(S, indices, groupNames, hasGroups) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!IsArray(indices) || !every(indices, isMatchRecordOrUndefined)) { + throw new $TypeError('Assertion failed: `indices` must be a List of either Match Records or `undefined`'); + } + if (!IsArray(groupNames) || !every(groupNames, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `groupNames` must be a List of either Strings or `undefined`'); + } + if (Type(hasGroups) !== 'Boolean') { + throw new $TypeError('Assertion failed: `hasGroups` must be a Boolean'); + } + + var n = indices.length; // step 1 + if (!(n < MAX_ARRAY_LENGTH)) { + throw new $TypeError('Assertion failed: `indices` length must be less than the max array size, 2**32 - 1'); + } + if (groupNames.length !== n - 1) { + throw new $TypeError('Assertion failed: `groupNames` must have exactly one fewer item than `indices`'); + } + + var A = ArrayCreate(n); // step 5 + var groups = hasGroups ? OrdinaryObjectCreate(null) : void undefined; // step 6-7 + CreateDataPropertyOrThrow(A, 'groups', groups); // step 8 + + for (var i = 0; i < n; i += 1) { // step 9 + var matchIndices = indices[i]; // step 9.a + // eslint-disable-next-line no-negated-condition + var matchIndexPair = typeof matchIndices !== 'undefined' ? GetMatchIndexPair(S, matchIndices) : void undefined; // step 9.b-9.c + CreateDataPropertyOrThrow(A, ToString(i), matchIndexPair); // step 9.d + if (i > 0 && typeof groupNames[i - 1] !== 'undefined') { // step 9.e + if (!groups) { + throw new $TypeError('if `hasGroups` is `false`, `groupNames` can only contain `undefined` values'); + } + CreateDataPropertyOrThrow(groups, groupNames[i - 1], matchIndexPair); // step 9.e.i + } + } + return A; // step 10 +}; diff --git a/node_modules/es-abstract/2022/MakeTime.js b/node_modules/es-abstract/2022/MakeTime.js new file mode 100644 index 0000000000000..a11d07ef83131 --- /dev/null +++ b/node_modules/es-abstract/2022/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +// https://262.ecma-international.org/12.0/#sec-maketime + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToIntegerOrInfinity(hour); + var m = ToIntegerOrInfinity(min); + var s = ToIntegerOrInfinity(sec); + var milli = ToIntegerOrInfinity(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2022/MinFromTime.js b/node_modules/es-abstract/2022/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2022/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2022/MonthFromTime.js b/node_modules/es-abstract/2022/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2022/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2022/NewPromiseCapability.js b/node_modules/es-abstract/2022/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2022/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2022/NormalCompletion.js b/node_modules/es-abstract/2022/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2022/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2022/Number/add.js b/node_modules/es-abstract/2022/Number/add.js new file mode 100644 index 0000000000000..8d6271f545a1a --- /dev/null +++ b/node_modules/es-abstract/2022/Number/add.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add + +module.exports = function NumberAdd(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) { + return NaN; + } + + if (!isFinite(x)) { + return x; + } + if (!isFinite(y)) { + return y; + } + + if (x === y && x === 0) { // both zeroes + return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0; + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2022/Number/bitwiseAND.js b/node_modules/es-abstract/2022/Number/bitwiseAND.js new file mode 100644 index 0000000000000..a7159802ded72 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND + +module.exports = function NumberBitwiseAND(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2022/Number/bitwiseNOT.js b/node_modules/es-abstract/2022/Number/bitwiseNOT.js new file mode 100644 index 0000000000000..ae8032a785327 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/bitwiseNOT.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT + +module.exports = function NumberBitwiseNOT(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + var oldValue = ToInt32(x); + // Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer. + return ~oldValue; +}; diff --git a/node_modules/es-abstract/2022/Number/bitwiseOR.js b/node_modules/es-abstract/2022/Number/bitwiseOR.js new file mode 100644 index 0000000000000..c5e67b96802f0 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR + +module.exports = function NumberBitwiseOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2022/Number/bitwiseXOR.js b/node_modules/es-abstract/2022/Number/bitwiseXOR.js new file mode 100644 index 0000000000000..a4030e9a4b07c --- /dev/null +++ b/node_modules/es-abstract/2022/Number/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR + +module.exports = function NumberBitwiseXOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2022/Number/divide.js b/node_modules/es-abstract/2022/Number/divide.js new file mode 100644 index 0000000000000..65244625d300d --- /dev/null +++ b/node_modules/es-abstract/2022/Number/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide + +module.exports = function NumberDivide(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) { + return NaN; + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2022/Number/equal.js b/node_modules/es-abstract/2022/Number/equal.js new file mode 100644 index 0000000000000..db68afa464d2e --- /dev/null +++ b/node_modules/es-abstract/2022/Number/equal.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal + +module.exports = function NumberEqual(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y)) { + return false; + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2022/Number/exponentiate.js b/node_modules/es-abstract/2022/Number/exponentiate.js new file mode 100644 index 0000000000000..2568651032514 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/exponentiate.js @@ -0,0 +1,77 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +// var isNegativeZero = require('is-negative-zero'); + +var $pow = GetIntrinsic('%Math.pow%'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +/* +var abs = require('../../helpers/abs'); +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var IsInteger = require('../IsInteger'); +*/ +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate + +/* eslint max-lines-per-function: 0, max-statements: 0 */ + +module.exports = function NumberExponentiate(base, exponent) { + if (Type(base) !== 'Number' || Type(exponent) !== 'Number') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers'); + } + return $pow(base, exponent); + /* + if (isNaN(exponent)) { + return NaN; + } + if (exponent === 0) { + return 1; + } + if (isNaN(base)) { + return NaN; + } + var aB = abs(base); + if (aB > 1 && exponent === Infinity) { + return Infinity; + } + if (aB > 1 && exponent === -Infinity) { + return 0; + } + if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) { + return NaN; + } + if (aB < 1 && exponent === Infinity) { + return +0; + } + if (aB < 1 && exponent === -Infinity) { + return Infinity; + } + if (base === Infinity) { + return exponent > 0 ? Infinity : 0; + } + if (base === -Infinity) { + var isOdd = true; + if (exponent > 0) { + return isOdd ? -Infinity : Infinity; + } + return isOdd ? -0 : 0; + } + if (exponent > 0) { + return isNegativeZero(base) ? Infinity : 0; + } + if (isNegativeZero(base)) { + if (exponent > 0) { + return isOdd ? -0 : 0; + } + return isOdd ? -Infinity : Infinity; + } + if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) { + return NaN; + } + */ +}; diff --git a/node_modules/es-abstract/2022/Number/index.js b/node_modules/es-abstract/2022/Number/index.js new file mode 100644 index 0000000000000..63ec52da69e28 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2022/Number/leftShift.js b/node_modules/es-abstract/2022/Number/leftShift.js new file mode 100644 index 0000000000000..023b3390f3f37 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/leftShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift + +module.exports = function NumberLeftShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum << shiftCount; +}; diff --git a/node_modules/es-abstract/2022/Number/lessThan.js b/node_modules/es-abstract/2022/Number/lessThan.js new file mode 100644 index 0000000000000..5fcac24e9d958 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/lessThan.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan + +module.exports = function NumberLessThan(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + // If x is NaN, return undefined. + // If y is NaN, return undefined. + if (isNaN(x) || isNaN(y)) { + return void undefined; + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2022/Number/multiply.js b/node_modules/es-abstract/2022/Number/multiply.js new file mode 100644 index 0000000000000..2a6c478a5bcaf --- /dev/null +++ b/node_modules/es-abstract/2022/Number/multiply.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply + +module.exports = function NumberMultiply(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) { + return NaN; + } + if (!isFinite(x) && !isFinite(y)) { + return x === y ? Infinity : -Infinity; + } + if (!isFinite(x) && y !== 0) { + return x > 0 ? Infinity : -Infinity; + } + if (!isFinite(y) && x !== 0) { + return y > 0 ? Infinity : -Infinity; + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2022/Number/remainder.js b/node_modules/es-abstract/2022/Number/remainder.js new file mode 100644 index 0000000000000..c9a7c2d7d3519 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/remainder.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-remainder + +module.exports = function NumberRemainder(n, d) { + if (Type(n) !== 'Number' || Type(d) !== 'Number') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers'); + } + + // If either operand is NaN, the result is NaN. + // If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN. + if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) { + return NaN; + } + + // If the dividend is finite and the divisor is an infinity, the result equals the dividend. + // If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend. + if (!isFinite(d) || n === 0) { + return n; + } + + // In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved… + return n % d; +}; diff --git a/node_modules/es-abstract/2022/Number/sameValue.js b/node_modules/es-abstract/2022/Number/sameValue.js new file mode 100644 index 0000000000000..19efc379d1d8c --- /dev/null +++ b/node_modules/es-abstract/2022/Number/sameValue.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var isNegativeZero = require('is-negative-zero'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var NumberSameValueZero = require('./sameValueZero'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue + +module.exports = function NumberSameValue(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (x === 0 && y === 0) { + return !(isNegativeZero(x) ^ isNegativeZero(y)); + } + return NumberSameValueZero(x, y); +}; diff --git a/node_modules/es-abstract/2022/Number/sameValueZero.js b/node_modules/es-abstract/2022/Number/sameValueZero.js new file mode 100644 index 0000000000000..5688198fe88aa --- /dev/null +++ b/node_modules/es-abstract/2022/Number/sameValueZero.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero + +module.exports = function NumberSameValueZero(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var xNaN = isNaN(x); + var yNaN = isNaN(y); + if (xNaN || yNaN) { + return xNaN === yNaN; + } + return x === y; +}; diff --git a/node_modules/es-abstract/2022/Number/signedRightShift.js b/node_modules/es-abstract/2022/Number/signedRightShift.js new file mode 100644 index 0000000000000..025f39a1c4ef8 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/signedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift + +module.exports = function NumberSignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >> shiftCount; +}; diff --git a/node_modules/es-abstract/2022/Number/subtract.js b/node_modules/es-abstract/2022/Number/subtract.js new file mode 100644 index 0000000000000..29a29e6198ba2 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/subtract.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var NumberAdd = require('./add'); +var NumberUnaryMinus = require('./unaryMinus'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract + +module.exports = function NumberSubtract(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberAdd(x, NumberUnaryMinus(y)); +}; diff --git a/node_modules/es-abstract/2022/Number/toString.js b/node_modules/es-abstract/2022/Number/toString.js new file mode 100644 index 0000000000000..4f133160abb57 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring + +module.exports = function NumberToString(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` must be a Number'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2022/Number/unaryMinus.js b/node_modules/es-abstract/2022/Number/unaryMinus.js new file mode 100644 index 0000000000000..794582ad8d42b --- /dev/null +++ b/node_modules/es-abstract/2022/Number/unaryMinus.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus + +module.exports = function NumberUnaryMinus(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + if (isNaN(x)) { + return NaN; + } + return -x; +}; diff --git a/node_modules/es-abstract/2022/Number/unsignedRightShift.js b/node_modules/es-abstract/2022/Number/unsignedRightShift.js new file mode 100644 index 0000000000000..2eb967ac2828b --- /dev/null +++ b/node_modules/es-abstract/2022/Number/unsignedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift + +module.exports = function NumberUnsignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >>> shiftCount; +}; diff --git a/node_modules/es-abstract/2022/NumberBitwiseOp.js b/node_modules/es-abstract/2022/NumberBitwiseOp.js new file mode 100644 index 0000000000000..11425ffded076 --- /dev/null +++ b/node_modules/es-abstract/2022/NumberBitwiseOp.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('./ToInt32'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-numberbitwiseop + +module.exports = function NumberBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + var lnum = ToInt32(x); + var rnum = ToUint32(y); + if (op === '&') { + return lnum & rnum; + } + if (op === '|') { + return lnum | rnum; + } + return lnum ^ rnum; +}; diff --git a/node_modules/es-abstract/2022/NumberToBigInt.js b/node_modules/es-abstract/2022/NumberToBigInt.js new file mode 100644 index 0000000000000..9ed8ed9a9be5d --- /dev/null +++ b/node_modules/es-abstract/2022/NumberToBigInt.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-numbertobigint + +module.exports = function NumberToBigInt(number) { + if (Type(number) !== 'Number') { + throw new $TypeError('Assertion failed: `number` must be a String'); + } + if (!IsIntegralNumber(number)) { + throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + return $BigInt(number); +}; diff --git a/node_modules/es-abstract/2022/NumericToRawBytes.js b/node_modules/es-abstract/2022/NumericToRawBytes.js new file mode 100644 index 0000000000000..cc671159f4cb7 --- /dev/null +++ b/node_modules/es-abstract/2022/NumericToRawBytes.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwnProperty = require('./HasOwnProperty'); +var ToBigInt64 = require('./ToBigInt64'); +var ToBigUint64 = require('./ToBigUint64'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); +var integerToNBytes = require('../helpers/integerToNBytes'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32, + BigInt64: ToBigInt64, + BigUint64: ToBigUint64 +}; + +// https://262.ecma-international.org/11.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number' && Type(value) !== 'BigInt') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'Float32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; diff --git a/node_modules/es-abstract/2022/ObjectDefineProperties.js b/node_modules/es-abstract/2022/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2022/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2022/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2022/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..8f3bb829df950 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return OrdinaryObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2022/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2022/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2022/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2022/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2022/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2022/OrdinaryGetPrototypeOf.js new file mode 100644 index 0000000000000..ba17b98872933 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2022/OrdinaryHasInstance.js b/node_modules/es-abstract/2022/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2022/OrdinaryHasProperty.js b/node_modules/es-abstract/2022/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2022/OrdinaryObjectCreate.js b/node_modules/es-abstract/2022/OrdinaryObjectCreate.js new file mode 100644 index 0000000000000..140534083c5c7 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryObjectCreate.js @@ -0,0 +1,56 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/11.0/#sec-objectcreate + +module.exports = function OrdinaryObjectCreate(proto) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1]; + if (!IsArray(additionalInternalSlotsList)) { + throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array'); + } + + // var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1 + // internalSlotsList.push(...additionalInternalSlotsList); // step 2 + // var O = MakeBasicObject(internalSlotsList); // step 3 + // setProto(O, proto); // step 4 + // return O; // step 5 + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (additionalInternalSlotsList.length > 0) { + forEach(additionalInternalSlotsList, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; +}; diff --git a/node_modules/es-abstract/2022/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2022/OrdinarySetPrototypeOf.js new file mode 100644 index 0000000000000..d2b72306c187b --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2022/OrdinaryToPrimitive.js b/node_modules/es-abstract/2022/OrdinaryToPrimitive.js new file mode 100644 index 0000000000000..e1dbe1427f8d8 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2022/PromiseResolve.js b/node_modules/es-abstract/2022/PromiseResolve.js new file mode 100644 index 0000000000000..6474b79c40ae6 --- /dev/null +++ b/node_modules/es-abstract/2022/PromiseResolve.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBind = require('call-bind'); + +var $resolve = GetIntrinsic('%Promise.resolve%', true); +var $PromiseResolve = $resolve && callBind($resolve); + +// https://262.ecma-international.org/9.0/#sec-promise-resolve + +module.exports = function PromiseResolve(C, x) { + if (!$PromiseResolve) { + throw new SyntaxError('This environment does not support Promises.'); + } + return $PromiseResolve(C, x); +}; + diff --git a/node_modules/es-abstract/2022/QuoteJSONString.js b/node_modules/es-abstract/2022/QuoteJSONString.js new file mode 100644 index 0000000000000..1a7fae1824357 --- /dev/null +++ b/node_modules/es-abstract/2022/QuoteJSONString.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +var StringToCodePoints = require('./StringToCodePoints'); +var Type = require('./Type'); +var UnicodeEscape = require('./UnicodeEscape'); +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); + +var hasOwn = require('hasown'); + +// https://262.ecma-international.org/12.0/#sec-quotejsonstring + +var escapes = { + '\u0008': '\\b', + '\u0009': '\\t', + '\u000A': '\\n', + '\u000C': '\\f', + '\u000D': '\\r', + '\u0022': '\\"', + '\u005c': '\\\\' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach(StringToCodePoints(value), function (C) { + if (hasOwn(escapes, C)) { + product += escapes[C]; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20 || isLeadingSurrogate(C) || isTrailingSurrogate(C)) { + product += UnicodeEscape(C); + } else { + product += UTF16EncodeCodePoint(cCharCode); + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2022/RawBytesToNumeric.js b/node_modules/es-abstract/2022/RawBytesToNumeric.js new file mode 100644 index 0000000000000..d14705cdcc0de --- /dev/null +++ b/node_modules/es-abstract/2022/RawBytesToNumeric.js @@ -0,0 +1,84 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnsignedElementType = require('./IsUnsignedElementType'); +var Type = require('./Type'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt); +}; diff --git a/node_modules/es-abstract/2022/RegExpCreate.js b/node_modules/es-abstract/2022/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2022/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2022/RegExpExec.js b/node_modules/es-abstract/2022/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2022/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2022/RegExpHasFlag.js b/node_modules/es-abstract/2022/RegExpHasFlag.js new file mode 100644 index 0000000000000..a7c800d9e145f --- /dev/null +++ b/node_modules/es-abstract/2022/RegExpHasFlag.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $RegExpPrototype = GetIntrinsic('%RegExp.prototype%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var hasRegExpMatcher = require('is-regex'); +var getFlags = require('regexp.prototype.flags'); + +// https://262.ecma-international.org/13.0/#sec-regexphasflag + +module.exports = function RegExpHasFlag(R, codeUnit) { + if (Type(codeUnit) !== 'String' || codeUnit.length !== 1) { + throw new $TypeError('Assertion failed: `string` must be a code unit - a String of length 1'); + } + + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: Type(R) is not Object'); + } + + if (!hasRegExpMatcher(R)) { // step 2 + if (SameValue(R, $RegExpPrototype)) { + return void undefined; // step 2.a + } + throw new $TypeError('`R` must be a RegExp object'); // step 2.b + } + + var flags = getFlags(R); // step 3 + + return $indexOf(flags, codeUnit) > -1; // steps 4-5 +}; diff --git a/node_modules/es-abstract/2022/RequireObjectCoercible.js b/node_modules/es-abstract/2022/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2022/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2022/SameValue.js b/node_modules/es-abstract/2022/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2022/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2022/SameValueNonNumeric.js b/node_modules/es-abstract/2022/SameValueNonNumeric.js new file mode 100644 index 0000000000000..04f6cbfbe3594 --- /dev/null +++ b/node_modules/es-abstract/2022/SameValueNonNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric + +module.exports = function SameValueNonNumeric(x, y) { + var xType = Type(x); + if (xType === 'Number' || xType === 'BigInt') { + throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); + } + if (xType !== Type(y)) { + throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2022/SameValueZero.js b/node_modules/es-abstract/2022/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2022/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2022/SecFromTime.js b/node_modules/es-abstract/2022/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2022/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2022/Set.js b/node_modules/es-abstract/2022/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2022/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2022/SetFunctionLength.js b/node_modules/es-abstract/2022/SetFunctionLength.js new file mode 100644 index 0000000000000..fbf9f2352ab66 --- /dev/null +++ b/node_modules/es-abstract/2022/SetFunctionLength.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var HasOwnProperty = require('./HasOwnProperty'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/12.0/#sec-setfunctionlength + +module.exports = function SetFunctionLength(F, length) { + if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) { + throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property'); + } + if (Type(length) !== 'Number') { + throw new $TypeError('Assertion failed: `length` must be a Number'); + } + if (length !== Infinity && (!isInteger(length) || length < 0)) { + throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0'); + } + return DefinePropertyOrThrow(F, 'length', { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); +}; diff --git a/node_modules/es-abstract/2022/SetFunctionName.js b/node_modules/es-abstract/2022/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2022/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2022/SetIntegrityLevel.js b/node_modules/es-abstract/2022/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2022/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2022/SetTypedArrayFromArrayLike.js b/node_modules/es-abstract/2022/SetTypedArrayFromArrayLike.js new file mode 100644 index 0000000000000..aa5581d99ce32 --- /dev/null +++ b/node_modules/es-abstract/2022/SetTypedArrayFromArrayLike.js @@ -0,0 +1,97 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isTypedArray = require('is-typed-array'); +var typedArrayBuffer = require('typed-array-buffer'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); +var whichTypedArray = require('which-typed-array'); + +var isInteger = require('../helpers/isInteger'); + +var Get = require('./Get'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var SetValueInBuffer = require('./SetValueInBuffer'); +var ToBigInt = require('./ToBigInt'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var TypedArrayElementSize = require('./TypedArrayElementSize'); +var TypedArrayElementType = require('./TypedArrayElementType'); + +// https://262.ecma-international.org/13.0/#sec-settypedarrayfromarraylike + +module.exports = function SetTypedArrayFromArrayLike(target, targetOffset, source) { + var whichTarget = whichTypedArray(target); + if (!whichTarget) { + throw new $TypeError('Assertion failed: target must be a TypedArray instance'); + } + + if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) { + throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity'); + } + + if (isTypedArray(source)) { + throw new $TypeError('Assertion failed: source must not be a TypedArray instance'); + } + + var targetBuffer = typedArrayBuffer(target); // step 1 + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 2 + } + + var targetLength = typedArrayLength(target); // step 3 + + var targetElementSize = TypedArrayElementSize(target); // step 4 + + var targetType = TypedArrayElementType(target); // step 5 + + var targetByteOffset = typedArrayByteOffset(target); // step 6 + + var src = ToObject(source); // step 7 + + var srcLength = LengthOfArrayLike(src); // step 8 + + if (targetOffset === Infinity) { + throw new $RangeError('targetOffset must be a finite integer'); // step 9 + } + + if (srcLength + targetOffset > targetLength) { + throw new $RangeError('targetOffset + srcLength must be <= target.length'); // step 10 + } + + var targetByteIndex = (targetOffset * targetElementSize) + targetByteOffset; // step 11 + + var k = 0; // step 12 + + var limit = targetByteIndex + (targetElementSize * srcLength); // step 13 + + while (targetByteIndex < limit) { // step 14 + var Pk = ToString(k); // step 14.a + + var value = Get(src, Pk); // step 14.b + + if (IsBigIntElementType(targetType)) { + value = ToBigInt(value); // step 14.c + } else { + value = ToNumber(value); // step 14.d + } + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 14.e + } + + SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value, true, 'Unordered'); // step 14.f + + k += 1; // step 14.g + + targetByteIndex += targetElementSize; // step 14.h + } +}; diff --git a/node_modules/es-abstract/2022/SetTypedArrayFromTypedArray.js b/node_modules/es-abstract/2022/SetTypedArrayFromTypedArray.js new file mode 100644 index 0000000000000..1988f20d59110 --- /dev/null +++ b/node_modules/es-abstract/2022/SetTypedArrayFromTypedArray.js @@ -0,0 +1,135 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true); + +var typedArrayBuffer = require('typed-array-buffer'); +var typedArrayByteLength = require('typed-array-byte-length'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); +var whichTypedArray = require('which-typed-array'); + +var isInteger = require('../helpers/isInteger'); + +var CloneArrayBuffer = require('./CloneArrayBuffer'); +var GetValueFromBuffer = require('./GetValueFromBuffer'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var IsSharedArrayBuffer = require('./IsSharedArrayBuffer'); +var SameValue = require('./SameValue'); +var SetValueInBuffer = require('./SetValueInBuffer'); +var TypedArrayElementSize = require('./TypedArrayElementSize'); +var TypedArrayElementType = require('./TypedArrayElementType'); + +// https://262.ecma-international.org/13.0/#sec-settypedarrayfromtypedarray + +module.exports = function SetTypedArrayFromTypedArray(target, targetOffset, source) { + var whichTarget = whichTypedArray(target); + if (!whichTarget) { + throw new $TypeError('Assertion failed: target must be a TypedArray instance'); + } + + if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) { + throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity'); + } + + var whichSource = whichTypedArray(source); + if (!whichSource) { + throw new $TypeError('Assertion failed: source must be a TypedArray instance'); + } + + var targetBuffer = typedArrayBuffer(target); // step 1 + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 2 + } + + var targetLength = typedArrayLength(target); // step 3 + + var srcBuffer = typedArrayBuffer(source); // step 4 + + if (IsDetachedBuffer(srcBuffer)) { + throw new $TypeError('source’s buffer is detached'); // step 5 + } + + var targetType = TypedArrayElementType(target); // step 6 + + var targetElementSize = TypedArrayElementSize(target); // step 7 + + var targetByteOffset = typedArrayByteOffset(target); // step 8 + + var srcType = TypedArrayElementType(source); // step 9 + + var srcElementSize = TypedArrayElementSize(source); // step 10 + + var srcLength = typedArrayLength(source); // step 11 + + var srcByteOffset = typedArrayByteOffset(source); // step 12 + + if (targetOffset === Infinity) { + throw new $RangeError('targetOffset must be a non-negative integer or +Infinity'); // step 13 + } + + if (srcLength + targetOffset > targetLength) { + throw new $RangeError('targetOffset + source.length must not be greater than target.length'); // step 14 + } + + var targetContentType = whichTarget === 'BigInt64Array' || whichTarget === 'BigUint64Array' ? 'BigInt' : 'Number'; + var sourceContentType = whichSource === 'BigInt64Array' || whichSource === 'BigUint64Array' ? 'BigInt' : 'Number'; + if (targetContentType !== sourceContentType) { + throw new $TypeError('source and target must have the same content type'); // step 15 + } + + var same; + if (IsSharedArrayBuffer(srcBuffer) && IsSharedArrayBuffer(targetBuffer)) { // step 16 + // a. If srcBuffer.[[ArrayBufferData]] and targetBuffer.[[ArrayBufferData]] are the same Shared Data Block values, let same be true; else let same be false. + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + same = SameValue(srcBuffer, targetBuffer); // step 17 + } + + var srcByteIndex; + if (same) { // step 18 + var srcByteLength = typedArrayByteLength(source); // step 18.a + + srcBuffer = CloneArrayBuffer(srcBuffer, srcByteOffset, srcByteLength, $ArrayBuffer); // step 18.b + + // c. NOTE: %ArrayBuffer% is used to clone srcBuffer because is it known to not have any observable side-effects. + + srcByteIndex = 0; // step 18.d + } else { + srcByteIndex = srcByteOffset; // step 19 + } + + var targetByteIndex = (targetOffset * targetElementSize) + targetByteOffset; // step 20 + + var limit = targetByteIndex + (targetElementSize * srcLength); // step 21 + + var value; + if (srcType === targetType) { // step 22 + // a. NOTE: If srcType and targetType are the same, the transfer must be performed in a manner that preserves the bit-level encoding of the source data. + + while (targetByteIndex < limit) { // step 22.b + value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'Uint8', true, 'Unordered'); // step 22.b.i + + SetValueInBuffer(targetBuffer, targetByteIndex, 'Uint8', value, true, 'Unordered'); // step 22.b.ii + + srcByteIndex += 1; // step 22.b.iii + + targetByteIndex += 1; // step 22.b.iv + } + } else { // step 23 + while (targetByteIndex < limit) { // step 23.a + value = GetValueFromBuffer(srcBuffer, srcByteIndex, srcType, true, 'Unordered'); // step 23.a.i + + SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value, true, 'Unordered'); // step 23.a.ii + + srcByteIndex += srcElementSize; // step 23.a.iii + + targetByteIndex += targetElementSize; // step 23.a.iv + } + } +}; diff --git a/node_modules/es-abstract/2022/SetValueInBuffer.js b/node_modules/es-abstract/2022/SetValueInBuffer.js new file mode 100644 index 0000000000000..ff9de36ca2c75 --- /dev/null +++ b/node_modules/es-abstract/2022/SetValueInBuffer.js @@ -0,0 +1,105 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var NumericToRawBytes = require('./NumericToRawBytes'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var hasOwn = require('hasown'); + +var table60 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); + +// https://262.ecma-international.org/12.0/#sec-setvalueinbuffer + +/* eslint max-params: 0 */ + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex) || byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer'); + } + + if (typeof type !== 'string' || !hasOwn(table60, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') { + throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`'); + } + + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3 + throw new $TypeError('Assertion failed: `value` must be a BigInt if type is BigInt64 or BigUint64, otherwise a Number'); + } + + // 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = table60[type]; // step 5 + + // 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6 + + var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7 + + if (isSAB) { // step 8 + /* + Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). + If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false. + Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + } + + // 10. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2022/SortIndexedProperties.js b/node_modules/es-abstract/2022/SortIndexedProperties.js new file mode 100644 index 0000000000000..97eb76afa9a2b --- /dev/null +++ b/node_modules/es-abstract/2022/SortIndexedProperties.js @@ -0,0 +1,64 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DeletePropertyOrThrow = require('./DeletePropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var Set = require('./Set'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isAbstractClosure = require('../helpers/isAbstractClosure'); +var isInteger = require('../helpers/isInteger'); + +var $push = callBound('Array.prototype.push'); +var $sort = callBound('Array.prototype.sort'); + +// https://262.ecma-international.org/13.0/#sec-sortindexedproperties + +module.exports = function SortIndexedProperties(obj, len, SortCompare) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(obj) is not Object'); + } + if (!isInteger(len) || len < 0) { + throw new $TypeError('Assertion failed: `len` must be an integer >= 0'); + } + if (!isAbstractClosure(SortCompare) || SortCompare.length !== 2) { + throw new $TypeError('Assertion failed: `SortCompare` must be an abstract closure taking 2 arguments'); + } + + var items = []; // step 1 + + var k = 0; // step 2 + + while (k < len) { // step 3 + var Pk = ToString(k); + var kPresent = HasProperty(obj, Pk); + if (kPresent) { + var kValue = Get(obj, Pk); + $push(items, kValue); + } + k += 1; + } + + var itemCount = items.length; // step 4 + + $sort(items, SortCompare); // step 5 + + var j = 0; // step 6 + + while (j < itemCount) { // step 7 + Set(obj, ToString(j), items[j], true); + j += 1; + } + + while (j < len) { // step 8 + DeletePropertyOrThrow(obj, ToString(j)); + j += 1; + } + return obj; // step 9 +}; diff --git a/node_modules/es-abstract/2022/SpeciesConstructor.js b/node_modules/es-abstract/2022/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2022/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2022/StringCreate.js b/node_modules/es-abstract/2022/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2022/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2022/StringGetOwnProperty.js b/node_modules/es-abstract/2022/StringGetOwnProperty.js new file mode 100644 index 0000000000000..579bb9556dbc7 --- /dev/null +++ b/node_modules/es-abstract/2022/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://262.ecma-international.org/12.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsIntegralNumber(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2022/StringIndexOf.js b/node_modules/es-abstract/2022/StringIndexOf.js new file mode 100644 index 0000000000000..2f6944d156bce --- /dev/null +++ b/node_modules/es-abstract/2022/StringIndexOf.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $slice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/12.0/#sec-stringindexof + +module.exports = function StringIndexOf(string, searchValue, fromIndex) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + if (Type(searchValue) !== 'String') { + throw new $TypeError('Assertion failed: `searchValue` must be a String'); + } + if (!isInteger(fromIndex) || fromIndex < 0) { + throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer'); + } + + var len = string.length; + if (searchValue === '' && fromIndex <= len) { + return fromIndex; + } + + var searchLen = searchValue.length; + for (var i = fromIndex; i <= (len - searchLen); i += 1) { + var candidate = $slice(string, i, i + searchLen); + if (candidate === searchValue) { + return i; + } + } + return -1; +}; diff --git a/node_modules/es-abstract/2022/StringPad.js b/node_modules/es-abstract/2022/StringPad.js new file mode 100644 index 0000000000000..cdf69001bb5bd --- /dev/null +++ b/node_modules/es-abstract/2022/StringPad.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); + +var $strSlice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/11.0/#sec-stringpad + +module.exports = function StringPad(O, maxLength, fillString, placement) { + if (placement !== 'start' && placement !== 'end') { + throw new $TypeError('Assertion failed: `placement` must be "start" or "end"'); + } + var S = ToString(O); + var intMaxLength = ToLength(maxLength); + var stringLength = S.length; + if (intMaxLength <= stringLength) { + return S; + } + var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString); + if (filler === '') { + return S; + } + var fillLen = intMaxLength - stringLength; + + // the String value consisting of repeated concatenations of filler truncated to length fillLen. + var truncatedStringFiller = ''; + while (truncatedStringFiller.length < fillLen) { + truncatedStringFiller += filler; + } + truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen); + + if (placement === 'start') { + return truncatedStringFiller + S; + } + return S + truncatedStringFiller; +}; diff --git a/node_modules/es-abstract/2022/StringToBigInt.js b/node_modules/es-abstract/2022/StringToBigInt.js new file mode 100644 index 0000000000000..bb113b4c6a258 --- /dev/null +++ b/node_modules/es-abstract/2022/StringToBigInt.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +// https://262.ecma-international.org/14.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return void undefined; + } +}; diff --git a/node_modules/es-abstract/2022/StringToCodePoints.js b/node_modules/es-abstract/2022/StringToCodePoints.js new file mode 100644 index 0000000000000..f503ce1b47933 --- /dev/null +++ b/node_modules/es-abstract/2022/StringToCodePoints.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $push = callBound('Array.prototype.push'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-stringtocodepoints + +module.exports = function StringToCodePoints(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var codePoints = []; + var size = string.length; + var position = 0; + while (position < size) { + var cp = CodePointAt(string, position); + $push(codePoints, cp['[[CodePoint]]']); + position += cp['[[CodeUnitCount]]']; + } + return codePoints; +}; diff --git a/node_modules/es-abstract/2022/StringToNumber.js b/node_modules/es-abstract/2022/StringToNumber.js new file mode 100644 index 0000000000000..5775b56c69f4e --- /dev/null +++ b/node_modules/es-abstract/2022/StringToNumber.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-stringtonumber + +module.exports = function StringToNumber(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` is not a String'); + } + if (isBinary(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 2)); + } + if (isOctal(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 8)); + } + if (hasNonWS(argument) || isInvalidHexLiteral(argument)) { + return NaN; + } + var trimmed = $trim(argument); + if (trimmed !== argument) { + return StringToNumber(trimmed); + } + return $Number(argument); +}; diff --git a/node_modules/es-abstract/2022/SymbolDescriptiveString.js b/node_modules/es-abstract/2022/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2022/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2022/TestIntegrityLevel.js b/node_modules/es-abstract/2022/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2022/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2022/ThrowCompletion.js b/node_modules/es-abstract/2022/ThrowCompletion.js new file mode 100644 index 0000000000000..b7d388a35292e --- /dev/null +++ b/node_modules/es-abstract/2022/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2022/TimeClip.js b/node_modules/es-abstract/2022/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2022/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2022/TimeFromYear.js b/node_modules/es-abstract/2022/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2022/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2022/TimeString.js b/node_modules/es-abstract/2022/TimeString.js new file mode 100644 index 0000000000000..051c4728e2e49 --- /dev/null +++ b/node_modules/es-abstract/2022/TimeString.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var HourFromTime = require('./HourFromTime'); +var MinFromTime = require('./MinFromTime'); +var SecFromTime = require('./SecFromTime'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-timestring + +module.exports = function TimeString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var hour = HourFromTime(tv); + var minute = MinFromTime(tv); + var second = SecFromTime(tv); + return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; +}; diff --git a/node_modules/es-abstract/2022/TimeWithinDay.js b/node_modules/es-abstract/2022/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2022/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2022/ToBigInt.js b/node_modules/es-abstract/2022/ToBigInt.js new file mode 100644 index 0000000000000..d24e0fff091e3 --- /dev/null +++ b/node_modules/es-abstract/2022/ToBigInt.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var StringToBigInt = require('./StringToBigInt'); +var ToPrimitive = require('./ToPrimitive'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/11.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (prim == null) { + throw new $TypeError('Cannot convert null or undefined to a BigInt'); + } + + if (typeof prim === 'boolean') { + return prim ? $BigInt(1) : $BigInt(0); + } + + if (typeof prim === 'number') { + throw new $TypeError('Cannot convert a Number value to a BigInt'); + } + + if (typeof prim === 'string') { + var n = StringToBigInt(prim); + if (isNaN(n)) { + throw new $TypeError('Failed to parse String to BigInt'); + } + return n; + } + + if (typeof prim === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a BigInt'); + } + + if (typeof prim !== 'bigint') { + throw new $SyntaxError('Assertion failed: unknown primitive type'); + } + + return prim; +}; diff --git a/node_modules/es-abstract/2022/ToBigInt64.js b/node_modules/es-abstract/2022/ToBigInt64.js new file mode 100644 index 0000000000000..65c1c55d92b18 --- /dev/null +++ b/node_modules/es-abstract/2022/ToBigInt64.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; diff --git a/node_modules/es-abstract/2022/ToBigUint64.js b/node_modules/es-abstract/2022/ToBigUint64.js new file mode 100644 index 0000000000000..ff68236a8c88f --- /dev/null +++ b/node_modules/es-abstract/2022/ToBigUint64.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; diff --git a/node_modules/es-abstract/2022/ToBoolean.js b/node_modules/es-abstract/2022/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2022/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2022/ToDateString.js b/node_modules/es-abstract/2022/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2022/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2022/ToIndex.js b/node_modules/es-abstract/2022/ToIndex.js new file mode 100644 index 0000000000000..2343b44f32192 --- /dev/null +++ b/node_modules/es-abstract/2022/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var ToLength = require('./ToLength'); +var SameValue = require('./SameValue'); + +// https://262.ecma-international.org/8.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToIntegerOrInfinity(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValue(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2022/ToInt16.js b/node_modules/es-abstract/2022/ToInt16.js new file mode 100644 index 0000000000000..21694bdeb923c --- /dev/null +++ b/node_modules/es-abstract/2022/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://262.ecma-international.org/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2022/ToInt32.js b/node_modules/es-abstract/2022/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/2022/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2022/ToInt8.js b/node_modules/es-abstract/2022/ToInt8.js new file mode 100644 index 0000000000000..e223b6c1d352a --- /dev/null +++ b/node_modules/es-abstract/2022/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://262.ecma-international.org/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2022/ToIntegerOrInfinity.js b/node_modules/es-abstract/2022/ToIntegerOrInfinity.js new file mode 100644 index 0000000000000..5f55e1ea0cadf --- /dev/null +++ b/node_modules/es-abstract/2022/ToIntegerOrInfinity.js @@ -0,0 +1,20 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + var integer = floor(abs(number)); + if (integer === 0) { return 0; } + return $sign(number) * integer; +}; diff --git a/node_modules/es-abstract/2022/ToLength.js b/node_modules/es-abstract/2022/ToLength.js new file mode 100644 index 0000000000000..0468c3e71f305 --- /dev/null +++ b/node_modules/es-abstract/2022/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +module.exports = function ToLength(argument) { + var len = ToIntegerOrInfinity(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2022/ToNumber.js b/node_modules/es-abstract/2022/ToNumber.js new file mode 100644 index 0000000000000..c471ed42867ac --- /dev/null +++ b/node_modules/es-abstract/2022/ToNumber.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var StringToNumber = require('./StringToNumber'); + +// https://262.ecma-international.org/13.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + return StringToNumber(value); + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2022/ToNumeric.js b/node_modules/es-abstract/2022/ToNumeric.js new file mode 100644 index 0000000000000..140adb3975b21 --- /dev/null +++ b/node_modules/es-abstract/2022/ToNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); + +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var ToNumber = require('./ToNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-tonumeric + +module.exports = function ToNumeric(argument) { + var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (Type(primValue) === 'BigInt') { + return primValue; + } + return ToNumber(primValue); +}; diff --git a/node_modules/es-abstract/2022/ToObject.js b/node_modules/es-abstract/2022/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2022/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2022/ToPrimitive.js b/node_modules/es-abstract/2022/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2022/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2022/ToPropertyDescriptor.js b/node_modules/es-abstract/2022/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2022/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2022/ToPropertyKey.js b/node_modules/es-abstract/2022/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2022/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2022/ToString.js b/node_modules/es-abstract/2022/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2022/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2022/ToUint16.js b/node_modules/es-abstract/2022/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/2022/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2022/ToUint32.js b/node_modules/es-abstract/2022/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/2022/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2022/ToUint8.js b/node_modules/es-abstract/2022/ToUint8.js new file mode 100644 index 0000000000000..6e4e4b5add2ab --- /dev/null +++ b/node_modules/es-abstract/2022/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2022/ToUint8Clamp.js b/node_modules/es-abstract/2022/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2022/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2022/ToZeroPaddedDecimalString.js b/node_modules/es-abstract/2022/ToZeroPaddedDecimalString.js new file mode 100644 index 0000000000000..b74b74d2cc0d6 --- /dev/null +++ b/node_modules/es-abstract/2022/ToZeroPaddedDecimalString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $RangeError = GetIntrinsic('%RangeError%'); + +var StringPad = require('./StringPad'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/13.0/#sec-tozeropaddeddecimalstring + +module.exports = function ToZeroPaddedDecimalString(n, minLength) { + if (!isInteger(n) || n < 0) { + throw new $RangeError('Assertion failed: `q` must be a non-negative integer'); + } + var S = $String(n); + return StringPad(S, minLength, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2022/TrimString.js b/node_modules/es-abstract/2022/TrimString.js new file mode 100644 index 0000000000000..113dcf82b82d8 --- /dev/null +++ b/node_modules/es-abstract/2022/TrimString.js @@ -0,0 +1,29 @@ +'use strict'; + +var trimStart = require('string.prototype.trimstart'); +var trimEnd = require('string.prototype.trimend'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/10.0/#sec-trimstring + +module.exports = function TrimString(string, where) { + var str = RequireObjectCoercible(string); + var S = ToString(str); + var T; + if (where === 'start') { + T = trimStart(S); + } else if (where === 'end') { + T = trimEnd(S); + } else if (where === 'start+end') { + T = trimStart(trimEnd(S)); + } else { + throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"'); + } + return T; +}; diff --git a/node_modules/es-abstract/2022/Type.js b/node_modules/es-abstract/2022/Type.js new file mode 100644 index 0000000000000..555ca74ea5196 --- /dev/null +++ b/node_modules/es-abstract/2022/Type.js @@ -0,0 +1,15 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2022/TypedArrayCreate.js b/node_modules/es-abstract/2022/TypedArrayCreate.js new file mode 100644 index 0000000000000..ef9fbe2599495 --- /dev/null +++ b/node_modules/es-abstract/2022/TypedArrayCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var availableTypedArrays = require('available-typed-arrays')(); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/7.0/#typedarray-create + +module.exports = function TypedArrayCreate(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + ValidateTypedArray(newTypedArray); // step 2 + + if (argumentList.length === 1 && Type(argumentList[0]) === 'Number') { // step 3 + if (typedArrayLength(newTypedArray) < argumentList[0]) { + throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a + } + } + + return newTypedArray; // step 4 +}; diff --git a/node_modules/es-abstract/2022/TypedArrayElementSize.js b/node_modules/es-abstract/2022/TypedArrayElementSize.js new file mode 100644 index 0000000000000..4f2917ee64d1f --- /dev/null +++ b/node_modules/es-abstract/2022/TypedArrayElementSize.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize + +var table71 = { + __proto__: null, + $Int8Array: 1, + $Uint8Array: 1, + $Uint8ClampedArray: 1, + $Int16Array: 2, + $Uint16Array: 2, + $Int32Array: 4, + $Uint32Array: 4, + $BigInt64Array: 8, + $BigUint64Array: 8, + $Float32Array: 4, + $Float64Array: 8 +}; + +module.exports = function TypedArrayElementSize(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var size = table71['$' + type]; + if (!isInteger(size) || size < 0) { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return size; +}; diff --git a/node_modules/es-abstract/2022/TypedArrayElementType.js b/node_modules/es-abstract/2022/TypedArrayElementType.js new file mode 100644 index 0000000000000..d6d9e2b140827 --- /dev/null +++ b/node_modules/es-abstract/2022/TypedArrayElementType.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementtype + +var table71 = { + __proto__: null, + $Int8Array: 'Int8', + $Uint8Array: 'Uint8', + $Uint8ClampedArray: 'Uint8C', + $Int16Array: 'Int16', + $Uint16Array: 'Uint16', + $Int32Array: 'Int32', + $Uint32Array: 'Uint32', + $BigInt64Array: 'BigInt64', + $BigUint64Array: 'BigUint64', + $Float32Array: 'Float32', + $Float64Array: 'Float64' +}; + +module.exports = function TypedArrayElementType(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var result = table71['$' + type]; + if (typeof result !== 'string') { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return result; +}; diff --git a/node_modules/es-abstract/2022/TypedArraySpeciesCreate.js b/node_modules/es-abstract/2022/TypedArraySpeciesCreate.js new file mode 100644 index 0000000000000..2bfdff5eb705c --- /dev/null +++ b/node_modules/es-abstract/2022/TypedArraySpeciesCreate.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var SpeciesConstructor = require('./SpeciesConstructor'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/7.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreate(constructor, argumentList); // step 4 +}; diff --git a/node_modules/es-abstract/2022/UTF16EncodeCodePoint.js b/node_modules/es-abstract/2022/UTF16EncodeCodePoint.js new file mode 100644 index 0000000000000..0af67bc12e7b9 --- /dev/null +++ b/node_modules/es-abstract/2022/UTF16EncodeCodePoint.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/12.0/#sec-utf16encoding + +module.exports = function UTF16EncodeCodePoint(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800); + var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00); + return cu1 + cu2; +}; diff --git a/node_modules/es-abstract/2022/UTF16SurrogatePairToCodePoint.js b/node_modules/es-abstract/2022/UTF16SurrogatePairToCodePoint.js new file mode 100644 index 0000000000000..6a247a239d96b --- /dev/null +++ b/node_modules/es-abstract/2022/UTF16SurrogatePairToCodePoint.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair + +module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2022/UnicodeEscape.js b/node_modules/es-abstract/2022/UnicodeEscape.js new file mode 100644 index 0000000000000..b708c90df0a05 --- /dev/null +++ b/node_modules/es-abstract/2022/UnicodeEscape.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); + +var StringPad = require('./StringPad'); + +// https://262.ecma-international.org/11.0/#sec-unicodeescape + +module.exports = function UnicodeEscape(C) { + if (typeof C !== 'string' || C.length !== 1) { + throw new $TypeError('Assertion failed: `C` must be a single code unit'); + } + var n = $charCodeAt(C, 0); + if (n > 0xFFFF) { + throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF'); + } + + return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..c67d7856078c5 --- /dev/null +++ b/node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,177 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isFullyPopulatedPropertyDescriptor = require('../helpers/isFullyPopulatedPropertyDescriptor'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor + +// see https://github.com/tc39/ecma262/pull/2468 for ES2022 changes + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + + if (Type(current) === 'Undefined') { // step 2 + if (!extensible) { + return false; // step 2.a + } + if (oType === 'Undefined') { + return true; // step 2.b + } + if (IsAccessorDescriptor(Desc)) { // step 2.c + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + // step 2.d + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!Desc['[[Configurable]]'], + '[[Enumerable]]': !!Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': !!Desc['[[Writable]]'] + } + ); + } + + // 3. Assert: current is a fully populated Property Descriptor. + if (!isFullyPopulatedPropertyDescriptor({ + IsAccessorDescriptor: IsAccessorDescriptor, + IsDataDescriptor: IsDataDescriptor + }, current)) { + throw new $TypeError('`current`, when present, must be a fully populated and valid Property Descriptor'); + } + + // 4. If every field in Desc is absent, return true. + // this can't really match the assertion that it's a Property Descriptor in our JS implementation + + // 5. If current.[[Configurable]] is false, then + if (!current['[[Configurable]]']) { + if ('[[Configurable]]' in Desc && Desc['[[Configurable]]']) { + // step 5.a + return false; + } + if ('[[Enumerable]]' in Desc && !SameValue(Desc['[[Enumerable]]'], current['[[Enumerable]]'])) { + // step 5.b + return false; + } + if (!IsGenericDescriptor(Desc) && !SameValue(IsAccessorDescriptor(Desc), IsAccessorDescriptor(current))) { + // step 5.c + return false; + } + if (IsAccessorDescriptor(current)) { // step 5.d + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + } else if (!current['[[Writable]]']) { // step 5.e + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + } + } + + // 6. If O is not undefined, then + if (oType !== 'Undefined') { + var configurable; + var enumerable; + if (IsDataDescriptor(current) && IsAccessorDescriptor(Desc)) { // step 6.a + configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]']; + enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]']; + // Replace the property named P of object O with an accessor property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!configurable, + '[[Enumerable]]': !!enumerable, + '[[Get]]': ('[[Get]]' in Desc ? Desc : current)['[[Get]]'], + '[[Set]]': ('[[Set]]' in Desc ? Desc : current)['[[Set]]'] + } + ); + } else if (IsAccessorDescriptor(current) && IsDataDescriptor(Desc)) { + configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]']; + enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]']; + // i. Replace the property named P of object O with a data property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!configurable, + '[[Enumerable]]': !!enumerable, + '[[Value]]': ('[[Value]]' in Desc ? Desc : current)['[[Value]]'], + '[[Writable]]': !!('[[Writable]]' in Desc ? Desc : current)['[[Writable]]'] + } + ); + } + + // For each field of Desc that is present, set the corresponding attribute of the property named P of object O to the value of the field. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + + return true; // step 7 +}; diff --git a/node_modules/es-abstract/2022/ValidateAtomicAccess.js b/node_modules/es-abstract/2022/ValidateAtomicAccess.js new file mode 100644 index 0000000000000..914525bcd5187 --- /dev/null +++ b/node_modules/es-abstract/2022/ValidateAtomicAccess.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); +var TypedArrayElementSize = require('./TypedArrayElementSize'); + +var isTypedArray = require('is-typed-array'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/13.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); + } + + var length = typedArrayLength(typedArray); // step 1 + + var accessIndex = ToIndex(requestIndex); // step 2 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 4 + } + + var elementSize = TypedArrayElementSize(typedArray); // step 5 + + var offset = typedArrayByteOffset(typedArray); // step 6 + + return (accessIndex * elementSize) + offset; // step 7 +}; diff --git a/node_modules/es-abstract/2022/ValidateIntegerTypedArray.js b/node_modules/es-abstract/2022/ValidateIntegerTypedArray.js new file mode 100644 index 0000000000000..c9c8249c6aaa9 --- /dev/null +++ b/node_modules/es-abstract/2022/ValidateIntegerTypedArray.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var Type = require('./Type'); +var TypedArrayElementType = require('./TypedArrayElementType'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-validateintegertypedarray + +module.exports = function ValidateIntegerTypedArray(typedArray) { + var waitable = arguments.length > 1 ? arguments[1] : false; // step 1 + + if (Type(waitable) !== 'Boolean') { + throw new $TypeError('Assertion failed: `waitable` must be a Boolean'); + } + + var buffer = ValidateTypedArray(typedArray); // step 2 + + if (waitable) { // step 5 + var typeName = whichTypedArray(typedArray); + if (typeName !== 'Int32Array' && typeName !== 'BigInt64Array') { + throw new $TypeError('Assertion failed: `typedArray` must be an Int32Array or BigInt64Array when `waitable` is true'); // step 5.a + } + } else { + var type = TypedArrayElementType(typedArray); // step 5.a + if (!IsUnclampedIntegerElementType(type) && !IsBigIntElementType(type)) { + throw new $TypeError('Assertion failed: `typedArray` must be an integer TypedArray'); // step 5.b + } + } + + return buffer; // step 6 +}; diff --git a/node_modules/es-abstract/2022/ValidateTypedArray.js b/node_modules/es-abstract/2022/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2022/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2022/WeakRefDeref.js b/node_modules/es-abstract/2022/WeakRefDeref.js new file mode 100644 index 0000000000000..6b9921f37be92 --- /dev/null +++ b/node_modules/es-abstract/2022/WeakRefDeref.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $deref = callBound('WeakRef.prototype.deref', true); + +var isWeakRef = require('is-weakref'); + +var AddToKeptObjects = require('./AddToKeptObjects'); + +// https://262.ecma-international.org/12.0/#sec-weakrefderef + +module.exports = function WeakRefDeref(weakRef) { + if (!isWeakRef(weakRef)) { + throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef'); + } + var target = $deref(weakRef); + if (target) { + AddToKeptObjects(target); + } + return target; +}; diff --git a/node_modules/es-abstract/2022/WeekDay.js b/node_modules/es-abstract/2022/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2022/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2022/WordCharacters.js b/node_modules/es-abstract/2022/WordCharacters.js new file mode 100644 index 0000000000000..aeebc1e75cbc7 --- /dev/null +++ b/node_modules/es-abstract/2022/WordCharacters.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $indexOf = callBound('String.prototype.indexOf', true); + +var Canonicalize = require('./Canonicalize'); +var Type = require('./Type'); + +var caseFolding = require('../helpers/caseFolding'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var A = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1 + +// https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation + +module.exports = function WordCharacters(IgnoreCase, Unicode) { + if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans'); + } + + var U = ''; + forEach(OwnPropertyKeys(caseFolding.C), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.C[c]; // step 3 + } + }); + forEach(OwnPropertyKeys(caseFolding.S), function (c) { + if ( + $indexOf(A, c) === -1 // c not in A + && $indexOf(A, Canonicalize(c, IgnoreCase, Unicode)) > -1 // canonicalized c IS in A + ) { + U += caseFolding.S[c]; // step 3 + } + }); + + if ((!Unicode || !IgnoreCase) && U.length > 0) { + throw new $TypeError('Assertion failed: `U` must be empty when `IgnoreCase` and `Unicode` are not both true'); // step 4 + } + + return A + U; // step 5, 6 +}; diff --git a/node_modules/es-abstract/2022/YearFromTime.js b/node_modules/es-abstract/2022/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2022/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2022/abs.js b/node_modules/es-abstract/2022/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2022/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2022/clamp.js b/node_modules/es-abstract/2022/clamp.js new file mode 100644 index 0000000000000..8da1394845973 --- /dev/null +++ b/node_modules/es-abstract/2022/clamp.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var max = GetIntrinsic('%Math.max%'); +var min = GetIntrinsic('%Math.min%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#clamping + +module.exports = function clamp(x, lower, upper) { + if (Type(x) !== 'Number' || Type(lower) !== 'Number' || Type(upper) !== 'Number' || !(lower <= upper)) { + throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`'); + } + return min(max(lower, x), upper); +}; diff --git a/node_modules/es-abstract/2022/floor.js b/node_modules/es-abstract/2022/floor.js new file mode 100644 index 0000000000000..625548e936b95 --- /dev/null +++ b/node_modules/es-abstract/2022/floor.js @@ -0,0 +1,16 @@ +'use strict'; + +var Type = require('./Type'); + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (Type(x) === 'BigInt') { + return x; + } + return $floor(x); +}; diff --git a/node_modules/es-abstract/2022/max.js b/node_modules/es-abstract/2022/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2022/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2022/min.js b/node_modules/es-abstract/2022/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2022/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2022/modulo.js b/node_modules/es-abstract/2022/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2022/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2022/msFromTime.js b/node_modules/es-abstract/2022/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2022/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2022/substring.js b/node_modules/es-abstract/2022/substring.js new file mode 100644 index 0000000000000..0c7e0203d596c --- /dev/null +++ b/node_modules/es-abstract/2022/substring.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/12.0/#substring +module.exports = function substring(S, inclusiveStart, exclusiveEnd) { + if (Type(S) !== 'String' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) { + throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers'); + } + return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length); +}; diff --git a/node_modules/es-abstract/2022/thisBigIntValue.js b/node_modules/es-abstract/2022/thisBigIntValue.js new file mode 100644 index 0000000000000..d03b4a43c3c51 --- /dev/null +++ b/node_modules/es-abstract/2022/thisBigIntValue.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-thisbigintvalue + +module.exports = function thisBigIntValue(value) { + var type = Type(value); + if (type === 'BigInt') { + return value; + } + if (!$bigIntValueOf) { + throw new $SyntaxError('BigInt is not supported'); + } + return $bigIntValueOf(value); +}; diff --git a/node_modules/es-abstract/2022/thisBooleanValue.js b/node_modules/es-abstract/2022/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2022/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2022/thisNumberValue.js b/node_modules/es-abstract/2022/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2022/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2022/thisStringValue.js b/node_modules/es-abstract/2022/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2022/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2022/thisSymbolValue.js b/node_modules/es-abstract/2022/thisSymbolValue.js new file mode 100644 index 0000000000000..91a55254283b8 --- /dev/null +++ b/node_modules/es-abstract/2022/thisSymbolValue.js @@ -0,0 +1,19 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-thissymbolvalue + +module.exports = function thisSymbolValue(value) { + if (!$SymbolValueOf) { + throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); + } + if (Type(value) === 'Symbol') { + return value; + } + return $SymbolValueOf(value); +}; diff --git a/node_modules/es-abstract/2022/thisTimeValue.js b/node_modules/es-abstract/2022/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2022/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2023/AddEntriesFromIterable.js b/node_modules/es-abstract/2023/AddEntriesFromIterable.js new file mode 100644 index 0000000000000..907229909ef20 --- /dev/null +++ b/node_modules/es-abstract/2023/AddEntriesFromIterable.js @@ -0,0 +1,47 @@ +'use strict'; + +var inspect = require('object-inspect'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var GetIterator = require('./GetIterator'); +var IsCallable = require('./IsCallable'); +var IteratorClose = require('./IteratorClose'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var ThrowCompletion = require('./ThrowCompletion'); +var Type = require('./Type'); + +// https://262.ecma-international.org/14.0/#sec-add-entries-from-iterable + +module.exports = function AddEntriesFromIterable(target, iterable, adder) { + if (!IsCallable(adder)) { + throw new $TypeError('Assertion failed: `adder` is not callable'); + } + if (iterable == null) { + throw new $TypeError('Assertion failed: `iterable` is present, and not nullish'); + } + var iteratorRecord = GetIterator(iterable, 'sync'); + while (true) { // eslint-disable-line no-constant-condition + var next = IteratorStep(iteratorRecord); + if (!next) { + return target; + } + var nextItem = IteratorValue(next); + if (Type(nextItem) !== 'Object') { + var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem))); + return IteratorClose(iteratorRecord, error); + } + try { + var k = Get(nextItem, '0'); + var v = Get(nextItem, '1'); + Call(adder, target, [k, v]); + } catch (e) { + return IteratorClose(iteratorRecord, ThrowCompletion(e)); + } + } +}; diff --git a/node_modules/es-abstract/2023/AddToKeptObjects.js b/node_modules/es-abstract/2023/AddToKeptObjects.js new file mode 100644 index 0000000000000..a2495ba8faba0 --- /dev/null +++ b/node_modules/es-abstract/2023/AddToKeptObjects.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var SLOT = require('internal-slot'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ClearKeptObjects = require('./ClearKeptObjects'); +var Type = require('./Type'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/12.0/#sec-addtokeptobjects + +module.exports = function AddToKeptObjects(object) { + if (Type(object) !== 'Object') { + throw new $TypeError('Assertion failed: `object` must be an Object'); + } + $push(SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]'), object); +}; diff --git a/node_modules/es-abstract/2023/AdvanceStringIndex.js b/node_modules/es-abstract/2023/AdvanceStringIndex.js new file mode 100644 index 0000000000000..4a0f499aa592d --- /dev/null +++ b/node_modules/es-abstract/2023/AdvanceStringIndex.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/12.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + var cp = CodePointAt(S, index); + return index + cp['[[CodeUnitCount]]']; +}; diff --git a/node_modules/es-abstract/2023/ApplyStringOrNumericBinaryOperator.js b/node_modules/es-abstract/2023/ApplyStringOrNumericBinaryOperator.js new file mode 100644 index 0000000000000..e5f997a39d09a --- /dev/null +++ b/node_modules/es-abstract/2023/ApplyStringOrNumericBinaryOperator.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var HasOwnProperty = require('./HasOwnProperty'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var NumberAdd = require('./Number/add'); +var NumberBitwiseAND = require('./Number/bitwiseAND'); +var NumberBitwiseOR = require('./Number/bitwiseOR'); +var NumberBitwiseXOR = require('./Number/bitwiseXOR'); +var NumberDivide = require('./Number/divide'); +var NumberExponentiate = require('./Number/exponentiate'); +var NumberLeftShift = require('./Number/leftShift'); +var NumberMultiply = require('./Number/multiply'); +var NumberRemainder = require('./Number/remainder'); +var NumberSignedRightShift = require('./Number/signedRightShift'); +var NumberSubtract = require('./Number/subtract'); +var NumberUnsignedRightShift = require('./Number/unsignedRightShift'); +var BigIntAdd = require('./BigInt/add'); +var BigIntBitwiseAND = require('./BigInt/bitwiseAND'); +var BigIntBitwiseOR = require('./BigInt/bitwiseOR'); +var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR'); +var BigIntDivide = require('./BigInt/divide'); +var BigIntExponentiate = require('./BigInt/exponentiate'); +var BigIntLeftShift = require('./BigInt/leftShift'); +var BigIntMultiply = require('./BigInt/multiply'); +var BigIntRemainder = require('./BigInt/remainder'); +var BigIntSignedRightShift = require('./BigInt/signedRightShift'); +var BigIntSubtract = require('./BigInt/subtract'); +var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift'); + +// https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator + +// https://262.ecma-international.org/12.0/#step-applystringornumericbinaryoperator-operations-table +var table = { + '**': [NumberExponentiate, BigIntExponentiate], + '*': [NumberMultiply, BigIntMultiply], + '/': [NumberDivide, BigIntDivide], + '%': [NumberRemainder, BigIntRemainder], + '+': [NumberAdd, BigIntAdd], + '-': [NumberSubtract, BigIntSubtract], + '<<': [NumberLeftShift, BigIntLeftShift], + '>>': [NumberSignedRightShift, BigIntSignedRightShift], + '>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift], + '&': [NumberBitwiseAND, BigIntBitwiseAND], + '^': [NumberBitwiseXOR, BigIntBitwiseXOR], + '|': [NumberBitwiseOR, BigIntBitwiseOR] +}; + +module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) { + if (Type(opText) !== 'String' || !HasOwnProperty(table, opText)) { + throw new $TypeError('Assertion failed: `opText` must be a valid operation string'); + } + if (opText === '+') { + var lprim = ToPrimitive(lval); + var rprim = ToPrimitive(rval); + if (Type(lprim) === 'String' || Type(rprim) === 'String') { + var lstr = ToString(lprim); + var rstr = ToString(rprim); + return lstr + rstr; + } + /* eslint no-param-reassign: 1 */ + lval = lprim; + rval = rprim; + } + var lnum = ToNumeric(lval); + var rnum = ToNumeric(rval); + var T = Type(lnum); + if (T !== Type(rnum)) { + throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ'); + } + var Operation = table[opText][T === 'BigInt' ? 1 : 0]; + return Operation(lnum, rnum); +}; diff --git a/node_modules/es-abstract/2023/ArrayCreate.js b/node_modules/es-abstract/2023/ArrayCreate.js new file mode 100644 index 0000000000000..e33224517e289 --- /dev/null +++ b/node_modules/es-abstract/2023/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var hasProto = require('has-proto')(); + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://262.ecma-international.org/12.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 3, 5 + if (proto !== $ArrayPrototype) { // step 4 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 6 + A.length = length; + } + /* step 6, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2023/ArraySetLength.js b/node_modules/es-abstract/2023/ArraySetLength.js new file mode 100644 index 0000000000000..45d7569e7d18c --- /dev/null +++ b/node_modules/es-abstract/2023/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2023/ArraySpeciesCreate.js b/node_modules/es-abstract/2023/ArraySpeciesCreate.js new file mode 100644 index 0000000000000..7b1fd1d27a754 --- /dev/null +++ b/node_modules/es-abstract/2023/ArraySpeciesCreate.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ArrayCreate = require('./ArrayCreate'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/12.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!isInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + + var isArray = IsArray(originalArray); + if (!isArray) { + return ArrayCreate(length); + } + + var C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + + if (typeof C === 'undefined') { + return ArrayCreate(length); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(length); // Construct(C, length); +}; + diff --git a/node_modules/es-abstract/2023/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2023/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 0000000000000..5618539dd6fb0 --- /dev/null +++ b/node_modules/es-abstract/2023/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2023/AsyncIteratorClose.js b/node_modules/es-abstract/2023/AsyncIteratorClose.js new file mode 100644 index 0000000000000..1ae42c0c5f76e --- /dev/null +++ b/node_modules/es-abstract/2023/AsyncIteratorClose.js @@ -0,0 +1,68 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/12.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return $then( + $then( + $then( + new $Promise(function (resolve) { + resolve(GetMethod(iterator, 'return')); // step 4 + // resolve(Call(ret, iterator, [])); // step 6 + }), + function (returnV) { // step 5.a + if (typeof returnV === 'undefined') { + return completion; // step 5.b + } + return Call(returnV, iterator); // step 5.c, 5.d. + } + ), + null, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } else { + throw e; // step 7 + } + } + ), + function (innerResult) { // step 8 + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + } + ); +}; diff --git a/node_modules/es-abstract/2023/BigInt/add.js b/node_modules/es-abstract/2023/BigInt/add.js new file mode 100644 index 0000000000000..22b5db4b32d2c --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/add.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add + +module.exports = function BigIntAdd(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2023/BigInt/bitwiseAND.js b/node_modules/es-abstract/2023/BigInt/bitwiseAND.js new file mode 100644 index 0000000000000..83cd2c3ca9edc --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND + +module.exports = function BigIntBitwiseAND(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2023/BigInt/bitwiseNOT.js b/node_modules/es-abstract/2023/BigInt/bitwiseNOT.js new file mode 100644 index 0000000000000..9a444dfeab8d6 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/bitwiseNOT.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT + +module.exports = function BigIntBitwiseNOT(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + return -x - $BigInt(1); +}; diff --git a/node_modules/es-abstract/2023/BigInt/bitwiseOR.js b/node_modules/es-abstract/2023/BigInt/bitwiseOR.js new file mode 100644 index 0000000000000..3c1b57193ef48 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR + +module.exports = function BigIntBitwiseOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2023/BigInt/bitwiseXOR.js b/node_modules/es-abstract/2023/BigInt/bitwiseXOR.js new file mode 100644 index 0000000000000..45f8217efb83c --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR + +module.exports = function BigIntBitwiseXOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2023/BigInt/divide.js b/node_modules/es-abstract/2023/BigInt/divide.js new file mode 100644 index 0000000000000..5706e7d72e424 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide + +module.exports = function BigIntDivide(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + if (y === $BigInt(0)) { + throw new $RangeError('Division by zero'); + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2023/BigInt/equal.js b/node_modules/es-abstract/2023/BigInt/equal.js new file mode 100644 index 0000000000000..a28826d67ff75 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/equal.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal + +module.exports = function BigIntEqual(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2023/BigInt/exponentiate.js b/node_modules/es-abstract/2023/BigInt/exponentiate.js new file mode 100644 index 0000000000000..2365838c269b6 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/exponentiate.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate + +module.exports = function BigIntExponentiate(base, exponent) { + if (Type(base) !== 'BigInt' || Type(exponent) !== 'BigInt') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts'); + } + if (exponent < $BigInt(0)) { + throw new $RangeError('Exponent must be positive'); + } + if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) { + return $BigInt(1); + } + + var square = base; + var remaining = exponent; + while (remaining > $BigInt(0)) { + square += exponent; + --remaining; // eslint-disable-line no-plusplus + } + return square; +}; diff --git a/node_modules/es-abstract/2023/BigInt/index.js b/node_modules/es-abstract/2023/BigInt/index.js new file mode 100644 index 0000000000000..6ba755ff52a6f --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2023/BigInt/leftShift.js b/node_modules/es-abstract/2023/BigInt/leftShift.js new file mode 100644 index 0000000000000..d2a570223e22c --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/leftShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift + +module.exports = function BigIntLeftShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x << y; +}; diff --git a/node_modules/es-abstract/2023/BigInt/lessThan.js b/node_modules/es-abstract/2023/BigInt/lessThan.js new file mode 100644 index 0000000000000..0b3cd6ba029e8 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/lessThan.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan + +module.exports = function BigIntLessThan(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2023/BigInt/multiply.js b/node_modules/es-abstract/2023/BigInt/multiply.js new file mode 100644 index 0000000000000..6e5d56c83ea0b --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/multiply.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply + +module.exports = function BigIntMultiply(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2023/BigInt/remainder.js b/node_modules/es-abstract/2023/BigInt/remainder.js new file mode 100644 index 0000000000000..d2dc678caf6bd --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/remainder.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (Type(n) !== 'BigInt' || Type(d) !== 'BigInt') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; diff --git a/node_modules/es-abstract/2023/BigInt/signedRightShift.js b/node_modules/es-abstract/2023/BigInt/signedRightShift.js new file mode 100644 index 0000000000000..f63c642f0cda7 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/signedRightShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntLeftShift = require('./leftShift'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift + +module.exports = function BigIntSignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntLeftShift(x, -y); +}; diff --git a/node_modules/es-abstract/2023/BigInt/subtract.js b/node_modules/es-abstract/2023/BigInt/subtract.js new file mode 100644 index 0000000000000..0490784f679cd --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/subtract.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract + +module.exports = function BigIntSubtract(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x - y; +}; diff --git a/node_modules/es-abstract/2023/BigInt/toString.js b/node_modules/es-abstract/2023/BigInt/toString.js new file mode 100644 index 0000000000000..43ad9ec88fef7 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/toString.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError; +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $BigIntToString = callBound('BigInt.prototype.toString', true); + +var Type = require('../Type'); + +var isInteger = require('../../helpers/isInteger'); + +// https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-tostring + +module.exports = function BigIntToString(x, radix) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` must be a BigInt'); + } + + if (!isInteger(radix) || radix < 2 || radix > 36) { + throw new $TypeError('Assertion failed: `radix` must be an integer >= 2 and <= 36'); + } + + if (!$BigIntToString) { + throw new $SyntaxError('BigInt is not supported'); + } + + return $BigIntToString(x, radix); // steps 1 - 12 +}; diff --git a/node_modules/es-abstract/2023/BigInt/unaryMinus.js b/node_modules/es-abstract/2023/BigInt/unaryMinus.js new file mode 100644 index 0000000000000..ee0f7ef1962c3 --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/unaryMinus.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus + +module.exports = function BigIntUnaryMinus(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + + if (x === zero) { + return zero; + } + + return -x; +}; diff --git a/node_modules/es-abstract/2023/BigInt/unsignedRightShift.js b/node_modules/es-abstract/2023/BigInt/unsignedRightShift.js new file mode 100644 index 0000000000000..7ad94f7a88d5f --- /dev/null +++ b/node_modules/es-abstract/2023/BigInt/unsignedRightShift.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift + +module.exports = function BigIntUnsignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + throw new $TypeError('BigInts have no unsigned right shift, use >> instead'); +}; diff --git a/node_modules/es-abstract/2023/BigIntBitwiseOp.js b/node_modules/es-abstract/2023/BigIntBitwiseOp.js new file mode 100644 index 0000000000000..0b1c03a911b68 --- /dev/null +++ b/node_modules/es-abstract/2023/BigIntBitwiseOp.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +// var $BigInt = GetIntrinsic('%BigInt%', true); +// var $pow = GetIntrinsic('%Math.pow%'); + +// var BinaryAnd = require('./BinaryAnd'); +// var BinaryOr = require('./BinaryOr'); +// var BinaryXor = require('./BinaryXor'); +var Type = require('./Type'); +// var modulo = require('./modulo'); + +// var zero = $BigInt && $BigInt(0); +// var negOne = $BigInt && $BigInt(-1); +// var two = $BigInt && $BigInt(2); + +// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop + +module.exports = function BigIntBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('`x` and `y` must be BigInts'); + } + + if (op === '&') { + return x & y; + } + if (op === '|') { + return x | y; + } + return x ^ y; + /* + var result = zero; + var shift = 0; + while (x !== zero && x !== negOne && y !== zero && y !== negOne) { + var xDigit = modulo(x, two); + var yDigit = modulo(y, two); + if (op === '&') { + result += $pow(2, shift) * BinaryAnd(xDigit, yDigit); + } else if (op === '|') { + result += $pow(2, shift) * BinaryOr(xDigit, yDigit); + } else if (op === '^') { + result += $pow(2, shift) * BinaryXor(xDigit, yDigit); + } + shift += 1; + x = (x - xDigit) / two; + y = (y - yDigit) / two; + } + var tmp; + if (op === '&') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else if (op === '|') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else { + tmp = BinaryXor(modulo(x, two), modulo(y, two)); + } + if (tmp !== 0) { + result -= $pow(2, shift); + } + return result; + */ +}; diff --git a/node_modules/es-abstract/2023/BinaryAnd.js b/node_modules/es-abstract/2023/BinaryAnd.js new file mode 100644 index 0000000000000..c617f388dea72 --- /dev/null +++ b/node_modules/es-abstract/2023/BinaryAnd.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryand + +module.exports = function BinaryAnd(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x & y; +}; diff --git a/node_modules/es-abstract/2023/BinaryOr.js b/node_modules/es-abstract/2023/BinaryOr.js new file mode 100644 index 0000000000000..6de0955f1a6d3 --- /dev/null +++ b/node_modules/es-abstract/2023/BinaryOr.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryor + +module.exports = function BinaryOr(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x | y; +}; diff --git a/node_modules/es-abstract/2023/BinaryXor.js b/node_modules/es-abstract/2023/BinaryXor.js new file mode 100644 index 0000000000000..189d7d8469ce1 --- /dev/null +++ b/node_modules/es-abstract/2023/BinaryXor.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryxor + +module.exports = function BinaryXor(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x ^ y; +}; diff --git a/node_modules/es-abstract/2023/ByteListBitwiseOp.js b/node_modules/es-abstract/2023/ByteListBitwiseOp.js new file mode 100644 index 0000000000000..67f4cecb59bac --- /dev/null +++ b/node_modules/es-abstract/2023/ByteListBitwiseOp.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $push = callBound('Array.prototype.push'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop + +module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) { + if (op !== '&' && op !== '^' && op !== '|') { + throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`'); + } + if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + + var result = []; + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + var resultByte; + if (op === '&') { + resultByte = xByte & yByte; + } else if (op === '^') { + resultByte = xByte ^ yByte; + } else { + resultByte = xByte | yByte; + } + $push(result, resultByte); + } + + return result; +}; diff --git a/node_modules/es-abstract/2023/ByteListEqual.js b/node_modules/es-abstract/2023/ByteListEqual.js new file mode 100644 index 0000000000000..489ddc224e667 --- /dev/null +++ b/node_modules/es-abstract/2023/ByteListEqual.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://262.ecma-international.org/12.0/#sec-bytelistequal + +module.exports = function ByteListEqual(xBytes, yBytes) { + if (!IsArray(xBytes) || !IsArray(yBytes)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + + if (xBytes.length !== yBytes.length) { + return false; + } + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + if (xByte !== yByte) { + return false; + } + } + return true; +}; diff --git a/node_modules/es-abstract/2023/Call.js b/node_modules/es-abstract/2023/Call.js new file mode 100644 index 0000000000000..be76246db04f0 --- /dev/null +++ b/node_modules/es-abstract/2023/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply'); + +// https://262.ecma-international.org/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2023/CanBeHeldWeakly.js b/node_modules/es-abstract/2023/CanBeHeldWeakly.js new file mode 100644 index 0000000000000..717effc67e0d0 --- /dev/null +++ b/node_modules/es-abstract/2023/CanBeHeldWeakly.js @@ -0,0 +1,16 @@ +'use strict'; + +var KeyForSymbol = require('./KeyForSymbol'); +var Type = require('./Type'); + +// https://262.ecma-international.org/14.0/#sec-canbeheldweakly + +module.exports = function CanBeHeldWeakly(v) { + if (Type(v) === 'Object') { + return true; // step 1 + } + if (Type(v) === 'Symbol' && typeof KeyForSymbol(v) === 'undefined') { + return true; // step 2 + } + return false; // step 3 +}; diff --git a/node_modules/es-abstract/2023/CanonicalNumericIndexString.js b/node_modules/es-abstract/2023/CanonicalNumericIndexString.js new file mode 100644 index 0000000000000..e9f386326c398 --- /dev/null +++ b/node_modules/es-abstract/2023/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2023/Canonicalize.js b/node_modules/es-abstract/2023/Canonicalize.js new file mode 100644 index 0000000000000..8d0c2249d7427 --- /dev/null +++ b/node_modules/es-abstract/2023/Canonicalize.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var hasOwn = require('hasown'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); +var caseFolding = require('../helpers/caseFolding'); + +// https://262.ecma-international.org/14.0/#sec-runtime-semantics-canonicalize-ch + +module.exports = function Canonicalize(rer, ch) { + assertRecord(Type, 'RegExp Record', 'rer', rer); + if (Type(ch) !== 'String') { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (rer['[[Unicode]]'] && rer['[[IgnoreCase]]']) { // step 1 + if (hasOwn(caseFolding.C, ch)) { + return caseFolding.C[ch]; + } + if (hasOwn(caseFolding.S, ch)) { + return caseFolding.S[ch]; + } + return ch; // step 1.b + } + + if (!rer['[[IgnoreCase]]']) { + return ch; // step 2 + } + + var u = $toUpperCase(ch); // step 5 + + if (u.length !== 1) { + return ch; // step 7 + } + + var cu = u; // step 8 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 9 + } + + return cu; // step 10 +}; diff --git a/node_modules/es-abstract/2023/CharacterRange.js b/node_modules/es-abstract/2023/CharacterRange.js new file mode 100644 index 0000000000000..78783a59f2d6f --- /dev/null +++ b/node_modules/es-abstract/2023/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $push = callBound('Array.prototype.push'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2023/ClearKeptObjects.js b/node_modules/es-abstract/2023/ClearKeptObjects.js new file mode 100644 index 0000000000000..50bd4a5da4199 --- /dev/null +++ b/node_modules/es-abstract/2023/ClearKeptObjects.js @@ -0,0 +1,12 @@ +'use strict'; + +var SLOT = require('internal-slot'); +var keptObjects = []; + +// https://262.ecma-international.org/12.0/#sec-clear-kept-objects + +module.exports = function ClearKeptObjects() { + keptObjects.length = 0; +}; + +SLOT.set(module.exports, '[[es-abstract internal: KeptAlive]]', keptObjects); diff --git a/node_modules/es-abstract/2023/CloneArrayBuffer.js b/node_modules/es-abstract/2023/CloneArrayBuffer.js new file mode 100644 index 0000000000000..d03e91f86470f --- /dev/null +++ b/node_modules/es-abstract/2023/CloneArrayBuffer.js @@ -0,0 +1,49 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsConstructor = require('./IsConstructor'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var OrdinarySetPrototypeOf = require('./OrdinarySetPrototypeOf'); + +var isInteger = require('../helpers/isInteger'); + +var isArrayBuffer = require('is-array-buffer'); +var arrayBufferSlice = require('arraybuffer.prototype.slice'); + +// https://262.ecma-international.org/12.0/#sec-clonearraybuffer + +module.exports = function CloneArrayBuffer(srcBuffer, srcByteOffset, srcLength, cloneConstructor) { + if (!isArrayBuffer(srcBuffer)) { + throw new $TypeError('Assertion failed: `srcBuffer` must be an ArrayBuffer instance'); + } + if (!isInteger(srcByteOffset) || srcByteOffset < 0) { + throw new $TypeError('Assertion failed: `srcByteOffset` must be a non-negative integer'); + } + if (!isInteger(srcLength) || srcLength < 0) { + throw new $TypeError('Assertion failed: `srcLength` must be a non-negative integer'); + } + if (!IsConstructor(cloneConstructor)) { + throw new $TypeError('Assertion failed: `cloneConstructor` must be a constructor'); + } + + // 3. Let targetBuffer be ? AllocateArrayBuffer(cloneConstructor, srcLength). + var proto = GetPrototypeFromConstructor(cloneConstructor, '%ArrayBufferPrototype%'); // step 3, kinda + + if (IsDetachedBuffer(srcBuffer)) { + throw new $TypeError('`srcBuffer` must not be a detached ArrayBuffer'); // step 4 + } + + /* + 5. Let srcBlock be srcBuffer.[[ArrayBufferData]]. + 6. Let targetBlock be targetBuffer.[[ArrayBufferData]]. + 7. Perform CopyDataBlockBytes(targetBlock, 0, srcBlock, srcByteOffset, srcLength). + */ + var targetBuffer = arrayBufferSlice(srcBuffer, srcByteOffset, srcByteOffset + srcLength); // steps 5-7 + OrdinarySetPrototypeOf(targetBuffer, proto); // step 3 + + return targetBuffer; // step 8 +}; diff --git a/node_modules/es-abstract/2023/CodePointAt.js b/node_modules/es-abstract/2023/CodePointAt.js new file mode 100644 index 0000000000000..e1e22905a4f92 --- /dev/null +++ b/node_modules/es-abstract/2023/CodePointAt.js @@ -0,0 +1,58 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var callBound = require('call-bind/callBound'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var Type = require('./Type'); +var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint'); + +var $charAt = callBound('String.prototype.charAt'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +// https://262.ecma-international.org/12.0/#sec-codepointat + +module.exports = function CodePointAt(string, position) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var size = string.length; + if (position < 0 || position >= size) { + throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`'); + } + var first = $charCodeAt(string, position); + var cp = $charAt(string, position); + var firstIsLeading = isLeadingSurrogate(first); + var firstIsTrailing = isTrailingSurrogate(first); + if (!firstIsLeading && !firstIsTrailing) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': false + }; + } + if (firstIsTrailing || (position + 1 === size)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + var second = $charCodeAt(string, position + 1); + if (!isTrailingSurrogate(second)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + + return { + '[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second), + '[[CodeUnitCount]]': 2, + '[[IsUnpairedSurrogate]]': false + }; +}; diff --git a/node_modules/es-abstract/2023/CodePointsToString.js b/node_modules/es-abstract/2023/CodePointsToString.js new file mode 100644 index 0000000000000..6d7cd854b9d85 --- /dev/null +++ b/node_modules/es-abstract/2023/CodePointsToString.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); +var IsArray = require('./IsArray'); + +var forEach = require('../helpers/forEach'); +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/12.0/#sec-codepointstostring + +module.exports = function CodePointsToString(text) { + if (!IsArray(text)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + var result = ''; + forEach(text, function (cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + result += UTF16EncodeCodePoint(cp); + }); + return result; +}; diff --git a/node_modules/es-abstract/2023/CompareArrayElements.js b/node_modules/es-abstract/2023/CompareArrayElements.js new file mode 100644 index 0000000000000..2b8c5f4c64c51 --- /dev/null +++ b/node_modules/es-abstract/2023/CompareArrayElements.js @@ -0,0 +1,52 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsLessThan = require('./IsLessThan'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/14.0/#sec-comparearrayelements + +module.exports = function CompareArrayElements(x, y, compareFn) { + if (typeof compareFn !== 'function' && typeof compareFn !== 'undefined') { + throw new $TypeError('Assertion failed: `compareFn` must be a function or undefined'); + } + + if (typeof x === 'undefined' && typeof y === 'undefined') { + return 0; // step 1 + } + + if (typeof x === 'undefined') { + return 1; // step 2 + } + + if (typeof y === 'undefined') { + return -1; // step 3 + } + + if (typeof compareFn !== 'undefined') { // step 4 + var v = ToNumber(Call(compareFn, void undefined, [x, y])); // step 4.a + if (isNaN(v)) { + return 0; // step 4.b + } + return v; // step 4.c + } + + var xString = ToString(x); // step 5 + var yString = ToString(y); // step 6 + var xSmaller = IsLessThan(xString, yString, true); // step 7 + if (xSmaller) { + return -1; // step 8 + } + var ySmaller = IsLessThan(yString, xString, true); // step 9 + if (ySmaller) { + return 1; // step 10 + } + return 0; // step 11 +}; diff --git a/node_modules/es-abstract/2023/CompareTypedArrayElements.js b/node_modules/es-abstract/2023/CompareTypedArrayElements.js new file mode 100644 index 0000000000000..1a580e20a3dde --- /dev/null +++ b/node_modules/es-abstract/2023/CompareTypedArrayElements.js @@ -0,0 +1,65 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/14.0/#sec-comparetypedarrayelements + +module.exports = function CompareTypedArrayElements(x, y, compareFn) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType || (xType !== 'BigInt' && xType !== 'Number')) { + throw new $TypeError('Assertion failed: `x` and `y` must be either a BigInt or a Number, and both must be the same type'); + } + if (typeof compareFn !== 'function' && typeof compareFn !== 'undefined') { + throw new $TypeError('Assertion failed: `compareFn` must be a function or undefined'); + } + + if (typeof compareFn !== 'undefined') { // step 2 + var v = ToNumber(Call(compareFn, void undefined, [x, y])); // step 2.a + if (isNaN(v)) { + return 0; // step 2.b + } + return v; // step 2.c + } + + var xNaN = isNaN(x); + var yNaN = isNaN(y); + if (xNaN && yNaN) { + return 0; // step 3 + } + + if (xNaN) { + return 1; // step 4 + } + + if (yNaN) { + return -1; // step 5 + } + + if (x < y) { + return -1; // step 6 + } + + if (x > y) { + return 1; // step 7 + } + + if (SameValue(x, -0) && SameValue(y, 0)) { + return -1; // step 8 + } + + if (SameValue(x, 0) && SameValue(y, -0)) { + return 1; // step 9 + } + + return 0; // step 10 +}; diff --git a/node_modules/es-abstract/2023/CompletePropertyDescriptor.js b/node_modules/es-abstract/2023/CompletePropertyDescriptor.js new file mode 100644 index 0000000000000..1530241dc526d --- /dev/null +++ b/node_modules/es-abstract/2023/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!hasOwn(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!hasOwn(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!hasOwn(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!hasOwn(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!hasOwn(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!hasOwn(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2023/CompletionRecord.js b/node_modules/es-abstract/2023/CompletionRecord.js new file mode 100644 index 0000000000000..370a5677f378e --- /dev/null +++ b/node_modules/es-abstract/2023/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2023/CopyDataProperties.js b/node_modules/es-abstract/2023/CopyDataProperties.js new file mode 100644 index 0000000000000..18723f9d0d22d --- /dev/null +++ b/node_modules/es-abstract/2023/CopyDataProperties.js @@ -0,0 +1,70 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var every = require('../helpers/every'); +var some = require('../helpers/some'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-copydataproperties + +module.exports = function CopyDataProperties(target, source, excludedItems) { + if (Type(target) !== 'Object') { + throw new $TypeError('Assertion failed: "target" must be an Object'); + } + + if (!IsArray(excludedItems) || !every(excludedItems, IsPropertyKey)) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + + if (typeof source === 'undefined' || source === null) { + return target; + } + + var from = ToObject(source); + + var keys = OwnPropertyKeys(from); + forEach(keys, function (nextKey) { + var excluded = some(excludedItems, function (e) { + return SameValue(e, nextKey) === true; + }); + /* + var excluded = false; + + forEach(excludedItems, function (e) { + if (SameValue(e, nextKey) === true) { + excluded = true; + } + }); + */ + + var enumerable = $isEnumerable(from, nextKey) || ( + // this is to handle string keys being non-enumerable in older engines + typeof source === 'string' + && nextKey >= 0 + && IsIntegralNumber(ToNumber(nextKey)) + ); + if (excluded === false && enumerable) { + var propValue = Get(from, nextKey); + CreateDataPropertyOrThrow(target, nextKey, propValue); + } + }); + + return target; +}; diff --git a/node_modules/es-abstract/2023/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2023/CreateAsyncFromSyncIterator.js new file mode 100644 index 0000000000000..15e893dabec5f --- /dev/null +++ b/node_modules/es-abstract/2023/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord, value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://262.ecma-international.org/14.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2023/CreateDataProperty.js b/node_modules/es-abstract/2023/CreateDataProperty.js new file mode 100644 index 0000000000000..5bd5fc4787a84 --- /dev/null +++ b/node_modules/es-abstract/2023/CreateDataProperty.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + }; + return OrdinaryDefineOwnProperty(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2023/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2023/CreateDataPropertyOrThrow.js new file mode 100644 index 0000000000000..aa016f17cc963 --- /dev/null +++ b/node_modules/es-abstract/2023/CreateDataPropertyOrThrow.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://262.ecma-international.org/14.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } +}; diff --git a/node_modules/es-abstract/2023/CreateHTML.js b/node_modules/es-abstract/2023/CreateHTML.js new file mode 100644 index 0000000000000..ea7633da68003 --- /dev/null +++ b/node_modules/es-abstract/2023/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2023/CreateIterResultObject.js b/node_modules/es-abstract/2023/CreateIterResultObject.js new file mode 100644 index 0000000000000..ed86b34f25d5d --- /dev/null +++ b/node_modules/es-abstract/2023/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2023/CreateListFromArrayLike.js b/node_modules/es-abstract/2023/CreateListFromArrayLike.js new file mode 100644 index 0000000000000..7592307eb13a4 --- /dev/null +++ b/node_modules/es-abstract/2023/CreateListFromArrayLike.js @@ -0,0 +1,46 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object']; + +// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike + +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : defaultElementTypes; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = LengthOfArrayLike(obj); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2023/CreateMethodProperty.js b/node_modules/es-abstract/2023/CreateMethodProperty.js new file mode 100644 index 0000000000000..058c0f1760854 --- /dev/null +++ b/node_modules/es-abstract/2023/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2023/CreateNonEnumerableDataPropertyOrThrow.js b/node_modules/es-abstract/2023/CreateNonEnumerableDataPropertyOrThrow.js new file mode 100644 index 0000000000000..59a16ef00455b --- /dev/null +++ b/node_modules/es-abstract/2023/CreateNonEnumerableDataPropertyOrThrow.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-createnonenumerabledatapropertyorthrow + +module.exports = function CreateNonEnumerableDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefinePropertyOrThrow(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2023/CreateRegExpStringIterator.js b/node_modules/es-abstract/2023/CreateRegExpStringIterator.js new file mode 100644 index 0000000000000..cdfae56216ba7 --- /dev/null +++ b/node_modules/es-abstract/2023/CreateRegExpStringIterator.js @@ -0,0 +1,100 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); +var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true); + +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var CreateMethodProperty = require('./CreateMethodProperty'); +var Get = require('./Get'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var RegExpExec = require('./RegExpExec'); +var Set = require('./Set'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); +var setToStringTag = require('es-set-tostringtag'); + +var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) { + if (Type(S) !== 'String') { + throw new $TypeError('`S` must be a string'); + } + if (Type(global) !== 'Boolean') { + throw new $TypeError('`global` must be a boolean'); + } + if (Type(fullUnicode) !== 'Boolean') { + throw new $TypeError('`fullUnicode` must be a boolean'); + } + SLOT.set(this, '[[IteratingRegExp]]', R); + SLOT.set(this, '[[IteratedString]]', S); + SLOT.set(this, '[[Global]]', global); + SLOT.set(this, '[[Unicode]]', fullUnicode); + SLOT.set(this, '[[Done]]', false); +}; + +if (IteratorPrototype) { + RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype); +} + +var RegExpStringIteratorNext = function next() { + var O = this; // eslint-disable-line no-invalid-this + if (Type(O) !== 'Object') { + throw new $TypeError('receiver must be an object'); + } + if ( + !(O instanceof RegExpStringIterator) + || !SLOT.has(O, '[[IteratingRegExp]]') + || !SLOT.has(O, '[[IteratedString]]') + || !SLOT.has(O, '[[Global]]') + || !SLOT.has(O, '[[Unicode]]') + || !SLOT.has(O, '[[Done]]') + ) { + throw new $TypeError('"this" value must be a RegExpStringIterator instance'); + } + if (SLOT.get(O, '[[Done]]')) { + return CreateIterResultObject(undefined, true); + } + var R = SLOT.get(O, '[[IteratingRegExp]]'); + var S = SLOT.get(O, '[[IteratedString]]'); + var global = SLOT.get(O, '[[Global]]'); + var fullUnicode = SLOT.get(O, '[[Unicode]]'); + var match = RegExpExec(R, S); + if (match === null) { + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(undefined, true); + } + if (global) { + var matchStr = ToString(Get(match, '0')); + if (matchStr === '') { + var thisIndex = ToLength(Get(R, 'lastIndex')); + var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode); + Set(R, 'lastIndex', nextIndex, true); + } + return CreateIterResultObject(match, false); + } + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(match, false); +}; +CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext); + +if (hasSymbols) { + setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator'); + + if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') { + var iteratorFn = function SymbolIterator() { + return this; + }; + CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn); + } +} + +// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator +module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) { + // assert R.global === global && R.unicode === fullUnicode? + return new RegExpStringIterator(R, S, global, fullUnicode); +}; diff --git a/node_modules/es-abstract/2023/DateFromTime.js b/node_modules/es-abstract/2023/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/2023/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2023/DateString.js b/node_modules/es-abstract/2023/DateString.js new file mode 100644 index 0000000000000..939c14c0c87ef --- /dev/null +++ b/node_modules/es-abstract/2023/DateString.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var Type = require('./Type'); +var WeekDay = require('./WeekDay'); +var MonthFromTime = require('./MonthFromTime'); +var YearFromTime = require('./YearFromTime'); +var DateFromTime = require('./DateFromTime'); + +// https://262.ecma-international.org/9.0/#sec-datestring + +module.exports = function DateString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var weekday = weekdays[WeekDay(tv)]; + var month = months[MonthFromTime(tv)]; + var day = padTimeComponent(DateFromTime(tv)); + var year = padTimeComponent(YearFromTime(tv), 4); + return weekday + '\x20' + month + '\x20' + day + '\x20' + year; +}; diff --git a/node_modules/es-abstract/2023/Day.js b/node_modules/es-abstract/2023/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/2023/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2023/DayFromYear.js b/node_modules/es-abstract/2023/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/2023/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2023/DayWithinYear.js b/node_modules/es-abstract/2023/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/2023/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2023/DaysInYear.js b/node_modules/es-abstract/2023/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/2023/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2023/DefinePropertyOrThrow.js b/node_modules/es-abstract/2023/DefinePropertyOrThrow.js new file mode 100644 index 0000000000000..8fe097068db31 --- /dev/null +++ b/node_modules/es-abstract/2023/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2023/DeletePropertyOrThrow.js b/node_modules/es-abstract/2023/DeletePropertyOrThrow.js new file mode 100644 index 0000000000000..581bf06ea2444 --- /dev/null +++ b/node_modules/es-abstract/2023/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2023/DetachArrayBuffer.js b/node_modules/es-abstract/2023/DetachArrayBuffer.js new file mode 100644 index 0000000000000..03284729b3d4e --- /dev/null +++ b/node_modules/es-abstract/2023/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2023/EnumerableOwnProperties.js b/node_modules/es-abstract/2023/EnumerableOwnProperties.js new file mode 100644 index 0000000000000..9fe8534af5d5b --- /dev/null +++ b/node_modules/es-abstract/2023/EnumerableOwnProperties.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/14.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnProperties(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2023/FindViaPredicate.js b/node_modules/es-abstract/2023/FindViaPredicate.js new file mode 100644 index 0000000000000..963de94e14331 --- /dev/null +++ b/node_modules/es-abstract/2023/FindViaPredicate.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +module.exports = function FindViaPredicate(O, len, direction, predicate, thisArg) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!isInteger(len) || len < 0) { + throw new $TypeError('Assertion failed: len must be a non-negative integer'); + } + if (direction !== 'ascending' && direction !== 'descending') { + throw new $TypeError('Assertion failed: direction must be "ascending" or "descending"'); + } + + if (!IsCallable(predicate)) { + throw new $TypeError('predicate must be callable'); // step 1 + } + + for ( // steps 2-4 + var k = direction === 'ascending' ? 0 : len - 1; + direction === 'ascending' ? k < len : k >= 0; + k += 1 + ) { + var Pk = ToString(k); // step 4.a + var kValue = Get(O, Pk); // step 4.c + var testResult = Call(predicate, thisArg, [kValue, k, O]); // step 4.d + if (ToBoolean(testResult)) { + return { '[[Index]]': k, '[[Value]]': kValue }; // step 4.e + } + } + return { '[[Index]]': -1, '[[Value]]': void undefined }; // step 5 +}; diff --git a/node_modules/es-abstract/2023/FlattenIntoArray.js b/node_modules/es-abstract/2023/FlattenIntoArray.js new file mode 100644 index 0000000000000..0fb87bc6a39b0 --- /dev/null +++ b/node_modules/es-abstract/2023/FlattenIntoArray.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var Call = require('./Call'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/11.0/#sec-flattenintoarray + +module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) { + var mapperFunction; + if (arguments.length > 5) { + mapperFunction = arguments[5]; + } + + var targetIndex = start; + var sourceIndex = 0; + while (sourceIndex < sourceLen) { + var P = ToString(sourceIndex); + var exists = HasProperty(source, P); + if (exists === true) { + var element = Get(source, P); + if (typeof mapperFunction !== 'undefined') { + if (arguments.length <= 6) { + throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); + } + element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]); + } + var shouldFlatten = false; + if (depth > 0) { + shouldFlatten = IsArray(element); + } + if (shouldFlatten) { + var elementLen = LengthOfArrayLike(element); + targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); + } else { + if (targetIndex >= MAX_SAFE_INTEGER) { + throw new $TypeError('index too large'); + } + CreateDataPropertyOrThrow(target, ToString(targetIndex), element); + targetIndex += 1; + } + } + sourceIndex += 1; + } + + return targetIndex; +}; diff --git a/node_modules/es-abstract/2023/FromPropertyDescriptor.js b/node_modules/es-abstract/2023/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..c70f0c60e1ff8 --- /dev/null +++ b/node_modules/es-abstract/2023/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2023/Get.js b/node_modules/es-abstract/2023/Get.js new file mode 100644 index 0000000000000..09731522229d6 --- /dev/null +++ b/node_modules/es-abstract/2023/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2023/GetGlobalObject.js b/node_modules/es-abstract/2023/GetGlobalObject.js new file mode 100644 index 0000000000000..0541ede0c4888 --- /dev/null +++ b/node_modules/es-abstract/2023/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2023/GetIterator.js b/node_modules/es-abstract/2023/GetIterator.js new file mode 100644 index 0000000000000..1308c7ed9923f --- /dev/null +++ b/node_modules/es-abstract/2023/GetIterator.js @@ -0,0 +1,56 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true); + +var inspect = require('object-inspect'); +var hasSymbols = require('has-symbols')(); + +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var CreateAsyncFromSyncIterator = require('./CreateAsyncFromSyncIterator'); +var GetIteratorFromMethod = require('./GetIteratorFromMethod'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); + +// https://262.ecma-international.org/14.0/#sec-getiterator + +module.exports = function GetIterator(obj, kind) { + if (kind !== 'sync' && kind !== 'async') { + throw new $TypeError("Assertion failed: `kind` must be one of 'sync' or 'async', got " + inspect(kind)); + } + + var method; + if (kind === 'async') { // step 1 + if (hasSymbols && $asyncIterator) { + method = GetMethod(obj, $asyncIterator); // step 1.a + } + } + if (typeof method === 'undefined') { // step 1.b + // var syncMethod = GetMethod(obj, $iterator); // step 1.b.i + var syncMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + if (kind === 'async') { + if (typeof syncMethod === 'undefined') { + throw new $TypeError('iterator method is `undefined`'); // step 1.b.ii + } + var syncIteratorRecord = GetIteratorFromMethod(obj, syncMethod); // step 1.b.iii + return CreateAsyncFromSyncIterator(syncIteratorRecord); // step 1.b.iv + } + method = syncMethod; // step 2, kind of + } + + if (typeof method === 'undefined') { + throw new $TypeError('iterator method is `undefined`'); // step 3 + } + return GetIteratorFromMethod(obj, method); // step 4 +}; diff --git a/node_modules/es-abstract/2023/GetIteratorFromMethod.js b/node_modules/es-abstract/2023/GetIteratorFromMethod.js new file mode 100644 index 0000000000000..aac91ca2cf708 --- /dev/null +++ b/node_modules/es-abstract/2023/GetIteratorFromMethod.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/14.0/#sec-getiteratorfrommethod + +module.exports = function GetIteratorFromMethod(obj, method) { + if (!IsCallable(method)) { + throw new $TypeError('method must be a function'); + } + + var iterator = Call(method, obj); // step 1 + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); // step 2 + } + + var nextMethod = GetV(iterator, 'next'); // step 3 + return { // steps 4-5 + '[[Iterator]]': iterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2023/GetMatchIndexPair.js b/node_modules/es-abstract/2023/GetMatchIndexPair.js new file mode 100644 index 0000000000000..c72d311a9502e --- /dev/null +++ b/node_modules/es-abstract/2023/GetMatchIndexPair.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/13.0/#sec-getmatchindexpair + +module.exports = function GetMatchIndexPair(S, match) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + assertRecord(Type, 'Match Record', 'match', match); + + if (!(match['[[StartIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S'); + } + if (!(match['[[EndIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive'); + } + return [match['[[StartIndex]]'], match['[[EndIndex]]']]; +}; diff --git a/node_modules/es-abstract/2023/GetMatchString.js b/node_modules/es-abstract/2023/GetMatchString.js new file mode 100644 index 0000000000000..bfac4c43c5f56 --- /dev/null +++ b/node_modules/es-abstract/2023/GetMatchString.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var substring = require('./substring'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/13.0/#sec-getmatchstring + +module.exports = function GetMatchString(S, match) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + assertRecord(Type, 'Match Record', 'match', match); + + if (!(match['[[StartIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S'); + } + if (!(match['[[EndIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive'); + } + return substring(S, match['[[StartIndex]]'], match['[[EndIndex]]']); +}; diff --git a/node_modules/es-abstract/2023/GetMethod.js b/node_modules/es-abstract/2023/GetMethod.js new file mode 100644 index 0000000000000..e9f2854ff3842 --- /dev/null +++ b/node_modules/es-abstract/2023/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2023/GetOwnPropertyKeys.js b/node_modules/es-abstract/2023/GetOwnPropertyKeys.js new file mode 100644 index 0000000000000..043fd733bd8a4 --- /dev/null +++ b/node_modules/es-abstract/2023/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2023/GetPromiseResolve.js b/node_modules/es-abstract/2023/GetPromiseResolve.js new file mode 100644 index 0000000000000..f0db02617bc79 --- /dev/null +++ b/node_modules/es-abstract/2023/GetPromiseResolve.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/12.0/#sec-getpromiseresolve + +module.exports = function GetPromiseResolve(promiseConstructor) { + if (!IsConstructor(promiseConstructor)) { + throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor'); + } + var promiseResolve = Get(promiseConstructor, 'resolve'); + if (IsCallable(promiseResolve) === false) { + throw new $TypeError('`resolve` method is not callable'); + } + return promiseResolve; +}; diff --git a/node_modules/es-abstract/2023/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2023/GetPrototypeFromConstructor.js new file mode 100644 index 0000000000000..0b281ef4fe740 --- /dev/null +++ b/node_modules/es-abstract/2023/GetPrototypeFromConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (Type(intrinsic) !== 'Object') { + throw new $TypeError('intrinsicDefaultProto must be an object'); + } + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2023/GetStringIndex.js b/node_modules/es-abstract/2023/GetStringIndex.js new file mode 100644 index 0000000000000..9c796d86b8cd5 --- /dev/null +++ b/node_modules/es-abstract/2023/GetStringIndex.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var StringToCodePoints = require('./StringToCodePoints'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $indexOf = callBound('String.prototype.indexOf'); + +// https://262.ecma-international.org/13.0/#sec-getstringindex + +module.exports = function GetStringIndex(S, e) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!isInteger(e) || e < 0) { + throw new $TypeError('Assertion failed: `e` must be a non-negative integer'); + } + + if (S === '') { + return 0; + } + var codepoints = StringToCodePoints(S); + var eUTF = e >= codepoints.length ? S.length : $indexOf(S, codepoints[e]); + return eUTF; +}; diff --git a/node_modules/es-abstract/2023/GetSubstitution.js b/node_modules/es-abstract/2023/GetSubstitution.js new file mode 100644 index 0000000000000..9f2a02561850f --- /dev/null +++ b/node_modules/es-abstract/2023/GetSubstitution.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var every = require('../helpers/every'); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); +var $indexOf = callBound('String.prototype.indexOf'); +var $parseInt = parseInt; + +var isDigit = regexTester(/^[0-9]$/); + +var inspect = require('object-inspect'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); +var isStringOrUndefined = require('../helpers/isStringOrUndefined'); + +// http://www.ecma-international.org/ecma-262/12.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-params, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!isInteger(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + if (Type(namedCaptures) !== 'Undefined') { + namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign + } + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else if (next === '<') { + // eslint-disable-next-line max-depth + if (Type(namedCaptures) === 'Undefined') { + result += '$<'; + i += 2; + } else { + var endIndex = $indexOf(replacement, '>', i); + // eslint-disable-next-line max-depth + if (endIndex > -1) { + var groupName = $strSlice(replacement, i + '$<'.length, endIndex); + var capture = Get(namedCaptures, groupName); + // eslint-disable-next-line max-depth + if (Type(capture) !== 'Undefined') { + result += ToString(capture); + } + i += ('<' + groupName + '>').length; + } + } + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2023/GetV.js b/node_modules/es-abstract/2023/GetV.js new file mode 100644 index 0000000000000..706a9211ab847 --- /dev/null +++ b/node_modules/es-abstract/2023/GetV.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +// var ToObject = require('./ToObject'); + +// https://262.ecma-international.org/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + + // 7.3.2.2-3 + // var O = ToObject(V); + + // 7.3.2.4 + return V[P]; +}; diff --git a/node_modules/es-abstract/2023/GetValueFromBuffer.js b/node_modules/es-abstract/2023/GetValueFromBuffer.js new file mode 100644 index 0000000000000..8d3a2f4fc5423 --- /dev/null +++ b/node_modules/es-abstract/2023/GetValueFromBuffer.js @@ -0,0 +1,110 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = require('../helpers/isInteger'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var RawBytesToNumeric = require('./RawBytesToNumeric'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var safeConcat = require('safe-array-concat'); + +var table61 = { + __proto__: null, + $Int8: 1, + $Uint8: 1, + $Uint8C: 1, + $Int16: 2, + $Uint16: 2, + $Int32: 4, + $Uint32: 4, + $BigInt64: 8, + $BigUint64: 8, + $Float32: 4, + $Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); + +// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || typeof table61['$' + type] !== 'number') { + throw new $TypeError('Assertion failed: `type` must be a Typed Array element type'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (order !== 'SeqCst' && order !== 'Unordered') { + throw new $TypeError('Assertion failed: `order` must be either `SeqCst` or `Unordered`'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = table61['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "BigInt64", "BigUint64", "Float32", or "Float64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumeric(type, bytes, isLittleEndian); +}; diff --git a/node_modules/es-abstract/2023/HasOwnProperty.js b/node_modules/es-abstract/2023/HasOwnProperty.js new file mode 100644 index 0000000000000..d2f24115370be --- /dev/null +++ b/node_modules/es-abstract/2023/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwn = require('hasown'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; diff --git a/node_modules/es-abstract/2023/HasProperty.js b/node_modules/es-abstract/2023/HasProperty.js new file mode 100644 index 0000000000000..91476d208b05f --- /dev/null +++ b/node_modules/es-abstract/2023/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2023/HourFromTime.js b/node_modules/es-abstract/2023/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/2023/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2023/InLeapYear.js b/node_modules/es-abstract/2023/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/2023/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2023/InstallErrorCause.js b/node_modules/es-abstract/2023/InstallErrorCause.js new file mode 100644 index 0000000000000..949ecc77eebbb --- /dev/null +++ b/node_modules/es-abstract/2023/InstallErrorCause.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateNonEnumerableDataPropertyOrThrow = require('./CreateNonEnumerableDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-installerrorcause + +module.exports = function InstallErrorCause(O, options) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (Type(options) === 'Object' && HasProperty(options, 'cause')) { + var cause = Get(options, 'cause'); + CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause); + } +}; diff --git a/node_modules/es-abstract/2023/InstanceofOperator.js b/node_modules/es-abstract/2023/InstanceofOperator.js new file mode 100644 index 0000000000000..4a34d0c20cdb0 --- /dev/null +++ b/node_modules/es-abstract/2023/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2023/Invoke.js b/node_modules/es-abstract/2023/Invoke.js new file mode 100644 index 0000000000000..084e5e28253d5 --- /dev/null +++ b/node_modules/es-abstract/2023/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://262.ecma-international.org/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2023/IsAccessorDescriptor.js b/node_modules/es-abstract/2023/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/2023/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2023/IsArray.js b/node_modules/es-abstract/2023/IsArray.js new file mode 100644 index 0000000000000..c2c48c1f233c0 --- /dev/null +++ b/node_modules/es-abstract/2023/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2023/IsBigIntElementType.js b/node_modules/es-abstract/2023/IsBigIntElementType.js new file mode 100644 index 0000000000000..e3f58a949b3ca --- /dev/null +++ b/node_modules/es-abstract/2023/IsBigIntElementType.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BigUint64' || type === 'BigInt64'; +}; diff --git a/node_modules/es-abstract/2023/IsCallable.js b/node_modules/es-abstract/2023/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/2023/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2023/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2023/IsCompatiblePropertyDescriptor.js new file mode 100644 index 0000000000000..48e719f3c1e51 --- /dev/null +++ b/node_modules/es-abstract/2023/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/13.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, '', Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2023/IsConcatSpreadable.js b/node_modules/es-abstract/2023/IsConcatSpreadable.js new file mode 100644 index 0000000000000..10e1eab2168c8 --- /dev/null +++ b/node_modules/es-abstract/2023/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2023/IsConstructor.js b/node_modules/es-abstract/2023/IsConstructor.js new file mode 100644 index 0000000000000..62ac47f6a3d26 --- /dev/null +++ b/node_modules/es-abstract/2023/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2023/IsDataDescriptor.js b/node_modules/es-abstract/2023/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/2023/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2023/IsDetachedBuffer.js b/node_modules/es-abstract/2023/IsDetachedBuffer.js new file mode 100644 index 0000000000000..01529bca2c7a9 --- /dev/null +++ b/node_modules/es-abstract/2023/IsDetachedBuffer.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $byteLength = require('array-buffer-byte-length'); + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2023/IsExtensible.js b/node_modules/es-abstract/2023/IsExtensible.js new file mode 100644 index 0000000000000..aa19b914c2d3d --- /dev/null +++ b/node_modules/es-abstract/2023/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://262.ecma-international.org/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2023/IsGenericDescriptor.js b/node_modules/es-abstract/2023/IsGenericDescriptor.js new file mode 100644 index 0000000000000..d43bec2b35e5c --- /dev/null +++ b/node_modules/es-abstract/2023/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2023/IsIntegralNumber.js b/node_modules/es-abstract/2023/IsIntegralNumber.js new file mode 100644 index 0000000000000..f00051a449e06 --- /dev/null +++ b/node_modules/es-abstract/2023/IsIntegralNumber.js @@ -0,0 +1,15 @@ +'use strict'; + +var truncate = require('./truncate'); +var Type = require('./Type'); + +var $isFinite = require('../helpers/isFinite'); + +// https://262.ecma-international.org/14.0/#sec-isintegralnumber + +module.exports = function IsIntegralNumber(argument) { + if (Type(argument) !== 'Number' || !$isFinite(argument)) { + return false; + } + return truncate(argument) === argument; +}; diff --git a/node_modules/es-abstract/2023/IsLessThan.js b/node_modules/es-abstract/2023/IsLessThan.js new file mode 100644 index 0000000000000..03d420fdd5470 --- /dev/null +++ b/node_modules/es-abstract/2023/IsLessThan.js @@ -0,0 +1,100 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var min = GetIntrinsic('%Math.min%'); + +var $isNaN = require('../helpers/isNaN'); +var $charCodeAt = require('call-bind/callBound')('String.prototype.charCodeAt'); + +var StringToBigInt = require('./StringToBigInt'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var BigIntLessThan = require('./BigInt/lessThan'); +var NumberLessThan = require('./Number/lessThan'); + +// https://262.ecma-international.org/14.0/#sec-islessthan + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function IsLessThan(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + var pxType = Type(px); + var pyType = Type(py); + if (pxType === 'String' && pyType === 'String') { // step 3 + // a. Let lx be the length of px. + // b. Let ly be the length of py. + // c. For each integer i starting with 0 such that i < min(lx, ly), in ascending order, do + // i. Let cx be the integer that is the numeric value of the code unit at index i within px. + // ii. Let cy be the integer that is the numeric value of the code unit at index i within py. + // iii. If cx < cy, return true. + // iv. If cx > cy, return false. + // d. If lx < ly, return true. Otherwise, return false. + + var lx = px.length; // step 3.a + var ly = py.length; // step 3.b + for (var i = 0; i < min(lx, ly); i++) { // step 3.c + var cx = $charCodeAt(px, i); // step 3.c.i + var cy = $charCodeAt(py, i); // step 3.c.ii + if (cx < cy) { + return true; // step 3.c.iii + } + if (cx > cy) { + return false; // step 3.c.iv + } + } + return lx < ly; // step 3.d + } + + var nx; + var ny; + if (pxType === 'BigInt' && pyType === 'String') { + ny = StringToBigInt(py); + if (typeof ny === 'undefined') { + return void undefined; + } + return BigIntLessThan(px, ny); + } + if (pxType === 'String' && pyType === 'BigInt') { + nx = StringToBigInt(px); + if (typeof nx === 'undefined') { + return void undefined; + } + return BigIntLessThan(nx, py); + } + + nx = ToNumeric(px); + ny = ToNumeric(py); + + var nxType = Type(nx); + if (nxType === Type(ny)) { + return nxType === 'Number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); + } + + if ($isNaN(nx) || $isNaN(ny)) { + return void undefined; + } + + if (nx === -Infinity || ny === Infinity) { + return true; + } + if (nx === Infinity || ny === -Infinity) { + return false; + } + + return nx < ny; // by now, these are both finite, and the same type +}; diff --git a/node_modules/es-abstract/2023/IsLooselyEqual.js b/node_modules/es-abstract/2023/IsLooselyEqual.js new file mode 100644 index 0000000000000..9d254ba68cfaa --- /dev/null +++ b/node_modules/es-abstract/2023/IsLooselyEqual.js @@ -0,0 +1,58 @@ +'use strict'; + +var isFinite = require('../helpers/isFinite'); + +var IsStrictlyEqual = require('./IsStrictlyEqual'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-islooselyequal + +module.exports = function IsLooselyEqual(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return IsStrictlyEqual(x, y); + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return IsLooselyEqual(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return IsLooselyEqual(ToNumber(x), y); + } + if (xType === 'BigInt' && yType === 'String') { + var n = StringToBigInt(y); + if (typeof n === 'undefined') { + return false; + } + return IsLooselyEqual(x, n); + } + if (xType === 'String' && yType === 'BigInt') { + return IsLooselyEqual(y, x); + } + if (xType === 'Boolean') { + return IsLooselyEqual(ToNumber(x), y); + } + if (yType === 'Boolean') { + return IsLooselyEqual(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'Symbol' || xType === 'BigInt') && yType === 'Object') { + return IsLooselyEqual(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol' || yType === 'BigInt')) { + return IsLooselyEqual(ToPrimitive(x), y); + } + if ((xType === 'BigInt' && yType === 'Number') || (xType === 'Number' && yType === 'BigInt')) { + if (!isFinite(x) || !isFinite(y)) { + return false; + } + // eslint-disable-next-line eqeqeq + return x == y; // shortcut for step 13.b. + } + return false; +}; diff --git a/node_modules/es-abstract/2023/IsNoTearConfiguration.js b/node_modules/es-abstract/2023/IsNoTearConfiguration.js new file mode 100644 index 0000000000000..f0d2808737ac6 --- /dev/null +++ b/node_modules/es-abstract/2023/IsNoTearConfiguration.js @@ -0,0 +1,16 @@ +'use strict'; + +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var IsBigIntElementType = require('./IsBigIntElementType'); + +// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration + +module.exports = function IsNoTearConfiguration(type, order) { + if (IsUnclampedIntegerElementType(type)) { + return true; + } + if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') { + return true; + } + return false; +}; diff --git a/node_modules/es-abstract/2023/IsPromise.js b/node_modules/es-abstract/2023/IsPromise.js new file mode 100644 index 0000000000000..411539b0818c2 --- /dev/null +++ b/node_modules/es-abstract/2023/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2023/IsPropertyKey.js b/node_modules/es-abstract/2023/IsPropertyKey.js new file mode 100644 index 0000000000000..aaeb6f9b6f83b --- /dev/null +++ b/node_modules/es-abstract/2023/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2023/IsRegExp.js b/node_modules/es-abstract/2023/IsRegExp.js new file mode 100644 index 0000000000000..33d983dc8d3ba --- /dev/null +++ b/node_modules/es-abstract/2023/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://262.ecma-international.org/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2023/IsSharedArrayBuffer.js b/node_modules/es-abstract/2023/IsSharedArrayBuffer.js new file mode 100644 index 0000000000000..8e96e33f3c2dc --- /dev/null +++ b/node_modules/es-abstract/2023/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2023/IsStrictlyEqual.js b/node_modules/es-abstract/2023/IsStrictlyEqual.js new file mode 100644 index 0000000000000..81966d62afbaa --- /dev/null +++ b/node_modules/es-abstract/2023/IsStrictlyEqual.js @@ -0,0 +1,16 @@ +'use strict'; + +var SameValueNonNumber = require('./SameValueNonNumber'); +var Type = require('./Type'); +var NumberEqual = require('./Number/equal'); + +// https://262.ecma-international.org/14.0/#sec-isstrictlyequal + +module.exports = function IsStrictlyEqual(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + return xType === 'Number' ? NumberEqual(x, y) : SameValueNonNumber(x, y); +}; diff --git a/node_modules/es-abstract/2023/IsStringWellFormedUnicode.js b/node_modules/es-abstract/2023/IsStringWellFormedUnicode.js new file mode 100644 index 0000000000000..4a4ad6682ba28 --- /dev/null +++ b/node_modules/es-abstract/2023/IsStringWellFormedUnicode.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var CodePointAt = require('./CodePointAt'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/14.0/#sec-isstringwellformedunicode + +module.exports = function IsStringWellFormedUnicode(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var len = string.length; // step 1 + var k = 0; // step 2 + while (k < len) { // step 3 + var cp = CodePointAt(string, k); // step 3.a + if (cp['[[IsUnpairedSurrogate]]']) { + return false; // step 3.b + } + k += cp['[[CodeUnitCount]]']; // step 3.c + } + return true; // step 4 +}; diff --git a/node_modules/es-abstract/2023/IsUnclampedIntegerElementType.js b/node_modules/es-abstract/2023/IsUnclampedIntegerElementType.js new file mode 100644 index 0000000000000..4e3a38425d65f --- /dev/null +++ b/node_modules/es-abstract/2023/IsUnclampedIntegerElementType.js @@ -0,0 +1,12 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype + +module.exports = function IsUnclampedIntegerElementType(type) { + return type === 'Int8' + || type === 'Uint8' + || type === 'Int16' + || type === 'Uint16' + || type === 'Int32' + || type === 'Uint32'; +}; diff --git a/node_modules/es-abstract/2023/IsUnsignedElementType.js b/node_modules/es-abstract/2023/IsUnsignedElementType.js new file mode 100644 index 0000000000000..b1ff194d73916 --- /dev/null +++ b/node_modules/es-abstract/2023/IsUnsignedElementType.js @@ -0,0 +1,11 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'Uint8' + || type === 'Uint8C' + || type === 'Uint16' + || type === 'Uint32' + || type === 'BigUint64'; +}; diff --git a/node_modules/es-abstract/2023/IsValidIntegerIndex.js b/node_modules/es-abstract/2023/IsValidIntegerIndex.js new file mode 100644 index 0000000000000..830416312dad6 --- /dev/null +++ b/node_modules/es-abstract/2023/IsValidIntegerIndex.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var IsIntegralNumber = require('./IsIntegralNumber'); + +var isNegativeZero = require('../helpers/isNegativeZero'); + +var typedArrayBuffer = require('typed-array-buffer'); + +// https://262.ecma-international.org/12.0/#sec-isvalidintegerindex + +module.exports = function IsValidIntegerIndex(O, index) { + // Assert: O is an Integer-Indexed exotic object. + var buffer = typedArrayBuffer(O); // step 1 + + if (typeof index !== 'number') { + throw new $TypeError('Assertion failed: Type(index) is not Number'); + } + + if (IsDetachedBuffer(buffer)) { return false; } // step 2 + + if (!IsIntegralNumber(index)) { return false; } // step 3 + + if (isNegativeZero(index)) { return false; } // step 4 + + if (index < 0 || index >= O.length) { return false; } // step 5 + + return true; // step 6 +}; diff --git a/node_modules/es-abstract/2023/IsWordChar.js b/node_modules/es-abstract/2023/IsWordChar.js new file mode 100644 index 0000000000000..3d8459ab6df14 --- /dev/null +++ b/node_modules/es-abstract/2023/IsWordChar.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); +var WordCharacters = require('./WordCharacters'); + +var assertRecord = require('../helpers/assertRecord'); +var every = require('../helpers/every'); +var isInteger = require('../helpers/isInteger'); + +var isChar = function isChar(c) { + return typeof c === 'string'; +}; + +// https://262.ecma-international.org/14.0/#sec-runtime-semantics-iswordchar-abstract-operation + +// note: prior to ES2023, this AO erroneously omitted the latter of its arguments. +module.exports = function IsWordChar(rer, Input, e) { + assertRecord(Type, 'RegExp Record', 'rer', rer); + if (!IsArray(Input) || !every(Input, isChar)) { + throw new $TypeError('Assertion failed: `Input` must be a List of characters'); + } + + if (!isInteger(e)) { + throw new $TypeError('Assertion failed: `e` must be an integer'); + } + + var InputLength = Input.length; // step 1 + + if (e === -1 || e === InputLength) { + return false; // step 2 + } + + var c = Input[e]; // step 3 + + return $indexOf(WordCharacters(rer), c) > -1; // steps 4-5 +}; diff --git a/node_modules/es-abstract/2023/IteratorClose.js b/node_modules/es-abstract/2023/IteratorClose.js new file mode 100644 index 0000000000000..0e393534cb51e --- /dev/null +++ b/node_modules/es-abstract/2023/IteratorClose.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/14.0/#sec-iteratorclose + +module.exports = function IteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); + if (Type(iteratorRecord['[[Iterator]]']) !== 'Object') { + throw new $TypeError('Assertion failed: iteratorRecord.[[Iterator]] must be an Object'); // step 1 + } + + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { // step 2 + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + var iteratorReturn; + try { + iteratorReturn = GetMethod(iterator, 'return'); // step 4 + } catch (e) { + completionThunk(); // throws if `completion` is a throw completion // step 6 + completionThunk = null; // ensure it's not called twice. + throw e; // step 7 + } + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); // step 5.a - 5.b + } + + var innerResult; + try { + innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + completionThunk(); // throws if `completion` is a throw completion // step 6 + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; // step 7 + } + var completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2023/IteratorComplete.js b/node_modules/es-abstract/2023/IteratorComplete.js new file mode 100644 index 0000000000000..29f5f75fea945 --- /dev/null +++ b/node_modules/es-abstract/2023/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2023/IteratorNext.js b/node_modules/es-abstract/2023/IteratorNext.js new file mode 100644 index 0000000000000..b893ef1bd9a7b --- /dev/null +++ b/node_modules/es-abstract/2023/IteratorNext.js @@ -0,0 +1,28 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/14.0/#sec-iteratornext + +module.exports = function IteratorNext(iteratorRecord) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); + + var result; + if (arguments.length < 2) { // step 1 + result = Call(iteratorRecord['[[NextMethod]]'], iteratorRecord['[[Iterator]]']); // step 1.a + } else { // step 2 + result = Call(iteratorRecord['[[NextMethod]]'], iteratorRecord['[[Iterator]]'], [arguments[1]]); // step 2.a + } + + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); // step 3 + } + return result; // step 4 +}; diff --git a/node_modules/es-abstract/2023/IteratorStep.js b/node_modules/es-abstract/2023/IteratorStep.js new file mode 100644 index 0000000000000..c4f15362a02b5 --- /dev/null +++ b/node_modules/es-abstract/2023/IteratorStep.js @@ -0,0 +1,18 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/14.0/#sec-iteratorstep + +module.exports = function IteratorStep(iteratorRecord) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); + + var result = IteratorNext(iteratorRecord); // step 1 + var done = IteratorComplete(result); // step 2 + return done === true ? false : result; // steps 3-4 +}; + diff --git a/node_modules/es-abstract/2023/IteratorToList.js b/node_modules/es-abstract/2023/IteratorToList.js new file mode 100644 index 0000000000000..5b5ecea3433b8 --- /dev/null +++ b/node_modules/es-abstract/2023/IteratorToList.js @@ -0,0 +1,28 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $arrayPush = callBound('Array.prototype.push'); + +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/14.0/#sec-iteratortolist + +module.exports = function IteratorToList(iteratorRecord) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); + + var values = []; // step 1 + var next = true; // step 2 + while (next) { // step 3 + next = IteratorStep(iteratorRecord); // step 3.a + if (next) { + var nextValue = IteratorValue(next); // step 3.b.i + $arrayPush(values, nextValue); // step 3.b.ii + } + } + return values; // step 4 +}; diff --git a/node_modules/es-abstract/2023/IteratorValue.js b/node_modules/es-abstract/2023/IteratorValue.js new file mode 100644 index 0000000000000..e9b16daed51c6 --- /dev/null +++ b/node_modules/es-abstract/2023/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2023/KeyForSymbol.js b/node_modules/es-abstract/2023/KeyForSymbol.js new file mode 100644 index 0000000000000..5fec3cc74c39e --- /dev/null +++ b/node_modules/es-abstract/2023/KeyForSymbol.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $keyFor = callBound('Symbol.keyFor', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/14.0/#sec-keyforsymbol + +module.exports = function KeyForSymbol(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $keyFor(sym); +}; diff --git a/node_modules/es-abstract/2023/LengthOfArrayLike.js b/node_modules/es-abstract/2023/LengthOfArrayLike.js new file mode 100644 index 0000000000000..132c4d58480f7 --- /dev/null +++ b/node_modules/es-abstract/2023/LengthOfArrayLike.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToLength = require('./ToLength'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-lengthofarraylike + +module.exports = function LengthOfArrayLike(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + return ToLength(Get(obj, 'length')); +}; + +// TODO: use this all over diff --git a/node_modules/es-abstract/2023/MakeDate.js b/node_modules/es-abstract/2023/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/2023/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2023/MakeDay.js b/node_modules/es-abstract/2023/MakeDay.js new file mode 100644 index 0000000000000..161ccaf23daf6 --- /dev/null +++ b/node_modules/es-abstract/2023/MakeDay.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToIntegerOrInfinity(year); + var m = ToIntegerOrInfinity(month); + var dt = ToIntegerOrInfinity(date); + var ym = y + floor(m / 12); + if (!$isFinite(ym)) { + return NaN; + } + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2023/MakeMatchIndicesIndexPairArray.js b/node_modules/es-abstract/2023/MakeMatchIndicesIndexPairArray.js new file mode 100644 index 0000000000000..962f5d8be8411 --- /dev/null +++ b/node_modules/es-abstract/2023/MakeMatchIndicesIndexPairArray.js @@ -0,0 +1,69 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ArrayCreate = require('./ArrayCreate'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var GetMatchIndexPair = require('./GetMatchIndexPair'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isMatchRecord = require('../helpers/isMatchRecord'); + +var isStringOrUndefined = function isStringOrUndefined(s) { + return typeof s === 'undefined' || typeof s === 'string'; +}; + +var isMatchRecordOrUndefined = function isMatchRecordOrUndefined(m) { + return typeof m === 'undefined' || isMatchRecord(m); +}; + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +// https://262.ecma-international.org/13.0/#sec-getmatchindexpair + +module.exports = function MakeMatchIndicesIndexPairArray(S, indices, groupNames, hasGroups) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!IsArray(indices) || !every(indices, isMatchRecordOrUndefined)) { + throw new $TypeError('Assertion failed: `indices` must be a List of either Match Records or `undefined`'); + } + if (!IsArray(groupNames) || !every(groupNames, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `groupNames` must be a List of either Strings or `undefined`'); + } + if (Type(hasGroups) !== 'Boolean') { + throw new $TypeError('Assertion failed: `hasGroups` must be a Boolean'); + } + + var n = indices.length; // step 1 + if (!(n < MAX_ARRAY_LENGTH)) { + throw new $TypeError('Assertion failed: `indices` length must be less than the max array size, 2**32 - 1'); + } + if (groupNames.length !== n - 1) { + throw new $TypeError('Assertion failed: `groupNames` must have exactly one fewer item than `indices`'); + } + + var A = ArrayCreate(n); // step 5 + var groups = hasGroups ? OrdinaryObjectCreate(null) : void undefined; // step 6-7 + CreateDataPropertyOrThrow(A, 'groups', groups); // step 8 + + for (var i = 0; i < n; i += 1) { // step 9 + var matchIndices = indices[i]; // step 9.a + // eslint-disable-next-line no-negated-condition + var matchIndexPair = typeof matchIndices !== 'undefined' ? GetMatchIndexPair(S, matchIndices) : void undefined; // step 9.b-9.c + CreateDataPropertyOrThrow(A, ToString(i), matchIndexPair); // step 9.d + if (i > 0 && typeof groupNames[i - 1] !== 'undefined') { // step 9.e + if (!groups) { + throw new $TypeError('if `hasGroups` is `false`, `groupNames` can only contain `undefined` values'); + } + CreateDataPropertyOrThrow(groups, groupNames[i - 1], matchIndexPair); // step 9.e.i + } + } + return A; // step 10 +}; diff --git a/node_modules/es-abstract/2023/MakeTime.js b/node_modules/es-abstract/2023/MakeTime.js new file mode 100644 index 0000000000000..a11d07ef83131 --- /dev/null +++ b/node_modules/es-abstract/2023/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +// https://262.ecma-international.org/12.0/#sec-maketime + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToIntegerOrInfinity(hour); + var m = ToIntegerOrInfinity(min); + var s = ToIntegerOrInfinity(sec); + var milli = ToIntegerOrInfinity(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2023/MinFromTime.js b/node_modules/es-abstract/2023/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/2023/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2023/MonthFromTime.js b/node_modules/es-abstract/2023/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/2023/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2023/NewPromiseCapability.js b/node_modules/es-abstract/2023/NewPromiseCapability.js new file mode 100644 index 0000000000000..640c380dbb5e2 --- /dev/null +++ b/node_modules/es-abstract/2023/NewPromiseCapability.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://262.ecma-international.org/6.0/#sec-newpromisecapability + +module.exports = function NewPromiseCapability(C) { + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); // step 1 + } + + var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3 + + var promise = new C(function (resolve, reject) { // steps 4-5 + if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') { + throw new $TypeError('executor has already been called'); // step 4.a, 4.b + } + resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c + resolvingFunctions['[[Reject]]'] = reject; // step 4.d + }); // step 4-6 + + if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) { + throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8 + } + + return { + '[[Promise]]': promise, + '[[Resolve]]': resolvingFunctions['[[Resolve]]'], + '[[Reject]]': resolvingFunctions['[[Reject]]'] + }; // step 9 +}; diff --git a/node_modules/es-abstract/2023/NormalCompletion.js b/node_modules/es-abstract/2023/NormalCompletion.js new file mode 100644 index 0000000000000..1e429dd65cfad --- /dev/null +++ b/node_modules/es-abstract/2023/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2023/Number/add.js b/node_modules/es-abstract/2023/Number/add.js new file mode 100644 index 0000000000000..8d6271f545a1a --- /dev/null +++ b/node_modules/es-abstract/2023/Number/add.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add + +module.exports = function NumberAdd(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) { + return NaN; + } + + if (!isFinite(x)) { + return x; + } + if (!isFinite(y)) { + return y; + } + + if (x === y && x === 0) { // both zeroes + return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0; + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2023/Number/bitwiseAND.js b/node_modules/es-abstract/2023/Number/bitwiseAND.js new file mode 100644 index 0000000000000..a7159802ded72 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND + +module.exports = function NumberBitwiseAND(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2023/Number/bitwiseNOT.js b/node_modules/es-abstract/2023/Number/bitwiseNOT.js new file mode 100644 index 0000000000000..ae8032a785327 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/bitwiseNOT.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT + +module.exports = function NumberBitwiseNOT(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + var oldValue = ToInt32(x); + // Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer. + return ~oldValue; +}; diff --git a/node_modules/es-abstract/2023/Number/bitwiseOR.js b/node_modules/es-abstract/2023/Number/bitwiseOR.js new file mode 100644 index 0000000000000..c5e67b96802f0 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR + +module.exports = function NumberBitwiseOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2023/Number/bitwiseXOR.js b/node_modules/es-abstract/2023/Number/bitwiseXOR.js new file mode 100644 index 0000000000000..a4030e9a4b07c --- /dev/null +++ b/node_modules/es-abstract/2023/Number/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR + +module.exports = function NumberBitwiseXOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2023/Number/divide.js b/node_modules/es-abstract/2023/Number/divide.js new file mode 100644 index 0000000000000..65244625d300d --- /dev/null +++ b/node_modules/es-abstract/2023/Number/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide + +module.exports = function NumberDivide(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) { + return NaN; + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2023/Number/equal.js b/node_modules/es-abstract/2023/Number/equal.js new file mode 100644 index 0000000000000..db68afa464d2e --- /dev/null +++ b/node_modules/es-abstract/2023/Number/equal.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal + +module.exports = function NumberEqual(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y)) { + return false; + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2023/Number/exponentiate.js b/node_modules/es-abstract/2023/Number/exponentiate.js new file mode 100644 index 0000000000000..2568651032514 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/exponentiate.js @@ -0,0 +1,77 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +// var isNegativeZero = require('is-negative-zero'); + +var $pow = GetIntrinsic('%Math.pow%'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +/* +var abs = require('../../helpers/abs'); +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var IsInteger = require('../IsInteger'); +*/ +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate + +/* eslint max-lines-per-function: 0, max-statements: 0 */ + +module.exports = function NumberExponentiate(base, exponent) { + if (Type(base) !== 'Number' || Type(exponent) !== 'Number') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers'); + } + return $pow(base, exponent); + /* + if (isNaN(exponent)) { + return NaN; + } + if (exponent === 0) { + return 1; + } + if (isNaN(base)) { + return NaN; + } + var aB = abs(base); + if (aB > 1 && exponent === Infinity) { + return Infinity; + } + if (aB > 1 && exponent === -Infinity) { + return 0; + } + if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) { + return NaN; + } + if (aB < 1 && exponent === Infinity) { + return +0; + } + if (aB < 1 && exponent === -Infinity) { + return Infinity; + } + if (base === Infinity) { + return exponent > 0 ? Infinity : 0; + } + if (base === -Infinity) { + var isOdd = true; + if (exponent > 0) { + return isOdd ? -Infinity : Infinity; + } + return isOdd ? -0 : 0; + } + if (exponent > 0) { + return isNegativeZero(base) ? Infinity : 0; + } + if (isNegativeZero(base)) { + if (exponent > 0) { + return isOdd ? -0 : 0; + } + return isOdd ? -Infinity : Infinity; + } + if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) { + return NaN; + } + */ +}; diff --git a/node_modules/es-abstract/2023/Number/index.js b/node_modules/es-abstract/2023/Number/index.js new file mode 100644 index 0000000000000..63ec52da69e28 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2023/Number/leftShift.js b/node_modules/es-abstract/2023/Number/leftShift.js new file mode 100644 index 0000000000000..023b3390f3f37 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/leftShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift + +module.exports = function NumberLeftShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum << shiftCount; +}; diff --git a/node_modules/es-abstract/2023/Number/lessThan.js b/node_modules/es-abstract/2023/Number/lessThan.js new file mode 100644 index 0000000000000..5fcac24e9d958 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/lessThan.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan + +module.exports = function NumberLessThan(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + // If x is NaN, return undefined. + // If y is NaN, return undefined. + if (isNaN(x) || isNaN(y)) { + return void undefined; + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2023/Number/multiply.js b/node_modules/es-abstract/2023/Number/multiply.js new file mode 100644 index 0000000000000..2a6c478a5bcaf --- /dev/null +++ b/node_modules/es-abstract/2023/Number/multiply.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply + +module.exports = function NumberMultiply(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) { + return NaN; + } + if (!isFinite(x) && !isFinite(y)) { + return x === y ? Infinity : -Infinity; + } + if (!isFinite(x) && y !== 0) { + return x > 0 ? Infinity : -Infinity; + } + if (!isFinite(y) && x !== 0) { + return y > 0 ? Infinity : -Infinity; + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2023/Number/remainder.js b/node_modules/es-abstract/2023/Number/remainder.js new file mode 100644 index 0000000000000..56a51c3f9b893 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/remainder.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); +var isFinite = require('../../helpers/isFinite'); + +var truncate = require('../truncate'); +var Type = require('../Type'); + +// https://262.ecma-international.org/14.0/#sec-numeric-types-number-remainder + +module.exports = function NumberRemainder(n, d) { + if (Type(n) !== 'Number' || Type(d) !== 'Number') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers'); + } + + // If either operand is NaN, the result is NaN. + // If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN. + if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) { + return NaN; + } + + // If the dividend is finite and the divisor is an infinity, the result equals the dividend. + // If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend. + if (!isFinite(d) || n === 0) { + return n; + } + + if (!isFinite(n) || !isFinite(d) || n === 0 || d === 0) { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be finite and nonzero'); + } + var quotient = n / d; + var q = truncate(quotient); + var r = n - (d * q); + if (r === 0 && n < 0) { + return -0; + } + return r; +}; diff --git a/node_modules/es-abstract/2023/Number/sameValue.js b/node_modules/es-abstract/2023/Number/sameValue.js new file mode 100644 index 0000000000000..19efc379d1d8c --- /dev/null +++ b/node_modules/es-abstract/2023/Number/sameValue.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var isNegativeZero = require('is-negative-zero'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var NumberSameValueZero = require('./sameValueZero'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue + +module.exports = function NumberSameValue(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (x === 0 && y === 0) { + return !(isNegativeZero(x) ^ isNegativeZero(y)); + } + return NumberSameValueZero(x, y); +}; diff --git a/node_modules/es-abstract/2023/Number/sameValueZero.js b/node_modules/es-abstract/2023/Number/sameValueZero.js new file mode 100644 index 0000000000000..5688198fe88aa --- /dev/null +++ b/node_modules/es-abstract/2023/Number/sameValueZero.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero + +module.exports = function NumberSameValueZero(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var xNaN = isNaN(x); + var yNaN = isNaN(y); + if (xNaN || yNaN) { + return xNaN === yNaN; + } + return x === y; +}; diff --git a/node_modules/es-abstract/2023/Number/signedRightShift.js b/node_modules/es-abstract/2023/Number/signedRightShift.js new file mode 100644 index 0000000000000..025f39a1c4ef8 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/signedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift + +module.exports = function NumberSignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >> shiftCount; +}; diff --git a/node_modules/es-abstract/2023/Number/subtract.js b/node_modules/es-abstract/2023/Number/subtract.js new file mode 100644 index 0000000000000..29a29e6198ba2 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/subtract.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var NumberAdd = require('./add'); +var NumberUnaryMinus = require('./unaryMinus'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract + +module.exports = function NumberSubtract(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberAdd(x, NumberUnaryMinus(y)); +}; diff --git a/node_modules/es-abstract/2023/Number/toString.js b/node_modules/es-abstract/2023/Number/toString.js new file mode 100644 index 0000000000000..375da2a5b6080 --- /dev/null +++ b/node_modules/es-abstract/2023/Number/toString.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $numberToString = callBound('Number.prototype.toString'); + +var Type = require('../Type'); + +var isInteger = require('../../helpers/isInteger'); + +// https://262.ecma-international.org/14.0/#sec-numeric-types-number-tostring + +module.exports = function NumberToString(x, radix) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` must be a Number'); + } + if (!isInteger(radix) || radix < 2 || radix > 36) { + throw new $TypeError('Assertion failed: `radix` must be an integer >= 2 and <= 36'); + } + + return $numberToString(x, radix); // steps 1 - 12 +}; diff --git a/node_modules/es-abstract/2023/Number/unaryMinus.js b/node_modules/es-abstract/2023/Number/unaryMinus.js new file mode 100644 index 0000000000000..794582ad8d42b --- /dev/null +++ b/node_modules/es-abstract/2023/Number/unaryMinus.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus + +module.exports = function NumberUnaryMinus(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + if (isNaN(x)) { + return NaN; + } + return -x; +}; diff --git a/node_modules/es-abstract/2023/Number/unsignedRightShift.js b/node_modules/es-abstract/2023/Number/unsignedRightShift.js new file mode 100644 index 0000000000000..2eb967ac2828b --- /dev/null +++ b/node_modules/es-abstract/2023/Number/unsignedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift + +module.exports = function NumberUnsignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >>> shiftCount; +}; diff --git a/node_modules/es-abstract/2023/NumberBitwiseOp.js b/node_modules/es-abstract/2023/NumberBitwiseOp.js new file mode 100644 index 0000000000000..11425ffded076 --- /dev/null +++ b/node_modules/es-abstract/2023/NumberBitwiseOp.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('./ToInt32'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-numberbitwiseop + +module.exports = function NumberBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + var lnum = ToInt32(x); + var rnum = ToUint32(y); + if (op === '&') { + return lnum & rnum; + } + if (op === '|') { + return lnum | rnum; + } + return lnum ^ rnum; +}; diff --git a/node_modules/es-abstract/2023/NumberToBigInt.js b/node_modules/es-abstract/2023/NumberToBigInt.js new file mode 100644 index 0000000000000..9ed8ed9a9be5d --- /dev/null +++ b/node_modules/es-abstract/2023/NumberToBigInt.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-numbertobigint + +module.exports = function NumberToBigInt(number) { + if (Type(number) !== 'Number') { + throw new $TypeError('Assertion failed: `number` must be a String'); + } + if (!IsIntegralNumber(number)) { + throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + return $BigInt(number); +}; diff --git a/node_modules/es-abstract/2023/NumericToRawBytes.js b/node_modules/es-abstract/2023/NumericToRawBytes.js new file mode 100644 index 0000000000000..cc671159f4cb7 --- /dev/null +++ b/node_modules/es-abstract/2023/NumericToRawBytes.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var hasOwnProperty = require('./HasOwnProperty'); +var ToBigInt64 = require('./ToBigInt64'); +var ToBigUint64 = require('./ToBigUint64'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes'); +var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes'); +var integerToNBytes = require('../helpers/integerToNBytes'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32, + BigInt64: ToBigInt64, + BigUint64: ToBigUint64 +}; + +// https://262.ecma-international.org/11.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number' && Type(value) !== 'BigInt') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'Float32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'Float64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; diff --git a/node_modules/es-abstract/2023/ObjectDefineProperties.js b/node_modules/es-abstract/2023/ObjectDefineProperties.js new file mode 100644 index 0000000000000..b47603487c9da --- /dev/null +++ b/node_modules/es-abstract/2023/ObjectDefineProperties.js @@ -0,0 +1,38 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2023/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2023/OrdinaryCreateFromConstructor.js new file mode 100644 index 0000000000000..8f3bb829df950 --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return OrdinaryObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2023/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2023/OrdinaryDefineOwnProperty.js new file mode 100644 index 0000000000000..70cd4fe58ddf1 --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2023/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2023/OrdinaryGetOwnProperty.js new file mode 100644 index 0000000000000..52c657eec324c --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var hasOwn = require('hasown'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!hasOwn(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2023/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2023/OrdinaryGetPrototypeOf.js new file mode 100644 index 0000000000000..ba17b98872933 --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2023/OrdinaryHasInstance.js b/node_modules/es-abstract/2023/OrdinaryHasInstance.js new file mode 100644 index 0000000000000..996a50e070993 --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (!IsCallable(C)) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2023/OrdinaryHasProperty.js b/node_modules/es-abstract/2023/OrdinaryHasProperty.js new file mode 100644 index 0000000000000..27e7da33ad0c9 --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2023/OrdinaryObjectCreate.js b/node_modules/es-abstract/2023/OrdinaryObjectCreate.js new file mode 100644 index 0000000000000..140534083c5c7 --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinaryObjectCreate.js @@ -0,0 +1,56 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/11.0/#sec-objectcreate + +module.exports = function OrdinaryObjectCreate(proto) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1]; + if (!IsArray(additionalInternalSlotsList)) { + throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array'); + } + + // var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1 + // internalSlotsList.push(...additionalInternalSlotsList); // step 2 + // var O = MakeBasicObject(internalSlotsList); // step 3 + // setProto(O, proto); // step 4 + // return O; // step 5 + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (additionalInternalSlotsList.length > 0) { + forEach(additionalInternalSlotsList, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; +}; diff --git a/node_modules/es-abstract/2023/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2023/OrdinarySetPrototypeOf.js new file mode 100644 index 0000000000000..d2b72306c187b --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2023/OrdinaryToPrimitive.js b/node_modules/es-abstract/2023/OrdinaryToPrimitive.js new file mode 100644 index 0000000000000..e1dbe1427f8d8 --- /dev/null +++ b/node_modules/es-abstract/2023/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2023/ParseHexOctet.js b/node_modules/es-abstract/2023/ParseHexOctet.js new file mode 100644 index 0000000000000..b3ab81c0d9a8b --- /dev/null +++ b/node_modules/es-abstract/2023/ParseHexOctet.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var substring = require('./substring'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/14.0/#sec-parsehexoctet + +module.exports = function ParseHexOctet(string, position) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + if (!IsIntegralNumber(position) || position < 0) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer'); + } + + var len = string.length; // step 1 + if ((position + 2) > len) { // step 2 + var error = new $SyntaxError('requested a position on a string that does not contain 2 characters at that position'); // step 2.a + return [error]; // step 2.b + } + var hexDigits = substring(string, position, position + 2); // step 3 + + var n = $Number('0x' + hexDigits); + if (isNaN(n)) { + return [new $SyntaxError('Invalid hexadecimal characters')]; + } + return n; + + /* + 4. Let _parseResult_ be ParseText(StringToCodePoints(_hexDigits_), |HexDigits[~Sep]|). + 5. If _parseResult_ is not a Parse Node, return _parseResult_. + 6. Let _n_ be the unsigned 8-bit value corresponding with the MV of _parseResult_. + 7. Return _n_. + */ +}; diff --git a/node_modules/es-abstract/2023/PromiseResolve.js b/node_modules/es-abstract/2023/PromiseResolve.js new file mode 100644 index 0000000000000..6474b79c40ae6 --- /dev/null +++ b/node_modules/es-abstract/2023/PromiseResolve.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBind = require('call-bind'); + +var $resolve = GetIntrinsic('%Promise.resolve%', true); +var $PromiseResolve = $resolve && callBind($resolve); + +// https://262.ecma-international.org/9.0/#sec-promise-resolve + +module.exports = function PromiseResolve(C, x) { + if (!$PromiseResolve) { + throw new SyntaxError('This environment does not support Promises.'); + } + return $PromiseResolve(C, x); +}; + diff --git a/node_modules/es-abstract/2023/QuoteJSONString.js b/node_modules/es-abstract/2023/QuoteJSONString.js new file mode 100644 index 0000000000000..1a7fae1824357 --- /dev/null +++ b/node_modules/es-abstract/2023/QuoteJSONString.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +var StringToCodePoints = require('./StringToCodePoints'); +var Type = require('./Type'); +var UnicodeEscape = require('./UnicodeEscape'); +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); + +var hasOwn = require('hasown'); + +// https://262.ecma-international.org/12.0/#sec-quotejsonstring + +var escapes = { + '\u0008': '\\b', + '\u0009': '\\t', + '\u000A': '\\n', + '\u000C': '\\f', + '\u000D': '\\r', + '\u0022': '\\"', + '\u005c': '\\\\' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach(StringToCodePoints(value), function (C) { + if (hasOwn(escapes, C)) { + product += escapes[C]; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20 || isLeadingSurrogate(C) || isTrailingSurrogate(C)) { + product += UnicodeEscape(C); + } else { + product += UTF16EncodeCodePoint(cCharCode); + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2023/RawBytesToNumeric.js b/node_modules/es-abstract/2023/RawBytesToNumeric.js new file mode 100644 index 0000000000000..d14705cdcc0de --- /dev/null +++ b/node_modules/es-abstract/2023/RawBytesToNumeric.js @@ -0,0 +1,84 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnsignedElementType = require('./IsUnsignedElementType'); +var Type = require('./Type'); + +var bytesAsFloat32 = require('../helpers/bytesAsFloat32'); +var bytesAsFloat64 = require('../helpers/bytesAsFloat64'); +var bytesAsInteger = require('../helpers/bytesAsInteger'); +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'Float32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'Float64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt); +}; diff --git a/node_modules/es-abstract/2023/RegExpCreate.js b/node_modules/es-abstract/2023/RegExpCreate.js new file mode 100644 index 0000000000000..68e31605ed176 --- /dev/null +++ b/node_modules/es-abstract/2023/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2023/RegExpExec.js b/node_modules/es-abstract/2023/RegExpExec.js new file mode 100644 index 0000000000000..cf15207415f5a --- /dev/null +++ b/node_modules/es-abstract/2023/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2023/RegExpHasFlag.js b/node_modules/es-abstract/2023/RegExpHasFlag.js new file mode 100644 index 0000000000000..a7c800d9e145f --- /dev/null +++ b/node_modules/es-abstract/2023/RegExpHasFlag.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $RegExpPrototype = GetIntrinsic('%RegExp.prototype%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var hasRegExpMatcher = require('is-regex'); +var getFlags = require('regexp.prototype.flags'); + +// https://262.ecma-international.org/13.0/#sec-regexphasflag + +module.exports = function RegExpHasFlag(R, codeUnit) { + if (Type(codeUnit) !== 'String' || codeUnit.length !== 1) { + throw new $TypeError('Assertion failed: `string` must be a code unit - a String of length 1'); + } + + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: Type(R) is not Object'); + } + + if (!hasRegExpMatcher(R)) { // step 2 + if (SameValue(R, $RegExpPrototype)) { + return void undefined; // step 2.a + } + throw new $TypeError('`R` must be a RegExp object'); // step 2.b + } + + var flags = getFlags(R); // step 3 + + return $indexOf(flags, codeUnit) > -1; // steps 4-5 +}; diff --git a/node_modules/es-abstract/2023/RequireObjectCoercible.js b/node_modules/es-abstract/2023/RequireObjectCoercible.js new file mode 100644 index 0000000000000..9008359db8f9a --- /dev/null +++ b/node_modules/es-abstract/2023/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2023/SameValue.js b/node_modules/es-abstract/2023/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/2023/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2023/SameValueNonNumber.js b/node_modules/es-abstract/2023/SameValueNonNumber.js new file mode 100644 index 0000000000000..82febfdfdb624 --- /dev/null +++ b/node_modules/es-abstract/2023/SameValueNonNumber.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/14.0/#sec-samevaluenonnumeric + +module.exports = function SameValueNonNumber(x, y) { + var xType = Type(x); + if (xType === 'Number') { + throw new $TypeError('Assertion failed: SameValueNonNumber does not accept Number values'); + } + if (xType !== Type(y)) { + throw new $TypeError('SameValueNonNumber requires two non-Number values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2023/SameValueZero.js b/node_modules/es-abstract/2023/SameValueZero.js new file mode 100644 index 0000000000000..3e2851b5ee656 --- /dev/null +++ b/node_modules/es-abstract/2023/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2023/SecFromTime.js b/node_modules/es-abstract/2023/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/2023/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2023/Set.js b/node_modules/es-abstract/2023/Set.js new file mode 100644 index 0000000000000..969703136399b --- /dev/null +++ b/node_modules/es-abstract/2023/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2023/SetFunctionLength.js b/node_modules/es-abstract/2023/SetFunctionLength.js new file mode 100644 index 0000000000000..fbf9f2352ab66 --- /dev/null +++ b/node_modules/es-abstract/2023/SetFunctionLength.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var HasOwnProperty = require('./HasOwnProperty'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/12.0/#sec-setfunctionlength + +module.exports = function SetFunctionLength(F, length) { + if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) { + throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property'); + } + if (Type(length) !== 'Number') { + throw new $TypeError('Assertion failed: `length` must be a Number'); + } + if (length !== Infinity && (!isInteger(length) || length < 0)) { + throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0'); + } + return DefinePropertyOrThrow(F, 'length', { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); +}; diff --git a/node_modules/es-abstract/2023/SetFunctionName.js b/node_modules/es-abstract/2023/SetFunctionName.js new file mode 100644 index 0000000000000..21c3ea95a3b82 --- /dev/null +++ b/node_modules/es-abstract/2023/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || hasOwn(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2023/SetIntegrityLevel.js b/node_modules/es-abstract/2023/SetIntegrityLevel.js new file mode 100644 index 0000000000000..aaef85a0a258a --- /dev/null +++ b/node_modules/es-abstract/2023/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2023/SetTypedArrayFromArrayLike.js b/node_modules/es-abstract/2023/SetTypedArrayFromArrayLike.js new file mode 100644 index 0000000000000..aa5581d99ce32 --- /dev/null +++ b/node_modules/es-abstract/2023/SetTypedArrayFromArrayLike.js @@ -0,0 +1,97 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isTypedArray = require('is-typed-array'); +var typedArrayBuffer = require('typed-array-buffer'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); +var whichTypedArray = require('which-typed-array'); + +var isInteger = require('../helpers/isInteger'); + +var Get = require('./Get'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var SetValueInBuffer = require('./SetValueInBuffer'); +var ToBigInt = require('./ToBigInt'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var TypedArrayElementSize = require('./TypedArrayElementSize'); +var TypedArrayElementType = require('./TypedArrayElementType'); + +// https://262.ecma-international.org/13.0/#sec-settypedarrayfromarraylike + +module.exports = function SetTypedArrayFromArrayLike(target, targetOffset, source) { + var whichTarget = whichTypedArray(target); + if (!whichTarget) { + throw new $TypeError('Assertion failed: target must be a TypedArray instance'); + } + + if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) { + throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity'); + } + + if (isTypedArray(source)) { + throw new $TypeError('Assertion failed: source must not be a TypedArray instance'); + } + + var targetBuffer = typedArrayBuffer(target); // step 1 + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 2 + } + + var targetLength = typedArrayLength(target); // step 3 + + var targetElementSize = TypedArrayElementSize(target); // step 4 + + var targetType = TypedArrayElementType(target); // step 5 + + var targetByteOffset = typedArrayByteOffset(target); // step 6 + + var src = ToObject(source); // step 7 + + var srcLength = LengthOfArrayLike(src); // step 8 + + if (targetOffset === Infinity) { + throw new $RangeError('targetOffset must be a finite integer'); // step 9 + } + + if (srcLength + targetOffset > targetLength) { + throw new $RangeError('targetOffset + srcLength must be <= target.length'); // step 10 + } + + var targetByteIndex = (targetOffset * targetElementSize) + targetByteOffset; // step 11 + + var k = 0; // step 12 + + var limit = targetByteIndex + (targetElementSize * srcLength); // step 13 + + while (targetByteIndex < limit) { // step 14 + var Pk = ToString(k); // step 14.a + + var value = Get(src, Pk); // step 14.b + + if (IsBigIntElementType(targetType)) { + value = ToBigInt(value); // step 14.c + } else { + value = ToNumber(value); // step 14.d + } + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 14.e + } + + SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value, true, 'Unordered'); // step 14.f + + k += 1; // step 14.g + + targetByteIndex += targetElementSize; // step 14.h + } +}; diff --git a/node_modules/es-abstract/2023/SetTypedArrayFromTypedArray.js b/node_modules/es-abstract/2023/SetTypedArrayFromTypedArray.js new file mode 100644 index 0000000000000..1988f20d59110 --- /dev/null +++ b/node_modules/es-abstract/2023/SetTypedArrayFromTypedArray.js @@ -0,0 +1,135 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true); + +var typedArrayBuffer = require('typed-array-buffer'); +var typedArrayByteLength = require('typed-array-byte-length'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); +var whichTypedArray = require('which-typed-array'); + +var isInteger = require('../helpers/isInteger'); + +var CloneArrayBuffer = require('./CloneArrayBuffer'); +var GetValueFromBuffer = require('./GetValueFromBuffer'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var IsSharedArrayBuffer = require('./IsSharedArrayBuffer'); +var SameValue = require('./SameValue'); +var SetValueInBuffer = require('./SetValueInBuffer'); +var TypedArrayElementSize = require('./TypedArrayElementSize'); +var TypedArrayElementType = require('./TypedArrayElementType'); + +// https://262.ecma-international.org/13.0/#sec-settypedarrayfromtypedarray + +module.exports = function SetTypedArrayFromTypedArray(target, targetOffset, source) { + var whichTarget = whichTypedArray(target); + if (!whichTarget) { + throw new $TypeError('Assertion failed: target must be a TypedArray instance'); + } + + if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) { + throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity'); + } + + var whichSource = whichTypedArray(source); + if (!whichSource) { + throw new $TypeError('Assertion failed: source must be a TypedArray instance'); + } + + var targetBuffer = typedArrayBuffer(target); // step 1 + + if (IsDetachedBuffer(targetBuffer)) { + throw new $TypeError('target’s buffer is detached'); // step 2 + } + + var targetLength = typedArrayLength(target); // step 3 + + var srcBuffer = typedArrayBuffer(source); // step 4 + + if (IsDetachedBuffer(srcBuffer)) { + throw new $TypeError('source’s buffer is detached'); // step 5 + } + + var targetType = TypedArrayElementType(target); // step 6 + + var targetElementSize = TypedArrayElementSize(target); // step 7 + + var targetByteOffset = typedArrayByteOffset(target); // step 8 + + var srcType = TypedArrayElementType(source); // step 9 + + var srcElementSize = TypedArrayElementSize(source); // step 10 + + var srcLength = typedArrayLength(source); // step 11 + + var srcByteOffset = typedArrayByteOffset(source); // step 12 + + if (targetOffset === Infinity) { + throw new $RangeError('targetOffset must be a non-negative integer or +Infinity'); // step 13 + } + + if (srcLength + targetOffset > targetLength) { + throw new $RangeError('targetOffset + source.length must not be greater than target.length'); // step 14 + } + + var targetContentType = whichTarget === 'BigInt64Array' || whichTarget === 'BigUint64Array' ? 'BigInt' : 'Number'; + var sourceContentType = whichSource === 'BigInt64Array' || whichSource === 'BigUint64Array' ? 'BigInt' : 'Number'; + if (targetContentType !== sourceContentType) { + throw new $TypeError('source and target must have the same content type'); // step 15 + } + + var same; + if (IsSharedArrayBuffer(srcBuffer) && IsSharedArrayBuffer(targetBuffer)) { // step 16 + // a. If srcBuffer.[[ArrayBufferData]] and targetBuffer.[[ArrayBufferData]] are the same Shared Data Block values, let same be true; else let same be false. + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + same = SameValue(srcBuffer, targetBuffer); // step 17 + } + + var srcByteIndex; + if (same) { // step 18 + var srcByteLength = typedArrayByteLength(source); // step 18.a + + srcBuffer = CloneArrayBuffer(srcBuffer, srcByteOffset, srcByteLength, $ArrayBuffer); // step 18.b + + // c. NOTE: %ArrayBuffer% is used to clone srcBuffer because is it known to not have any observable side-effects. + + srcByteIndex = 0; // step 18.d + } else { + srcByteIndex = srcByteOffset; // step 19 + } + + var targetByteIndex = (targetOffset * targetElementSize) + targetByteOffset; // step 20 + + var limit = targetByteIndex + (targetElementSize * srcLength); // step 21 + + var value; + if (srcType === targetType) { // step 22 + // a. NOTE: If srcType and targetType are the same, the transfer must be performed in a manner that preserves the bit-level encoding of the source data. + + while (targetByteIndex < limit) { // step 22.b + value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'Uint8', true, 'Unordered'); // step 22.b.i + + SetValueInBuffer(targetBuffer, targetByteIndex, 'Uint8', value, true, 'Unordered'); // step 22.b.ii + + srcByteIndex += 1; // step 22.b.iii + + targetByteIndex += 1; // step 22.b.iv + } + } else { // step 23 + while (targetByteIndex < limit) { // step 23.a + value = GetValueFromBuffer(srcBuffer, srcByteIndex, srcType, true, 'Unordered'); // step 23.a.i + + SetValueInBuffer(targetBuffer, targetByteIndex, targetType, value, true, 'Unordered'); // step 23.a.ii + + srcByteIndex += srcElementSize; // step 23.a.iii + + targetByteIndex += targetElementSize; // step 23.a.iv + } + } +}; diff --git a/node_modules/es-abstract/2023/SetValueInBuffer.js b/node_modules/es-abstract/2023/SetValueInBuffer.js new file mode 100644 index 0000000000000..ff9de36ca2c75 --- /dev/null +++ b/node_modules/es-abstract/2023/SetValueInBuffer.js @@ -0,0 +1,105 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsDetachedBuffer = require('./IsDetachedBuffer'); +var NumericToRawBytes = require('./NumericToRawBytes'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); +var hasOwn = require('hasown'); + +var table60 = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var defaultEndianness = require('../helpers/defaultEndianness'); +var forEach = require('../helpers/forEach'); + +// https://262.ecma-international.org/12.0/#sec-setvalueinbuffer + +/* eslint max-params: 0 */ + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex) || byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer'); + } + + if (typeof type !== 'string' || !hasOwn(table60, type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + if (order !== 'SeqCst' && order !== 'Unordered' && order !== 'Init') { + throw new $TypeError('Assertion failed: `order` must be `"SeqCst"`, `"Unordered"`, or `"Init"`'); + } + + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3 + throw new $TypeError('Assertion failed: `value` must be a BigInt if type is BigInt64 or BigUint64, otherwise a Number'); + } + + // 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = table60[type]; // step 5 + + // 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6 + + var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7 + + if (isSAB) { // step 8 + /* + Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). + If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false. + Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + } + + // 10. Return NormalCompletion(undefined). +}; diff --git a/node_modules/es-abstract/2023/SortIndexedProperties.js b/node_modules/es-abstract/2023/SortIndexedProperties.js new file mode 100644 index 0000000000000..1f7ac9052bb2d --- /dev/null +++ b/node_modules/es-abstract/2023/SortIndexedProperties.js @@ -0,0 +1,52 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isAbstractClosure = require('../helpers/isAbstractClosure'); +var isInteger = require('../helpers/isInteger'); + +var $push = callBound('Array.prototype.push'); +var $sort = callBound('Array.prototype.sort'); + +// https://262.ecma-international.org/14.0/#sec-sortindexedproperties + +module.exports = function SortIndexedProperties(obj, len, SortCompare, holes) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(obj) is not Object'); + } + if (!isInteger(len) || len < 0) { + throw new $TypeError('Assertion failed: `len` must be an integer >= 0'); + } + if (!isAbstractClosure(SortCompare) || SortCompare.length !== 2) { + throw new $TypeError('Assertion failed: `SortCompare` must be an abstract closure taking 2 arguments'); + } + if (holes !== 'skip-holes' && holes !== 'read-through-holes') { + throw new $TypeError('Assertion failed: `holes` must be either `skip-holes` or `read-through-holes`'); + } + + var items = []; // step 1 + + var k = 0; // step 2 + + while (k < len) { // step 3 + var Pk = ToString(k); + var kRead = holes === 'skip-holes' ? HasProperty(obj, Pk) : true; // step 3.b - 3.c + if (kRead) { // step 3.d + var kValue = Get(obj, Pk); + $push(items, kValue); + } + k += 1; // step 3.e + } + + $sort(items, SortCompare); // step 4 + + return items; // step 5 +}; diff --git a/node_modules/es-abstract/2023/SpeciesConstructor.js b/node_modules/es-abstract/2023/SpeciesConstructor.js new file mode 100644 index 0000000000000..1937b9c9cdebe --- /dev/null +++ b/node_modules/es-abstract/2023/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2023/StringCreate.js b/node_modules/es-abstract/2023/StringCreate.js new file mode 100644 index 0000000000000..bd02820f79e32 --- /dev/null +++ b/node_modules/es-abstract/2023/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2023/StringGetOwnProperty.js b/node_modules/es-abstract/2023/StringGetOwnProperty.js new file mode 100644 index 0000000000000..579bb9556dbc7 --- /dev/null +++ b/node_modules/es-abstract/2023/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://262.ecma-international.org/12.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsIntegralNumber(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2023/StringIndexOf.js b/node_modules/es-abstract/2023/StringIndexOf.js new file mode 100644 index 0000000000000..2f6944d156bce --- /dev/null +++ b/node_modules/es-abstract/2023/StringIndexOf.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var $slice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/12.0/#sec-stringindexof + +module.exports = function StringIndexOf(string, searchValue, fromIndex) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + if (Type(searchValue) !== 'String') { + throw new $TypeError('Assertion failed: `searchValue` must be a String'); + } + if (!isInteger(fromIndex) || fromIndex < 0) { + throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer'); + } + + var len = string.length; + if (searchValue === '' && fromIndex <= len) { + return fromIndex; + } + + var searchLen = searchValue.length; + for (var i = fromIndex; i <= (len - searchLen); i += 1) { + var candidate = $slice(string, i, i + searchLen); + if (candidate === searchValue) { + return i; + } + } + return -1; +}; diff --git a/node_modules/es-abstract/2023/StringPad.js b/node_modules/es-abstract/2023/StringPad.js new file mode 100644 index 0000000000000..cdf69001bb5bd --- /dev/null +++ b/node_modules/es-abstract/2023/StringPad.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); + +var $strSlice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/11.0/#sec-stringpad + +module.exports = function StringPad(O, maxLength, fillString, placement) { + if (placement !== 'start' && placement !== 'end') { + throw new $TypeError('Assertion failed: `placement` must be "start" or "end"'); + } + var S = ToString(O); + var intMaxLength = ToLength(maxLength); + var stringLength = S.length; + if (intMaxLength <= stringLength) { + return S; + } + var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString); + if (filler === '') { + return S; + } + var fillLen = intMaxLength - stringLength; + + // the String value consisting of repeated concatenations of filler truncated to length fillLen. + var truncatedStringFiller = ''; + while (truncatedStringFiller.length < fillLen) { + truncatedStringFiller += filler; + } + truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen); + + if (placement === 'start') { + return truncatedStringFiller + S; + } + return S + truncatedStringFiller; +}; diff --git a/node_modules/es-abstract/2023/StringToBigInt.js b/node_modules/es-abstract/2023/StringToBigInt.js new file mode 100644 index 0000000000000..bb113b4c6a258 --- /dev/null +++ b/node_modules/es-abstract/2023/StringToBigInt.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +// https://262.ecma-international.org/14.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return void undefined; + } +}; diff --git a/node_modules/es-abstract/2023/StringToCodePoints.js b/node_modules/es-abstract/2023/StringToCodePoints.js new file mode 100644 index 0000000000000..f503ce1b47933 --- /dev/null +++ b/node_modules/es-abstract/2023/StringToCodePoints.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $push = callBound('Array.prototype.push'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-stringtocodepoints + +module.exports = function StringToCodePoints(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var codePoints = []; + var size = string.length; + var position = 0; + while (position < size) { + var cp = CodePointAt(string, position); + $push(codePoints, cp['[[CodePoint]]']); + position += cp['[[CodeUnitCount]]']; + } + return codePoints; +}; diff --git a/node_modules/es-abstract/2023/StringToNumber.js b/node_modules/es-abstract/2023/StringToNumber.js new file mode 100644 index 0000000000000..5775b56c69f4e --- /dev/null +++ b/node_modules/es-abstract/2023/StringToNumber.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = require('string.prototype.trim'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-stringtonumber + +module.exports = function StringToNumber(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` is not a String'); + } + if (isBinary(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 2)); + } + if (isOctal(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 8)); + } + if (hasNonWS(argument) || isInvalidHexLiteral(argument)) { + return NaN; + } + var trimmed = $trim(argument); + if (trimmed !== argument) { + return StringToNumber(trimmed); + } + return $Number(argument); +}; diff --git a/node_modules/es-abstract/2023/SymbolDescriptiveString.js b/node_modules/es-abstract/2023/SymbolDescriptiveString.js new file mode 100644 index 0000000000000..89c253ffaed3e --- /dev/null +++ b/node_modules/es-abstract/2023/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2023/TestIntegrityLevel.js b/node_modules/es-abstract/2023/TestIntegrityLevel.js new file mode 100644 index 0000000000000..7cefab7017907 --- /dev/null +++ b/node_modules/es-abstract/2023/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2023/ThrowCompletion.js b/node_modules/es-abstract/2023/ThrowCompletion.js new file mode 100644 index 0000000000000..b7d388a35292e --- /dev/null +++ b/node_modules/es-abstract/2023/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2023/TimeClip.js b/node_modules/es-abstract/2023/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/2023/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2023/TimeFromYear.js b/node_modules/es-abstract/2023/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/2023/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2023/TimeString.js b/node_modules/es-abstract/2023/TimeString.js new file mode 100644 index 0000000000000..051c4728e2e49 --- /dev/null +++ b/node_modules/es-abstract/2023/TimeString.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var HourFromTime = require('./HourFromTime'); +var MinFromTime = require('./MinFromTime'); +var SecFromTime = require('./SecFromTime'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-timestring + +module.exports = function TimeString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var hour = HourFromTime(tv); + var minute = MinFromTime(tv); + var second = SecFromTime(tv); + return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; +}; diff --git a/node_modules/es-abstract/2023/TimeWithinDay.js b/node_modules/es-abstract/2023/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/2023/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2023/ToBigInt.js b/node_modules/es-abstract/2023/ToBigInt.js new file mode 100644 index 0000000000000..d24e0fff091e3 --- /dev/null +++ b/node_modules/es-abstract/2023/ToBigInt.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var StringToBigInt = require('./StringToBigInt'); +var ToPrimitive = require('./ToPrimitive'); + +var isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/11.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (prim == null) { + throw new $TypeError('Cannot convert null or undefined to a BigInt'); + } + + if (typeof prim === 'boolean') { + return prim ? $BigInt(1) : $BigInt(0); + } + + if (typeof prim === 'number') { + throw new $TypeError('Cannot convert a Number value to a BigInt'); + } + + if (typeof prim === 'string') { + var n = StringToBigInt(prim); + if (isNaN(n)) { + throw new $TypeError('Failed to parse String to BigInt'); + } + return n; + } + + if (typeof prim === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a BigInt'); + } + + if (typeof prim !== 'bigint') { + throw new $SyntaxError('Assertion failed: unknown primitive type'); + } + + return prim; +}; diff --git a/node_modules/es-abstract/2023/ToBigInt64.js b/node_modules/es-abstract/2023/ToBigInt64.js new file mode 100644 index 0000000000000..65c1c55d92b18 --- /dev/null +++ b/node_modules/es-abstract/2023/ToBigInt64.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; diff --git a/node_modules/es-abstract/2023/ToBigUint64.js b/node_modules/es-abstract/2023/ToBigUint64.js new file mode 100644 index 0000000000000..ff68236a8c88f --- /dev/null +++ b/node_modules/es-abstract/2023/ToBigUint64.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; diff --git a/node_modules/es-abstract/2023/ToBoolean.js b/node_modules/es-abstract/2023/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/2023/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2023/ToDateString.js b/node_modules/es-abstract/2023/ToDateString.js new file mode 100644 index 0000000000000..dabb2bb38a515 --- /dev/null +++ b/node_modules/es-abstract/2023/ToDateString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $String(new $Date(tv)); +}; diff --git a/node_modules/es-abstract/2023/ToIndex.js b/node_modules/es-abstract/2023/ToIndex.js new file mode 100644 index 0000000000000..2343b44f32192 --- /dev/null +++ b/node_modules/es-abstract/2023/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var ToLength = require('./ToLength'); +var SameValue = require('./SameValue'); + +// https://262.ecma-international.org/8.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToIntegerOrInfinity(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValue(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2023/ToInt16.js b/node_modules/es-abstract/2023/ToInt16.js new file mode 100644 index 0000000000000..49d02c4c5c230 --- /dev/null +++ b/node_modules/es-abstract/2023/ToInt16.js @@ -0,0 +1,21 @@ +'use strict'; + +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); +var truncate = require('./truncate'); + +var isFinite = require('../helpers/isFinite'); + +// https://262.ecma-international.org/14.0/#sec-toint16 + +var two16 = 0x10000; // Math.pow(2, 16); + +module.exports = function ToInt16(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit >= 0x8000 ? int16bit - two16 : int16bit; +}; diff --git a/node_modules/es-abstract/2023/ToInt32.js b/node_modules/es-abstract/2023/ToInt32.js new file mode 100644 index 0000000000000..c4d6bbc61bffc --- /dev/null +++ b/node_modules/es-abstract/2023/ToInt32.js @@ -0,0 +1,23 @@ +'use strict'; + +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); +var truncate = require('./truncate'); + +var isFinite = require('../helpers/isFinite'); + +// https://262.ecma-international.org/14.0/#sec-toint32 + +var two31 = 0x80000000; // Math.pow(2, 31); +var two32 = 0x100000000; // Math.pow(2, 32); + +module.exports = function ToInt32(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + var result = int32bit >= two31 ? int32bit - two32 : int32bit; + return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here +}; diff --git a/node_modules/es-abstract/2023/ToInt8.js b/node_modules/es-abstract/2023/ToInt8.js new file mode 100644 index 0000000000000..6b9da945c3537 --- /dev/null +++ b/node_modules/es-abstract/2023/ToInt8.js @@ -0,0 +1,19 @@ +'use strict'; + +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); +var truncate = require('./truncate'); + +var isFinite = require('../helpers/isFinite'); + +// https://262.ecma-international.org/14.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 0x100); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2023/ToIntegerOrInfinity.js b/node_modules/es-abstract/2023/ToIntegerOrInfinity.js new file mode 100644 index 0000000000000..8cc0c8d433b98 --- /dev/null +++ b/node_modules/es-abstract/2023/ToIntegerOrInfinity.js @@ -0,0 +1,16 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var truncate = require('./truncate'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); + +// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + return truncate(number); +}; diff --git a/node_modules/es-abstract/2023/ToLength.js b/node_modules/es-abstract/2023/ToLength.js new file mode 100644 index 0000000000000..0468c3e71f305 --- /dev/null +++ b/node_modules/es-abstract/2023/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +module.exports = function ToLength(argument) { + var len = ToIntegerOrInfinity(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2023/ToNumber.js b/node_modules/es-abstract/2023/ToNumber.js new file mode 100644 index 0000000000000..c471ed42867ac --- /dev/null +++ b/node_modules/es-abstract/2023/ToNumber.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var StringToNumber = require('./StringToNumber'); + +// https://262.ecma-international.org/13.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + return StringToNumber(value); + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2023/ToNumeric.js b/node_modules/es-abstract/2023/ToNumeric.js new file mode 100644 index 0000000000000..140adb3975b21 --- /dev/null +++ b/node_modules/es-abstract/2023/ToNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); + +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var ToNumber = require('./ToNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-tonumeric + +module.exports = function ToNumeric(argument) { + var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (Type(primValue) === 'BigInt') { + return primValue; + } + return ToNumber(primValue); +}; diff --git a/node_modules/es-abstract/2023/ToObject.js b/node_modules/es-abstract/2023/ToObject.js new file mode 100644 index 0000000000000..26a007cead238 --- /dev/null +++ b/node_modules/es-abstract/2023/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://262.ecma-international.org/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2023/ToPrimitive.js b/node_modules/es-abstract/2023/ToPrimitive.js new file mode 100644 index 0000000000000..56bcf1aa9eb26 --- /dev/null +++ b/node_modules/es-abstract/2023/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2023/ToPropertyDescriptor.js b/node_modules/es-abstract/2023/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/2023/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2023/ToPropertyKey.js b/node_modules/es-abstract/2023/ToPropertyKey.js new file mode 100644 index 0000000000000..e363cd93b1722 --- /dev/null +++ b/node_modules/es-abstract/2023/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2023/ToString.js b/node_modules/es-abstract/2023/ToString.js new file mode 100644 index 0000000000000..d86aed4ce88de --- /dev/null +++ b/node_modules/es-abstract/2023/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2023/ToUint16.js b/node_modules/es-abstract/2023/ToUint16.js new file mode 100644 index 0000000000000..744ed6c85d4d3 --- /dev/null +++ b/node_modules/es-abstract/2023/ToUint16.js @@ -0,0 +1,21 @@ +'use strict'; + +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); +var truncate = require('./truncate'); + +var isFinite = require('../helpers/isFinite'); + +// https://262.ecma-international.org/14.0/#sec-touint16 + +var two16 = 0x10000; // Math.pow(2, 16) + +module.exports = function ToUint16(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit === 0 ? 0 : int16bit; // in the spec, these are math values, so we filter out -0 here +}; diff --git a/node_modules/es-abstract/2023/ToUint32.js b/node_modules/es-abstract/2023/ToUint32.js new file mode 100644 index 0000000000000..7e4fae2b0a38a --- /dev/null +++ b/node_modules/es-abstract/2023/ToUint32.js @@ -0,0 +1,21 @@ +'use strict'; + +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); +var truncate = require('./truncate'); + +var isFinite = require('../helpers/isFinite'); + +// https://262.ecma-international.org/14.0/#sec-touint32 + +var two32 = 0x100000000; // Math.pow(2, 32); + +module.exports = function ToUint32(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + return int32bit === 0 ? 0 : int32bit; // in the spec, these are math values, so we filter out -0 here +}; diff --git a/node_modules/es-abstract/2023/ToUint8.js b/node_modules/es-abstract/2023/ToUint8.js new file mode 100644 index 0000000000000..bacad8af7244d --- /dev/null +++ b/node_modules/es-abstract/2023/ToUint8.js @@ -0,0 +1,19 @@ +'use strict'; + +var isFinite = require('../helpers/isFinite'); + +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); +var truncate = require('./truncate'); + +// https://262.ecma-international.org/14.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 0x100); + return int8bit; +}; diff --git a/node_modules/es-abstract/2023/ToUint8Clamp.js b/node_modules/es-abstract/2023/ToUint8Clamp.js new file mode 100644 index 0000000000000..3ba2fd71192eb --- /dev/null +++ b/node_modules/es-abstract/2023/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://262.ecma-international.org/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(number); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2023/ToZeroPaddedDecimalString.js b/node_modules/es-abstract/2023/ToZeroPaddedDecimalString.js new file mode 100644 index 0000000000000..b74b74d2cc0d6 --- /dev/null +++ b/node_modules/es-abstract/2023/ToZeroPaddedDecimalString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $RangeError = GetIntrinsic('%RangeError%'); + +var StringPad = require('./StringPad'); + +var isInteger = require('../helpers/isInteger'); + +// https://262.ecma-international.org/13.0/#sec-tozeropaddeddecimalstring + +module.exports = function ToZeroPaddedDecimalString(n, minLength) { + if (!isInteger(n) || n < 0) { + throw new $RangeError('Assertion failed: `q` must be a non-negative integer'); + } + var S = $String(n); + return StringPad(S, minLength, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2023/TrimString.js b/node_modules/es-abstract/2023/TrimString.js new file mode 100644 index 0000000000000..113dcf82b82d8 --- /dev/null +++ b/node_modules/es-abstract/2023/TrimString.js @@ -0,0 +1,29 @@ +'use strict'; + +var trimStart = require('string.prototype.trimstart'); +var trimEnd = require('string.prototype.trimend'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/10.0/#sec-trimstring + +module.exports = function TrimString(string, where) { + var str = RequireObjectCoercible(string); + var S = ToString(str); + var T; + if (where === 'start') { + T = trimStart(S); + } else if (where === 'end') { + T = trimEnd(S); + } else if (where === 'start+end') { + T = trimStart(trimEnd(S)); + } else { + throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"'); + } + return T; +}; diff --git a/node_modules/es-abstract/2023/Type.js b/node_modules/es-abstract/2023/Type.js new file mode 100644 index 0000000000000..555ca74ea5196 --- /dev/null +++ b/node_modules/es-abstract/2023/Type.js @@ -0,0 +1,15 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2023/TypedArrayCreate.js b/node_modules/es-abstract/2023/TypedArrayCreate.js new file mode 100644 index 0000000000000..ef9fbe2599495 --- /dev/null +++ b/node_modules/es-abstract/2023/TypedArrayCreate.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var availableTypedArrays = require('available-typed-arrays')(); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/7.0/#typedarray-create + +module.exports = function TypedArrayCreate(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + ValidateTypedArray(newTypedArray); // step 2 + + if (argumentList.length === 1 && Type(argumentList[0]) === 'Number') { // step 3 + if (typedArrayLength(newTypedArray) < argumentList[0]) { + throw new $TypeError('Assertion failed: `argumentList[0]` must be <= `newTypedArray.length`'); // step 3.a + } + } + + return newTypedArray; // step 4 +}; diff --git a/node_modules/es-abstract/2023/TypedArrayCreateSameType.js b/node_modules/es-abstract/2023/TypedArrayCreateSameType.js new file mode 100644 index 0000000000000..ce15255af1665 --- /dev/null +++ b/node_modules/es-abstract/2023/TypedArrayCreateSameType.js @@ -0,0 +1,37 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/14.0/#sec-typedarray-create-same-type + +module.exports = function TypedArrayCreateSameType(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var constructor = getConstructor(kind); // step 2 + if (typeof constructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + + return TypedArrayCreate(constructor, argumentList); // steps 3 - 6 +}; diff --git a/node_modules/es-abstract/2023/TypedArrayElementSize.js b/node_modules/es-abstract/2023/TypedArrayElementSize.js new file mode 100644 index 0000000000000..4f2917ee64d1f --- /dev/null +++ b/node_modules/es-abstract/2023/TypedArrayElementSize.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isInteger = require('../helpers/isInteger'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize + +var table71 = { + __proto__: null, + $Int8Array: 1, + $Uint8Array: 1, + $Uint8ClampedArray: 1, + $Int16Array: 2, + $Uint16Array: 2, + $Int32Array: 4, + $Uint32Array: 4, + $BigInt64Array: 8, + $BigUint64Array: 8, + $Float32Array: 4, + $Float64Array: 8 +}; + +module.exports = function TypedArrayElementSize(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var size = table71['$' + type]; + if (!isInteger(size) || size < 0) { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return size; +}; diff --git a/node_modules/es-abstract/2023/TypedArrayElementType.js b/node_modules/es-abstract/2023/TypedArrayElementType.js new file mode 100644 index 0000000000000..d6d9e2b140827 --- /dev/null +++ b/node_modules/es-abstract/2023/TypedArrayElementType.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementtype + +var table71 = { + __proto__: null, + $Int8Array: 'Int8', + $Uint8Array: 'Uint8', + $Uint8ClampedArray: 'Uint8C', + $Int16Array: 'Int16', + $Uint16Array: 'Uint16', + $Int32Array: 'Int32', + $Uint32Array: 'Uint32', + $BigInt64Array: 'BigInt64', + $BigUint64Array: 'BigUint64', + $Float32Array: 'Float32', + $Float64Array: 'Float64' +}; + +module.exports = function TypedArrayElementType(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var result = table71['$' + type]; + if (typeof result !== 'string') { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return result; +}; diff --git a/node_modules/es-abstract/2023/TypedArraySpeciesCreate.js b/node_modules/es-abstract/2023/TypedArraySpeciesCreate.js new file mode 100644 index 0000000000000..2bfdff5eb705c --- /dev/null +++ b/node_modules/es-abstract/2023/TypedArraySpeciesCreate.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); +var availableTypedArrays = require('available-typed-arrays')(); + +var IsArray = require('./IsArray'); +var SpeciesConstructor = require('./SpeciesConstructor'); +var TypedArrayCreate = require('./TypedArrayCreate'); + +var getConstructor = require('../helpers/typedArrayConstructors'); + +// https://262.ecma-international.org/7.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreate(constructor, argumentList); // step 4 +}; diff --git a/node_modules/es-abstract/2023/UTF16EncodeCodePoint.js b/node_modules/es-abstract/2023/UTF16EncodeCodePoint.js new file mode 100644 index 0000000000000..0af67bc12e7b9 --- /dev/null +++ b/node_modules/es-abstract/2023/UTF16EncodeCodePoint.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://262.ecma-international.org/12.0/#sec-utf16encoding + +module.exports = function UTF16EncodeCodePoint(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800); + var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00); + return cu1 + cu2; +}; diff --git a/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js b/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js new file mode 100644 index 0000000000000..6a247a239d96b --- /dev/null +++ b/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair + +module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2023/UnicodeEscape.js b/node_modules/es-abstract/2023/UnicodeEscape.js new file mode 100644 index 0000000000000..b708c90df0a05 --- /dev/null +++ b/node_modules/es-abstract/2023/UnicodeEscape.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); + +var StringPad = require('./StringPad'); + +// https://262.ecma-international.org/11.0/#sec-unicodeescape + +module.exports = function UnicodeEscape(C) { + if (typeof C !== 'string' || C.length !== 1) { + throw new $TypeError('Assertion failed: `C` must be a single code unit'); + } + var n = $charCodeAt(C, 0); + if (n > 0xFFFF) { + throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF'); + } + + return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2023/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2023/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 0000000000000..c67d7856078c5 --- /dev/null +++ b/node_modules/es-abstract/2023/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,177 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isFullyPopulatedPropertyDescriptor = require('../helpers/isFullyPopulatedPropertyDescriptor'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor + +// see https://github.com/tc39/ecma262/pull/2468 for ES2022 changes + +// eslint-disable-next-line max-lines-per-function, max-statements +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + + if (Type(current) === 'Undefined') { // step 2 + if (!extensible) { + return false; // step 2.a + } + if (oType === 'Undefined') { + return true; // step 2.b + } + if (IsAccessorDescriptor(Desc)) { // step 2.c + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + // step 2.d + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!Desc['[[Configurable]]'], + '[[Enumerable]]': !!Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': !!Desc['[[Writable]]'] + } + ); + } + + // 3. Assert: current is a fully populated Property Descriptor. + if (!isFullyPopulatedPropertyDescriptor({ + IsAccessorDescriptor: IsAccessorDescriptor, + IsDataDescriptor: IsDataDescriptor + }, current)) { + throw new $TypeError('`current`, when present, must be a fully populated and valid Property Descriptor'); + } + + // 4. If every field in Desc is absent, return true. + // this can't really match the assertion that it's a Property Descriptor in our JS implementation + + // 5. If current.[[Configurable]] is false, then + if (!current['[[Configurable]]']) { + if ('[[Configurable]]' in Desc && Desc['[[Configurable]]']) { + // step 5.a + return false; + } + if ('[[Enumerable]]' in Desc && !SameValue(Desc['[[Enumerable]]'], current['[[Enumerable]]'])) { + // step 5.b + return false; + } + if (!IsGenericDescriptor(Desc) && !SameValue(IsAccessorDescriptor(Desc), IsAccessorDescriptor(current))) { + // step 5.c + return false; + } + if (IsAccessorDescriptor(current)) { // step 5.d + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + } else if (!current['[[Writable]]']) { // step 5.e + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + } + } + + // 6. If O is not undefined, then + if (oType !== 'Undefined') { + var configurable; + var enumerable; + if (IsDataDescriptor(current) && IsAccessorDescriptor(Desc)) { // step 6.a + configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]']; + enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]']; + // Replace the property named P of object O with an accessor property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!configurable, + '[[Enumerable]]': !!enumerable, + '[[Get]]': ('[[Get]]' in Desc ? Desc : current)['[[Get]]'], + '[[Set]]': ('[[Set]]' in Desc ? Desc : current)['[[Set]]'] + } + ); + } else if (IsAccessorDescriptor(current) && IsDataDescriptor(Desc)) { + configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]']; + enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]']; + // i. Replace the property named P of object O with a data property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!configurable, + '[[Enumerable]]': !!enumerable, + '[[Value]]': ('[[Value]]' in Desc ? Desc : current)['[[Value]]'], + '[[Writable]]': !!('[[Writable]]' in Desc ? Desc : current)['[[Writable]]'] + } + ); + } + + // For each field of Desc that is present, set the corresponding attribute of the property named P of object O to the value of the field. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + + return true; // step 7 +}; diff --git a/node_modules/es-abstract/2023/ValidateAtomicAccess.js b/node_modules/es-abstract/2023/ValidateAtomicAccess.js new file mode 100644 index 0000000000000..914525bcd5187 --- /dev/null +++ b/node_modules/es-abstract/2023/ValidateAtomicAccess.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); +var TypedArrayElementSize = require('./TypedArrayElementSize'); + +var isTypedArray = require('is-typed-array'); +var typedArrayByteOffset = require('typed-array-byte-offset'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/13.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); + } + + var length = typedArrayLength(typedArray); // step 1 + + var accessIndex = ToIndex(requestIndex); // step 2 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 4 + } + + var elementSize = TypedArrayElementSize(typedArray); // step 5 + + var offset = typedArrayByteOffset(typedArray); // step 6 + + return (accessIndex * elementSize) + offset; // step 7 +}; diff --git a/node_modules/es-abstract/2023/ValidateIntegerTypedArray.js b/node_modules/es-abstract/2023/ValidateIntegerTypedArray.js new file mode 100644 index 0000000000000..c9c8249c6aaa9 --- /dev/null +++ b/node_modules/es-abstract/2023/ValidateIntegerTypedArray.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var Type = require('./Type'); +var TypedArrayElementType = require('./TypedArrayElementType'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-validateintegertypedarray + +module.exports = function ValidateIntegerTypedArray(typedArray) { + var waitable = arguments.length > 1 ? arguments[1] : false; // step 1 + + if (Type(waitable) !== 'Boolean') { + throw new $TypeError('Assertion failed: `waitable` must be a Boolean'); + } + + var buffer = ValidateTypedArray(typedArray); // step 2 + + if (waitable) { // step 5 + var typeName = whichTypedArray(typedArray); + if (typeName !== 'Int32Array' && typeName !== 'BigInt64Array') { + throw new $TypeError('Assertion failed: `typedArray` must be an Int32Array or BigInt64Array when `waitable` is true'); // step 5.a + } + } else { + var type = TypedArrayElementType(typedArray); // step 5.a + if (!IsUnclampedIntegerElementType(type) && !IsBigIntElementType(type)) { + throw new $TypeError('Assertion failed: `typedArray` must be an integer TypedArray'); // step 5.b + } + } + + return buffer; // step 6 +}; diff --git a/node_modules/es-abstract/2023/ValidateTypedArray.js b/node_modules/es-abstract/2023/ValidateTypedArray.js new file mode 100644 index 0000000000000..c7aa313938162 --- /dev/null +++ b/node_modules/es-abstract/2023/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('TypedArray.prototype.some', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2023/WeakRefDeref.js b/node_modules/es-abstract/2023/WeakRefDeref.js new file mode 100644 index 0000000000000..6b9921f37be92 --- /dev/null +++ b/node_modules/es-abstract/2023/WeakRefDeref.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $deref = callBound('WeakRef.prototype.deref', true); + +var isWeakRef = require('is-weakref'); + +var AddToKeptObjects = require('./AddToKeptObjects'); + +// https://262.ecma-international.org/12.0/#sec-weakrefderef + +module.exports = function WeakRefDeref(weakRef) { + if (!isWeakRef(weakRef)) { + throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef'); + } + var target = $deref(weakRef); + if (target) { + AddToKeptObjects(target); + } + return target; +}; diff --git a/node_modules/es-abstract/2023/WeekDay.js b/node_modules/es-abstract/2023/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/2023/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2023/WordCharacters.js b/node_modules/es-abstract/2023/WordCharacters.js new file mode 100644 index 0000000000000..b7cfa557053cd --- /dev/null +++ b/node_modules/es-abstract/2023/WordCharacters.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $indexOf = callBound('String.prototype.indexOf', true); + +var Canonicalize = require('./Canonicalize'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); +var caseFolding = require('../helpers/caseFolding'); +var forEach = require('../helpers/forEach'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var basicWordChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; // step 1 + +// https://262.ecma-international.org/14.0/#sec-runtime-semantics-wordcharacters-abstract-operation + +module.exports = function WordCharacters(rer) { + assertRecord(Type, 'RegExp Record', 'rer', rer); + + var extraWordChars = ''; + forEach(OwnPropertyKeys(caseFolding.C), function (c) { + if ( + $indexOf(basicWordChars, c) === -1 // c not in A + && $indexOf(basicWordChars, Canonicalize(rer, c)) > -1 // canonicalized c IS in A + ) { + extraWordChars += caseFolding.C[c]; // step 3 + } + }); + forEach(OwnPropertyKeys(caseFolding.S), function (c) { + if ( + $indexOf(basicWordChars, c) === -1 // c not in A + && $indexOf(basicWordChars, Canonicalize(rer, c)) > -1 // canonicalized c IS in A + ) { + extraWordChars += caseFolding.S[c]; // step 3 + } + }); + + if ((!rer['[[Unicode]]'] || !rer['[[IgnoreCase]]']) && extraWordChars.length > 0) { + throw new $TypeError('Assertion failed: `extraWordChars` must be empty when `rer.[[IgnoreCase]]` and `rer.[[Unicode]]` are not both true'); // step 3 + } + + return basicWordChars + extraWordChars; // step 4 +}; diff --git a/node_modules/es-abstract/2023/YearFromTime.js b/node_modules/es-abstract/2023/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/2023/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2023/abs.js b/node_modules/es-abstract/2023/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/2023/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2023/clamp.js b/node_modules/es-abstract/2023/clamp.js new file mode 100644 index 0000000000000..8da1394845973 --- /dev/null +++ b/node_modules/es-abstract/2023/clamp.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var max = GetIntrinsic('%Math.max%'); +var min = GetIntrinsic('%Math.min%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#clamping + +module.exports = function clamp(x, lower, upper) { + if (Type(x) !== 'Number' || Type(lower) !== 'Number' || Type(upper) !== 'Number' || !(lower <= upper)) { + throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`'); + } + return min(max(lower, x), upper); +}; diff --git a/node_modules/es-abstract/2023/floor.js b/node_modules/es-abstract/2023/floor.js new file mode 100644 index 0000000000000..625548e936b95 --- /dev/null +++ b/node_modules/es-abstract/2023/floor.js @@ -0,0 +1,16 @@ +'use strict'; + +var Type = require('./Type'); + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (Type(x) === 'BigInt') { + return x; + } + return $floor(x); +}; diff --git a/node_modules/es-abstract/2023/max.js b/node_modules/es-abstract/2023/max.js new file mode 100644 index 0000000000000..b919d4e836fe5 --- /dev/null +++ b/node_modules/es-abstract/2023/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2023/min.js b/node_modules/es-abstract/2023/min.js new file mode 100644 index 0000000000000..909de4b0e59be --- /dev/null +++ b/node_modules/es-abstract/2023/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2023/modulo.js b/node_modules/es-abstract/2023/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/2023/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2023/msFromTime.js b/node_modules/es-abstract/2023/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/2023/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2023/substring.js b/node_modules/es-abstract/2023/substring.js new file mode 100644 index 0000000000000..0c7e0203d596c --- /dev/null +++ b/node_modules/es-abstract/2023/substring.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isInteger = require('../helpers/isInteger'); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/12.0/#substring +module.exports = function substring(S, inclusiveStart, exclusiveEnd) { + if (Type(S) !== 'String' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) { + throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers'); + } + return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length); +}; diff --git a/node_modules/es-abstract/2023/thisBigIntValue.js b/node_modules/es-abstract/2023/thisBigIntValue.js new file mode 100644 index 0000000000000..d03b4a43c3c51 --- /dev/null +++ b/node_modules/es-abstract/2023/thisBigIntValue.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-thisbigintvalue + +module.exports = function thisBigIntValue(value) { + var type = Type(value); + if (type === 'BigInt') { + return value; + } + if (!$bigIntValueOf) { + throw new $SyntaxError('BigInt is not supported'); + } + return $bigIntValueOf(value); +}; diff --git a/node_modules/es-abstract/2023/thisBooleanValue.js b/node_modules/es-abstract/2023/thisBooleanValue.js new file mode 100644 index 0000000000000..e93a28ce47cce --- /dev/null +++ b/node_modules/es-abstract/2023/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2023/thisNumberValue.js b/node_modules/es-abstract/2023/thisNumberValue.js new file mode 100644 index 0000000000000..03580df26f9d8 --- /dev/null +++ b/node_modules/es-abstract/2023/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2023/thisStringValue.js b/node_modules/es-abstract/2023/thisStringValue.js new file mode 100644 index 0000000000000..c7bf3da70c84c --- /dev/null +++ b/node_modules/es-abstract/2023/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2023/thisSymbolValue.js b/node_modules/es-abstract/2023/thisSymbolValue.js new file mode 100644 index 0000000000000..91a55254283b8 --- /dev/null +++ b/node_modules/es-abstract/2023/thisSymbolValue.js @@ -0,0 +1,19 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-thissymbolvalue + +module.exports = function thisSymbolValue(value) { + if (!$SymbolValueOf) { + throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); + } + if (Type(value) === 'Symbol') { + return value; + } + return $SymbolValueOf(value); +}; diff --git a/node_modules/es-abstract/2023/thisTimeValue.js b/node_modules/es-abstract/2023/thisTimeValue.js new file mode 100644 index 0000000000000..bd50ddd0683fe --- /dev/null +++ b/node_modules/es-abstract/2023/thisTimeValue.js @@ -0,0 +1,9 @@ +'use strict'; + +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); + +// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object + +module.exports = function thisTimeValue(value) { + return $DateGetTime(value); +}; diff --git a/node_modules/es-abstract/2023/truncate.js b/node_modules/es-abstract/2023/truncate.js new file mode 100644 index 0000000000000..3a58d73bec7be --- /dev/null +++ b/node_modules/es-abstract/2023/truncate.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var floor = require('./floor'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/14.0/#eqn-truncate + +module.exports = function truncate(x) { + if (typeof x !== 'number' && typeof x !== 'bigint') { + throw new $TypeError('argument must be a Number or a BigInt'); + } + var result = x < 0 ? -floor(-x) : floor(x); + return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here +}; diff --git a/node_modules/es-abstract/5/AbstractEqualityComparison.js b/node_modules/es-abstract/5/AbstractEqualityComparison.js new file mode 100644 index 0000000000000..568bb409588cb --- /dev/null +++ b/node_modules/es-abstract/5/AbstractEqualityComparison.js @@ -0,0 +1,37 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.3 + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return x === y; // ES6+ specified this shortcut anyways. + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + return false; +}; diff --git a/node_modules/es-abstract/5/AbstractRelationalComparison.js b/node_modules/es-abstract/5/AbstractRelationalComparison.js new file mode 100644 index 0000000000000..0dfed5ffe1c63 --- /dev/null +++ b/node_modules/es-abstract/5/AbstractRelationalComparison.js @@ -0,0 +1,63 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var isPrefixOf = require('../helpers/isPrefixOf'); + +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.8.5 + +// eslint-disable-next-line max-statements +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + var bothStrings = Type(px) === 'String' && Type(py) === 'String'; + if (!bothStrings) { + var nx = ToNumber(px); + var ny = ToNumber(py); + if ($isNaN(nx) || $isNaN(ny)) { + return undefined; + } + if ($isFinite(nx) && $isFinite(ny) && nx === ny) { + return false; + } + if (nx === Infinity) { + return false; + } + if (ny === Infinity) { + return true; + } + if (ny === -Infinity) { + return false; + } + if (nx === -Infinity) { + return true; + } + return nx < ny; // by now, these are both nonzero, finite, and not equal + } + if (isPrefixOf(py, px)) { + return false; + } + if (isPrefixOf(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f +}; diff --git a/node_modules/es-abstract/5/Canonicalize.js b/node_modules/es-abstract/5/Canonicalize.js new file mode 100644 index 0000000000000..5b8c3592c2427 --- /dev/null +++ b/node_modules/es-abstract/5/Canonicalize.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $toUpperCase = callBound('String.prototype.toUpperCase'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-15.10.2.8 + +module.exports = function Canonicalize(ch, IgnoreCase) { + if (Type(ch) !== 'String' || ch.length !== 1) { + throw new $TypeError('Assertion failed: `ch` must be a character'); + } + + if (Type(IgnoreCase) !== 'Boolean') { + throw new $TypeError('Assertion failed: `IgnoreCase` must be a Boolean'); + } + + if (!IgnoreCase) { + return ch; // step 1 + } + + var u = $toUpperCase(ch); // step 2 + + if (u.length !== 1) { + return ch; // step 3 + } + + var cu = u; // step 4 + + if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) { + return ch; // step 5 + } + + return cu; +}; diff --git a/node_modules/es-abstract/5/CheckObjectCoercible.js b/node_modules/es-abstract/5/CheckObjectCoercible.js new file mode 100644 index 0000000000000..9083c717a357c --- /dev/null +++ b/node_modules/es-abstract/5/CheckObjectCoercible.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// http://262.ecma-international.org/5.1/#sec-9.10 + +module.exports = function CheckObjectCoercible(value, optMessage) { + if (value == null) { + throw new $TypeError(optMessage || ('Cannot call method on ' + value)); + } + return value; +}; diff --git a/node_modules/es-abstract/5/DateFromTime.js b/node_modules/es-abstract/5/DateFromTime.js new file mode 100644 index 0000000000000..20e4f2e4de7f7 --- /dev/null +++ b/node_modules/es-abstract/5/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/5/Day.js b/node_modules/es-abstract/5/Day.js new file mode 100644 index 0000000000000..51d01033c81cb --- /dev/null +++ b/node_modules/es-abstract/5/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/5/DayFromYear.js b/node_modules/es-abstract/5/DayFromYear.js new file mode 100644 index 0000000000000..341bf22a6c193 --- /dev/null +++ b/node_modules/es-abstract/5/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/5/DayWithinYear.js b/node_modules/es-abstract/5/DayWithinYear.js new file mode 100644 index 0000000000000..4c580940a58c5 --- /dev/null +++ b/node_modules/es-abstract/5/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/5/DaysInYear.js b/node_modules/es-abstract/5/DaysInYear.js new file mode 100644 index 0000000000000..7116c69027022 --- /dev/null +++ b/node_modules/es-abstract/5/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/5/FromPropertyDescriptor.js b/node_modules/es-abstract/5/FromPropertyDescriptor.js new file mode 100644 index 0000000000000..ebf5c89154cc9 --- /dev/null +++ b/node_modules/es-abstract/5/FromPropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.4 + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsDataDescriptor(Desc)) { + return { + value: Desc['[[Value]]'], + writable: !!Desc['[[Writable]]'], + enumerable: !!Desc['[[Enumerable]]'], + configurable: !!Desc['[[Configurable]]'] + }; + } else if (IsAccessorDescriptor(Desc)) { + return { + get: Desc['[[Get]]'], + set: Desc['[[Set]]'], + enumerable: !!Desc['[[Enumerable]]'], + configurable: !!Desc['[[Configurable]]'] + }; + } + throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); + +}; diff --git a/node_modules/es-abstract/5/HourFromTime.js b/node_modules/es-abstract/5/HourFromTime.js new file mode 100644 index 0000000000000..f963bfb68540b --- /dev/null +++ b/node_modules/es-abstract/5/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/5/InLeapYear.js b/node_modules/es-abstract/5/InLeapYear.js new file mode 100644 index 0000000000000..bfe0c451f4e79 --- /dev/null +++ b/node_modules/es-abstract/5/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/5/IsAccessorDescriptor.js b/node_modules/es-abstract/5/IsAccessorDescriptor.js new file mode 100644 index 0000000000000..102ec33e5b043 --- /dev/null +++ b/node_modules/es-abstract/5/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.1 + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/5/IsCallable.js b/node_modules/es-abstract/5/IsCallable.js new file mode 100644 index 0000000000000..3a69b19267dff --- /dev/null +++ b/node_modules/es-abstract/5/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/5/IsDataDescriptor.js b/node_modules/es-abstract/5/IsDataDescriptor.js new file mode 100644 index 0000000000000..e87078fb05092 --- /dev/null +++ b/node_modules/es-abstract/5/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/5/IsGenericDescriptor.js b/node_modules/es-abstract/5/IsGenericDescriptor.js new file mode 100644 index 0000000000000..b47bfc335dbd5 --- /dev/null +++ b/node_modules/es-abstract/5/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://262.ecma-international.org/5.1/#sec-8.10.3 + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/5/IsPropertyDescriptor.js b/node_modules/es-abstract/5/IsPropertyDescriptor.js new file mode 100644 index 0000000000000..4cfe79bbe5dbc --- /dev/null +++ b/node_modules/es-abstract/5/IsPropertyDescriptor.js @@ -0,0 +1,19 @@ +'use strict'; + +// TODO, semver-major: delete this + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var Type = require('./Type'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type + +module.exports = function IsPropertyDescriptor(Desc) { + return isPropertyDescriptor({ + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor, + Type: Type + }, Desc); +}; diff --git a/node_modules/es-abstract/5/MakeDate.js b/node_modules/es-abstract/5/MakeDate.js new file mode 100644 index 0000000000000..efeb6452e78c9 --- /dev/null +++ b/node_modules/es-abstract/5/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/5/MakeDay.js b/node_modules/es-abstract/5/MakeDay.js new file mode 100644 index 0000000000000..13f568633a34a --- /dev/null +++ b/node_modules/es-abstract/5/MakeDay.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToInteger = require('./ToInteger'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToInteger(year); + var m = ToInteger(month); + var dt = ToInteger(date); + var ym = y + floor(m / 12); + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/5/MakeTime.js b/node_modules/es-abstract/5/MakeTime.js new file mode 100644 index 0000000000000..34cb4dcca3f84 --- /dev/null +++ b/node_modules/es-abstract/5/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToInteger = require('./ToInteger'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToInteger(hour); + var m = ToInteger(min); + var s = ToInteger(sec); + var milli = ToInteger(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/5/MinFromTime.js b/node_modules/es-abstract/5/MinFromTime.js new file mode 100644 index 0000000000000..a0c631d4cc56c --- /dev/null +++ b/node_modules/es-abstract/5/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/5/MonthFromTime.js b/node_modules/es-abstract/5/MonthFromTime.js new file mode 100644 index 0000000000000..a482a7df95f61 --- /dev/null +++ b/node_modules/es-abstract/5/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/5/SameValue.js b/node_modules/es-abstract/5/SameValue.js new file mode 100644 index 0000000000000..b73939b204263 --- /dev/null +++ b/node_modules/es-abstract/5/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/5/SecFromTime.js b/node_modules/es-abstract/5/SecFromTime.js new file mode 100644 index 0000000000000..fc2e44560240f --- /dev/null +++ b/node_modules/es-abstract/5/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/5/StrictEqualityComparison.js b/node_modules/es-abstract/5/StrictEqualityComparison.js new file mode 100644 index 0000000000000..f3435ba9d181e --- /dev/null +++ b/node_modules/es-abstract/5/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/5/TimeClip.js b/node_modules/es-abstract/5/TimeClip.js new file mode 100644 index 0000000000000..e416cab4bf318 --- /dev/null +++ b/node_modules/es-abstract/5/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/5/TimeFromYear.js b/node_modules/es-abstract/5/TimeFromYear.js new file mode 100644 index 0000000000000..f3518a41a1914 --- /dev/null +++ b/node_modules/es-abstract/5/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/5/TimeWithinDay.js b/node_modules/es-abstract/5/TimeWithinDay.js new file mode 100644 index 0000000000000..2bba83386c141 --- /dev/null +++ b/node_modules/es-abstract/5/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/5/ToBoolean.js b/node_modules/es-abstract/5/ToBoolean.js new file mode 100644 index 0000000000000..466404bf9992f --- /dev/null +++ b/node_modules/es-abstract/5/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/5/ToInt32.js b/node_modules/es-abstract/5/ToInt32.js new file mode 100644 index 0000000000000..b879ccc479e03 --- /dev/null +++ b/node_modules/es-abstract/5/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/5/ToInteger.js b/node_modules/es-abstract/5/ToInteger.js new file mode 100644 index 0000000000000..d1c9b61629b3f --- /dev/null +++ b/node_modules/es-abstract/5/ToInteger.js @@ -0,0 +1,18 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.4 + +module.exports = function ToInteger(value) { + var number = ToNumber(value); + if ($isNaN(number)) { return 0; } + if (number === 0 || !$isFinite(number)) { return number; } + return $sign(number) * floor(abs(number)); +}; diff --git a/node_modules/es-abstract/5/ToNumber.js b/node_modules/es-abstract/5/ToNumber.js new file mode 100644 index 0000000000000..1e7507adb0074 --- /dev/null +++ b/node_modules/es-abstract/5/ToNumber.js @@ -0,0 +1,32 @@ +'use strict'; + +var ToPrimitive = require('./ToPrimitive'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var safeRegexTester = require('safe-regex-test'); + +var isNonDecimal = safeRegexTester(/^0[ob]|^[+-]0x/); + +// http://262.ecma-international.org/5.1/#sec-9.3 + +module.exports = function ToNumber(value) { + var prim = ToPrimitive(value, Number); + if (typeof prim !== 'string') { + return +prim; // eslint-disable-line no-implicit-coercion + } + + var trimmed = $replace( + prim, + // eslint-disable-next-line no-control-regex + /^[ \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\u0085]+|[ \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\u0085]+$/g, + '' + ); + if (isNonDecimal(trimmed)) { + return NaN; + } + + return +trimmed; // eslint-disable-line no-implicit-coercion +}; diff --git a/node_modules/es-abstract/5/ToObject.js b/node_modules/es-abstract/5/ToObject.js new file mode 100644 index 0000000000000..816e537562ca1 --- /dev/null +++ b/node_modules/es-abstract/5/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var CheckObjectCoercible = require('./CheckObjectCoercible'); + +// http://262.ecma-international.org/5.1/#sec-9.9 + +module.exports = function ToObject(value) { + CheckObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/5/ToPrimitive.js b/node_modules/es-abstract/5/ToPrimitive.js new file mode 100644 index 0000000000000..56dfdb0cbfabd --- /dev/null +++ b/node_modules/es-abstract/5/ToPrimitive.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.1 + +module.exports = require('es-to-primitive/es5'); diff --git a/node_modules/es-abstract/5/ToPropertyDescriptor.js b/node_modules/es-abstract/5/ToPropertyDescriptor.js new file mode 100644 index 0000000000000..0af998a5d7f92 --- /dev/null +++ b/node_modules/es-abstract/5/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var hasOwn = require('hasown'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/5/ToString.js b/node_modules/es-abstract/5/ToString.js new file mode 100644 index 0000000000000..c39faeb0dbe36 --- /dev/null +++ b/node_modules/es-abstract/5/ToString.js @@ -0,0 +1,12 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +// http://262.ecma-international.org/5.1/#sec-9.8 + +module.exports = function ToString(value) { + return $String(value); +}; + diff --git a/node_modules/es-abstract/5/ToUint16.js b/node_modules/es-abstract/5/ToUint16.js new file mode 100644 index 0000000000000..633ca8464dd23 --- /dev/null +++ b/node_modules/es-abstract/5/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/5/ToUint32.js b/node_modules/es-abstract/5/ToUint32.js new file mode 100644 index 0000000000000..2a8e9dd6a3794 --- /dev/null +++ b/node_modules/es-abstract/5/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/5/Type.js b/node_modules/es-abstract/5/Type.js new file mode 100644 index 0000000000000..f02303074e5c9 --- /dev/null +++ b/node_modules/es-abstract/5/Type.js @@ -0,0 +1,24 @@ +'use strict'; + +// https://262.ecma-international.org/5.1/#sec-8 + +module.exports = function Type(x) { + if (x === null) { + return 'Null'; + } + if (typeof x === 'undefined') { + return 'Undefined'; + } + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } +}; diff --git a/node_modules/es-abstract/5/WeekDay.js b/node_modules/es-abstract/5/WeekDay.js new file mode 100644 index 0000000000000..17cf94ca34ce0 --- /dev/null +++ b/node_modules/es-abstract/5/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/5/YearFromTime.js b/node_modules/es-abstract/5/YearFromTime.js new file mode 100644 index 0000000000000..be06ecbc36310 --- /dev/null +++ b/node_modules/es-abstract/5/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/5/abs.js b/node_modules/es-abstract/5/abs.js new file mode 100644 index 0000000000000..8bc45434da548 --- /dev/null +++ b/node_modules/es-abstract/5/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/5/floor.js b/node_modules/es-abstract/5/floor.js new file mode 100644 index 0000000000000..8439df0649365 --- /dev/null +++ b/node_modules/es-abstract/5/floor.js @@ -0,0 +1,11 @@ +'use strict'; + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function floor(x) { + // return x - modulo(x, 1); + return $floor(x); +}; diff --git a/node_modules/es-abstract/5/modulo.js b/node_modules/es-abstract/5/modulo.js new file mode 100644 index 0000000000000..b94bb52bb3c62 --- /dev/null +++ b/node_modules/es-abstract/5/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/5/msFromTime.js b/node_modules/es-abstract/5/msFromTime.js new file mode 100644 index 0000000000000..a6bae767aed31 --- /dev/null +++ b/node_modules/es-abstract/5/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/CHANGELOG.md b/node_modules/es-abstract/CHANGELOG.md new file mode 100644 index 0000000000000..2b321ebb612a9 --- /dev/null +++ b/node_modules/es-abstract/CHANGELOG.md @@ -0,0 +1,768 @@ +1.22.3 / 2023-10-20 +================= + * [Fix] `ES2015`+: `GetSubstitution`: accept `undefined` instead of a hole + * [Refactor] use `hasown` instead of `has` + * [Deps] update `call-bind`, `get-intrinsic`, `object-inspect`, `which-typed-array` + * [Dev Deps] update `function-bind`, `is-core-module`, `mock-property`, `tape` + +1.22.2 / 2023-09-14 +================= + * [Fix] `ES2015`+: `NewPromiseCapability`: use AOs from the current year, not 2022 + * [Refactor] `ES2021`+: `SetTypedArrayFromArrayLike`: use `IsBigIntElementType` + * [Refactor] properly name `helpers/typedArrayConstructors` + * [Refactor] simplify helpers + * [Deps] update `arraybuffer.prototype.slice`, `function.prototype.name`, `is-typed-array`, `regexp.prototype.flags`, `safe-array-concat`, `string.prototype.trim`, `string.prototype.trimend`, `string.prototype.trimstart`, `which-typed-array` + * [actions] update actions + * [Tests] run SES tests on more node versions + * [Dev Deps] update `@unicode/unicode-15.0.0`, `array.from`, `array.prototype.filter`, `array.prototype.flatmap`, `array.prototype.indexof`, `is-core-module`, `object.fromentries`, `ses`, `tape` + +1.22.1 / 2023-07-15 +================= + * [Deps] add missing `safe-array-concat` dep + +1.22.0 / 2023-07-15 +================= + * [New] add `ES2023` + * [New] `ES2021+`: add `SetTypedArrayFromArrayLike`, `SetTypedArrayFromTypedArray` + * [New] `ES2021`+: add `CloneArrayBuffer` + * [New] `ES2020`+: add `IsValidIntegerIndex` + * [New] `ES2015`+: add `GetValueFromBuffer`, `SetValueInBuffer` + * [New] `ES2016`+: add `TypedArrayCreate`, `TypedArraySpeciesCreate` + * [New] `ES2015`+: add `IsWordChar` + * [New] `ES2017`+ add `WordCharacters` + * [New] `ES2015`+: add `Canonicalize` + * [New] `ES2015`+: add `NewPromiseCapability` + * [Fix] `ES2017+`: `NumberToRawBytes`, `NumericToRawBytes`: reimplement Float64, fix integer scenarios + * [Refactor] add `helpers/isLineTerminator` + * [Refactor] add `isInteger` helper, and use it + * [Refactor] extract `isStringOrHole` to a helper + * [Refactor] `ES2017`+: `RawBytesToNumber`, `RawBytesToNumeric`: extract common code to helpers + * [Refactor] make a `MAX_VALUE` helper + * [Tests] fix RawBytesToNumeric tests in node v10.4-10.8 + * [Tests] fix buffer test cases in node v10.4-v10.8 + +1.21.3 / 2023-07-12 +================= + * [Fix] `ES2017+`: `RawBytesToNumber`, `RawBytesToNumeric`: properly handle some scenarios + * [Fix] `ES2015`+: `GetV`: the receiver is `V`, not `O` + * [Fix] `ES2017`+: `RawBytesToNumber`, `RawBytesToNumeric`: fix exponent calculation for Float64, improve tests + * [Fix] `ES2017`+: `RawBytesToNumber`, `RawBytesToNumeric`: fix logic, improve tests + * [Fix] `ES2019`+: `thisTimeValue`: fix spackling + * [Robustness] `ES2017`+: `NumberToRawBytes`, `NumericToRawBytes`: use `SameValue` instead of `Object.is` + * [Refactor] `ES2021`+: `ValidateAtomicAccess`: use `typed-array-byte-offset` + * [Refactor] `ES2019`+: `AddEntriesFromIterable`: use `ThrowCompletion` + * [patch] `ES2015`+: `ObjectDefineProperties`: satisfy TODO + * [patch] `ES2015`+: `GetV`: improve error message + * [patch] fix spec URLs + * [Deps] update `get-intrinsic`, `regexp.prototype.flags`, `which-typed-array` + * [actions] fix permissions + * [Tests] add buffer test case fixtures + tests + * [Tests] skip test that modifies the env in SES + * [Tests] fix regex flags tests for node 20 + * [Dev Deps] update `@ljharb/eslint-config`, `aud`, `available-regexp-flags`, `is-core-module`, `tape` + +1.21.2 / 2023-03-12 +================= + * [Fix] `ES2015`+: `CreateDataProperty`: use `OrdinaryDefineOwnProperty` + * [Fix] `ES2015`+: `CreateDataProperty`: use `OrdinaryDefineOwnProperty` + * [Fix] `ES2015`+: `GetPrototypeFromConstructor`: add missing assertion that `intrinsicDefaultProto` is an object + * [Fix] `ES2015`+: `IsDetachedBuffer`: ensure a nullish error does not crash + * [Fix] `ES2015`+: `ToDateString`: properly handle time values that aren’t "now" + * [Fix] `ES2015`+: `ToUint8Clamp`: avoid an extra observable ToNumber + * [Fix] `ES2015`+`: `GetMethod`: when `func` is not callable and `P` is a symbol, avoid the wrong TypeError + * [Fix] `ES2020`+: `ToBigInt`: properly throw on anything besides string, bigint, boolean + * [Fix] `ES2021`+: `SplitMatch`: instead of `false`, return `'not-matched'` + * [Fix] `helpers/assertRecord`: handle nullish input + * [Fix] `helpers/isFullyPopulatedPropertyDescriptor`: handle primitive inputs + * [Robustness] `ES5`: `ToNumber`: avoid relying on runtime `.test` and `.replace` + * [Refactor] `ES2015`: mark `IsDataDescriptor` and `IsAccessorDescriptor` as spackled + * [Refactor] `ES2015`+: `IsDetachedBuffer`: use `array-buffer-byte-length` package + * [Refactor] `ES2015`+: `OrdinaryHasInstance`: rely on falsiness + * [Refactor] `ES2016`+: `CreateListFromArrayLike`: hoist default element types to module level + * [Refactor] `ES2022`+: `StringToNumber`, `ToNumber`: use `string.prototype.trim` + * [patch] `ES2022`+: `IsLessThan`: fix a comment + * [patch] `ES2022`+: `TypedArrayElementSize`, `TypedArrayElementType`: throw a SyntaxError with an unknown TA type + * [patch] `ES2022`+: `IsLessThan`: fix a comment + * [patch] `ES2020`+: `thisBigIntValue`: throw a SyntaxError, not TypeError, for unsupported features + * [patch] `helpers/getIteratorMethod`: `String` is always available + * [patch] fix commented spec URLs + * [patch] omit `%` for `callBound` + * [meta] fix spec URLs + * [meta] fix spackle metadata, comments + * [Deps] update `get-intrinsic`, `internal-slot`, `is-array-buffer`, `object-inspect` + * [Deps] move `function-bind` to dev deps + * [Tests] String.fromCharCode takes numbers, not strings + * [Tests] use `makeIteratorRecord` helper + * [Tests] increase coverage + * [Tests] fix tests that throw a sentinel + * [Dev Deps] update `array.from`, `available-regexp-flags`, `tape` + +1.21.1 / 2023-01-10 +================= + * [Fix] move `available-typed-arrays` to runtime deps + * [Fix] `ES2021`+: `NumberToBigInt`: throw the proper error on an env without BigInts + * [Fix] `ES2018`+: `CreateAsyncFromSyncIterator`: properly check `next` method args length + * [Fix] `ES2020`-`ES2021`: Abstract Relational Comparison: handle BigInts properly + * [Fix] `ES2022`+: `StringToBigInt`: invalid BigInts should be `undefined`, not `NaN` as in previous years + * [Fix] `helpers/isFinite`: properly handle BigInt values + * [Fix] `ES2020`+: `CreateListFromArrayLike`: accept BigInts + * [Fix] `ES2019`+: `AsyncFromSyncIteratorContinuation`: throw a SyntaxError when > 1 arg is passed + * [patch] `ES2020`+: `GetIterator`: use SyntaxError for intentionally unsupported + * [patch] `ES2015`+: `GetPrototypeFromContructor`: use SyntaxError for intentionally unsupported + * [patch] `ES2022`+: `StringToNumber`: fix non-string assertion failure message + * [Deps] update `es-set-tostringtag`, `is-array-buffer` + * [Tests] increase coverage + * [Tests] exclude coverage from files that have been replaced by an extracted package + +1.21.0 / 2023-01-04 +================= + * [New] `ES2015`+: add `IsDetachedBuffer` + * [New] `ES2015+`: add `DetachArrayBuffer` + * [New] `ES2020`+: add `NumericToRawBytes` + * [New] `ES2017` - `ES2019`: add `NumberToRawBytes` + * [New] `ES2020+`: add `RawBytesToNumeric` + * [New] `ES2017-ES2019`: add `RawBytesToNumber` + * [New] `ES2017`+: add `ValidateAtomicAccess` + * [New] `ES2021`+: add `ValidateIntegerTypedArray` + * [New] `ES2015`+: add `ValidateTypedArray` + * [New] `ES2015`+: add `GetGlobalObject` + * [New] `ES2022`+: add `TypedArrayElementSize`, `TypedArrayElementType` + * [New] `ES2015`+: add `max`, `min` + * [New] `helpers/assertRecord`: add predicates for PromiseCapability and AsyncGeneratorRequest Records + * [New] `ES2018`+: add `AsyncIteratorClose` + * [New] `ES2015`+: `IteratorClose`: also accept a Completion Record instance instead of a completion thunk + * [New] `ES2015`+ (CompletionRecord, NormalCompletion), `ES2018`+ (ThrowCompletion): add new AOs + * [New] `ES2015`+ (`ObjectCreate`) and `ES2020`+ (`OrdinaryObjectCreate`): use `internal-slot` to support additional slots + * [New] `ES2018`+: add `CreateAsyncFromSyncIterator` + * [patch] `ES2015`+: `GetMethod`: better failure message + * [Refactor] use `es-set-tostringtag` package + * [Refactor] use `has-proto` package + * [Deps] update `has-proto`, `es-set-tostringtag`, `internal-slot` + * [meta] fix spackle script to `git add` after all writing is done + * [meta] autogenerate esX entry points + * [meta] use a leading slash in gitattributes for proper spackle matching + * [Tests] fix comments on missing AOs + * [Tests] filter out host-defined AOs + * [Dev Deps] update `@ljharb/eslint-config`, `aud` + +1.20.5 / 2022-12-07 +================= + * [Fix] `ES2020+`: `floor`: make it work with BigInts as well + * [Refactor] use `gopd` + * [Tests] add `mod` helper tests (#147) + * [Deps] update `string.prototype.trimend`, `string.prototype.trimstart` + * [Dev Deps] update `array.prototype.filter`, `array.prototype.flatmap`, `array.prototype.indexof`, `object.fromentries` + +1.20.4 / 2022-10-06 +================= + * [Fix] `ES2021+`: values that truncate to -0 in `ToIntegerOrInfinity` (#146) + * [Deps] update `is-callable` + +1.20.3 / 2022-09-22 +================= + * [Refactor] extract regex tester to `safe-regex-test` package + * [Deps] update `get-intrinsic`, `is-callable` + * [Dev Deps] update `aud`, `tape` + +1.20.2 / 2022-09-01 +================= + * [Fix] `ES2020+`: `SameValueNonNumeric`: properly throw on BigInt values + * [Deps] update `object.assign`, `get-intrinsic`, `object-inspect` + * [Dev Deps] update `array.prototype.indexof`, `diff`, `es-value-fixtures`, `tape` + * [meta] `spackle`: always mkdirp new files to be written + * [Tests] fix vscode auto-const from 8fc256d + +1.20.1 / 2022-05-16 +================= + * [Fix] `thisTimeValue`: use `getTime`, not `valueOf`, to get the time value + * [Refactor] create `IsArray` helper + * [Deps] update `regexp.prototype.flags` + * [Dev Deps] use `for-each` instead of `foreach` + +1.20.0 / 2022-05-05 +================= + * [New] add ES2022 + * [New] `ES2015+`: add `ObjectDefineProperties` + * [Refactor] create `fromPropertyDescriptor` helper + * [Refactor] use `has-property-descriptors` + * [Deps] update `string.prototype.trimend`, `string.prototype.trimstart`, `unbox-primitive` + * [meta] use `npmignore` to autogenerate an npmignore file + * [Dev Deps] update `es-value-fixtures`, `has-bigints`, `functions-have-names` + * [Tests] copy GetIntrinsic tests over from `get-intrinsic` + +1.19.5 / 2022-04-13 +================= + * [Fix] `DefineOwnProperty`: FF 4-22 throws an exception when defining length of an array + * [Dev Deps] update `@ljharb/eslint-config` + +1.19.4 / 2022-04-12 +================= + * [Fix] `ES2015+`: `CreateDataProperty`: a nonwritable but configurable property is still converted to a data property + +1.19.3 / 2022-04-11 +================= + * [Fix] `ES2015+`: `GetIterator`, `IterableToArrayLike`: in Symbol-less envs, handle boxed string objects + * [Robustness] use `exec` instead of `test`, since the latter observably looks up `exec` + * [Deps] update `is-shared-array-buffer` + * [actions] restrict permissions + * [Dev Deps] update `tape` + * [Tests] add test coverage + * [Tests] avoid a bug in node v4.0 with bound function names + +1.19.2 / 2022-03-28 +================= + * [Fix] `ES2018+`: `EnumerableOwnPropertyNames`, `ToIntegerOrInfinity`, `UTF16SurrogatePairToCodePoint`: proper function names + * [Fix] `ES2015+`: `GetOwnPropertyKeys`/`IsExtensible`/`{Set,Test}IntegrityLevel`: avoid a crash in IE 8 on missing ES5 intrinsics + * [Fix] `helpers/DefineOwnProperty`: avoid a crash in IE 8 + * [Fix] `ES2015+`: `StringCreate`: properly check for `prototype` being `String.prototype` + * [Docs] `ES2015+`: `GetV`: Fix spec URL + * [meta] operations: use a URL object instead of a URL string + * [meta] remove defunct greenkeeper config + * [meta] better `eccheck` command; fix indentation + * [Tests] node v0.6 lacks `RegExp.prototype.source` + * [Tests] remove a stray `console.log` + * [Tests] properly set the lastIndex in IE 8 + * [Tests] skip test due to IE 6-8 sparse/undefined bug + * [Tests] in IE 8, an empty regex is `` and not `(?:)` + * [Tests] ES3 engines don’t have `.bind` + * [Tests] avoid needless failures in ES3 engines that don't support descriptors + * [Tests] add test to cover https://github.com/tc39/ecma262/issues/2611 + * [Deps] update `has-symbols`, `is-negative-zero`, `is-weakref`, `object-inspect` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object.fromentries`, `safe-publish-latest`, `tape` + * [actions] reuse common workflows + * [actions] update codecov uploader + +1.19.1 / 2021-10-02 +================= + * [Fix] `ES2020+`: `CreateRegExpStringIterator`: should not have enumerable methods + * [Dev Deps] update `array.prototype.filter`, `array.prototype.indexof` + +1.19.0 / 2021-09-30 +================= + * [New] `ES2021+`: `IterableToList`: make `method` parameter optional (#61) + * [New] add ES2021 + * [New] `ES2020+`: add `StringToBigInt`, `ToBigInt`, `ToBigInt64`, `ToBigUint64` + * [New] `ES2017`+: add `IsSharedArrayBuffer`, `OrdinaryToPrimitive` + * [New] `ES2015+`: add `CharacterRange`, `IsCompatiblePropertyDescriptor` + * [New] `ES2020+`: add `CreateRegExpStringIterator` + * [Fix] `ES2020+`: `ToBigInt64`/`ToBigUint64`: avoid node v10.4-v10.8 bug with limited BigInt range + * [Fix] `ES2020+`: `AbstractRelationalComparison`, `AbstractEqualityComparison`: support BigInt + * [Fix] `ES2020+`: `ToBigInt64`/`ToBigUint64`: Improve the definitions of twoSixtyThree and twoSixtyFour (#140) + * [meta] do not publish .gitattributes + * [Tests] Correct the behavior of `safeBigInt` + * [Tests] Exclude dotfiles from the testing sweep (#141) + +1.18.7 / 2021-09-28 +================= + * [Fix] `getOwnPropertyDescriptor` helper: avoid crashing in IE < 9 + * [Fix] `ArraySetLength`: `node` `v0.6` has a bug where array lengths can be Set but not Defined + * [eslint] remove unused directive + * [Tests] fix spelling + +1.18.6 / 2021-09-07 +================= + * [Fix] `ES2020+`: `NumberToBigInt`: throw a SyntaxError when BigInts are not supported + * [Refactor] extract getSymbolDescription logic to `get-symbol-description` + * [Refactor] `ES2018+`: `AbstractRelationalComparison`: use `IsStringPrefix` + * [Deps] update `is-callable`, `is-regex`, `is-string` + * [Dev Deps] update `@ljharb/eslint-config`, `tape` + * [Tests] `GetSubstitution`: add cases + +1.18.5 / 2021-08-01 +================= + * [meta] remove "exports" (#133) + * [Dev Deps] update `eslint` + +1.18.4 / 2021-07-29 +================= + * [meta] partial revert of b54cfe8525faff482450e843a49d43be3a086225 + * [Deps] update `internal-slot`, `object-inspect` + * [Dev Deps] update `eslint`, `tape` + * [Tests] `ArraySetLength`: increase coverage + +1.18.3 / 2021-05-27 +================= + * [Fix] `ES2020+`: `ToNumber`: ensure it throws on a BigInt (#130) + +1.18.2 / 2021-05-25 +================= + * [meta] add `helpers` to "exports" field, for back compat + +1.18.1 / 2021-05-25 +================= + * [readme] update and clarify entry points + * [meta] add "exports" field, with escape hatch + * [meta] add `sideEffects` field + * [meta] use `prepublishOnly`, for npm 7+ + * [eslint] clean up eslint rules + * [Deps] update `is-regex`, `is-string`, `object-inspect`, `unbox-primitive` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` + * [actions] disable fail-fast on matrix jobs + * [actions] use `node/install` action instead of `node/run` + * [actions] update codeql-analysis to new best practices + +1.18.0 / 2021-03-03 +================= + * [New] add `ES2020`, and a number of additional AOs: See the changelog entries for the prereleases for more information: + - [next.3](./CHANGELOG.md#1180-next3--2021-03-01) + - [next.2](./CHANGELOG.md#1180-next2--2021-01-17) + - [next.1](./CHANGELOG.md#1180-next1--2020-09-30) + - [next.0](./CHANGELOG.md#1180-next0--2020-08-14) + * [Refactor] `ES5+`: `Abstract Relational Comparison`: increase coverage + * [Tests] increase coverage + * [Tests] do not run coverage on node 0.6 + +1.18.0-next.3 / 2021-03-01 +================= + * [New] `ES2015`: add `StringGetIndexProperty` + * [New] `ES2015+`: add `RegExpCreate`, `SplitMatch`, `StringCreate` + * [New] `ES2016-ES2019`: add `UTF16Decode` + * [New] `ES2020+`: add `NumberToBigInt` + * [New] `ES2020+: add `BigInt::`/`Number::` methods: + * [Fix] `ES5`: `ToNumber`: properly refuse to parse ES6+ forms + * [Fix] `ES2015+`: `Invoke`: optional argumentsList must be a List of arguments, not a list of arguments + * [Fix] `ES2016+`: `UTF16Encoding`: properly return a string code point instead of a numeric code point + * [Fix] `ES2020`: `NumberBitwiseOp`: assert that x and y are Numbers + * [readme] remove travis/testling badge, fix repo URLs + * [meta] `ES2015`: add missing `CreateArrayIterator` AO + * [meta] `ES2015-ES2017`: add missing `DaylightSavingTA` AO + * [meta] rerun `npm run spackle` to update URLs left after 11d8c8df11c0d15d094a6035afed662e22b440ef + * [meta] update ecma URLs + * [meta] unignore 2020 operations list + * [meta] update operations scripts linting + * [meta] refactor getOps script to fetch all years at once + * [meta] refactor operations script to keep years in one place + * [meta] fix ES2015 spec URL + * [Deps] update `has-symbols`, `string.prototype.trimend`, `string.prototype.trimstart`, `get-intrinsic`, `is-callable`, `is-regex` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.indexof`, `aud`, `es-value-fixtures`, `object.fromentries`, `tape`, `diff` + * [operations] detect ES2020+ style `T::` numeric operations + * [Tests] increase coverage + * [Tests] `BigInt(1e17)` throws on node v10.4-v10.6 + * [Tests] improve coverage on `Number::` methods + * [Tests] `tape` v5 `.equal` now uses strict equality, so no more need for `is()` + * [Tests] improve BigInt:: and Number:: coverage + * [Tests] actually run all the helpers tests + * [Tests] ensure "expected missing" ops list is accurate + * [Tests] abstract away per-operation skips + * [Tests] skip BigInt:: tests on envs without BigInts + * [Tests] use `es-value-fixtures` + * [actions] update workflows + +1.18.0-next.2 / 2021-01-17 +================= + * [New] `helpers`: add `isByteValue`, `isCodePoint`, `some` + * [Fix] `ES2018+`: fix `GetSubstitution` with named captures + * [Fix] `ES2020`: `GetIterator`: add omitted `hint` parameter + * [Fix] `ES2018`/`ES2019`: `SetFunctionLength`: Infinities should throw + * [Fix] `ES2020`: `ToIndex` uses `SameValue` instead of `SameValueZero` + * [Fix] `ES2020`: `CopyDataProperties` uses `CreateDataPropertyOrThrow` instead of `CreateDataProperty` + * [Refactor] use extracted `call-bind` instead of local helpers + * [Refactor] use extracted `get-intrinsic` package + * [Deps] update `call-bind`, `get-intrinsic`, `is-callable`, `is-negative-zero`, `is-regex`, `object-inspect`, `object.assign`, `string.prototype.trimend`, `string.prototype.trimstart` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.indexof`, `aud`, `diff`, `functions-have-names`, `has-bigints`, `has-strict-mode`, `object-is`, `object.fromentries`, `tape` + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + * [actions] add "Allow Edits" workflow + * [meta] pin cheerio to v1.0.0-rc.3, to fix getOps + * [meta] make all URLs consistent, and point to spec artifacts + * [meta] refactor `deltas` script; update eslint on operations scripts + * [meta] do not publish .github dir (#123) + * [Tests] add `v.notNonNegativeIntegers`, `v.nonConstructorFunctions` + * [Tests] migrate tests to Github Actions + * [Tests] run coverage on all tests + * [Tests] add `npm run test:ses` + +1.18.0-next.1 / 2020-09-30 +================= + * [Fix] `ES2020`: `ToInteger`: `-0` should always be normalized to `+0` (#116) + * [patch] `GetIntrinsic`: Adapt to override-mistake-fix pattern (#115) + * [Fix] `callBind`: ensure compatibility with SES + * [Deps] update `is-callable`, `object.assign` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + * [eslint] fix warning + * [Tests] temporarily allow SES tests to fail (#115) + * [Tests] ses-compat - initialize module after ses lockdown (#113) + * [Tests] [Refactor] use defineProperty helper rather than assignment + * [Tests] [Refactor] clean up defineProperty test helper + +1.18.0-next.0 / 2020-08-14 +================= + * [New] add `ES2020` + * [New] `GetIntrinsic`: add `%AggregateError%`, `%FinalizationRegistry%`, and `%WeakRef%` + * [New] `ES5`+: add `abs`, `floor`; use `modulo` consistently + * [New] `GetIntrinsic`: Cache accessed intrinsics (#98) + * [New] `GetIntrinsic`: Add ES201x function intrinsics (#97) + * [New] `ES2015`+: add `QuoteJSONString`, `OrdinaryCreateFromConstructor` + * [New] `ES2017`+: add `StringGetOwnProperty` + * [New] `ES2016`+: add `UTF16Encoding` + * [New] `ES2018`+: add `SetFunctionLength`, `UnicodeEscape` + * [New] add `isLeadingSurrogate`/`isTrailingSurrogate` helpers + * [Fix] `ES5`+: `ToPropertyDescriptor`: use intrinsic TypeError + * [Fix] `ES2018+`: `CopyDataProperties`/`NumberToString`: use intrinsic TypeError + * [Deps] update `is-regex`, `object-inspect` + * [Dev Deps] update `eslint` + +1.17.7 / 2020-09-30 +================= + * [Fix] `ES2020`: `ToInteger`: `-0` should always be normalized to `+0` (#116) + * [patch] `GetIntrinsic`: Adapt to override-mistake-fix pattern (#115) + * [Fix] `callBind`: ensure compatibility with SES + * [Deps] update `is-callable`, `is-regex`, `object-inspect`, `object.assign` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + +1.17.6 / 2020-06-13 +================= + * [Fix] `helpers/getSymbolDescription`: use the global Symbol registry when available (#92) + * [Fix] `ES2015+`: `IsConstructor`: when `Reflect.construct` is available, be spec-accurate (#93) + * [Fix] `ES2015+`: `Set`: Always return boolean value (#101) + * [Fix] `ES2015+`: `Set`: ensure exceptions are thrown in IE 9 when requested + * [Fix] Use `Reflect.apply(…)` if available (#99) + * [Fix] `helpers/floor`: module-cache `Math.floor` + * [Fix] `helpers/getSymbolDescription`: Prefer bound `description` getter when present + * [Fix] `2016`: Use `getIteratorMethod` in `IterableToArrayLike` (#94) + * [Fix] `helpers/OwnPropertyKeys`: Use `Reflect.ownKeys(…)` if available (#91) + * [Fix] `2018+`: Fix `CopyDataProperties` depending on `this` (#95) + * [meta] mark spackled files as autogenerated + * [meta] `Type`: fix spec URL + * [meta] `ES2015`: complete ops list + * [Deps] update `is‑callable`, `is‑regex` + * [Deps] switch from `string.prototype.trimleft`/`string.prototype.trimright` to `string.prototype.trimstart`/`string.prototype.trimend` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `in-publish`, `object-is`, `tape`; add `aud` + * [eslint] `helpers/isPropertyDescriptor`: fix indentation + * [Tests] `helpers/getSymbolDescription`: add test cases; some envs have `Symbol.for` but can not infer a name (#92) + * [Tests] try out CodeQL analysis + * [Tests] reformat expected missing ops + * [Tests] Run tests with `undefined` this (#96) + +1.17.5 / 2020-03-22 +================= + * [Fix] `CreateDataProperty`: update an existing property + * [Fix] run missing spackle from cd7504701879ddea0f5981e99cbcf93bfea9171d + * [Dev Deps] update `make-arrow-function`, `tape`, `@ljharb/eslint-config` + +1.17.4 / 2020-01-21 +================= + * [Fix] `2015+`: add code to handle IE 8’s problems + * [Tests] fix tests for IE 8 + +1.17.3 / 2020-01-19 +================= + * [Fix] `ObjectCreate` `2015+`: Fall back to `__proto__` and normal `new` in older browsers + * [Fix] `GetIntrinsic`: ensure the `allowMissing` property actually works on dotted intrinsics + +1.17.2 / 2020-01-14 +================= + * [Fix] `helpers/OwnPropertyKeys`: include non-enumerables too + +1.17.1 / 2020-01-14 +================= + * [Refactor] add `OwnPropertyKeys` helper, use it in `CopyDataProperties` + * [Refactor] `IteratorClose`: remove useless assignment + * [Dev Deps] update `eslint`, `tape`, `diff` + +1.17.0 / 2019-12-20 +================= + * [New] Split up each operation into its own file (prereleased) + * [Fix] `GetIntrinsic`: IE 8 has a broken `Object.getOwnPropertyDescriptor` + * [Fix] `object.assign` is a runtime dep (prereleased) + * [Refactor] `GetIntrinsic`: remove the internal property salts, since % already handles that + * [Refactor] `GetIntrinsic`: further simplification + * [Deps] update `is-callable`, `string.prototype.trimleft`, `string.prototype.trimright`, `is-regex` + * [Dev Deps] update `@ljharb/eslint-config`, `object-is`, `object.fromentries`, `tape` + * [Tests] add `.eslintignore` + * [meta] remove unused Makefile and associated utils + * [meta] only run spackle script in publish (#78) (prereleased) + +1.17.0-next.1 / 2019-12-11 +================= + * [Fix] `object.assign` is a runtime dep + * [meta] only run spackle script in publish (#78) + +1.17.0-next.0 / 2019-12-11 +================= + * [New] Split up each operation into its own file + +1.16.3 / 2019-12-04 +================= + * [Fix] `GetIntrinsic`: when given a path to a getter, return the actual getter + * [Dev Deps] update `eslint` + +1.16.2 / 2019-11-24 +================= + * [Fix] IE 6-7 lack JSON + * [Fix] IE 6-8 strings can’t use array slice, they need string slice + * [Dev Deps] update `eslint` + +1.16.1 / 2019-11-24 +================= + * [Fix] `GetIntrinsics`: turns out IE 8 throws when `Object.getOwnPropertyDescriptor(arguments);`, and does not throw on `callee` anyways + * [Deps] update `es-to-primitive`, `has-symbols`, `object-inspect` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` + * [meta] re-include year files inside `operations` + * [meta] add `funding` field + * [actions] add Automatic Rebase github action + * [Tests] use shared travis-ci config + * [Tests] disable `check-coverage`, and let codecov do it + +1.16.0 / 2019-10-18 +================= + * [New] `ES2015+`: add `SetFunctionName` + * [New] `ES2015+`: add `GetPrototypeFromConstructor`, with caveats + * [New] `ES2015+`: add `CreateListFromArrayLike` + * [New] `ES2016+`: add `OrdinarySetPrototypeOf` + * [New] `ES2016+`: add `OrdinaryGetPrototypeOf` + * [New] add `getSymbolDescription` and `getInferredName` helpers + * [Fix] `GetIterator`: add fallback for pre-Symbol environments, tests + * [Dev Deps] update `object.fromentries` + * [Tests] add `node` `v12.2` + +1.15.0 / 2019-10-02 +================= + * [New] `ES2018`+: add `DateString`, `TimeString` + * [New] `ES2015`+: add `ToDateString` + * [New] `ES5`+: add `msFromTime`, `SecFromTime`, `MinFromTime`, `HourFromTime`, `TimeWithinDay`, `Day`, `DayFromYear`, `TimeFromYear`, `YearFromTime`, `WeekDay`, `DaysInYear`, `InLeapYear`, `DayWithinYear`, `MonthFromTime`, `DateFromTime`, `MakeDay`, `MakeDate`, `MakeTime`, `TimeClip`, `modulo` + * [New] add `regexTester` helper + * [New] add `callBound` helper + * [New] add ES2020’s intrinsic dot notation + * [New] add `isPrefixOf` helper + * [New] add `maxSafeInteger` helper + * [Deps] update `string.prototype.trimleft`, `string.prototype.trimright` + * [Dev Deps] update `eslint` + * [Tests] on `node` `v12.11` + * [meta] npmignore operations scripts; add "deltas" + +1.14.2 / 2019-09-08 +================= + * [Fix] `ES2016`: `IterableToArrayLike`: add proper fallback for strings, pre-Symbols + * [Tests] on `node` `v12.10` + +1.14.1 / 2019-09-03 +================= + * [meta] republish with some extra files removed + +1.14.0 / 2019-09-02 +================= + * [New] add ES2019 + * [New] `ES2017+`: add `IterableToList` + * [New] `ES2016`: add `IterableToArrayLike` + * [New] `ES2015+`: add `ArrayCreate`, `ArraySetLength`, `OrdinaryDefineOwnProperty`, `OrdinaryGetOwnProperty`, `OrdinaryHasProperty`, `CreateHTML`, `GetOwnPropertyKeys`, `InstanceofOperator`, `SymbolDescriptiveString`, `GetSubstitution`, `ValidateAndApplyPropertyDescriptor`, `IsPromise`, `OrdinaryHasInstance`, `TestIntegrityLevel`, `SetIntegrityLevel` + * [New] add `callBind` helper, and use it + * [New] add helpers: `isPropertyDescriptor`, `every` + * [New] ES5+: add `Abstract Relational Comparison` + * [New] ES5+: add `Abstract Equality Comparison`, `Strict Equality Comparison` + * [Fix] `ES2015+`: `GetIterator`: only require native Symbols when `method` is omitted + * [Fix] `ES2015`: `Call`: error message now properly displays Symbols using `object-inspect` + * [Fix] `ES2015+`: `ValidateAndApplyPropertyDescriptor`: use ES2017 logic to bypass spec bugs + * [Fix] `ES2015+`: `CreateDataProperty`, `DefinePropertyOrThrow`, `ValidateAndApplyPropertyDescriptor`: add fallbacks for ES3 + * [Fix] `ES2015+`: `FromPropertyDescriptor`: no longer requires a fully complete Property Descriptor + * [Fix] `ES5`: `IsPropertyDescriptor`: call into `IsDataDescriptor` and `IsAccessorDescriptor` + * [Refactor] use `has-symbols` for Symbol detection + * [Fix] `helpers/assertRecord`: remove `console.log` + * [Deps] update `object-keys` + * [readme] add security note + * [meta] change http URLs to https + * [meta] linter cleanup + * [meta] fix getOps script + * [meta] add FUNDING.yml + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `replace`, `cheerio`, `tape` + * [Tests] up to `node` `v12.9`, `v11.15`, `v10.16`, `v8.16`, `v6.17` + * [Tests] temporarily allow node 0.6 to fail; segfaulting in travis + * [Tests] use the values helper more in es5 tests + * [Tests] fix linting to apply to all files + * [Tests] run `npx aud` only on prod deps + * [Tests] add v.descriptors helpers + * [Tests] use `npx aud` instead of `npm audit` with hoops + * [Tests] use `eclint` instead of `editorconfig-tools` + * [Tests] some intrinsic cleanup + * [Tests] migrate es5 tests to use values helper + * [Tests] add some missing ES2015 ops + +1.13.0 / 2019-01-02 +================= + * [New] add ES2018 + * [New] add ES2015/ES2016: EnumerableOwnNames; ES2017: EnumerableOwnProperties + * [New] `ES2015+`: add `thisBooleanValue`, `thisNumberValue`, `thisStringValue`, `thisTimeValue` + * [New] `ES2015+`: add `DefinePropertyOrThrow`, `DeletePropertyOrThrow`, `CreateMethodProperty` + * [New] add `assertRecord` helper + * [Deps] update `is-callable`, `has`, `object-keys`, `es-to-primitive` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `semver`, `safe-publish-latest`, `replace` + * [Tests] use `npm audit` instead of `nsp` + * [Tests] remove `jscs` + * [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16` + * [Tests] move descriptor factories to `values` helper + * [Tests] add `getOps` to programmatically fetch abstract operation names + +1.12.0 / 2018-05-31 +================= + * [New] add `GetIntrinsic` entry point + * [New] `ES2015`+: add `ObjectCreate` + * [Robustness]: `ES2015+`: ensure `Math.{abs,floor}` and `Function.call` are cached + +1.11.0 / 2018-03-21 +================= + * [New] `ES2015+`: add iterator abstract ops + * [Dev Deps] update `eslint`, `nsp`, `object.assign`, `semver`, `tape` + * [Tests] up to `node` `v9.8`, `v8.10`, `v6.13` + +1.10.0 / 2017-11-24 +================= + * [New] ES2015+: `AdvanceStringIndex` + * [Dev Deps] update `eslint`, `nsp` + * [Tests] require node 0.6 to pass again + * [Tests] up to `node` `v9.2`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS + +1.9.0 / 2017-09-30 +================= + * [New] `es2015+`: add `ArraySpeciesCreate` + * [New] ES2015+: add `CreateDataProperty` and `CreateDataPropertyOrThrow` + * [Tests] consolidate duplicated tests + * [Tests] increase coverage + * [Dev Deps] update `nsp`, `eslint` + +1.8.2 / 2017-09-03 +================= + * [Fix] `es2015`+: `ToNumber`: provide the proper hint for Date objects (#27) + * [Dev Deps] update `eslint` + +1.8.1 / 2017-08-30 +================= + * [Fix] ES2015+: `ToPropertyKey`: should return a symbol for Symbols (#26) + * [Deps] update `function-bind` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + * [Docs] github broke markdown parsing + +1.8.0 / 2017-08-04 +================= + * [New] add ES2017 + * [New] move es6+ to es2015+; leave es6/es7 as aliases + * [New] ES5+: add `IsPropertyDescriptor`, `IsAccessorDescriptor`, `IsDataDescriptor`, `IsGenericDescriptor`, `FromPropertyDescriptor`, `ToPropertyDescriptor` + * [New] ES2015+: add `CompletePropertyDescriptor`, `Set`, `HasOwnProperty`, `HasProperty`, `IsConcatSpreadable`, `Invoke`, `CreateIterResultObject`, `RegExpExec` + * [Fix] es7/es2016: do not mutate ES6 + * [Fix] assign helper only supports one source + * [Deps] update `is-regex` + * [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape` + * [Tests] add tests for missing and excess operations + * [Tests] add codecov for coverage + * [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v4.8`; newer npm breaks on older node + * [Tests] use same lists of value types across tests; ensure tests are the same when ops are the same + * [Tests] ES2015: add ToNumber symbol tests + * [Tests] switch to `nyc` for code coverage + * [Tests] make IsRegExp tests consistent across editions + +1.7.0 / 2017-01-22 +================= + * [New] ES6: Add `GetMethod` (#16) + * [New] ES6: Add `GetV` (#16) + * [New] ES6: Add `Get` (#17) + * [Tests] up to `node` `v7.4`, `v6.9`, `v4.6`; improve test matrix + * [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` + +1.6.1 / 2016-08-21 +================= + * [Fix] ES6: IsConstructor should return true for `class` constructors. + +1.6.0 / 2016-08-20 +================= + * [New] ES5 / ES6: add `Type` + * [New] ES6: `SpeciesConstructor` + * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`; add `safe-publish-latest` + * [Tests] up to `node` `v6.4`, `v5.12`, `v4.5` + +1.5.1 / 2016-05-30 +================= + * [Fix] `ES.IsRegExp`: actually look up `Symbol.match` on the argument + * [Refactor] create `isNaN` helper + * [Deps] update `is-callable`, `function-bind` + * [Deps] update `es-to-primitive`, fix ES5 tests + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape`, `nsp` + * [Tests] up to `node` `v6.2`, `v5.11`, `v4.4` + * [Tests] use pretest/posttest for linting/security + +1.5.0 / 2015-12-27 +================= + * [New] adds `Symbol.toPrimitive` support via `es-to-primitive` + * [Deps] update `is-callable`, `es-to-primitive` + * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape` + * [Tests] up to `node` `v5.3` + +1.4.3 / 2015-11-04 +================= + * [Fix] `ES6.ToNumber`: should give `NaN` for explicitly signed hex strings (#4) + * [Refactor] `ES6.ToNumber`: No need to double-trim + * [Refactor] group tests better + * [Tests] should still pass on `node` `v0.8` + +1.4.2 / 2015-11-02 +================= + * [Fix] ensure `ES.ToNumber` trims whitespace, and does not trim non-whitespace (#3) + +1.4.1 / 2015-10-31 +================= + * [Fix] ensure only 0-1 are valid binary and 0-7 are valid octal digits (#2) + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Tests] on `node` `v5.0` + * [Tests] fix npm upgrades for older node versions + * package.json: use object form of "authors", add "contributors" + +1.4.0 / 2015-09-26 +================= + * [Deps] update `is-callable` + * [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` + * [Tests] on `node` `v4.2` + * [New] Add `SameValueNonNumber` to ES7 + +1.3.2 / 2015-09-26 +================= + * [Fix] Fix `ES6.IsRegExp` to properly handle `Symbol.match`, per spec. + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` + +1.3.1 / 2015-08-15 +================= + * [Fix] Ensure that objects that `toString` to a binary or octal literal also convert properly + +1.3.0 / 2015-08-15 +================= + * [New] ES6’s ToNumber now supports binary and octal literals. + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Tests] up to `io.js` `v3.0` + +1.2.2 / 2015-07-28 +================= + * [Fix] Both `ES5.CheckObjectCoercible` and `ES6.RequireObjectCoercible` return the value if they don't throw. + * [Tests] Test on latest `io.js` versions. + * [Dev Deps] Update `eslint`, `jscs`, `tape`, `semver`, `covert`, `nsp` + +1.2.1 / 2015-03-20 +================= + * Fix `isFinite` helper. + +1.2.0 / 2015-03-19 +================= + * Use `es-to-primitive` for ToPrimitive methods. + * Test on latest `io.js` versions; allow failures on all but 2 latest `node`/`io.js` versions. + +1.1.2 / 2015-03-20 +================= + * Fix isFinite helper. + +1.1.1 / 2015-03-19 +================= + * Fix isPrimitive check for functions + * Update `eslint`, `editorconfig-tools`, `semver`, `nsp` + +1.1.0 / 2015-02-17 +================= + * Add ES7 export (non-default). + * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. + * Test on `iojs-v1.2`. + +1.0.1 / 2015-01-30 +================= + * Use `is-callable` instead of an internal function. + * Update `tape`, `jscs`, `nsp`, `eslint` + +1.0.0 / 2015-01-10 +================= + * v1.0.0 diff --git a/node_modules/es-abstract/GetIntrinsic.js b/node_modules/es-abstract/GetIntrinsic.js new file mode 100644 index 0000000000000..d7e67b47dc441 --- /dev/null +++ b/node_modules/es-abstract/GetIntrinsic.js @@ -0,0 +1,5 @@ +'use strict'; + +// TODO: remove, semver-major + +module.exports = require('get-intrinsic'); diff --git a/node_modules/es-abstract/LICENSE b/node_modules/es-abstract/LICENSE new file mode 100644 index 0000000000000..3f137ce0c3fc3 --- /dev/null +++ b/node_modules/es-abstract/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/es-abstract/README.md b/node_modules/es-abstract/README.md new file mode 100644 index 0000000000000..08f7b1c2a03fb --- /dev/null +++ b/node_modules/es-abstract/README.md @@ -0,0 +1,43 @@ +# es-abstract [![Version Badge][npm-version-svg]][package-url] + +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +ECMAScript spec abstract operations. + +Every operation is available by edition/year and by name - for example, `es-abstract/2020/Call` gives you the `Call` operation from ES2020, `es-abstract/5/Type` gives you the `Type` operation from ES5. + +All abstract operations are also available under an `es5`/`es2015`/`es2016`/`es2017`/`es2018`/`es2019`/`es2020`/`es2021` entry point, and as a property on the `main` export, but using deep imports is highly encouraged for bundle size and performance reasons. Non-deep entry points will be removed in the next semver-major release. + +## Example + +```js +var ES = require('es-abstract'); +var assert = require('assert'); + +assert(ES.isCallable(function () {})); +assert(!ES.isCallable(/a/g)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-abstract +[npm-version-svg]: https://versionbadg.es/ljharb/es-abstract.svg +[deps-svg]: https://david-dm.org/ljharb/es-abstract.svg +[deps-url]: https://david-dm.org/ljharb/es-abstract +[dev-deps-svg]: https://david-dm.org/ljharb/es-abstract/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-abstract#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-abstract.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-abstract.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-abstract.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-abstract diff --git a/node_modules/es-abstract/es2015.js b/node_modules/es-abstract/es2015.js new file mode 100644 index 0000000000000..1033716cefb33 --- /dev/null +++ b/node_modules/es-abstract/es2015.js @@ -0,0 +1,139 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/6.0/#sec-abstract-operations +var ES2015 = { + 'Abstract Equality Comparison': require('./2015/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./2015/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./2015/StrictEqualityComparison'), + abs: require('./2015/abs'), + AdvanceStringIndex: require('./2015/AdvanceStringIndex'), + ArrayCreate: require('./2015/ArrayCreate'), + ArraySetLength: require('./2015/ArraySetLength'), + ArraySpeciesCreate: require('./2015/ArraySpeciesCreate'), + Call: require('./2015/Call'), + Canonicalize: require('./2015/Canonicalize'), + CanonicalNumericIndexString: require('./2015/CanonicalNumericIndexString'), + CharacterRange: require('./2015/CharacterRange'), + CompletePropertyDescriptor: require('./2015/CompletePropertyDescriptor'), + CompletionRecord: require('./2015/CompletionRecord'), + CreateDataProperty: require('./2015/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2015/CreateDataPropertyOrThrow'), + CreateHTML: require('./2015/CreateHTML'), + CreateIterResultObject: require('./2015/CreateIterResultObject'), + CreateListFromArrayLike: require('./2015/CreateListFromArrayLike'), + CreateMethodProperty: require('./2015/CreateMethodProperty'), + DateFromTime: require('./2015/DateFromTime'), + Day: require('./2015/Day'), + DayFromYear: require('./2015/DayFromYear'), + DaysInYear: require('./2015/DaysInYear'), + DayWithinYear: require('./2015/DayWithinYear'), + DefinePropertyOrThrow: require('./2015/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2015/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2015/DetachArrayBuffer'), + EnumerableOwnNames: require('./2015/EnumerableOwnNames'), + floor: require('./2015/floor'), + FromPropertyDescriptor: require('./2015/FromPropertyDescriptor'), + Get: require('./2015/Get'), + GetGlobalObject: require('./2015/GetGlobalObject'), + GetIterator: require('./2015/GetIterator'), + GetMethod: require('./2015/GetMethod'), + GetOwnPropertyKeys: require('./2015/GetOwnPropertyKeys'), + GetPrototypeFromConstructor: require('./2015/GetPrototypeFromConstructor'), + GetSubstitution: require('./2015/GetSubstitution'), + GetV: require('./2015/GetV'), + GetValueFromBuffer: require('./2015/GetValueFromBuffer'), + HasOwnProperty: require('./2015/HasOwnProperty'), + HasProperty: require('./2015/HasProperty'), + HourFromTime: require('./2015/HourFromTime'), + InLeapYear: require('./2015/InLeapYear'), + InstanceofOperator: require('./2015/InstanceofOperator'), + Invoke: require('./2015/Invoke'), + IsAccessorDescriptor: require('./2015/IsAccessorDescriptor'), + IsArray: require('./2015/IsArray'), + IsCallable: require('./2015/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2015/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2015/IsConcatSpreadable'), + IsConstructor: require('./2015/IsConstructor'), + IsDataDescriptor: require('./2015/IsDataDescriptor'), + IsDetachedBuffer: require('./2015/IsDetachedBuffer'), + IsExtensible: require('./2015/IsExtensible'), + IsGenericDescriptor: require('./2015/IsGenericDescriptor'), + IsInteger: require('./2015/IsInteger'), + IsPromise: require('./2015/IsPromise'), + IsPropertyDescriptor: require('./2015/IsPropertyDescriptor'), + IsPropertyKey: require('./2015/IsPropertyKey'), + IsRegExp: require('./2015/IsRegExp'), + IsWordChar: require('./2015/IsWordChar'), + IteratorClose: require('./2015/IteratorClose'), + IteratorComplete: require('./2015/IteratorComplete'), + IteratorNext: require('./2015/IteratorNext'), + IteratorStep: require('./2015/IteratorStep'), + IteratorValue: require('./2015/IteratorValue'), + MakeDate: require('./2015/MakeDate'), + MakeDay: require('./2015/MakeDay'), + MakeTime: require('./2015/MakeTime'), + max: require('./2015/max'), + min: require('./2015/min'), + MinFromTime: require('./2015/MinFromTime'), + modulo: require('./2015/modulo'), + MonthFromTime: require('./2015/MonthFromTime'), + msFromTime: require('./2015/msFromTime'), + NewPromiseCapability: require('./2015/NewPromiseCapability'), + NormalCompletion: require('./2015/NormalCompletion'), + ObjectCreate: require('./2015/ObjectCreate'), + ObjectDefineProperties: require('./2015/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2015/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2015/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2015/OrdinaryGetOwnProperty'), + OrdinaryHasInstance: require('./2015/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2015/OrdinaryHasProperty'), + QuoteJSONString: require('./2015/QuoteJSONString'), + RegExpCreate: require('./2015/RegExpCreate'), + RegExpExec: require('./2015/RegExpExec'), + RequireObjectCoercible: require('./2015/RequireObjectCoercible'), + SameValue: require('./2015/SameValue'), + SameValueZero: require('./2015/SameValueZero'), + SecFromTime: require('./2015/SecFromTime'), + Set: require('./2015/Set'), + SetFunctionName: require('./2015/SetFunctionName'), + SetIntegrityLevel: require('./2015/SetIntegrityLevel'), + SetValueInBuffer: require('./2015/SetValueInBuffer'), + SpeciesConstructor: require('./2015/SpeciesConstructor'), + SplitMatch: require('./2015/SplitMatch'), + StringCreate: require('./2015/StringCreate'), + StringGetIndexProperty: require('./2015/StringGetIndexProperty'), + SymbolDescriptiveString: require('./2015/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2015/TestIntegrityLevel'), + thisBooleanValue: require('./2015/thisBooleanValue'), + thisNumberValue: require('./2015/thisNumberValue'), + thisStringValue: require('./2015/thisStringValue'), + thisTimeValue: require('./2015/thisTimeValue'), + TimeClip: require('./2015/TimeClip'), + TimeFromYear: require('./2015/TimeFromYear'), + TimeWithinDay: require('./2015/TimeWithinDay'), + ToBoolean: require('./2015/ToBoolean'), + ToDateString: require('./2015/ToDateString'), + ToInt16: require('./2015/ToInt16'), + ToInt32: require('./2015/ToInt32'), + ToInt8: require('./2015/ToInt8'), + ToInteger: require('./2015/ToInteger'), + ToLength: require('./2015/ToLength'), + ToNumber: require('./2015/ToNumber'), + ToObject: require('./2015/ToObject'), + ToPrimitive: require('./2015/ToPrimitive'), + ToPropertyDescriptor: require('./2015/ToPropertyDescriptor'), + ToPropertyKey: require('./2015/ToPropertyKey'), + ToString: require('./2015/ToString'), + ToUint16: require('./2015/ToUint16'), + ToUint32: require('./2015/ToUint32'), + ToUint8: require('./2015/ToUint8'), + ToUint8Clamp: require('./2015/ToUint8Clamp'), + Type: require('./2015/Type'), + ValidateAndApplyPropertyDescriptor: require('./2015/ValidateAndApplyPropertyDescriptor'), + ValidateTypedArray: require('./2015/ValidateTypedArray'), + WeekDay: require('./2015/WeekDay'), + YearFromTime: require('./2015/YearFromTime') +}; + +module.exports = ES2015; diff --git a/node_modules/es-abstract/es2016.js b/node_modules/es-abstract/es2016.js new file mode 100644 index 0000000000000..61e5f15e6a95c --- /dev/null +++ b/node_modules/es-abstract/es2016.js @@ -0,0 +1,146 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/7.0/#sec-abstract-operations +var ES2016 = { + 'Abstract Equality Comparison': require('./2016/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./2016/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./2016/StrictEqualityComparison'), + abs: require('./2016/abs'), + AdvanceStringIndex: require('./2016/AdvanceStringIndex'), + ArrayCreate: require('./2016/ArrayCreate'), + ArraySetLength: require('./2016/ArraySetLength'), + ArraySpeciesCreate: require('./2016/ArraySpeciesCreate'), + Call: require('./2016/Call'), + Canonicalize: require('./2016/Canonicalize'), + CanonicalNumericIndexString: require('./2016/CanonicalNumericIndexString'), + CharacterRange: require('./2016/CharacterRange'), + CompletePropertyDescriptor: require('./2016/CompletePropertyDescriptor'), + CompletionRecord: require('./2016/CompletionRecord'), + CreateDataProperty: require('./2016/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2016/CreateDataPropertyOrThrow'), + CreateHTML: require('./2016/CreateHTML'), + CreateIterResultObject: require('./2016/CreateIterResultObject'), + CreateListFromArrayLike: require('./2016/CreateListFromArrayLike'), + CreateMethodProperty: require('./2016/CreateMethodProperty'), + DateFromTime: require('./2016/DateFromTime'), + Day: require('./2016/Day'), + DayFromYear: require('./2016/DayFromYear'), + DaysInYear: require('./2016/DaysInYear'), + DayWithinYear: require('./2016/DayWithinYear'), + DefinePropertyOrThrow: require('./2016/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2016/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2016/DetachArrayBuffer'), + EnumerableOwnNames: require('./2016/EnumerableOwnNames'), + floor: require('./2016/floor'), + FromPropertyDescriptor: require('./2016/FromPropertyDescriptor'), + Get: require('./2016/Get'), + GetGlobalObject: require('./2016/GetGlobalObject'), + GetIterator: require('./2016/GetIterator'), + GetMethod: require('./2016/GetMethod'), + GetOwnPropertyKeys: require('./2016/GetOwnPropertyKeys'), + GetPrototypeFromConstructor: require('./2016/GetPrototypeFromConstructor'), + GetSubstitution: require('./2016/GetSubstitution'), + GetV: require('./2016/GetV'), + GetValueFromBuffer: require('./2016/GetValueFromBuffer'), + HasOwnProperty: require('./2016/HasOwnProperty'), + HasProperty: require('./2016/HasProperty'), + HourFromTime: require('./2016/HourFromTime'), + InLeapYear: require('./2016/InLeapYear'), + InstanceofOperator: require('./2016/InstanceofOperator'), + Invoke: require('./2016/Invoke'), + IsAccessorDescriptor: require('./2016/IsAccessorDescriptor'), + IsArray: require('./2016/IsArray'), + IsCallable: require('./2016/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2016/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2016/IsConcatSpreadable'), + IsConstructor: require('./2016/IsConstructor'), + IsDataDescriptor: require('./2016/IsDataDescriptor'), + IsDetachedBuffer: require('./2016/IsDetachedBuffer'), + IsExtensible: require('./2016/IsExtensible'), + IsGenericDescriptor: require('./2016/IsGenericDescriptor'), + IsInteger: require('./2016/IsInteger'), + IsPromise: require('./2016/IsPromise'), + IsPropertyDescriptor: require('./2016/IsPropertyDescriptor'), + IsPropertyKey: require('./2016/IsPropertyKey'), + IsRegExp: require('./2016/IsRegExp'), + IsWordChar: require('./2016/IsWordChar'), + IterableToArrayLike: require('./2016/IterableToArrayLike'), + IteratorClose: require('./2016/IteratorClose'), + IteratorComplete: require('./2016/IteratorComplete'), + IteratorNext: require('./2016/IteratorNext'), + IteratorStep: require('./2016/IteratorStep'), + IteratorValue: require('./2016/IteratorValue'), + MakeDate: require('./2016/MakeDate'), + MakeDay: require('./2016/MakeDay'), + MakeTime: require('./2016/MakeTime'), + max: require('./2016/max'), + min: require('./2016/min'), + MinFromTime: require('./2016/MinFromTime'), + modulo: require('./2016/modulo'), + MonthFromTime: require('./2016/MonthFromTime'), + msFromTime: require('./2016/msFromTime'), + NewPromiseCapability: require('./2016/NewPromiseCapability'), + NormalCompletion: require('./2016/NormalCompletion'), + ObjectCreate: require('./2016/ObjectCreate'), + ObjectDefineProperties: require('./2016/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2016/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2016/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2016/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2016/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2016/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2016/OrdinaryHasProperty'), + OrdinarySetPrototypeOf: require('./2016/OrdinarySetPrototypeOf'), + QuoteJSONString: require('./2016/QuoteJSONString'), + RegExpCreate: require('./2016/RegExpCreate'), + RegExpExec: require('./2016/RegExpExec'), + RequireObjectCoercible: require('./2016/RequireObjectCoercible'), + SameValue: require('./2016/SameValue'), + SameValueNonNumber: require('./2016/SameValueNonNumber'), + SameValueZero: require('./2016/SameValueZero'), + SecFromTime: require('./2016/SecFromTime'), + Set: require('./2016/Set'), + SetFunctionName: require('./2016/SetFunctionName'), + SetIntegrityLevel: require('./2016/SetIntegrityLevel'), + SetValueInBuffer: require('./2016/SetValueInBuffer'), + SpeciesConstructor: require('./2016/SpeciesConstructor'), + SplitMatch: require('./2016/SplitMatch'), + StringCreate: require('./2016/StringCreate'), + SymbolDescriptiveString: require('./2016/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2016/TestIntegrityLevel'), + thisBooleanValue: require('./2016/thisBooleanValue'), + thisNumberValue: require('./2016/thisNumberValue'), + thisStringValue: require('./2016/thisStringValue'), + thisTimeValue: require('./2016/thisTimeValue'), + TimeClip: require('./2016/TimeClip'), + TimeFromYear: require('./2016/TimeFromYear'), + TimeWithinDay: require('./2016/TimeWithinDay'), + ToBoolean: require('./2016/ToBoolean'), + ToDateString: require('./2016/ToDateString'), + ToInt16: require('./2016/ToInt16'), + ToInt32: require('./2016/ToInt32'), + ToInt8: require('./2016/ToInt8'), + ToInteger: require('./2016/ToInteger'), + ToLength: require('./2016/ToLength'), + ToNumber: require('./2016/ToNumber'), + ToObject: require('./2016/ToObject'), + ToPrimitive: require('./2016/ToPrimitive'), + ToPropertyDescriptor: require('./2016/ToPropertyDescriptor'), + ToPropertyKey: require('./2016/ToPropertyKey'), + ToString: require('./2016/ToString'), + ToUint16: require('./2016/ToUint16'), + ToUint32: require('./2016/ToUint32'), + ToUint8: require('./2016/ToUint8'), + ToUint8Clamp: require('./2016/ToUint8Clamp'), + Type: require('./2016/Type'), + TypedArrayCreate: require('./2016/TypedArrayCreate'), + TypedArraySpeciesCreate: require('./2016/TypedArraySpeciesCreate'), + UTF16Decode: require('./2016/UTF16Decode'), + UTF16Encoding: require('./2016/UTF16Encoding'), + ValidateAndApplyPropertyDescriptor: require('./2016/ValidateAndApplyPropertyDescriptor'), + ValidateTypedArray: require('./2016/ValidateTypedArray'), + WeekDay: require('./2016/WeekDay'), + YearFromTime: require('./2016/YearFromTime') +}; + +module.exports = ES2016; diff --git a/node_modules/es-abstract/es2017.js b/node_modules/es-abstract/es2017.js new file mode 100644 index 0000000000000..37fe762242e3d --- /dev/null +++ b/node_modules/es-abstract/es2017.js @@ -0,0 +1,154 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/8.0/#sec-abstract-operations +var ES2017 = { + 'Abstract Equality Comparison': require('./2017/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./2017/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./2017/StrictEqualityComparison'), + abs: require('./2017/abs'), + AdvanceStringIndex: require('./2017/AdvanceStringIndex'), + ArrayCreate: require('./2017/ArrayCreate'), + ArraySetLength: require('./2017/ArraySetLength'), + ArraySpeciesCreate: require('./2017/ArraySpeciesCreate'), + Call: require('./2017/Call'), + Canonicalize: require('./2017/Canonicalize'), + CanonicalNumericIndexString: require('./2017/CanonicalNumericIndexString'), + CharacterRange: require('./2017/CharacterRange'), + CompletePropertyDescriptor: require('./2017/CompletePropertyDescriptor'), + CompletionRecord: require('./2017/CompletionRecord'), + CreateDataProperty: require('./2017/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2017/CreateDataPropertyOrThrow'), + CreateHTML: require('./2017/CreateHTML'), + CreateIterResultObject: require('./2017/CreateIterResultObject'), + CreateListFromArrayLike: require('./2017/CreateListFromArrayLike'), + CreateMethodProperty: require('./2017/CreateMethodProperty'), + DateFromTime: require('./2017/DateFromTime'), + Day: require('./2017/Day'), + DayFromYear: require('./2017/DayFromYear'), + DaysInYear: require('./2017/DaysInYear'), + DayWithinYear: require('./2017/DayWithinYear'), + DefinePropertyOrThrow: require('./2017/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2017/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2017/DetachArrayBuffer'), + EnumerableOwnProperties: require('./2017/EnumerableOwnProperties'), + floor: require('./2017/floor'), + FromPropertyDescriptor: require('./2017/FromPropertyDescriptor'), + Get: require('./2017/Get'), + GetGlobalObject: require('./2017/GetGlobalObject'), + GetIterator: require('./2017/GetIterator'), + GetMethod: require('./2017/GetMethod'), + GetOwnPropertyKeys: require('./2017/GetOwnPropertyKeys'), + GetPrototypeFromConstructor: require('./2017/GetPrototypeFromConstructor'), + GetSubstitution: require('./2017/GetSubstitution'), + GetV: require('./2017/GetV'), + GetValueFromBuffer: require('./2017/GetValueFromBuffer'), + HasOwnProperty: require('./2017/HasOwnProperty'), + HasProperty: require('./2017/HasProperty'), + HourFromTime: require('./2017/HourFromTime'), + InLeapYear: require('./2017/InLeapYear'), + InstanceofOperator: require('./2017/InstanceofOperator'), + Invoke: require('./2017/Invoke'), + IsAccessorDescriptor: require('./2017/IsAccessorDescriptor'), + IsArray: require('./2017/IsArray'), + IsCallable: require('./2017/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2017/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2017/IsConcatSpreadable'), + IsConstructor: require('./2017/IsConstructor'), + IsDataDescriptor: require('./2017/IsDataDescriptor'), + IsDetachedBuffer: require('./2017/IsDetachedBuffer'), + IsExtensible: require('./2017/IsExtensible'), + IsGenericDescriptor: require('./2017/IsGenericDescriptor'), + IsInteger: require('./2017/IsInteger'), + IsPromise: require('./2017/IsPromise'), + IsPropertyDescriptor: require('./2017/IsPropertyDescriptor'), + IsPropertyKey: require('./2017/IsPropertyKey'), + IsRegExp: require('./2017/IsRegExp'), + IsSharedArrayBuffer: require('./2017/IsSharedArrayBuffer'), + IsWordChar: require('./2017/IsWordChar'), + IterableToList: require('./2017/IterableToList'), + IteratorClose: require('./2017/IteratorClose'), + IteratorComplete: require('./2017/IteratorComplete'), + IteratorNext: require('./2017/IteratorNext'), + IteratorStep: require('./2017/IteratorStep'), + IteratorValue: require('./2017/IteratorValue'), + MakeDate: require('./2017/MakeDate'), + MakeDay: require('./2017/MakeDay'), + MakeTime: require('./2017/MakeTime'), + max: require('./2017/max'), + min: require('./2017/min'), + MinFromTime: require('./2017/MinFromTime'), + modulo: require('./2017/modulo'), + MonthFromTime: require('./2017/MonthFromTime'), + msFromTime: require('./2017/msFromTime'), + NewPromiseCapability: require('./2017/NewPromiseCapability'), + NormalCompletion: require('./2017/NormalCompletion'), + NumberToRawBytes: require('./2017/NumberToRawBytes'), + ObjectCreate: require('./2017/ObjectCreate'), + ObjectDefineProperties: require('./2017/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2017/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2017/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2017/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2017/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2017/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2017/OrdinaryHasProperty'), + OrdinarySetPrototypeOf: require('./2017/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2017/OrdinaryToPrimitive'), + QuoteJSONString: require('./2017/QuoteJSONString'), + RawBytesToNumber: require('./2017/RawBytesToNumber'), + RegExpCreate: require('./2017/RegExpCreate'), + RegExpExec: require('./2017/RegExpExec'), + RequireObjectCoercible: require('./2017/RequireObjectCoercible'), + SameValue: require('./2017/SameValue'), + SameValueNonNumber: require('./2017/SameValueNonNumber'), + SameValueZero: require('./2017/SameValueZero'), + SecFromTime: require('./2017/SecFromTime'), + Set: require('./2017/Set'), + SetFunctionName: require('./2017/SetFunctionName'), + SetIntegrityLevel: require('./2017/SetIntegrityLevel'), + SetValueInBuffer: require('./2017/SetValueInBuffer'), + SpeciesConstructor: require('./2017/SpeciesConstructor'), + SplitMatch: require('./2017/SplitMatch'), + StringCreate: require('./2017/StringCreate'), + StringGetOwnProperty: require('./2017/StringGetOwnProperty'), + SymbolDescriptiveString: require('./2017/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2017/TestIntegrityLevel'), + thisBooleanValue: require('./2017/thisBooleanValue'), + thisNumberValue: require('./2017/thisNumberValue'), + thisStringValue: require('./2017/thisStringValue'), + thisTimeValue: require('./2017/thisTimeValue'), + TimeClip: require('./2017/TimeClip'), + TimeFromYear: require('./2017/TimeFromYear'), + TimeWithinDay: require('./2017/TimeWithinDay'), + ToBoolean: require('./2017/ToBoolean'), + ToDateString: require('./2017/ToDateString'), + ToIndex: require('./2017/ToIndex'), + ToInt16: require('./2017/ToInt16'), + ToInt32: require('./2017/ToInt32'), + ToInt8: require('./2017/ToInt8'), + ToInteger: require('./2017/ToInteger'), + ToLength: require('./2017/ToLength'), + ToNumber: require('./2017/ToNumber'), + ToObject: require('./2017/ToObject'), + ToPrimitive: require('./2017/ToPrimitive'), + ToPropertyDescriptor: require('./2017/ToPropertyDescriptor'), + ToPropertyKey: require('./2017/ToPropertyKey'), + ToString: require('./2017/ToString'), + ToUint16: require('./2017/ToUint16'), + ToUint32: require('./2017/ToUint32'), + ToUint8: require('./2017/ToUint8'), + ToUint8Clamp: require('./2017/ToUint8Clamp'), + Type: require('./2017/Type'), + TypedArrayCreate: require('./2017/TypedArrayCreate'), + TypedArraySpeciesCreate: require('./2017/TypedArraySpeciesCreate'), + UTF16Decode: require('./2017/UTF16Decode'), + UTF16Encoding: require('./2017/UTF16Encoding'), + ValidateAndApplyPropertyDescriptor: require('./2017/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2017/ValidateAtomicAccess'), + ValidateTypedArray: require('./2017/ValidateTypedArray'), + WeekDay: require('./2017/WeekDay'), + WordCharacters: require('./2017/WordCharacters'), + YearFromTime: require('./2017/YearFromTime') +}; + +module.exports = ES2017; diff --git a/node_modules/es-abstract/es2018.js b/node_modules/es-abstract/es2018.js new file mode 100644 index 0000000000000..d55fa0de4e2b0 --- /dev/null +++ b/node_modules/es-abstract/es2018.js @@ -0,0 +1,165 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/9.0/#sec-abstract-operations +var ES2018 = { + 'Abstract Equality Comparison': require('./2018/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./2018/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./2018/StrictEqualityComparison'), + abs: require('./2018/abs'), + AdvanceStringIndex: require('./2018/AdvanceStringIndex'), + ArrayCreate: require('./2018/ArrayCreate'), + ArraySetLength: require('./2018/ArraySetLength'), + ArraySpeciesCreate: require('./2018/ArraySpeciesCreate'), + AsyncIteratorClose: require('./2018/AsyncIteratorClose'), + Call: require('./2018/Call'), + Canonicalize: require('./2018/Canonicalize'), + CanonicalNumericIndexString: require('./2018/CanonicalNumericIndexString'), + CharacterRange: require('./2018/CharacterRange'), + CompletePropertyDescriptor: require('./2018/CompletePropertyDescriptor'), + CompletionRecord: require('./2018/CompletionRecord'), + CopyDataProperties: require('./2018/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2018/CreateAsyncFromSyncIterator'), + CreateDataProperty: require('./2018/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2018/CreateDataPropertyOrThrow'), + CreateHTML: require('./2018/CreateHTML'), + CreateIterResultObject: require('./2018/CreateIterResultObject'), + CreateListFromArrayLike: require('./2018/CreateListFromArrayLike'), + CreateMethodProperty: require('./2018/CreateMethodProperty'), + DateFromTime: require('./2018/DateFromTime'), + DateString: require('./2018/DateString'), + Day: require('./2018/Day'), + DayFromYear: require('./2018/DayFromYear'), + DaysInYear: require('./2018/DaysInYear'), + DayWithinYear: require('./2018/DayWithinYear'), + DefinePropertyOrThrow: require('./2018/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2018/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2018/DetachArrayBuffer'), + EnumerableOwnPropertyNames: require('./2018/EnumerableOwnPropertyNames'), + floor: require('./2018/floor'), + FromPropertyDescriptor: require('./2018/FromPropertyDescriptor'), + Get: require('./2018/Get'), + GetGlobalObject: require('./2018/GetGlobalObject'), + GetIterator: require('./2018/GetIterator'), + GetMethod: require('./2018/GetMethod'), + GetOwnPropertyKeys: require('./2018/GetOwnPropertyKeys'), + GetPrototypeFromConstructor: require('./2018/GetPrototypeFromConstructor'), + GetSubstitution: require('./2018/GetSubstitution'), + GetV: require('./2018/GetV'), + GetValueFromBuffer: require('./2018/GetValueFromBuffer'), + HasOwnProperty: require('./2018/HasOwnProperty'), + HasProperty: require('./2018/HasProperty'), + HourFromTime: require('./2018/HourFromTime'), + InLeapYear: require('./2018/InLeapYear'), + InstanceofOperator: require('./2018/InstanceofOperator'), + Invoke: require('./2018/Invoke'), + IsAccessorDescriptor: require('./2018/IsAccessorDescriptor'), + IsArray: require('./2018/IsArray'), + IsCallable: require('./2018/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2018/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2018/IsConcatSpreadable'), + IsConstructor: require('./2018/IsConstructor'), + IsDataDescriptor: require('./2018/IsDataDescriptor'), + IsDetachedBuffer: require('./2018/IsDetachedBuffer'), + IsExtensible: require('./2018/IsExtensible'), + IsGenericDescriptor: require('./2018/IsGenericDescriptor'), + IsInteger: require('./2018/IsInteger'), + IsPromise: require('./2018/IsPromise'), + IsPropertyKey: require('./2018/IsPropertyKey'), + IsRegExp: require('./2018/IsRegExp'), + IsSharedArrayBuffer: require('./2018/IsSharedArrayBuffer'), + IsStringPrefix: require('./2018/IsStringPrefix'), + IsWordChar: require('./2018/IsWordChar'), + IterableToList: require('./2018/IterableToList'), + IteratorClose: require('./2018/IteratorClose'), + IteratorComplete: require('./2018/IteratorComplete'), + IteratorNext: require('./2018/IteratorNext'), + IteratorStep: require('./2018/IteratorStep'), + IteratorValue: require('./2018/IteratorValue'), + MakeDate: require('./2018/MakeDate'), + MakeDay: require('./2018/MakeDay'), + MakeTime: require('./2018/MakeTime'), + max: require('./2018/max'), + min: require('./2018/min'), + MinFromTime: require('./2018/MinFromTime'), + modulo: require('./2018/modulo'), + MonthFromTime: require('./2018/MonthFromTime'), + msFromTime: require('./2018/msFromTime'), + NewPromiseCapability: require('./2018/NewPromiseCapability'), + NormalCompletion: require('./2018/NormalCompletion'), + NumberToRawBytes: require('./2018/NumberToRawBytes'), + NumberToString: require('./2018/NumberToString'), + ObjectCreate: require('./2018/ObjectCreate'), + ObjectDefineProperties: require('./2018/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2018/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2018/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2018/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2018/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2018/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2018/OrdinaryHasProperty'), + OrdinarySetPrototypeOf: require('./2018/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2018/OrdinaryToPrimitive'), + PromiseResolve: require('./2018/PromiseResolve'), + QuoteJSONString: require('./2018/QuoteJSONString'), + RawBytesToNumber: require('./2018/RawBytesToNumber'), + RegExpCreate: require('./2018/RegExpCreate'), + RegExpExec: require('./2018/RegExpExec'), + RequireObjectCoercible: require('./2018/RequireObjectCoercible'), + SameValue: require('./2018/SameValue'), + SameValueNonNumber: require('./2018/SameValueNonNumber'), + SameValueZero: require('./2018/SameValueZero'), + SecFromTime: require('./2018/SecFromTime'), + Set: require('./2018/Set'), + SetFunctionLength: require('./2018/SetFunctionLength'), + SetFunctionName: require('./2018/SetFunctionName'), + SetIntegrityLevel: require('./2018/SetIntegrityLevel'), + SetValueInBuffer: require('./2018/SetValueInBuffer'), + SpeciesConstructor: require('./2018/SpeciesConstructor'), + SplitMatch: require('./2018/SplitMatch'), + StringCreate: require('./2018/StringCreate'), + StringGetOwnProperty: require('./2018/StringGetOwnProperty'), + SymbolDescriptiveString: require('./2018/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2018/TestIntegrityLevel'), + thisBooleanValue: require('./2018/thisBooleanValue'), + thisNumberValue: require('./2018/thisNumberValue'), + thisStringValue: require('./2018/thisStringValue'), + thisSymbolValue: require('./2018/thisSymbolValue'), + thisTimeValue: require('./2018/thisTimeValue'), + ThrowCompletion: require('./2018/ThrowCompletion'), + TimeClip: require('./2018/TimeClip'), + TimeFromYear: require('./2018/TimeFromYear'), + TimeString: require('./2018/TimeString'), + TimeWithinDay: require('./2018/TimeWithinDay'), + ToBoolean: require('./2018/ToBoolean'), + ToDateString: require('./2018/ToDateString'), + ToIndex: require('./2018/ToIndex'), + ToInt16: require('./2018/ToInt16'), + ToInt32: require('./2018/ToInt32'), + ToInt8: require('./2018/ToInt8'), + ToInteger: require('./2018/ToInteger'), + ToLength: require('./2018/ToLength'), + ToNumber: require('./2018/ToNumber'), + ToObject: require('./2018/ToObject'), + ToPrimitive: require('./2018/ToPrimitive'), + ToPropertyDescriptor: require('./2018/ToPropertyDescriptor'), + ToPropertyKey: require('./2018/ToPropertyKey'), + ToString: require('./2018/ToString'), + ToUint16: require('./2018/ToUint16'), + ToUint32: require('./2018/ToUint32'), + ToUint8: require('./2018/ToUint8'), + ToUint8Clamp: require('./2018/ToUint8Clamp'), + Type: require('./2018/Type'), + TypedArrayCreate: require('./2018/TypedArrayCreate'), + TypedArraySpeciesCreate: require('./2018/TypedArraySpeciesCreate'), + UnicodeEscape: require('./2018/UnicodeEscape'), + UTF16Decode: require('./2018/UTF16Decode'), + UTF16Encoding: require('./2018/UTF16Encoding'), + ValidateAndApplyPropertyDescriptor: require('./2018/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2018/ValidateAtomicAccess'), + ValidateTypedArray: require('./2018/ValidateTypedArray'), + WeekDay: require('./2018/WeekDay'), + WordCharacters: require('./2018/WordCharacters'), + YearFromTime: require('./2018/YearFromTime') +}; + +module.exports = ES2018; diff --git a/node_modules/es-abstract/es2019.js b/node_modules/es-abstract/es2019.js new file mode 100644 index 0000000000000..42d96e4800e8e --- /dev/null +++ b/node_modules/es-abstract/es2019.js @@ -0,0 +1,169 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/10.0/#sec-abstract-operations +var ES2019 = { + 'Abstract Equality Comparison': require('./2019/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./2019/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./2019/StrictEqualityComparison'), + abs: require('./2019/abs'), + AddEntriesFromIterable: require('./2019/AddEntriesFromIterable'), + AdvanceStringIndex: require('./2019/AdvanceStringIndex'), + ArrayCreate: require('./2019/ArrayCreate'), + ArraySetLength: require('./2019/ArraySetLength'), + ArraySpeciesCreate: require('./2019/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2019/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2019/AsyncIteratorClose'), + Call: require('./2019/Call'), + Canonicalize: require('./2019/Canonicalize'), + CanonicalNumericIndexString: require('./2019/CanonicalNumericIndexString'), + CharacterRange: require('./2019/CharacterRange'), + CompletePropertyDescriptor: require('./2019/CompletePropertyDescriptor'), + CompletionRecord: require('./2019/CompletionRecord'), + CopyDataProperties: require('./2019/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2019/CreateAsyncFromSyncIterator'), + CreateDataProperty: require('./2019/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2019/CreateDataPropertyOrThrow'), + CreateHTML: require('./2019/CreateHTML'), + CreateIterResultObject: require('./2019/CreateIterResultObject'), + CreateListFromArrayLike: require('./2019/CreateListFromArrayLike'), + CreateMethodProperty: require('./2019/CreateMethodProperty'), + DateFromTime: require('./2019/DateFromTime'), + DateString: require('./2019/DateString'), + Day: require('./2019/Day'), + DayFromYear: require('./2019/DayFromYear'), + DaysInYear: require('./2019/DaysInYear'), + DayWithinYear: require('./2019/DayWithinYear'), + DefinePropertyOrThrow: require('./2019/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2019/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2019/DetachArrayBuffer'), + EnumerableOwnPropertyNames: require('./2019/EnumerableOwnPropertyNames'), + FlattenIntoArray: require('./2019/FlattenIntoArray'), + floor: require('./2019/floor'), + FromPropertyDescriptor: require('./2019/FromPropertyDescriptor'), + Get: require('./2019/Get'), + GetGlobalObject: require('./2019/GetGlobalObject'), + GetIterator: require('./2019/GetIterator'), + GetMethod: require('./2019/GetMethod'), + GetOwnPropertyKeys: require('./2019/GetOwnPropertyKeys'), + GetPrototypeFromConstructor: require('./2019/GetPrototypeFromConstructor'), + GetSubstitution: require('./2019/GetSubstitution'), + GetV: require('./2019/GetV'), + GetValueFromBuffer: require('./2019/GetValueFromBuffer'), + HasOwnProperty: require('./2019/HasOwnProperty'), + HasProperty: require('./2019/HasProperty'), + HourFromTime: require('./2019/HourFromTime'), + InLeapYear: require('./2019/InLeapYear'), + InstanceofOperator: require('./2019/InstanceofOperator'), + Invoke: require('./2019/Invoke'), + IsAccessorDescriptor: require('./2019/IsAccessorDescriptor'), + IsArray: require('./2019/IsArray'), + IsCallable: require('./2019/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2019/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2019/IsConcatSpreadable'), + IsConstructor: require('./2019/IsConstructor'), + IsDataDescriptor: require('./2019/IsDataDescriptor'), + IsDetachedBuffer: require('./2019/IsDetachedBuffer'), + IsExtensible: require('./2019/IsExtensible'), + IsGenericDescriptor: require('./2019/IsGenericDescriptor'), + IsInteger: require('./2019/IsInteger'), + IsPromise: require('./2019/IsPromise'), + IsPropertyKey: require('./2019/IsPropertyKey'), + IsRegExp: require('./2019/IsRegExp'), + IsSharedArrayBuffer: require('./2019/IsSharedArrayBuffer'), + IsStringPrefix: require('./2019/IsStringPrefix'), + IsWordChar: require('./2019/IsWordChar'), + IterableToList: require('./2019/IterableToList'), + IteratorClose: require('./2019/IteratorClose'), + IteratorComplete: require('./2019/IteratorComplete'), + IteratorNext: require('./2019/IteratorNext'), + IteratorStep: require('./2019/IteratorStep'), + IteratorValue: require('./2019/IteratorValue'), + MakeDate: require('./2019/MakeDate'), + MakeDay: require('./2019/MakeDay'), + MakeTime: require('./2019/MakeTime'), + max: require('./2019/max'), + min: require('./2019/min'), + MinFromTime: require('./2019/MinFromTime'), + modulo: require('./2019/modulo'), + MonthFromTime: require('./2019/MonthFromTime'), + msFromTime: require('./2019/msFromTime'), + NewPromiseCapability: require('./2019/NewPromiseCapability'), + NormalCompletion: require('./2019/NormalCompletion'), + NumberToRawBytes: require('./2019/NumberToRawBytes'), + NumberToString: require('./2019/NumberToString'), + ObjectCreate: require('./2019/ObjectCreate'), + ObjectDefineProperties: require('./2019/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2019/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2019/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2019/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2019/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2019/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2019/OrdinaryHasProperty'), + OrdinarySetPrototypeOf: require('./2019/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2019/OrdinaryToPrimitive'), + PromiseResolve: require('./2019/PromiseResolve'), + QuoteJSONString: require('./2019/QuoteJSONString'), + RawBytesToNumber: require('./2019/RawBytesToNumber'), + RegExpCreate: require('./2019/RegExpCreate'), + RegExpExec: require('./2019/RegExpExec'), + RequireObjectCoercible: require('./2019/RequireObjectCoercible'), + SameValue: require('./2019/SameValue'), + SameValueNonNumber: require('./2019/SameValueNonNumber'), + SameValueZero: require('./2019/SameValueZero'), + SecFromTime: require('./2019/SecFromTime'), + Set: require('./2019/Set'), + SetFunctionLength: require('./2019/SetFunctionLength'), + SetFunctionName: require('./2019/SetFunctionName'), + SetIntegrityLevel: require('./2019/SetIntegrityLevel'), + SetValueInBuffer: require('./2019/SetValueInBuffer'), + SpeciesConstructor: require('./2019/SpeciesConstructor'), + SplitMatch: require('./2019/SplitMatch'), + StringCreate: require('./2019/StringCreate'), + StringGetOwnProperty: require('./2019/StringGetOwnProperty'), + SymbolDescriptiveString: require('./2019/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2019/TestIntegrityLevel'), + thisBooleanValue: require('./2019/thisBooleanValue'), + thisNumberValue: require('./2019/thisNumberValue'), + thisStringValue: require('./2019/thisStringValue'), + thisSymbolValue: require('./2019/thisSymbolValue'), + thisTimeValue: require('./2019/thisTimeValue'), + ThrowCompletion: require('./2019/ThrowCompletion'), + TimeClip: require('./2019/TimeClip'), + TimeFromYear: require('./2019/TimeFromYear'), + TimeString: require('./2019/TimeString'), + TimeWithinDay: require('./2019/TimeWithinDay'), + ToBoolean: require('./2019/ToBoolean'), + ToDateString: require('./2019/ToDateString'), + ToIndex: require('./2019/ToIndex'), + ToInt16: require('./2019/ToInt16'), + ToInt32: require('./2019/ToInt32'), + ToInt8: require('./2019/ToInt8'), + ToInteger: require('./2019/ToInteger'), + ToLength: require('./2019/ToLength'), + ToNumber: require('./2019/ToNumber'), + ToObject: require('./2019/ToObject'), + ToPrimitive: require('./2019/ToPrimitive'), + ToPropertyDescriptor: require('./2019/ToPropertyDescriptor'), + ToPropertyKey: require('./2019/ToPropertyKey'), + ToString: require('./2019/ToString'), + ToUint16: require('./2019/ToUint16'), + ToUint32: require('./2019/ToUint32'), + ToUint8: require('./2019/ToUint8'), + ToUint8Clamp: require('./2019/ToUint8Clamp'), + TrimString: require('./2019/TrimString'), + Type: require('./2019/Type'), + TypedArrayCreate: require('./2019/TypedArrayCreate'), + TypedArraySpeciesCreate: require('./2019/TypedArraySpeciesCreate'), + UnicodeEscape: require('./2019/UnicodeEscape'), + UTF16Decode: require('./2019/UTF16Decode'), + UTF16Encoding: require('./2019/UTF16Encoding'), + ValidateAndApplyPropertyDescriptor: require('./2019/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2019/ValidateAtomicAccess'), + ValidateTypedArray: require('./2019/ValidateTypedArray'), + WeekDay: require('./2019/WeekDay'), + WordCharacters: require('./2019/WordCharacters'), + YearFromTime: require('./2019/YearFromTime') +}; + +module.exports = ES2019; diff --git a/node_modules/es-abstract/es2020.js b/node_modules/es-abstract/es2020.js new file mode 100644 index 0000000000000..39f6b7931bac0 --- /dev/null +++ b/node_modules/es-abstract/es2020.js @@ -0,0 +1,193 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/11.0/#sec-abstract-operations +var ES2020 = { + 'Abstract Equality Comparison': require('./2020/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./2020/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./2020/StrictEqualityComparison'), + abs: require('./2020/abs'), + AddEntriesFromIterable: require('./2020/AddEntriesFromIterable'), + AdvanceStringIndex: require('./2020/AdvanceStringIndex'), + ArrayCreate: require('./2020/ArrayCreate'), + ArraySetLength: require('./2020/ArraySetLength'), + ArraySpeciesCreate: require('./2020/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2020/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2020/AsyncIteratorClose'), + BigInt: require('./2020/BigInt'), + BigIntBitwiseOp: require('./2020/BigIntBitwiseOp'), + BinaryAnd: require('./2020/BinaryAnd'), + BinaryOr: require('./2020/BinaryOr'), + BinaryXor: require('./2020/BinaryXor'), + Call: require('./2020/Call'), + Canonicalize: require('./2020/Canonicalize'), + CanonicalNumericIndexString: require('./2020/CanonicalNumericIndexString'), + CharacterRange: require('./2020/CharacterRange'), + CodePointAt: require('./2020/CodePointAt'), + CompletePropertyDescriptor: require('./2020/CompletePropertyDescriptor'), + CompletionRecord: require('./2020/CompletionRecord'), + CopyDataProperties: require('./2020/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2020/CreateAsyncFromSyncIterator'), + CreateDataProperty: require('./2020/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2020/CreateDataPropertyOrThrow'), + CreateHTML: require('./2020/CreateHTML'), + CreateIterResultObject: require('./2020/CreateIterResultObject'), + CreateListFromArrayLike: require('./2020/CreateListFromArrayLike'), + CreateMethodProperty: require('./2020/CreateMethodProperty'), + CreateRegExpStringIterator: require('./2020/CreateRegExpStringIterator'), + DateFromTime: require('./2020/DateFromTime'), + DateString: require('./2020/DateString'), + Day: require('./2020/Day'), + DayFromYear: require('./2020/DayFromYear'), + DaysInYear: require('./2020/DaysInYear'), + DayWithinYear: require('./2020/DayWithinYear'), + DefinePropertyOrThrow: require('./2020/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2020/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2020/DetachArrayBuffer'), + EnumerableOwnPropertyNames: require('./2020/EnumerableOwnPropertyNames'), + FlattenIntoArray: require('./2020/FlattenIntoArray'), + floor: require('./2020/floor'), + FromPropertyDescriptor: require('./2020/FromPropertyDescriptor'), + Get: require('./2020/Get'), + GetGlobalObject: require('./2020/GetGlobalObject'), + GetIterator: require('./2020/GetIterator'), + GetMethod: require('./2020/GetMethod'), + GetOwnPropertyKeys: require('./2020/GetOwnPropertyKeys'), + GetPrototypeFromConstructor: require('./2020/GetPrototypeFromConstructor'), + GetSubstitution: require('./2020/GetSubstitution'), + GetV: require('./2020/GetV'), + GetValueFromBuffer: require('./2020/GetValueFromBuffer'), + HasOwnProperty: require('./2020/HasOwnProperty'), + HasProperty: require('./2020/HasProperty'), + HourFromTime: require('./2020/HourFromTime'), + InLeapYear: require('./2020/InLeapYear'), + InstanceofOperator: require('./2020/InstanceofOperator'), + Invoke: require('./2020/Invoke'), + IsAccessorDescriptor: require('./2020/IsAccessorDescriptor'), + IsArray: require('./2020/IsArray'), + IsBigIntElementType: require('./2020/IsBigIntElementType'), + IsCallable: require('./2020/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2020/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2020/IsConcatSpreadable'), + IsConstructor: require('./2020/IsConstructor'), + IsDataDescriptor: require('./2020/IsDataDescriptor'), + IsDetachedBuffer: require('./2020/IsDetachedBuffer'), + IsExtensible: require('./2020/IsExtensible'), + IsGenericDescriptor: require('./2020/IsGenericDescriptor'), + IsInteger: require('./2020/IsInteger'), + IsNonNegativeInteger: require('./2020/IsNonNegativeInteger'), + IsNoTearConfiguration: require('./2020/IsNoTearConfiguration'), + IsPromise: require('./2020/IsPromise'), + IsPropertyKey: require('./2020/IsPropertyKey'), + IsRegExp: require('./2020/IsRegExp'), + IsSharedArrayBuffer: require('./2020/IsSharedArrayBuffer'), + IsStringPrefix: require('./2020/IsStringPrefix'), + IsUnclampedIntegerElementType: require('./2020/IsUnclampedIntegerElementType'), + IsUnsignedElementType: require('./2020/IsUnsignedElementType'), + IsValidIntegerIndex: require('./2020/IsValidIntegerIndex'), + IsWordChar: require('./2020/IsWordChar'), + IterableToList: require('./2020/IterableToList'), + IteratorClose: require('./2020/IteratorClose'), + IteratorComplete: require('./2020/IteratorComplete'), + IteratorNext: require('./2020/IteratorNext'), + IteratorStep: require('./2020/IteratorStep'), + IteratorValue: require('./2020/IteratorValue'), + LengthOfArrayLike: require('./2020/LengthOfArrayLike'), + MakeDate: require('./2020/MakeDate'), + MakeDay: require('./2020/MakeDay'), + MakeTime: require('./2020/MakeTime'), + max: require('./2020/max'), + min: require('./2020/min'), + MinFromTime: require('./2020/MinFromTime'), + modulo: require('./2020/modulo'), + MonthFromTime: require('./2020/MonthFromTime'), + msFromTime: require('./2020/msFromTime'), + NewPromiseCapability: require('./2020/NewPromiseCapability'), + NormalCompletion: require('./2020/NormalCompletion'), + Number: require('./2020/Number'), + NumberBitwiseOp: require('./2020/NumberBitwiseOp'), + NumberToBigInt: require('./2020/NumberToBigInt'), + NumericToRawBytes: require('./2020/NumericToRawBytes'), + ObjectDefineProperties: require('./2020/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2020/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2020/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2020/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2020/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2020/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2020/OrdinaryHasProperty'), + OrdinaryObjectCreate: require('./2020/OrdinaryObjectCreate'), + OrdinarySetPrototypeOf: require('./2020/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2020/OrdinaryToPrimitive'), + PromiseResolve: require('./2020/PromiseResolve'), + QuoteJSONString: require('./2020/QuoteJSONString'), + RawBytesToNumeric: require('./2020/RawBytesToNumeric'), + RegExpCreate: require('./2020/RegExpCreate'), + RegExpExec: require('./2020/RegExpExec'), + RequireObjectCoercible: require('./2020/RequireObjectCoercible'), + SameValue: require('./2020/SameValue'), + SameValueNonNumeric: require('./2020/SameValueNonNumeric'), + SameValueZero: require('./2020/SameValueZero'), + SecFromTime: require('./2020/SecFromTime'), + Set: require('./2020/Set'), + SetFunctionLength: require('./2020/SetFunctionLength'), + SetFunctionName: require('./2020/SetFunctionName'), + SetIntegrityLevel: require('./2020/SetIntegrityLevel'), + SetValueInBuffer: require('./2020/SetValueInBuffer'), + SpeciesConstructor: require('./2020/SpeciesConstructor'), + SplitMatch: require('./2020/SplitMatch'), + StringCreate: require('./2020/StringCreate'), + StringGetOwnProperty: require('./2020/StringGetOwnProperty'), + StringPad: require('./2020/StringPad'), + StringToBigInt: require('./2020/StringToBigInt'), + SymbolDescriptiveString: require('./2020/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2020/TestIntegrityLevel'), + thisBigIntValue: require('./2020/thisBigIntValue'), + thisBooleanValue: require('./2020/thisBooleanValue'), + thisNumberValue: require('./2020/thisNumberValue'), + thisStringValue: require('./2020/thisStringValue'), + thisSymbolValue: require('./2020/thisSymbolValue'), + thisTimeValue: require('./2020/thisTimeValue'), + ThrowCompletion: require('./2020/ThrowCompletion'), + TimeClip: require('./2020/TimeClip'), + TimeFromYear: require('./2020/TimeFromYear'), + TimeString: require('./2020/TimeString'), + TimeWithinDay: require('./2020/TimeWithinDay'), + ToBigInt: require('./2020/ToBigInt'), + ToBigInt64: require('./2020/ToBigInt64'), + ToBigUint64: require('./2020/ToBigUint64'), + ToBoolean: require('./2020/ToBoolean'), + ToDateString: require('./2020/ToDateString'), + ToIndex: require('./2020/ToIndex'), + ToInt16: require('./2020/ToInt16'), + ToInt32: require('./2020/ToInt32'), + ToInt8: require('./2020/ToInt8'), + ToInteger: require('./2020/ToInteger'), + ToLength: require('./2020/ToLength'), + ToNumber: require('./2020/ToNumber'), + ToNumeric: require('./2020/ToNumeric'), + ToObject: require('./2020/ToObject'), + ToPrimitive: require('./2020/ToPrimitive'), + ToPropertyDescriptor: require('./2020/ToPropertyDescriptor'), + ToPropertyKey: require('./2020/ToPropertyKey'), + ToString: require('./2020/ToString'), + ToUint16: require('./2020/ToUint16'), + ToUint32: require('./2020/ToUint32'), + ToUint8: require('./2020/ToUint8'), + ToUint8Clamp: require('./2020/ToUint8Clamp'), + TrimString: require('./2020/TrimString'), + Type: require('./2020/Type'), + TypedArrayCreate: require('./2020/TypedArrayCreate'), + TypedArraySpeciesCreate: require('./2020/TypedArraySpeciesCreate'), + UnicodeEscape: require('./2020/UnicodeEscape'), + UTF16DecodeString: require('./2020/UTF16DecodeString'), + UTF16DecodeSurrogatePair: require('./2020/UTF16DecodeSurrogatePair'), + UTF16Encoding: require('./2020/UTF16Encoding'), + ValidateAndApplyPropertyDescriptor: require('./2020/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2020/ValidateAtomicAccess'), + ValidateTypedArray: require('./2020/ValidateTypedArray'), + WeekDay: require('./2020/WeekDay'), + WordCharacters: require('./2020/WordCharacters'), + YearFromTime: require('./2020/YearFromTime') +}; + +module.exports = ES2020; diff --git a/node_modules/es-abstract/es2021.js b/node_modules/es-abstract/es2021.js new file mode 100644 index 0000000000000..410d283f2d435 --- /dev/null +++ b/node_modules/es-abstract/es2021.js @@ -0,0 +1,207 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/12.0/#sec-abstract-operations +var ES2021 = { + 'Abstract Equality Comparison': require('./2021/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./2021/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./2021/StrictEqualityComparison'), + abs: require('./2021/abs'), + AddEntriesFromIterable: require('./2021/AddEntriesFromIterable'), + AddToKeptObjects: require('./2021/AddToKeptObjects'), + AdvanceStringIndex: require('./2021/AdvanceStringIndex'), + ApplyStringOrNumericBinaryOperator: require('./2021/ApplyStringOrNumericBinaryOperator'), + ArrayCreate: require('./2021/ArrayCreate'), + ArraySetLength: require('./2021/ArraySetLength'), + ArraySpeciesCreate: require('./2021/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2021/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2021/AsyncIteratorClose'), + BigInt: require('./2021/BigInt'), + BigIntBitwiseOp: require('./2021/BigIntBitwiseOp'), + BinaryAnd: require('./2021/BinaryAnd'), + BinaryOr: require('./2021/BinaryOr'), + BinaryXor: require('./2021/BinaryXor'), + ByteListBitwiseOp: require('./2021/ByteListBitwiseOp'), + ByteListEqual: require('./2021/ByteListEqual'), + Call: require('./2021/Call'), + Canonicalize: require('./2021/Canonicalize'), + CanonicalNumericIndexString: require('./2021/CanonicalNumericIndexString'), + CharacterRange: require('./2021/CharacterRange'), + clamp: require('./2021/clamp'), + ClearKeptObjects: require('./2021/ClearKeptObjects'), + CloneArrayBuffer: require('./2021/CloneArrayBuffer'), + CodePointAt: require('./2021/CodePointAt'), + CodePointsToString: require('./2021/CodePointsToString'), + CompletePropertyDescriptor: require('./2021/CompletePropertyDescriptor'), + CompletionRecord: require('./2021/CompletionRecord'), + CopyDataProperties: require('./2021/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2021/CreateAsyncFromSyncIterator'), + CreateDataProperty: require('./2021/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2021/CreateDataPropertyOrThrow'), + CreateHTML: require('./2021/CreateHTML'), + CreateIterResultObject: require('./2021/CreateIterResultObject'), + CreateListFromArrayLike: require('./2021/CreateListFromArrayLike'), + CreateMethodProperty: require('./2021/CreateMethodProperty'), + CreateRegExpStringIterator: require('./2021/CreateRegExpStringIterator'), + DateFromTime: require('./2021/DateFromTime'), + DateString: require('./2021/DateString'), + Day: require('./2021/Day'), + DayFromYear: require('./2021/DayFromYear'), + DaysInYear: require('./2021/DaysInYear'), + DayWithinYear: require('./2021/DayWithinYear'), + DefinePropertyOrThrow: require('./2021/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2021/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2021/DetachArrayBuffer'), + EnumerableOwnPropertyNames: require('./2021/EnumerableOwnPropertyNames'), + FlattenIntoArray: require('./2021/FlattenIntoArray'), + floor: require('./2021/floor'), + FromPropertyDescriptor: require('./2021/FromPropertyDescriptor'), + Get: require('./2021/Get'), + GetGlobalObject: require('./2021/GetGlobalObject'), + GetIterator: require('./2021/GetIterator'), + GetMethod: require('./2021/GetMethod'), + GetOwnPropertyKeys: require('./2021/GetOwnPropertyKeys'), + GetPromiseResolve: require('./2021/GetPromiseResolve'), + GetPrototypeFromConstructor: require('./2021/GetPrototypeFromConstructor'), + GetSubstitution: require('./2021/GetSubstitution'), + GetV: require('./2021/GetV'), + GetValueFromBuffer: require('./2021/GetValueFromBuffer'), + HasOwnProperty: require('./2021/HasOwnProperty'), + HasProperty: require('./2021/HasProperty'), + HourFromTime: require('./2021/HourFromTime'), + InLeapYear: require('./2021/InLeapYear'), + InstanceofOperator: require('./2021/InstanceofOperator'), + Invoke: require('./2021/Invoke'), + IsAccessorDescriptor: require('./2021/IsAccessorDescriptor'), + IsArray: require('./2021/IsArray'), + IsBigIntElementType: require('./2021/IsBigIntElementType'), + IsCallable: require('./2021/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2021/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2021/IsConcatSpreadable'), + IsConstructor: require('./2021/IsConstructor'), + IsDataDescriptor: require('./2021/IsDataDescriptor'), + IsDetachedBuffer: require('./2021/IsDetachedBuffer'), + IsExtensible: require('./2021/IsExtensible'), + IsGenericDescriptor: require('./2021/IsGenericDescriptor'), + IsIntegralNumber: require('./2021/IsIntegralNumber'), + IsNoTearConfiguration: require('./2021/IsNoTearConfiguration'), + IsPromise: require('./2021/IsPromise'), + IsPropertyKey: require('./2021/IsPropertyKey'), + IsRegExp: require('./2021/IsRegExp'), + IsSharedArrayBuffer: require('./2021/IsSharedArrayBuffer'), + IsStringPrefix: require('./2021/IsStringPrefix'), + IsUnclampedIntegerElementType: require('./2021/IsUnclampedIntegerElementType'), + IsUnsignedElementType: require('./2021/IsUnsignedElementType'), + IsValidIntegerIndex: require('./2021/IsValidIntegerIndex'), + IsWordChar: require('./2021/IsWordChar'), + IterableToList: require('./2021/IterableToList'), + IteratorClose: require('./2021/IteratorClose'), + IteratorComplete: require('./2021/IteratorComplete'), + IteratorNext: require('./2021/IteratorNext'), + IteratorStep: require('./2021/IteratorStep'), + IteratorValue: require('./2021/IteratorValue'), + LengthOfArrayLike: require('./2021/LengthOfArrayLike'), + MakeDate: require('./2021/MakeDate'), + MakeDay: require('./2021/MakeDay'), + MakeTime: require('./2021/MakeTime'), + max: require('./2021/max'), + min: require('./2021/min'), + MinFromTime: require('./2021/MinFromTime'), + modulo: require('./2021/modulo'), + MonthFromTime: require('./2021/MonthFromTime'), + msFromTime: require('./2021/msFromTime'), + NewPromiseCapability: require('./2021/NewPromiseCapability'), + NormalCompletion: require('./2021/NormalCompletion'), + Number: require('./2021/Number'), + NumberBitwiseOp: require('./2021/NumberBitwiseOp'), + NumberToBigInt: require('./2021/NumberToBigInt'), + NumericToRawBytes: require('./2021/NumericToRawBytes'), + ObjectDefineProperties: require('./2021/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2021/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2021/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2021/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2021/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2021/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2021/OrdinaryHasProperty'), + OrdinaryObjectCreate: require('./2021/OrdinaryObjectCreate'), + OrdinarySetPrototypeOf: require('./2021/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2021/OrdinaryToPrimitive'), + PromiseResolve: require('./2021/PromiseResolve'), + QuoteJSONString: require('./2021/QuoteJSONString'), + RawBytesToNumeric: require('./2021/RawBytesToNumeric'), + RegExpCreate: require('./2021/RegExpCreate'), + RegExpExec: require('./2021/RegExpExec'), + RequireObjectCoercible: require('./2021/RequireObjectCoercible'), + SameValue: require('./2021/SameValue'), + SameValueNonNumeric: require('./2021/SameValueNonNumeric'), + SameValueZero: require('./2021/SameValueZero'), + SecFromTime: require('./2021/SecFromTime'), + Set: require('./2021/Set'), + SetFunctionLength: require('./2021/SetFunctionLength'), + SetFunctionName: require('./2021/SetFunctionName'), + SetIntegrityLevel: require('./2021/SetIntegrityLevel'), + SetTypedArrayFromArrayLike: require('./2021/SetTypedArrayFromArrayLike'), + SetTypedArrayFromTypedArray: require('./2021/SetTypedArrayFromTypedArray'), + SetValueInBuffer: require('./2021/SetValueInBuffer'), + SpeciesConstructor: require('./2021/SpeciesConstructor'), + SplitMatch: require('./2021/SplitMatch'), + StringCreate: require('./2021/StringCreate'), + StringGetOwnProperty: require('./2021/StringGetOwnProperty'), + StringIndexOf: require('./2021/StringIndexOf'), + StringPad: require('./2021/StringPad'), + StringToBigInt: require('./2021/StringToBigInt'), + StringToCodePoints: require('./2021/StringToCodePoints'), + substring: require('./2021/substring'), + SymbolDescriptiveString: require('./2021/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2021/TestIntegrityLevel'), + thisBigIntValue: require('./2021/thisBigIntValue'), + thisBooleanValue: require('./2021/thisBooleanValue'), + thisNumberValue: require('./2021/thisNumberValue'), + thisStringValue: require('./2021/thisStringValue'), + thisSymbolValue: require('./2021/thisSymbolValue'), + thisTimeValue: require('./2021/thisTimeValue'), + ThrowCompletion: require('./2021/ThrowCompletion'), + TimeClip: require('./2021/TimeClip'), + TimeFromYear: require('./2021/TimeFromYear'), + TimeString: require('./2021/TimeString'), + TimeWithinDay: require('./2021/TimeWithinDay'), + ToBigInt: require('./2021/ToBigInt'), + ToBigInt64: require('./2021/ToBigInt64'), + ToBigUint64: require('./2021/ToBigUint64'), + ToBoolean: require('./2021/ToBoolean'), + ToDateString: require('./2021/ToDateString'), + ToIndex: require('./2021/ToIndex'), + ToInt16: require('./2021/ToInt16'), + ToInt32: require('./2021/ToInt32'), + ToInt8: require('./2021/ToInt8'), + ToIntegerOrInfinity: require('./2021/ToIntegerOrInfinity'), + ToLength: require('./2021/ToLength'), + ToNumber: require('./2021/ToNumber'), + ToNumeric: require('./2021/ToNumeric'), + ToObject: require('./2021/ToObject'), + ToPrimitive: require('./2021/ToPrimitive'), + ToPropertyDescriptor: require('./2021/ToPropertyDescriptor'), + ToPropertyKey: require('./2021/ToPropertyKey'), + ToString: require('./2021/ToString'), + ToUint16: require('./2021/ToUint16'), + ToUint32: require('./2021/ToUint32'), + ToUint8: require('./2021/ToUint8'), + ToUint8Clamp: require('./2021/ToUint8Clamp'), + TrimString: require('./2021/TrimString'), + Type: require('./2021/Type'), + TypedArrayCreate: require('./2021/TypedArrayCreate'), + TypedArraySpeciesCreate: require('./2021/TypedArraySpeciesCreate'), + UnicodeEscape: require('./2021/UnicodeEscape'), + UTF16EncodeCodePoint: require('./2021/UTF16EncodeCodePoint'), + UTF16SurrogatePairToCodePoint: require('./2021/UTF16SurrogatePairToCodePoint'), + ValidateAndApplyPropertyDescriptor: require('./2021/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2021/ValidateAtomicAccess'), + ValidateIntegerTypedArray: require('./2021/ValidateIntegerTypedArray'), + ValidateTypedArray: require('./2021/ValidateTypedArray'), + WeakRefDeref: require('./2021/WeakRefDeref'), + WeekDay: require('./2021/WeekDay'), + WordCharacters: require('./2021/WordCharacters'), + YearFromTime: require('./2021/YearFromTime') +}; + +module.exports = ES2021; diff --git a/node_modules/es-abstract/es2022.js b/node_modules/es-abstract/es2022.js new file mode 100644 index 0000000000000..dfd808ae359c3 --- /dev/null +++ b/node_modules/es-abstract/es2022.js @@ -0,0 +1,219 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/13.0/#sec-abstract-operations +var ES2022 = { + abs: require('./2022/abs'), + AddEntriesFromIterable: require('./2022/AddEntriesFromIterable'), + AddToKeptObjects: require('./2022/AddToKeptObjects'), + AdvanceStringIndex: require('./2022/AdvanceStringIndex'), + ApplyStringOrNumericBinaryOperator: require('./2022/ApplyStringOrNumericBinaryOperator'), + ArrayCreate: require('./2022/ArrayCreate'), + ArraySetLength: require('./2022/ArraySetLength'), + ArraySpeciesCreate: require('./2022/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2022/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2022/AsyncIteratorClose'), + BigInt: require('./2022/BigInt'), + BigIntBitwiseOp: require('./2022/BigIntBitwiseOp'), + BinaryAnd: require('./2022/BinaryAnd'), + BinaryOr: require('./2022/BinaryOr'), + BinaryXor: require('./2022/BinaryXor'), + ByteListBitwiseOp: require('./2022/ByteListBitwiseOp'), + ByteListEqual: require('./2022/ByteListEqual'), + Call: require('./2022/Call'), + Canonicalize: require('./2022/Canonicalize'), + CanonicalNumericIndexString: require('./2022/CanonicalNumericIndexString'), + CharacterRange: require('./2022/CharacterRange'), + clamp: require('./2022/clamp'), + ClearKeptObjects: require('./2022/ClearKeptObjects'), + CloneArrayBuffer: require('./2022/CloneArrayBuffer'), + CodePointAt: require('./2022/CodePointAt'), + CodePointsToString: require('./2022/CodePointsToString'), + CompletePropertyDescriptor: require('./2022/CompletePropertyDescriptor'), + CompletionRecord: require('./2022/CompletionRecord'), + CopyDataProperties: require('./2022/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2022/CreateAsyncFromSyncIterator'), + CreateDataProperty: require('./2022/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2022/CreateDataPropertyOrThrow'), + CreateHTML: require('./2022/CreateHTML'), + CreateIterResultObject: require('./2022/CreateIterResultObject'), + CreateListFromArrayLike: require('./2022/CreateListFromArrayLike'), + CreateMethodProperty: require('./2022/CreateMethodProperty'), + CreateNonEnumerableDataPropertyOrThrow: require('./2022/CreateNonEnumerableDataPropertyOrThrow'), + CreateRegExpStringIterator: require('./2022/CreateRegExpStringIterator'), + DateFromTime: require('./2022/DateFromTime'), + DateString: require('./2022/DateString'), + Day: require('./2022/Day'), + DayFromYear: require('./2022/DayFromYear'), + DaysInYear: require('./2022/DaysInYear'), + DayWithinYear: require('./2022/DayWithinYear'), + DefinePropertyOrThrow: require('./2022/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2022/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2022/DetachArrayBuffer'), + EnumerableOwnPropertyNames: require('./2022/EnumerableOwnPropertyNames'), + FlattenIntoArray: require('./2022/FlattenIntoArray'), + floor: require('./2022/floor'), + FromPropertyDescriptor: require('./2022/FromPropertyDescriptor'), + Get: require('./2022/Get'), + GetGlobalObject: require('./2022/GetGlobalObject'), + GetIterator: require('./2022/GetIterator'), + GetMatchIndexPair: require('./2022/GetMatchIndexPair'), + GetMatchString: require('./2022/GetMatchString'), + GetMethod: require('./2022/GetMethod'), + GetOwnPropertyKeys: require('./2022/GetOwnPropertyKeys'), + GetPromiseResolve: require('./2022/GetPromiseResolve'), + GetPrototypeFromConstructor: require('./2022/GetPrototypeFromConstructor'), + GetStringIndex: require('./2022/GetStringIndex'), + GetSubstitution: require('./2022/GetSubstitution'), + GetV: require('./2022/GetV'), + GetValueFromBuffer: require('./2022/GetValueFromBuffer'), + HasOwnProperty: require('./2022/HasOwnProperty'), + HasProperty: require('./2022/HasProperty'), + HourFromTime: require('./2022/HourFromTime'), + InLeapYear: require('./2022/InLeapYear'), + InstallErrorCause: require('./2022/InstallErrorCause'), + InstanceofOperator: require('./2022/InstanceofOperator'), + Invoke: require('./2022/Invoke'), + IsAccessorDescriptor: require('./2022/IsAccessorDescriptor'), + IsArray: require('./2022/IsArray'), + IsBigIntElementType: require('./2022/IsBigIntElementType'), + IsCallable: require('./2022/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2022/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2022/IsConcatSpreadable'), + IsConstructor: require('./2022/IsConstructor'), + IsDataDescriptor: require('./2022/IsDataDescriptor'), + IsDetachedBuffer: require('./2022/IsDetachedBuffer'), + IsExtensible: require('./2022/IsExtensible'), + IsGenericDescriptor: require('./2022/IsGenericDescriptor'), + IsIntegralNumber: require('./2022/IsIntegralNumber'), + IsLessThan: require('./2022/IsLessThan'), + IsLooselyEqual: require('./2022/IsLooselyEqual'), + IsNoTearConfiguration: require('./2022/IsNoTearConfiguration'), + IsPromise: require('./2022/IsPromise'), + IsPropertyKey: require('./2022/IsPropertyKey'), + IsRegExp: require('./2022/IsRegExp'), + IsSharedArrayBuffer: require('./2022/IsSharedArrayBuffer'), + IsStrictlyEqual: require('./2022/IsStrictlyEqual'), + IsStringPrefix: require('./2022/IsStringPrefix'), + IsStringWellFormedUnicode: require('./2022/IsStringWellFormedUnicode'), + IsUnclampedIntegerElementType: require('./2022/IsUnclampedIntegerElementType'), + IsUnsignedElementType: require('./2022/IsUnsignedElementType'), + IsValidIntegerIndex: require('./2022/IsValidIntegerIndex'), + IsWordChar: require('./2022/IsWordChar'), + IterableToList: require('./2022/IterableToList'), + IteratorClose: require('./2022/IteratorClose'), + IteratorComplete: require('./2022/IteratorComplete'), + IteratorNext: require('./2022/IteratorNext'), + IteratorStep: require('./2022/IteratorStep'), + IteratorValue: require('./2022/IteratorValue'), + LengthOfArrayLike: require('./2022/LengthOfArrayLike'), + MakeDate: require('./2022/MakeDate'), + MakeDay: require('./2022/MakeDay'), + MakeMatchIndicesIndexPairArray: require('./2022/MakeMatchIndicesIndexPairArray'), + MakeTime: require('./2022/MakeTime'), + max: require('./2022/max'), + min: require('./2022/min'), + MinFromTime: require('./2022/MinFromTime'), + modulo: require('./2022/modulo'), + MonthFromTime: require('./2022/MonthFromTime'), + msFromTime: require('./2022/msFromTime'), + NewPromiseCapability: require('./2022/NewPromiseCapability'), + NormalCompletion: require('./2022/NormalCompletion'), + Number: require('./2022/Number'), + NumberBitwiseOp: require('./2022/NumberBitwiseOp'), + NumberToBigInt: require('./2022/NumberToBigInt'), + NumericToRawBytes: require('./2022/NumericToRawBytes'), + ObjectDefineProperties: require('./2022/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2022/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2022/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2022/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2022/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2022/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2022/OrdinaryHasProperty'), + OrdinaryObjectCreate: require('./2022/OrdinaryObjectCreate'), + OrdinarySetPrototypeOf: require('./2022/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2022/OrdinaryToPrimitive'), + PromiseResolve: require('./2022/PromiseResolve'), + QuoteJSONString: require('./2022/QuoteJSONString'), + RawBytesToNumeric: require('./2022/RawBytesToNumeric'), + RegExpCreate: require('./2022/RegExpCreate'), + RegExpExec: require('./2022/RegExpExec'), + RegExpHasFlag: require('./2022/RegExpHasFlag'), + RequireObjectCoercible: require('./2022/RequireObjectCoercible'), + SameValue: require('./2022/SameValue'), + SameValueNonNumeric: require('./2022/SameValueNonNumeric'), + SameValueZero: require('./2022/SameValueZero'), + SecFromTime: require('./2022/SecFromTime'), + Set: require('./2022/Set'), + SetFunctionLength: require('./2022/SetFunctionLength'), + SetFunctionName: require('./2022/SetFunctionName'), + SetIntegrityLevel: require('./2022/SetIntegrityLevel'), + SetTypedArrayFromArrayLike: require('./2022/SetTypedArrayFromArrayLike'), + SetTypedArrayFromTypedArray: require('./2022/SetTypedArrayFromTypedArray'), + SetValueInBuffer: require('./2022/SetValueInBuffer'), + SortIndexedProperties: require('./2022/SortIndexedProperties'), + SpeciesConstructor: require('./2022/SpeciesConstructor'), + StringCreate: require('./2022/StringCreate'), + StringGetOwnProperty: require('./2022/StringGetOwnProperty'), + StringIndexOf: require('./2022/StringIndexOf'), + StringPad: require('./2022/StringPad'), + StringToBigInt: require('./2022/StringToBigInt'), + StringToCodePoints: require('./2022/StringToCodePoints'), + StringToNumber: require('./2022/StringToNumber'), + substring: require('./2022/substring'), + SymbolDescriptiveString: require('./2022/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2022/TestIntegrityLevel'), + thisBigIntValue: require('./2022/thisBigIntValue'), + thisBooleanValue: require('./2022/thisBooleanValue'), + thisNumberValue: require('./2022/thisNumberValue'), + thisStringValue: require('./2022/thisStringValue'), + thisSymbolValue: require('./2022/thisSymbolValue'), + thisTimeValue: require('./2022/thisTimeValue'), + ThrowCompletion: require('./2022/ThrowCompletion'), + TimeClip: require('./2022/TimeClip'), + TimeFromYear: require('./2022/TimeFromYear'), + TimeString: require('./2022/TimeString'), + TimeWithinDay: require('./2022/TimeWithinDay'), + ToBigInt: require('./2022/ToBigInt'), + ToBigInt64: require('./2022/ToBigInt64'), + ToBigUint64: require('./2022/ToBigUint64'), + ToBoolean: require('./2022/ToBoolean'), + ToDateString: require('./2022/ToDateString'), + ToIndex: require('./2022/ToIndex'), + ToInt16: require('./2022/ToInt16'), + ToInt32: require('./2022/ToInt32'), + ToInt8: require('./2022/ToInt8'), + ToIntegerOrInfinity: require('./2022/ToIntegerOrInfinity'), + ToLength: require('./2022/ToLength'), + ToNumber: require('./2022/ToNumber'), + ToNumeric: require('./2022/ToNumeric'), + ToObject: require('./2022/ToObject'), + ToPrimitive: require('./2022/ToPrimitive'), + ToPropertyDescriptor: require('./2022/ToPropertyDescriptor'), + ToPropertyKey: require('./2022/ToPropertyKey'), + ToString: require('./2022/ToString'), + ToUint16: require('./2022/ToUint16'), + ToUint32: require('./2022/ToUint32'), + ToUint8: require('./2022/ToUint8'), + ToUint8Clamp: require('./2022/ToUint8Clamp'), + ToZeroPaddedDecimalString: require('./2022/ToZeroPaddedDecimalString'), + TrimString: require('./2022/TrimString'), + Type: require('./2022/Type'), + TypedArrayCreate: require('./2022/TypedArrayCreate'), + TypedArrayElementSize: require('./2022/TypedArrayElementSize'), + TypedArrayElementType: require('./2022/TypedArrayElementType'), + TypedArraySpeciesCreate: require('./2022/TypedArraySpeciesCreate'), + UnicodeEscape: require('./2022/UnicodeEscape'), + UTF16EncodeCodePoint: require('./2022/UTF16EncodeCodePoint'), + UTF16SurrogatePairToCodePoint: require('./2022/UTF16SurrogatePairToCodePoint'), + ValidateAndApplyPropertyDescriptor: require('./2022/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2022/ValidateAtomicAccess'), + ValidateIntegerTypedArray: require('./2022/ValidateIntegerTypedArray'), + ValidateTypedArray: require('./2022/ValidateTypedArray'), + WeakRefDeref: require('./2022/WeakRefDeref'), + WeekDay: require('./2022/WeekDay'), + WordCharacters: require('./2022/WordCharacters'), + YearFromTime: require('./2022/YearFromTime') +}; + +module.exports = ES2022; diff --git a/node_modules/es-abstract/es2023.js b/node_modules/es-abstract/es2023.js new file mode 100644 index 0000000000000..75fddd5bb721b --- /dev/null +++ b/node_modules/es-abstract/es2023.js @@ -0,0 +1,227 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/14.0/#sec-abstract-operations +var ES2023 = { + abs: require('./2023/abs'), + AddEntriesFromIterable: require('./2023/AddEntriesFromIterable'), + AddToKeptObjects: require('./2023/AddToKeptObjects'), + AdvanceStringIndex: require('./2023/AdvanceStringIndex'), + ApplyStringOrNumericBinaryOperator: require('./2023/ApplyStringOrNumericBinaryOperator'), + ArrayCreate: require('./2023/ArrayCreate'), + ArraySetLength: require('./2023/ArraySetLength'), + ArraySpeciesCreate: require('./2023/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2023/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2023/AsyncIteratorClose'), + BigInt: require('./2023/BigInt'), + BigIntBitwiseOp: require('./2023/BigIntBitwiseOp'), + BinaryAnd: require('./2023/BinaryAnd'), + BinaryOr: require('./2023/BinaryOr'), + BinaryXor: require('./2023/BinaryXor'), + ByteListBitwiseOp: require('./2023/ByteListBitwiseOp'), + ByteListEqual: require('./2023/ByteListEqual'), + Call: require('./2023/Call'), + CanBeHeldWeakly: require('./2023/CanBeHeldWeakly'), + Canonicalize: require('./2023/Canonicalize'), + CanonicalNumericIndexString: require('./2023/CanonicalNumericIndexString'), + CharacterRange: require('./2023/CharacterRange'), + clamp: require('./2023/clamp'), + ClearKeptObjects: require('./2023/ClearKeptObjects'), + CloneArrayBuffer: require('./2023/CloneArrayBuffer'), + CodePointAt: require('./2023/CodePointAt'), + CodePointsToString: require('./2023/CodePointsToString'), + CompareArrayElements: require('./2023/CompareArrayElements'), + CompareTypedArrayElements: require('./2023/CompareTypedArrayElements'), + CompletePropertyDescriptor: require('./2023/CompletePropertyDescriptor'), + CompletionRecord: require('./2023/CompletionRecord'), + CopyDataProperties: require('./2023/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2023/CreateAsyncFromSyncIterator'), + CreateDataProperty: require('./2023/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2023/CreateDataPropertyOrThrow'), + CreateHTML: require('./2023/CreateHTML'), + CreateIterResultObject: require('./2023/CreateIterResultObject'), + CreateListFromArrayLike: require('./2023/CreateListFromArrayLike'), + CreateMethodProperty: require('./2023/CreateMethodProperty'), + CreateNonEnumerableDataPropertyOrThrow: require('./2023/CreateNonEnumerableDataPropertyOrThrow'), + CreateRegExpStringIterator: require('./2023/CreateRegExpStringIterator'), + DateFromTime: require('./2023/DateFromTime'), + DateString: require('./2023/DateString'), + Day: require('./2023/Day'), + DayFromYear: require('./2023/DayFromYear'), + DaysInYear: require('./2023/DaysInYear'), + DayWithinYear: require('./2023/DayWithinYear'), + DefinePropertyOrThrow: require('./2023/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2023/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2023/DetachArrayBuffer'), + EnumerableOwnProperties: require('./2023/EnumerableOwnProperties'), + FindViaPredicate: require('./2023/FindViaPredicate'), + FlattenIntoArray: require('./2023/FlattenIntoArray'), + floor: require('./2023/floor'), + FromPropertyDescriptor: require('./2023/FromPropertyDescriptor'), + Get: require('./2023/Get'), + GetGlobalObject: require('./2023/GetGlobalObject'), + GetIterator: require('./2023/GetIterator'), + GetIteratorFromMethod: require('./2023/GetIteratorFromMethod'), + GetMatchIndexPair: require('./2023/GetMatchIndexPair'), + GetMatchString: require('./2023/GetMatchString'), + GetMethod: require('./2023/GetMethod'), + GetOwnPropertyKeys: require('./2023/GetOwnPropertyKeys'), + GetPromiseResolve: require('./2023/GetPromiseResolve'), + GetPrototypeFromConstructor: require('./2023/GetPrototypeFromConstructor'), + GetStringIndex: require('./2023/GetStringIndex'), + GetSubstitution: require('./2023/GetSubstitution'), + GetV: require('./2023/GetV'), + GetValueFromBuffer: require('./2023/GetValueFromBuffer'), + HasOwnProperty: require('./2023/HasOwnProperty'), + HasProperty: require('./2023/HasProperty'), + HourFromTime: require('./2023/HourFromTime'), + InLeapYear: require('./2023/InLeapYear'), + InstallErrorCause: require('./2023/InstallErrorCause'), + InstanceofOperator: require('./2023/InstanceofOperator'), + Invoke: require('./2023/Invoke'), + IsAccessorDescriptor: require('./2023/IsAccessorDescriptor'), + IsArray: require('./2023/IsArray'), + IsBigIntElementType: require('./2023/IsBigIntElementType'), + IsCallable: require('./2023/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2023/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2023/IsConcatSpreadable'), + IsConstructor: require('./2023/IsConstructor'), + IsDataDescriptor: require('./2023/IsDataDescriptor'), + IsDetachedBuffer: require('./2023/IsDetachedBuffer'), + IsExtensible: require('./2023/IsExtensible'), + IsGenericDescriptor: require('./2023/IsGenericDescriptor'), + IsIntegralNumber: require('./2023/IsIntegralNumber'), + IsLessThan: require('./2023/IsLessThan'), + IsLooselyEqual: require('./2023/IsLooselyEqual'), + IsNoTearConfiguration: require('./2023/IsNoTearConfiguration'), + IsPromise: require('./2023/IsPromise'), + IsPropertyKey: require('./2023/IsPropertyKey'), + IsRegExp: require('./2023/IsRegExp'), + IsSharedArrayBuffer: require('./2023/IsSharedArrayBuffer'), + IsStrictlyEqual: require('./2023/IsStrictlyEqual'), + IsStringWellFormedUnicode: require('./2023/IsStringWellFormedUnicode'), + IsUnclampedIntegerElementType: require('./2023/IsUnclampedIntegerElementType'), + IsUnsignedElementType: require('./2023/IsUnsignedElementType'), + IsValidIntegerIndex: require('./2023/IsValidIntegerIndex'), + IsWordChar: require('./2023/IsWordChar'), + IteratorClose: require('./2023/IteratorClose'), + IteratorComplete: require('./2023/IteratorComplete'), + IteratorNext: require('./2023/IteratorNext'), + IteratorStep: require('./2023/IteratorStep'), + IteratorToList: require('./2023/IteratorToList'), + IteratorValue: require('./2023/IteratorValue'), + KeyForSymbol: require('./2023/KeyForSymbol'), + LengthOfArrayLike: require('./2023/LengthOfArrayLike'), + MakeDate: require('./2023/MakeDate'), + MakeDay: require('./2023/MakeDay'), + MakeMatchIndicesIndexPairArray: require('./2023/MakeMatchIndicesIndexPairArray'), + MakeTime: require('./2023/MakeTime'), + max: require('./2023/max'), + min: require('./2023/min'), + MinFromTime: require('./2023/MinFromTime'), + modulo: require('./2023/modulo'), + MonthFromTime: require('./2023/MonthFromTime'), + msFromTime: require('./2023/msFromTime'), + NewPromiseCapability: require('./2023/NewPromiseCapability'), + NormalCompletion: require('./2023/NormalCompletion'), + Number: require('./2023/Number'), + NumberBitwiseOp: require('./2023/NumberBitwiseOp'), + NumberToBigInt: require('./2023/NumberToBigInt'), + NumericToRawBytes: require('./2023/NumericToRawBytes'), + ObjectDefineProperties: require('./2023/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2023/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2023/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2023/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2023/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2023/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2023/OrdinaryHasProperty'), + OrdinaryObjectCreate: require('./2023/OrdinaryObjectCreate'), + OrdinarySetPrototypeOf: require('./2023/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2023/OrdinaryToPrimitive'), + ParseHexOctet: require('./2023/ParseHexOctet'), + PromiseResolve: require('./2023/PromiseResolve'), + QuoteJSONString: require('./2023/QuoteJSONString'), + RawBytesToNumeric: require('./2023/RawBytesToNumeric'), + RegExpCreate: require('./2023/RegExpCreate'), + RegExpExec: require('./2023/RegExpExec'), + RegExpHasFlag: require('./2023/RegExpHasFlag'), + RequireObjectCoercible: require('./2023/RequireObjectCoercible'), + SameValue: require('./2023/SameValue'), + SameValueNonNumber: require('./2023/SameValueNonNumber'), + SameValueZero: require('./2023/SameValueZero'), + SecFromTime: require('./2023/SecFromTime'), + Set: require('./2023/Set'), + SetFunctionLength: require('./2023/SetFunctionLength'), + SetFunctionName: require('./2023/SetFunctionName'), + SetIntegrityLevel: require('./2023/SetIntegrityLevel'), + SetTypedArrayFromArrayLike: require('./2023/SetTypedArrayFromArrayLike'), + SetTypedArrayFromTypedArray: require('./2023/SetTypedArrayFromTypedArray'), + SetValueInBuffer: require('./2023/SetValueInBuffer'), + SortIndexedProperties: require('./2023/SortIndexedProperties'), + SpeciesConstructor: require('./2023/SpeciesConstructor'), + StringCreate: require('./2023/StringCreate'), + StringGetOwnProperty: require('./2023/StringGetOwnProperty'), + StringIndexOf: require('./2023/StringIndexOf'), + StringPad: require('./2023/StringPad'), + StringToBigInt: require('./2023/StringToBigInt'), + StringToCodePoints: require('./2023/StringToCodePoints'), + StringToNumber: require('./2023/StringToNumber'), + substring: require('./2023/substring'), + SymbolDescriptiveString: require('./2023/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2023/TestIntegrityLevel'), + thisBigIntValue: require('./2023/thisBigIntValue'), + thisBooleanValue: require('./2023/thisBooleanValue'), + thisNumberValue: require('./2023/thisNumberValue'), + thisStringValue: require('./2023/thisStringValue'), + thisSymbolValue: require('./2023/thisSymbolValue'), + thisTimeValue: require('./2023/thisTimeValue'), + ThrowCompletion: require('./2023/ThrowCompletion'), + TimeClip: require('./2023/TimeClip'), + TimeFromYear: require('./2023/TimeFromYear'), + TimeString: require('./2023/TimeString'), + TimeWithinDay: require('./2023/TimeWithinDay'), + ToBigInt: require('./2023/ToBigInt'), + ToBigInt64: require('./2023/ToBigInt64'), + ToBigUint64: require('./2023/ToBigUint64'), + ToBoolean: require('./2023/ToBoolean'), + ToDateString: require('./2023/ToDateString'), + ToIndex: require('./2023/ToIndex'), + ToInt16: require('./2023/ToInt16'), + ToInt32: require('./2023/ToInt32'), + ToInt8: require('./2023/ToInt8'), + ToIntegerOrInfinity: require('./2023/ToIntegerOrInfinity'), + ToLength: require('./2023/ToLength'), + ToNumber: require('./2023/ToNumber'), + ToNumeric: require('./2023/ToNumeric'), + ToObject: require('./2023/ToObject'), + ToPrimitive: require('./2023/ToPrimitive'), + ToPropertyDescriptor: require('./2023/ToPropertyDescriptor'), + ToPropertyKey: require('./2023/ToPropertyKey'), + ToString: require('./2023/ToString'), + ToUint16: require('./2023/ToUint16'), + ToUint32: require('./2023/ToUint32'), + ToUint8: require('./2023/ToUint8'), + ToUint8Clamp: require('./2023/ToUint8Clamp'), + ToZeroPaddedDecimalString: require('./2023/ToZeroPaddedDecimalString'), + TrimString: require('./2023/TrimString'), + truncate: require('./2023/truncate'), + Type: require('./2023/Type'), + TypedArrayCreate: require('./2023/TypedArrayCreate'), + TypedArrayCreateSameType: require('./2023/TypedArrayCreateSameType'), + TypedArrayElementSize: require('./2023/TypedArrayElementSize'), + TypedArrayElementType: require('./2023/TypedArrayElementType'), + TypedArraySpeciesCreate: require('./2023/TypedArraySpeciesCreate'), + UnicodeEscape: require('./2023/UnicodeEscape'), + UTF16EncodeCodePoint: require('./2023/UTF16EncodeCodePoint'), + UTF16SurrogatePairToCodePoint: require('./2023/UTF16SurrogatePairToCodePoint'), + ValidateAndApplyPropertyDescriptor: require('./2023/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2023/ValidateAtomicAccess'), + ValidateIntegerTypedArray: require('./2023/ValidateIntegerTypedArray'), + ValidateTypedArray: require('./2023/ValidateTypedArray'), + WeakRefDeref: require('./2023/WeakRefDeref'), + WeekDay: require('./2023/WeekDay'), + WordCharacters: require('./2023/WordCharacters'), + YearFromTime: require('./2023/YearFromTime') +}; + +module.exports = ES2023; diff --git a/node_modules/es-abstract/es5.js b/node_modules/es-abstract/es5.js new file mode 100644 index 0000000000000..3cb42988c99d7 --- /dev/null +++ b/node_modules/es-abstract/es5.js @@ -0,0 +1,52 @@ +'use strict'; + +/* eslint global-require: 0 */ + +// https://es5.github.io/#x9 +module.exports = { + 'Abstract Equality Comparison': require('./5/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./5/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./5/StrictEqualityComparison'), + abs: require('./5/abs'), + Canonicalize: require('./5/Canonicalize'), + CheckObjectCoercible: require('./5/CheckObjectCoercible'), + DateFromTime: require('./5/DateFromTime'), + Day: require('./5/Day'), + DayFromYear: require('./5/DayFromYear'), + DaysInYear: require('./5/DaysInYear'), + DayWithinYear: require('./5/DayWithinYear'), + floor: require('./5/floor'), + FromPropertyDescriptor: require('./5/FromPropertyDescriptor'), + HourFromTime: require('./5/HourFromTime'), + InLeapYear: require('./5/InLeapYear'), + IsAccessorDescriptor: require('./5/IsAccessorDescriptor'), + IsCallable: require('./5/IsCallable'), + IsDataDescriptor: require('./5/IsDataDescriptor'), + IsGenericDescriptor: require('./5/IsGenericDescriptor'), + IsPropertyDescriptor: require('./5/IsPropertyDescriptor'), + MakeDate: require('./5/MakeDate'), + MakeDay: require('./5/MakeDay'), + MakeTime: require('./5/MakeTime'), + MinFromTime: require('./5/MinFromTime'), + modulo: require('./5/modulo'), + MonthFromTime: require('./5/MonthFromTime'), + msFromTime: require('./5/msFromTime'), + SameValue: require('./5/SameValue'), + SecFromTime: require('./5/SecFromTime'), + TimeClip: require('./5/TimeClip'), + TimeFromYear: require('./5/TimeFromYear'), + TimeWithinDay: require('./5/TimeWithinDay'), + ToBoolean: require('./5/ToBoolean'), + ToInt32: require('./5/ToInt32'), + ToInteger: require('./5/ToInteger'), + ToNumber: require('./5/ToNumber'), + ToObject: require('./5/ToObject'), + ToPrimitive: require('./5/ToPrimitive'), + ToPropertyDescriptor: require('./5/ToPropertyDescriptor'), + ToString: require('./5/ToString'), + ToUint16: require('./5/ToUint16'), + ToUint32: require('./5/ToUint32'), + Type: require('./5/Type'), + WeekDay: require('./5/WeekDay'), + YearFromTime: require('./5/YearFromTime') +}; diff --git a/node_modules/es-abstract/es6.js b/node_modules/es-abstract/es6.js new file mode 100644 index 0000000000000..2d1f4dc927a90 --- /dev/null +++ b/node_modules/es-abstract/es6.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2015'); diff --git a/node_modules/es-abstract/es7.js b/node_modules/es-abstract/es7.js new file mode 100644 index 0000000000000..f2f15c0a88712 --- /dev/null +++ b/node_modules/es-abstract/es7.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2016'); diff --git a/node_modules/es-abstract/helpers/DefineOwnProperty.js b/node_modules/es-abstract/helpers/DefineOwnProperty.js new file mode 100644 index 0000000000000..61e83716e6701 --- /dev/null +++ b/node_modules/es-abstract/helpers/DefineOwnProperty.js @@ -0,0 +1,55 @@ +'use strict'; + +var hasPropertyDescriptors = require('has-property-descriptors'); + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true); + +var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + +// eslint-disable-next-line global-require +var isArray = hasArrayLengthDefineBug && require('../helpers/IsArray'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +// eslint-disable-next-line max-params +module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) { + if (!$defineProperty) { + if (!IsDataDescriptor(desc)) { + // ES3 does not support getters/setters + return false; + } + if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) { + return false; + } + + // fallback for ES3 + if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) { + // a non-enumerable existing property + return false; + } + + // property does not exist at all, or exists but is enumerable + var V = desc['[[Value]]']; + // eslint-disable-next-line no-param-reassign + O[P] = V; // will use [[Define]] + return SameValue(O[P], V); + } + if ( + hasArrayLengthDefineBug + && P === 'length' + && '[[Value]]' in desc + && isArray(O) + && O.length !== desc['[[Value]]'] + ) { + // eslint-disable-next-line no-param-reassign + O.length = desc['[[Value]]']; + return O.length === desc['[[Value]]']; + } + + $defineProperty(O, P, FromPropertyDescriptor(desc)); + return true; +}; diff --git a/node_modules/es-abstract/helpers/IsArray.js b/node_modules/es-abstract/helpers/IsArray.js new file mode 100644 index 0000000000000..26b52fb4bfc5e --- /dev/null +++ b/node_modules/es-abstract/helpers/IsArray.js @@ -0,0 +1,12 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Array = GetIntrinsic('%Array%'); + +// eslint-disable-next-line global-require +var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString'); + +module.exports = $Array.isArray || function IsArray(argument) { + return toStr(argument) === '[object Array]'; +}; diff --git a/node_modules/es-abstract/helpers/OwnPropertyKeys.js b/node_modules/es-abstract/helpers/OwnPropertyKeys.js new file mode 100644 index 0000000000000..6baa986fb4b90 --- /dev/null +++ b/node_modules/es-abstract/helpers/OwnPropertyKeys.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBind = require('call-bind'); +var callBound = require('call-bind/callBound'); + +var $ownKeys = GetIntrinsic('%Reflect.ownKeys%', true); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = $SymbolValueOf ? GetIntrinsic('%Object.getOwnPropertySymbols%') : null; + +var keys = require('object-keys'); + +module.exports = $ownKeys || function OwnPropertyKeys(source) { + var ownKeys = ($gOPN || keys)(source); + if ($gOPS) { + $pushApply(ownKeys, $gOPS(source)); + } + return ownKeys; +}; diff --git a/node_modules/es-abstract/helpers/assertRecord.js b/node_modules/es-abstract/helpers/assertRecord.js new file mode 100644 index 0000000000000..d715c9c7f295b --- /dev/null +++ b/node_modules/es-abstract/helpers/assertRecord.js @@ -0,0 +1,87 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var hasOwn = require('hasown'); +var isInteger = require('./isInteger'); + +var isMatchRecord = require('./isMatchRecord'); + +var predicates = { + // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type + 'Property Descriptor': function isPropertyDescriptor(Desc) { + var allowed = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true + }; + + if (!Desc) { + return false; + } + for (var key in Desc) { // eslint-disable-line + if (hasOwn(Desc, key) && !allowed[key]) { + return false; + } + } + + var isData = hasOwn(Desc, '[[Value]]'); + var IsAccessor = hasOwn(Desc, '[[Get]]') || hasOwn(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; + }, + // https://262.ecma-international.org/13.0/#sec-match-records + 'Match Record': isMatchRecord, + 'Iterator Record': function isIteratorRecord(value) { + return hasOwn(value, '[[Iterator]]') && hasOwn(value, '[[NextMethod]]') && hasOwn(value, '[[Done]]'); + }, + 'PromiseCapability Record': function isPromiseCapabilityRecord(value) { + return !!value + && hasOwn(value, '[[Resolve]]') + && typeof value['[[Resolve]]'] === 'function' + && hasOwn(value, '[[Reject]]') + && typeof value['[[Reject]]'] === 'function' + && hasOwn(value, '[[Promise]]') + && value['[[Promise]]'] + && typeof value['[[Promise]]'].then === 'function'; + }, + 'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) { + return !!value + && hasOwn(value, '[[Completion]]') // TODO: confirm is a completion record + && hasOwn(value, '[[Capability]]') + && predicates['PromiseCapability Record'](value['[[Capability]]']); + }, + 'RegExp Record': function isRegExpRecord(value) { + return value + && hasOwn(value, '[[IgnoreCase]]') + && typeof value['[[IgnoreCase]]'] === 'boolean' + && hasOwn(value, '[[Multiline]]') + && typeof value['[[Multiline]]'] === 'boolean' + && hasOwn(value, '[[DotAll]]') + && typeof value['[[DotAll]]'] === 'boolean' + && hasOwn(value, '[[Unicode]]') + && typeof value['[[Unicode]]'] === 'boolean' + && hasOwn(value, '[[CapturingGroupsCount]]') + && typeof value['[[CapturingGroupsCount]]'] === 'number' + && isInteger(value['[[CapturingGroupsCount]]']) + && value['[[CapturingGroupsCount]]'] >= 0; + } +}; + +module.exports = function assertRecord(Type, recordType, argumentName, value) { + var predicate = predicates[recordType]; + if (typeof predicate !== 'function') { + throw new $SyntaxError('unknown record type: ' + recordType); + } + if (Type(value) !== 'Object' || !predicate(value)) { + throw new $TypeError(argumentName + ' must be a ' + recordType); + } +}; diff --git a/node_modules/es-abstract/helpers/assign.js b/node_modules/es-abstract/helpers/assign.js new file mode 100644 index 0000000000000..1e63a30de0c6d --- /dev/null +++ b/node_modules/es-abstract/helpers/assign.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); + +var $assign = GetIntrinsic('%Object.assign%', true); + +module.exports = function assign(target, source) { + if ($assign) { + return $assign(target, source); + } + + // eslint-disable-next-line no-restricted-syntax + for (var key in source) { + if (hasOwn(source, key)) { + // eslint-disable-next-line no-param-reassign + target[key] = source[key]; + } + } + return target; +}; diff --git a/node_modules/es-abstract/helpers/bytesAsFloat32.js b/node_modules/es-abstract/helpers/bytesAsFloat32.js new file mode 100644 index 0000000000000..2e2cdcb1aba9d --- /dev/null +++ b/node_modules/es-abstract/helpers/bytesAsFloat32.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $pow = GetIntrinsic('%Math.pow%'); + +module.exports = function bytesAsFloat32(rawBytes) { + // return new Float32Array(new Uint8Array(rawBytes).buffer)[0]; + + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[3] & 0x80 ? -1 : 1; // Check the sign bit + var exponent = ((rawBytes[3] & 0x7F) << 1) + | (rawBytes[2] >> 7); // Combine bits for exponent + var mantissa = ((rawBytes[2] & 0x7F) << 16) + | (rawBytes[1] << 8) + | rawBytes[0]; // Combine bits for mantissa + + if (exponent === 0 && mantissa === 0) { + return sign === 1 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 1 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + if (exponent === -127) { + return sign * mantissa * $pow(2, -126 - 23); + } + return sign * (1 + (mantissa * $pow(2, -23))) * $pow(2, exponent); +}; diff --git a/node_modules/es-abstract/helpers/bytesAsFloat64.js b/node_modules/es-abstract/helpers/bytesAsFloat64.js new file mode 100644 index 0000000000000..675c5b6d81ccf --- /dev/null +++ b/node_modules/es-abstract/helpers/bytesAsFloat64.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $pow = GetIntrinsic('%Math.pow%'); + +module.exports = function bytesAsFloat64(rawBytes) { + // return new Float64Array(new Uint8Array(rawBytes).buffer)[0]; + + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + // Handle subnormal numbers + if (exponent === -1023) { + return sign * mantissa * 5e-324; // $pow(2, -1022 - 52) + } + + return sign * (1 + (mantissa / 0x10000000000000)) * $pow(2, exponent); +}; diff --git a/node_modules/es-abstract/helpers/bytesAsInteger.js b/node_modules/es-abstract/helpers/bytesAsInteger.js new file mode 100644 index 0000000000000..bae4bef2d44b8 --- /dev/null +++ b/node_modules/es-abstract/helpers/bytesAsInteger.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $pow = GetIntrinsic('%Math.pow%'); +var $Number = GetIntrinsic('%Number%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +module.exports = function bytesAsInteger(rawBytes, elementSize, isUnsigned, isBigInt) { + var Z = isBigInt ? $BigInt : $Number; + + // this is common to both branches + var intValue = Z(0); + for (var i = 0; i < rawBytes.length; i++) { + intValue += Z(rawBytes[i]) * Z($pow(2, 8 * i)); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if (!isUnsigned) { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + + if (rawBytes[elementSize - 1] & 0x80) { + intValue -= Z($pow(2, bitLength)); + } + } + + return intValue; // step 7 +}; diff --git a/node_modules/es-abstract/helpers/callBind.js b/node_modules/es-abstract/helpers/callBind.js new file mode 100644 index 0000000000000..699dba7062bd9 --- /dev/null +++ b/node_modules/es-abstract/helpers/callBind.js @@ -0,0 +1,5 @@ +'use strict'; + +// TODO; semver-major: remove + +module.exports = require('call-bind'); diff --git a/node_modules/es-abstract/helpers/callBound.js b/node_modules/es-abstract/helpers/callBound.js new file mode 100644 index 0000000000000..349030cbc9603 --- /dev/null +++ b/node_modules/es-abstract/helpers/callBound.js @@ -0,0 +1,5 @@ +'use strict'; + +// TODO; semver-major: remove + +module.exports = require('call-bind/callBound'); diff --git a/node_modules/es-abstract/helpers/caseFolding.json b/node_modules/es-abstract/helpers/caseFolding.json new file mode 100644 index 0000000000000..1f8383511e4b9 --- /dev/null +++ b/node_modules/es-abstract/helpers/caseFolding.json @@ -0,0 +1,1430 @@ +{ + "C": { + "a": "A", + "b": "B", + "c": "C", + "d": "D", + "e": "E", + "f": "F", + "g": "G", + "h": "H", + "i": "I", + "j": "J", + "k": "K", + "l": "L", + "m": "M", + "n": "N", + "o": "O", + "p": "P", + "q": "Q", + "r": "R", + "s": "ſ", + "t": "T", + "u": "U", + "v": "V", + "w": "W", + "x": "X", + "y": "Y", + "z": "Z", + "μ": "Μ", + "à": "À", + "á": "Á", + "â": "Â", + "ã": "Ã", + "ä": "Ä", + "å": "Å", + "æ": "Æ", + "ç": "Ç", + "è": "È", + "é": "É", + "ê": "Ê", + "ë": "Ë", + "ì": "Ì", + "í": "Í", + "î": "Î", + "ï": "Ï", + "ð": "Ð", + "ñ": "Ñ", + "ò": "Ò", + "ó": "Ó", + "ô": "Ô", + "õ": "Õ", + "ö": "Ö", + "ø": "Ø", + "ù": "Ù", + "ú": "Ú", + "û": "Û", + "ü": "Ü", + "ý": "Ý", + "þ": "Þ", + "ā": "Ā", + "ă": "Ă", + "ą": "Ą", + "ć": "Ć", + "ĉ": "Ĉ", + "ċ": "Ċ", + "č": "Č", + "ď": "Ď", + "đ": "Đ", + "ē": "Ē", + "ĕ": "Ĕ", + "ė": "Ė", + "ę": "Ę", + "ě": "Ě", + "ĝ": "Ĝ", + "ğ": "Ğ", + "ġ": "Ġ", + "ģ": "Ģ", + "ĥ": "Ĥ", + "ħ": "Ħ", + "ĩ": "Ĩ", + "ī": "Ī", + "ĭ": "Ĭ", + "į": "Į", + "ij": "IJ", + "ĵ": "Ĵ", + "ķ": "Ķ", + "ĺ": "Ĺ", + "ļ": "Ļ", + "ľ": "Ľ", + "ŀ": "Ŀ", + "ł": "Ł", + "ń": "Ń", + "ņ": "Ņ", + "ň": "Ň", + "ŋ": "Ŋ", + "ō": "Ō", + "ŏ": "Ŏ", + "ő": "Ő", + "œ": "Œ", + "ŕ": "Ŕ", + "ŗ": "Ŗ", + "ř": "Ř", + "ś": "Ś", + "ŝ": "Ŝ", + "ş": "Ş", + "š": "Š", + "ţ": "Ţ", + "ť": "Ť", + "ŧ": "Ŧ", + "ũ": "Ũ", + "ū": "Ū", + "ŭ": "Ŭ", + "ů": "Ů", + "ű": "Ű", + "ų": "Ų", + "ŵ": "Ŵ", + "ŷ": "Ŷ", + "ÿ": "Ÿ", + "ź": "Ź", + "ż": "Ż", + "ž": "Ž", + "ɓ": "Ɓ", + "ƃ": "Ƃ", + "ƅ": "Ƅ", + "ɔ": "Ɔ", + "ƈ": "Ƈ", + "ɖ": "Ɖ", + "ɗ": "Ɗ", + "ƌ": "Ƌ", + "ǝ": "Ǝ", + "ə": "Ə", + "ɛ": "Ɛ", + "ƒ": "Ƒ", + "ɠ": "Ɠ", + "ɣ": "Ɣ", + "ɩ": "Ɩ", + "ɨ": "Ɨ", + "ƙ": "Ƙ", + "ɯ": "Ɯ", + "ɲ": "Ɲ", + "ɵ": "Ɵ", + "ơ": "Ơ", + "ƣ": "Ƣ", + "ƥ": "Ƥ", + "ʀ": "Ʀ", + "ƨ": "Ƨ", + "ʃ": "Ʃ", + "ƭ": "Ƭ", + "ʈ": "Ʈ", + "ư": "Ư", + "ʊ": "Ʊ", + "ʋ": "Ʋ", + "ƴ": "Ƴ", + "ƶ": "Ƶ", + "ʒ": "Ʒ", + "ƹ": "Ƹ", + "ƽ": "Ƽ", + "dž": "Dž", + "lj": "Lj", + "nj": "Nj", + "ǎ": "Ǎ", + "ǐ": "Ǐ", + "ǒ": "Ǒ", + "ǔ": "Ǔ", + "ǖ": "Ǖ", + "ǘ": "Ǘ", + "ǚ": "Ǚ", + "ǜ": "Ǜ", + "ǟ": "Ǟ", + "ǡ": "Ǡ", + "ǣ": "Ǣ", + "ǥ": "Ǥ", + "ǧ": "Ǧ", + "ǩ": "Ǩ", + "ǫ": "Ǫ", + "ǭ": "Ǭ", + "ǯ": "Ǯ", + "dz": "Dz", + "ǵ": "Ǵ", + "ƕ": "Ƕ", + "ƿ": "Ƿ", + "ǹ": "Ǹ", + "ǻ": "Ǻ", + "ǽ": "Ǽ", + "ǿ": "Ǿ", + "ȁ": "Ȁ", + "ȃ": "Ȃ", + "ȅ": "Ȅ", + "ȇ": "Ȇ", + "ȉ": "Ȉ", + "ȋ": "Ȋ", + "ȍ": "Ȍ", + "ȏ": "Ȏ", + "ȑ": "Ȑ", + "ȓ": "Ȓ", + "ȕ": "Ȕ", + "ȗ": "Ȗ", + "ș": "Ș", + "ț": "Ț", + "ȝ": "Ȝ", + "ȟ": "Ȟ", + "ƞ": "Ƞ", + "ȣ": "Ȣ", + "ȥ": "Ȥ", + "ȧ": "Ȧ", + "ȩ": "Ȩ", + "ȫ": "Ȫ", + "ȭ": "Ȭ", + "ȯ": "Ȯ", + "ȱ": "Ȱ", + "ȳ": "Ȳ", + "ⱥ": "Ⱥ", + "ȼ": "Ȼ", + "ƚ": "Ƚ", + "ⱦ": "Ⱦ", + "ɂ": "Ɂ", + "ƀ": "Ƀ", + "ʉ": "Ʉ", + "ʌ": "Ʌ", + "ɇ": "Ɇ", + "ɉ": "Ɉ", + "ɋ": "Ɋ", + "ɍ": "Ɍ", + "ɏ": "Ɏ", + "ι": "ι", + "ͱ": "Ͱ", + "ͳ": "Ͳ", + "ͷ": "Ͷ", + "ϳ": "Ϳ", + "ά": "Ά", + "έ": "Έ", + "ή": "Ή", + "ί": "Ί", + "ό": "Ό", + "ύ": "Ύ", + "ώ": "Ώ", + "α": "Α", + "β": "ϐ", + "γ": "Γ", + "δ": "Δ", + "ε": "ϵ", + "ζ": "Ζ", + "η": "Η", + "θ": "ϴ", + "κ": "ϰ", + "λ": "Λ", + "ν": "Ν", + "ξ": "Ξ", + "ο": "Ο", + "π": "ϖ", + "ρ": "ϱ", + "σ": "ς", + "τ": "Τ", + "υ": "Υ", + "φ": "ϕ", + "χ": "Χ", + "ψ": "Ψ", + "ω": "Ω", + "ϊ": "Ϊ", + "ϋ": "Ϋ", + "ϗ": "Ϗ", + "ϙ": "Ϙ", + "ϛ": "Ϛ", + "ϝ": "Ϝ", + "ϟ": "Ϟ", + "ϡ": "Ϡ", + "ϣ": "Ϣ", + "ϥ": "Ϥ", + "ϧ": "Ϧ", + "ϩ": "Ϩ", + "ϫ": "Ϫ", + "ϭ": "Ϭ", + "ϯ": "Ϯ", + "ϸ": "Ϸ", + "ϲ": "Ϲ", + "ϻ": "Ϻ", + "ͻ": "Ͻ", + "ͼ": "Ͼ", + "ͽ": "Ͽ", + "ѐ": "Ѐ", + "ё": "Ё", + "ђ": "Ђ", + "ѓ": "Ѓ", + "є": "Є", + "ѕ": "Ѕ", + "і": "І", + "ї": "Ї", + "ј": "Ј", + "љ": "Љ", + "њ": "Њ", + "ћ": "Ћ", + "ќ": "Ќ", + "ѝ": "Ѝ", + "ў": "Ў", + "џ": "Џ", + "а": "А", + "б": "Б", + "в": "ᲀ", + "г": "Г", + "д": "ᲁ", + "е": "Е", + "ж": "Ж", + "з": "З", + "и": "И", + "й": "Й", + "к": "К", + "л": "Л", + "м": "М", + "н": "Н", + "о": "ᲂ", + "п": "П", + "р": "Р", + "с": "ᲃ", + "т": "ᲅ", + "у": "У", + "ф": "Ф", + "х": "Х", + "ц": "Ц", + "ч": "Ч", + "ш": "Ш", + "щ": "Щ", + "ъ": "ᲆ", + "ы": "Ы", + "ь": "Ь", + "э": "Э", + "ю": "Ю", + "я": "Я", + "ѡ": "Ѡ", + "ѣ": "ᲇ", + "ѥ": "Ѥ", + "ѧ": "Ѧ", + "ѩ": "Ѩ", + "ѫ": "Ѫ", + "ѭ": "Ѭ", + "ѯ": "Ѯ", + "ѱ": "Ѱ", + "ѳ": "Ѳ", + "ѵ": "Ѵ", + "ѷ": "Ѷ", + "ѹ": "Ѹ", + "ѻ": "Ѻ", + "ѽ": "Ѽ", + "ѿ": "Ѿ", + "ҁ": "Ҁ", + "ҋ": "Ҋ", + "ҍ": "Ҍ", + "ҏ": "Ҏ", + "ґ": "Ґ", + "ғ": "Ғ", + "ҕ": "Ҕ", + "җ": "Җ", + "ҙ": "Ҙ", + "қ": "Қ", + "ҝ": "Ҝ", + "ҟ": "Ҟ", + "ҡ": "Ҡ", + "ң": "Ң", + "ҥ": "Ҥ", + "ҧ": "Ҧ", + "ҩ": "Ҩ", + "ҫ": "Ҫ", + "ҭ": "Ҭ", + "ү": "Ү", + "ұ": "Ұ", + "ҳ": "Ҳ", + "ҵ": "Ҵ", + "ҷ": "Ҷ", + "ҹ": "Ҹ", + "һ": "Һ", + "ҽ": "Ҽ", + "ҿ": "Ҿ", + "ӏ": "Ӏ", + "ӂ": "Ӂ", + "ӄ": "Ӄ", + "ӆ": "Ӆ", + "ӈ": "Ӈ", + "ӊ": "Ӊ", + "ӌ": "Ӌ", + "ӎ": "Ӎ", + "ӑ": "Ӑ", + "ӓ": "Ӓ", + "ӕ": "Ӕ", + "ӗ": "Ӗ", + "ә": "Ә", + "ӛ": "Ӛ", + "ӝ": "Ӝ", + "ӟ": "Ӟ", + "ӡ": "Ӡ", + "ӣ": "Ӣ", + "ӥ": "Ӥ", + "ӧ": "Ӧ", + "ө": "Ө", + "ӫ": "Ӫ", + "ӭ": "Ӭ", + "ӯ": "Ӯ", + "ӱ": "Ӱ", + "ӳ": "Ӳ", + "ӵ": "Ӵ", + "ӷ": "Ӷ", + "ӹ": "Ӹ", + "ӻ": "Ӻ", + "ӽ": "Ӽ", + "ӿ": "Ӿ", + "ԁ": "Ԁ", + "ԃ": "Ԃ", + "ԅ": "Ԅ", + "ԇ": "Ԇ", + "ԉ": "Ԉ", + "ԋ": "Ԋ", + "ԍ": "Ԍ", + "ԏ": "Ԏ", + "ԑ": "Ԑ", + "ԓ": "Ԓ", + "ԕ": "Ԕ", + "ԗ": "Ԗ", + "ԙ": "Ԙ", + "ԛ": "Ԛ", + "ԝ": "Ԝ", + "ԟ": "Ԟ", + "ԡ": "Ԡ", + "ԣ": "Ԣ", + "ԥ": "Ԥ", + "ԧ": "Ԧ", + "ԩ": "Ԩ", + "ԫ": "Ԫ", + "ԭ": "Ԭ", + "ԯ": "Ԯ", + "ա": "Ա", + "բ": "Բ", + "գ": "Գ", + "դ": "Դ", + "ե": "Ե", + "զ": "Զ", + "է": "Է", + "ը": "Ը", + "թ": "Թ", + "ժ": "Ժ", + "ի": "Ի", + "լ": "Լ", + "խ": "Խ", + "ծ": "Ծ", + "կ": "Կ", + "հ": "Հ", + "ձ": "Ձ", + "ղ": "Ղ", + "ճ": "Ճ", + "մ": "Մ", + "յ": "Յ", + "ն": "Ն", + "շ": "Շ", + "ո": "Ո", + "չ": "Չ", + "պ": "Պ", + "ջ": "Ջ", + "ռ": "Ռ", + "ս": "Ս", + "վ": "Վ", + "տ": "Տ", + "ր": "Ր", + "ց": "Ց", + "ւ": "Ւ", + "փ": "Փ", + "ք": "Ք", + "օ": "Օ", + "ֆ": "Ֆ", + "ⴀ": "Ⴀ", + "ⴁ": "Ⴁ", + "ⴂ": "Ⴂ", + "ⴃ": "Ⴃ", + "ⴄ": "Ⴄ", + "ⴅ": "Ⴅ", + "ⴆ": "Ⴆ", + "ⴇ": "Ⴇ", + "ⴈ": "Ⴈ", + "ⴉ": "Ⴉ", + "ⴊ": "Ⴊ", + "ⴋ": "Ⴋ", + "ⴌ": "Ⴌ", + "ⴍ": "Ⴍ", + "ⴎ": "Ⴎ", + "ⴏ": "Ⴏ", + "ⴐ": "Ⴐ", + "ⴑ": "Ⴑ", + "ⴒ": "Ⴒ", + "ⴓ": "Ⴓ", + "ⴔ": "Ⴔ", + "ⴕ": "Ⴕ", + "ⴖ": "Ⴖ", + "ⴗ": "Ⴗ", + "ⴘ": "Ⴘ", + "ⴙ": "Ⴙ", + "ⴚ": "Ⴚ", + "ⴛ": "Ⴛ", + "ⴜ": "Ⴜ", + "ⴝ": "Ⴝ", + "ⴞ": "Ⴞ", + "ⴟ": "Ⴟ", + "ⴠ": "Ⴠ", + "ⴡ": "Ⴡ", + "ⴢ": "Ⴢ", + "ⴣ": "Ⴣ", + "ⴤ": "Ⴤ", + "ⴥ": "Ⴥ", + "ⴧ": "Ⴧ", + "ⴭ": "Ⴭ", + "Ᏸ": "ᏸ", + "Ᏹ": "ᏹ", + "Ᏺ": "ᏺ", + "Ᏻ": "ᏻ", + "Ᏼ": "ᏼ", + "Ᏽ": "ᏽ", + "ꙋ": "Ꙋ", + "ა": "Ა", + "ბ": "Ბ", + "გ": "Გ", + "დ": "Დ", + "ე": "Ე", + "ვ": "Ვ", + "ზ": "Ზ", + "თ": "Თ", + "ი": "Ი", + "კ": "Კ", + "ლ": "Ლ", + "მ": "Მ", + "ნ": "Ნ", + "ო": "Ო", + "პ": "Პ", + "ჟ": "Ჟ", + "რ": "Რ", + "ს": "Ს", + "ტ": "Ტ", + "უ": "Უ", + "ფ": "Ფ", + "ქ": "Ქ", + "ღ": "Ღ", + "ყ": "Ყ", + "შ": "Შ", + "ჩ": "Ჩ", + "ც": "Ც", + "ძ": "Ძ", + "წ": "Წ", + "ჭ": "Ჭ", + "ხ": "Ხ", + "ჯ": "Ჯ", + "ჰ": "Ჰ", + "ჱ": "Ჱ", + "ჲ": "Ჲ", + "ჳ": "Ჳ", + "ჴ": "Ჴ", + "ჵ": "Ჵ", + "ჶ": "Ჶ", + "ჷ": "Ჷ", + "ჸ": "Ჸ", + "ჹ": "Ჹ", + "ჺ": "Ჺ", + "ჽ": "Ჽ", + "ჾ": "Ჾ", + "ჿ": "Ჿ", + "ḁ": "Ḁ", + "ḃ": "Ḃ", + "ḅ": "Ḅ", + "ḇ": "Ḇ", + "ḉ": "Ḉ", + "ḋ": "Ḋ", + "ḍ": "Ḍ", + "ḏ": "Ḏ", + "ḑ": "Ḑ", + "ḓ": "Ḓ", + "ḕ": "Ḕ", + "ḗ": "Ḗ", + "ḙ": "Ḙ", + "ḛ": "Ḛ", + "ḝ": "Ḝ", + "ḟ": "Ḟ", + "ḡ": "Ḡ", + "ḣ": "Ḣ", + "ḥ": "Ḥ", + "ḧ": "Ḧ", + "ḩ": "Ḩ", + "ḫ": "Ḫ", + "ḭ": "Ḭ", + "ḯ": "Ḯ", + "ḱ": "Ḱ", + "ḳ": "Ḳ", + "ḵ": "Ḵ", + "ḷ": "Ḷ", + "ḹ": "Ḹ", + "ḻ": "Ḻ", + "ḽ": "Ḽ", + "ḿ": "Ḿ", + "ṁ": "Ṁ", + "ṃ": "Ṃ", + "ṅ": "Ṅ", + "ṇ": "Ṇ", + "ṉ": "Ṉ", + "ṋ": "Ṋ", + "ṍ": "Ṍ", + "ṏ": "Ṏ", + "ṑ": "Ṑ", + "ṓ": "Ṓ", + "ṕ": "Ṕ", + "ṗ": "Ṗ", + "ṙ": "Ṙ", + "ṛ": "Ṛ", + "ṝ": "Ṝ", + "ṟ": "Ṟ", + "ṡ": "ẛ", + "ṣ": "Ṣ", + "ṥ": "Ṥ", + "ṧ": "Ṧ", + "ṩ": "Ṩ", + "ṫ": "Ṫ", + "ṭ": "Ṭ", + "ṯ": "Ṯ", + "ṱ": "Ṱ", + "ṳ": "Ṳ", + "ṵ": "Ṵ", + "ṷ": "Ṷ", + "ṹ": "Ṹ", + "ṻ": "Ṻ", + "ṽ": "Ṽ", + "ṿ": "Ṿ", + "ẁ": "Ẁ", + "ẃ": "Ẃ", + "ẅ": "Ẅ", + "ẇ": "Ẇ", + "ẉ": "Ẉ", + "ẋ": "Ẋ", + "ẍ": "Ẍ", + "ẏ": "Ẏ", + "ẑ": "Ẑ", + "ẓ": "Ẓ", + "ẕ": "Ẕ", + "ạ": "Ạ", + "ả": "Ả", + "ấ": "Ấ", + "ầ": "Ầ", + "ẩ": "Ẩ", + "ẫ": "Ẫ", + "ậ": "Ậ", + "ắ": "Ắ", + "ằ": "Ằ", + "ẳ": "Ẳ", + "ẵ": "Ẵ", + "ặ": "Ặ", + "ẹ": "Ẹ", + "ẻ": "Ẻ", + "ẽ": "Ẽ", + "ế": "Ế", + "ề": "Ề", + "ể": "Ể", + "ễ": "Ễ", + "ệ": "Ệ", + "ỉ": "Ỉ", + "ị": "Ị", + "ọ": "Ọ", + "ỏ": "Ỏ", + "ố": "Ố", + "ồ": "Ồ", + "ổ": "Ổ", + "ỗ": "Ỗ", + "ộ": "Ộ", + "ớ": "Ớ", + "ờ": "Ờ", + "ở": "Ở", + "ỡ": "Ỡ", + "ợ": "Ợ", + "ụ": "Ụ", + "ủ": "Ủ", + "ứ": "Ứ", + "ừ": "Ừ", + "ử": "Ử", + "ữ": "Ữ", + "ự": "Ự", + "ỳ": "Ỳ", + "ỵ": "Ỵ", + "ỷ": "Ỷ", + "ỹ": "Ỹ", + "ỻ": "Ỻ", + "ỽ": "Ỽ", + "ỿ": "Ỿ", + "ἀ": "Ἀ", + "ἁ": "Ἁ", + "ἂ": "Ἂ", + "ἃ": "Ἃ", + "ἄ": "Ἄ", + "ἅ": "Ἅ", + "ἆ": "Ἆ", + "ἇ": "Ἇ", + "ἐ": "Ἐ", + "ἑ": "Ἑ", + "ἒ": "Ἒ", + "ἓ": "Ἓ", + "ἔ": "Ἔ", + "ἕ": "Ἕ", + "ἠ": "Ἠ", + "ἡ": "Ἡ", + "ἢ": "Ἢ", + "ἣ": "Ἣ", + "ἤ": "Ἤ", + "ἥ": "Ἥ", + "ἦ": "Ἦ", + "ἧ": "Ἧ", + "ἰ": "Ἰ", + "ἱ": "Ἱ", + "ἲ": "Ἲ", + "ἳ": "Ἳ", + "ἴ": "Ἴ", + "ἵ": "Ἵ", + "ἶ": "Ἶ", + "ἷ": "Ἷ", + "ὀ": "Ὀ", + "ὁ": "Ὁ", + "ὂ": "Ὂ", + "ὃ": "Ὃ", + "ὄ": "Ὄ", + "ὅ": "Ὅ", + "ὑ": "Ὑ", + "ὓ": "Ὓ", + "ὕ": "Ὕ", + "ὗ": "Ὗ", + "ὠ": "Ὠ", + "ὡ": "Ὡ", + "ὢ": "Ὢ", + "ὣ": "Ὣ", + "ὤ": "Ὤ", + "ὥ": "Ὥ", + "ὦ": "Ὦ", + "ὧ": "Ὧ", + "ᾰ": "Ᾰ", + "ᾱ": "Ᾱ", + "ὰ": "Ὰ", + "ά": "Ά", + "ὲ": "Ὲ", + "έ": "Έ", + "ὴ": "Ὴ", + "ή": "Ή", + "ῐ": "Ῐ", + "ῑ": "Ῑ", + "ὶ": "Ὶ", + "ί": "Ί", + "ῠ": "Ῠ", + "ῡ": "Ῡ", + "ὺ": "Ὺ", + "ύ": "Ύ", + "ῥ": "Ῥ", + "ὸ": "Ὸ", + "ό": "Ό", + "ὼ": "Ὼ", + "ώ": "Ώ", + "ⅎ": "Ⅎ", + "ⅰ": "Ⅰ", + "ⅱ": "Ⅱ", + "ⅲ": "Ⅲ", + "ⅳ": "Ⅳ", + "ⅴ": "Ⅴ", + "ⅵ": "Ⅵ", + "ⅶ": "Ⅶ", + "ⅷ": "Ⅷ", + "ⅸ": "Ⅸ", + "ⅹ": "Ⅹ", + "ⅺ": "Ⅺ", + "ⅻ": "Ⅻ", + "ⅼ": "Ⅼ", + "ⅽ": "Ⅽ", + "ⅾ": "Ⅾ", + "ⅿ": "Ⅿ", + "ↄ": "Ↄ", + "ⓐ": "Ⓐ", + "ⓑ": "Ⓑ", + "ⓒ": "Ⓒ", + "ⓓ": "Ⓓ", + "ⓔ": "Ⓔ", + "ⓕ": "Ⓕ", + "ⓖ": "Ⓖ", + "ⓗ": "Ⓗ", + "ⓘ": "Ⓘ", + "ⓙ": "Ⓙ", + "ⓚ": "Ⓚ", + "ⓛ": "Ⓛ", + "ⓜ": "Ⓜ", + "ⓝ": "Ⓝ", + "ⓞ": "Ⓞ", + "ⓟ": "Ⓟ", + "ⓠ": "Ⓠ", + "ⓡ": "Ⓡ", + "ⓢ": "Ⓢ", + "ⓣ": "Ⓣ", + "ⓤ": "Ⓤ", + "ⓥ": "Ⓥ", + "ⓦ": "Ⓦ", + "ⓧ": "Ⓧ", + "ⓨ": "Ⓨ", + "ⓩ": "Ⓩ", + "ⰰ": "Ⰰ", + "ⰱ": "Ⰱ", + "ⰲ": "Ⰲ", + "ⰳ": "Ⰳ", + "ⰴ": "Ⰴ", + "ⰵ": "Ⰵ", + "ⰶ": "Ⰶ", + "ⰷ": "Ⰷ", + "ⰸ": "Ⰸ", + "ⰹ": "Ⰹ", + "ⰺ": "Ⰺ", + "ⰻ": "Ⰻ", + "ⰼ": "Ⰼ", + "ⰽ": "Ⰽ", + "ⰾ": "Ⰾ", + "ⰿ": "Ⰿ", + "ⱀ": "Ⱀ", + "ⱁ": "Ⱁ", + "ⱂ": "Ⱂ", + "ⱃ": "Ⱃ", + "ⱄ": "Ⱄ", + "ⱅ": "Ⱅ", + "ⱆ": "Ⱆ", + "ⱇ": "Ⱇ", + "ⱈ": "Ⱈ", + "ⱉ": "Ⱉ", + "ⱊ": "Ⱊ", + "ⱋ": "Ⱋ", + "ⱌ": "Ⱌ", + "ⱍ": "Ⱍ", + "ⱎ": "Ⱎ", + "ⱏ": "Ⱏ", + "ⱐ": "Ⱐ", + "ⱑ": "Ⱑ", + "ⱒ": "Ⱒ", + "ⱓ": "Ⱓ", + "ⱔ": "Ⱔ", + "ⱕ": "Ⱕ", + "ⱖ": "Ⱖ", + "ⱗ": "Ⱗ", + "ⱘ": "Ⱘ", + "ⱙ": "Ⱙ", + "ⱚ": "Ⱚ", + "ⱛ": "Ⱛ", + "ⱜ": "Ⱜ", + "ⱝ": "Ⱝ", + "ⱞ": "Ⱞ", + "ⱟ": "Ⱟ", + "ⱡ": "Ⱡ", + "ɫ": "Ɫ", + "ᵽ": "Ᵽ", + "ɽ": "Ɽ", + "ⱨ": "Ⱨ", + "ⱪ": "Ⱪ", + "ⱬ": "Ⱬ", + "ɑ": "Ɑ", + "ɱ": "Ɱ", + "ɐ": "Ɐ", + "ɒ": "Ɒ", + "ⱳ": "Ⱳ", + "ⱶ": "Ⱶ", + "ȿ": "Ȿ", + "ɀ": "Ɀ", + "ⲁ": "Ⲁ", + "ⲃ": "Ⲃ", + "ⲅ": "Ⲅ", + "ⲇ": "Ⲇ", + "ⲉ": "Ⲉ", + "ⲋ": "Ⲋ", + "ⲍ": "Ⲍ", + "ⲏ": "Ⲏ", + "ⲑ": "Ⲑ", + "ⲓ": "Ⲓ", + "ⲕ": "Ⲕ", + "ⲗ": "Ⲗ", + "ⲙ": "Ⲙ", + "ⲛ": "Ⲛ", + "ⲝ": "Ⲝ", + "ⲟ": "Ⲟ", + "ⲡ": "Ⲡ", + "ⲣ": "Ⲣ", + "ⲥ": "Ⲥ", + "ⲧ": "Ⲧ", + "ⲩ": "Ⲩ", + "ⲫ": "Ⲫ", + "ⲭ": "Ⲭ", + "ⲯ": "Ⲯ", + "ⲱ": "Ⲱ", + "ⲳ": "Ⲳ", + "ⲵ": "Ⲵ", + "ⲷ": "Ⲷ", + "ⲹ": "Ⲹ", + "ⲻ": "Ⲻ", + "ⲽ": "Ⲽ", + "ⲿ": "Ⲿ", + "ⳁ": "Ⳁ", + "ⳃ": "Ⳃ", + "ⳅ": "Ⳅ", + "ⳇ": "Ⳇ", + "ⳉ": "Ⳉ", + "ⳋ": "Ⳋ", + "ⳍ": "Ⳍ", + "ⳏ": "Ⳏ", + "ⳑ": "Ⳑ", + "ⳓ": "Ⳓ", + "ⳕ": "Ⳕ", + "ⳗ": "Ⳗ", + "ⳙ": "Ⳙ", + "ⳛ": "Ⳛ", + "ⳝ": "Ⳝ", + "ⳟ": "Ⳟ", + "ⳡ": "Ⳡ", + "ⳣ": "Ⳣ", + "ⳬ": "Ⳬ", + "ⳮ": "Ⳮ", + "ⳳ": "Ⳳ", + "ꙁ": "Ꙁ", + "ꙃ": "Ꙃ", + "ꙅ": "Ꙅ", + "ꙇ": "Ꙇ", + "ꙉ": "Ꙉ", + "ꙍ": "Ꙍ", + "ꙏ": "Ꙏ", + "ꙑ": "Ꙑ", + "ꙓ": "Ꙓ", + "ꙕ": "Ꙕ", + "ꙗ": "Ꙗ", + "ꙙ": "Ꙙ", + "ꙛ": "Ꙛ", + "ꙝ": "Ꙝ", + "ꙟ": "Ꙟ", + "ꙡ": "Ꙡ", + "ꙣ": "Ꙣ", + "ꙥ": "Ꙥ", + "ꙧ": "Ꙧ", + "ꙩ": "Ꙩ", + "ꙫ": "Ꙫ", + "ꙭ": "Ꙭ", + "ꚁ": "Ꚁ", + "ꚃ": "Ꚃ", + "ꚅ": "Ꚅ", + "ꚇ": "Ꚇ", + "ꚉ": "Ꚉ", + "ꚋ": "Ꚋ", + "ꚍ": "Ꚍ", + "ꚏ": "Ꚏ", + "ꚑ": "Ꚑ", + "ꚓ": "Ꚓ", + "ꚕ": "Ꚕ", + "ꚗ": "Ꚗ", + "ꚙ": "Ꚙ", + "ꚛ": "Ꚛ", + "ꜣ": "Ꜣ", + "ꜥ": "Ꜥ", + "ꜧ": "Ꜧ", + "ꜩ": "Ꜩ", + "ꜫ": "Ꜫ", + "ꜭ": "Ꜭ", + "ꜯ": "Ꜯ", + "ꜳ": "Ꜳ", + "ꜵ": "Ꜵ", + "ꜷ": "Ꜷ", + "ꜹ": "Ꜹ", + "ꜻ": "Ꜻ", + "ꜽ": "Ꜽ", + "ꜿ": "Ꜿ", + "ꝁ": "Ꝁ", + "ꝃ": "Ꝃ", + "ꝅ": "Ꝅ", + "ꝇ": "Ꝇ", + "ꝉ": "Ꝉ", + "ꝋ": "Ꝋ", + "ꝍ": "Ꝍ", + "ꝏ": "Ꝏ", + "ꝑ": "Ꝑ", + "ꝓ": "Ꝓ", + "ꝕ": "Ꝕ", + "ꝗ": "Ꝗ", + "ꝙ": "Ꝙ", + "ꝛ": "Ꝛ", + "ꝝ": "Ꝝ", + "ꝟ": "Ꝟ", + "ꝡ": "Ꝡ", + "ꝣ": "Ꝣ", + "ꝥ": "Ꝥ", + "ꝧ": "Ꝧ", + "ꝩ": "Ꝩ", + "ꝫ": "Ꝫ", + "ꝭ": "Ꝭ", + "ꝯ": "Ꝯ", + "ꝺ": "Ꝺ", + "ꝼ": "Ꝼ", + "ᵹ": "Ᵹ", + "ꝿ": "Ꝿ", + "ꞁ": "Ꞁ", + "ꞃ": "Ꞃ", + "ꞅ": "Ꞅ", + "ꞇ": "Ꞇ", + "ꞌ": "Ꞌ", + "ɥ": "Ɥ", + "ꞑ": "Ꞑ", + "ꞓ": "Ꞓ", + "ꞗ": "Ꞗ", + "ꞙ": "Ꞙ", + "ꞛ": "Ꞛ", + "ꞝ": "Ꞝ", + "ꞟ": "Ꞟ", + "ꞡ": "Ꞡ", + "ꞣ": "Ꞣ", + "ꞥ": "Ꞥ", + "ꞧ": "Ꞧ", + "ꞩ": "Ꞩ", + "ɦ": "Ɦ", + "ɜ": "Ɜ", + "ɡ": "Ɡ", + "ɬ": "Ɬ", + "ɪ": "Ɪ", + "ʞ": "Ʞ", + "ʇ": "Ʇ", + "ʝ": "Ʝ", + "ꭓ": "Ꭓ", + "ꞵ": "Ꞵ", + "ꞷ": "Ꞷ", + "ꞹ": "Ꞹ", + "ꞻ": "Ꞻ", + "ꞽ": "Ꞽ", + "ꞿ": "Ꞿ", + "ꟁ": "Ꟁ", + "ꟃ": "Ꟃ", + "ꞔ": "Ꞔ", + "ʂ": "Ʂ", + "ᶎ": "Ᶎ", + "ꟈ": "Ꟈ", + "ꟊ": "Ꟊ", + "ꟑ": "Ꟑ", + "ꟗ": "Ꟗ", + "ꟙ": "Ꟙ", + "ꟶ": "Ꟶ", + "Ꭰ": "ꭰ", + "Ꭱ": "ꭱ", + "Ꭲ": "ꭲ", + "Ꭳ": "ꭳ", + "Ꭴ": "ꭴ", + "Ꭵ": "ꭵ", + "Ꭶ": "ꭶ", + "Ꭷ": "ꭷ", + "Ꭸ": "ꭸ", + "Ꭹ": "ꭹ", + "Ꭺ": "ꭺ", + "Ꭻ": "ꭻ", + "Ꭼ": "ꭼ", + "Ꭽ": "ꭽ", + "Ꭾ": "ꭾ", + "Ꭿ": "ꭿ", + "Ꮀ": "ꮀ", + "Ꮁ": "ꮁ", + "Ꮂ": "ꮂ", + "Ꮃ": "ꮃ", + "Ꮄ": "ꮄ", + "Ꮅ": "ꮅ", + "Ꮆ": "ꮆ", + "Ꮇ": "ꮇ", + "Ꮈ": "ꮈ", + "Ꮉ": "ꮉ", + "Ꮊ": "ꮊ", + "Ꮋ": "ꮋ", + "Ꮌ": "ꮌ", + "Ꮍ": "ꮍ", + "Ꮎ": "ꮎ", + "Ꮏ": "ꮏ", + "Ꮐ": "ꮐ", + "Ꮑ": "ꮑ", + "Ꮒ": "ꮒ", + "Ꮓ": "ꮓ", + "Ꮔ": "ꮔ", + "Ꮕ": "ꮕ", + "Ꮖ": "ꮖ", + "Ꮗ": "ꮗ", + "Ꮘ": "ꮘ", + "Ꮙ": "ꮙ", + "Ꮚ": "ꮚ", + "Ꮛ": "ꮛ", + "Ꮜ": "ꮜ", + "Ꮝ": "ꮝ", + "Ꮞ": "ꮞ", + "Ꮟ": "ꮟ", + "Ꮠ": "ꮠ", + "Ꮡ": "ꮡ", + "Ꮢ": "ꮢ", + "Ꮣ": "ꮣ", + "Ꮤ": "ꮤ", + "Ꮥ": "ꮥ", + "Ꮦ": "ꮦ", + "Ꮧ": "ꮧ", + "Ꮨ": "ꮨ", + "Ꮩ": "ꮩ", + "Ꮪ": "ꮪ", + "Ꮫ": "ꮫ", + "Ꮬ": "ꮬ", + "Ꮭ": "ꮭ", + "Ꮮ": "ꮮ", + "Ꮯ": "ꮯ", + "Ꮰ": "ꮰ", + "Ꮱ": "ꮱ", + "Ꮲ": "ꮲ", + "Ꮳ": "ꮳ", + "Ꮴ": "ꮴ", + "Ꮵ": "ꮵ", + "Ꮶ": "ꮶ", + "Ꮷ": "ꮷ", + "Ꮸ": "ꮸ", + "Ꮹ": "ꮹ", + "Ꮺ": "ꮺ", + "Ꮻ": "ꮻ", + "Ꮼ": "ꮼ", + "Ꮽ": "ꮽ", + "Ꮾ": "ꮾ", + "Ꮿ": "ꮿ", + "a": "A", + "b": "B", + "c": "C", + "d": "D", + "e": "E", + "f": "F", + "g": "G", + "h": "H", + "i": "I", + "j": "J", + "k": "K", + "l": "L", + "m": "M", + "n": "N", + "o": "O", + "p": "P", + "q": "Q", + "r": "R", + "s": "S", + "t": "T", + "u": "U", + "v": "V", + "w": "W", + "x": "X", + "y": "Y", + "z": "Z", + "𐐨": "𐐀", + "𐐩": "𐐁", + "𐐪": "𐐂", + "𐐫": "𐐃", + "𐐬": "𐐄", + "𐐭": "𐐅", + "𐐮": "𐐆", + "𐐯": "𐐇", + "𐐰": "𐐈", + "𐐱": "𐐉", + "𐐲": "𐐊", + "𐐳": "𐐋", + "𐐴": "𐐌", + "𐐵": "𐐍", + "𐐶": "𐐎", + "𐐷": "𐐏", + "𐐸": "𐐐", + "𐐹": "𐐑", + "𐐺": "𐐒", + "𐐻": "𐐓", + "𐐼": "𐐔", + "𐐽": "𐐕", + "𐐾": "𐐖", + "𐐿": "𐐗", + "𐑀": "𐐘", + "𐑁": "𐐙", + "𐑂": "𐐚", + "𐑃": "𐐛", + "𐑄": "𐐜", + "𐑅": "𐐝", + "𐑆": "𐐞", + "𐑇": "𐐟", + "𐑈": "𐐠", + "𐑉": "𐐡", + "𐑊": "𐐢", + "𐑋": "𐐣", + "𐑌": "𐐤", + "𐑍": "𐐥", + "𐑎": "𐐦", + "𐑏": "𐐧", + "𐓘": "𐒰", + "𐓙": "𐒱", + "𐓚": "𐒲", + "𐓛": "𐒳", + "𐓜": "𐒴", + "𐓝": "𐒵", + "𐓞": "𐒶", + "𐓟": "𐒷", + "𐓠": "𐒸", + "𐓡": "𐒹", + "𐓢": "𐒺", + "𐓣": "𐒻", + "𐓤": "𐒼", + "𐓥": "𐒽", + "𐓦": "𐒾", + "𐓧": "𐒿", + "𐓨": "𐓀", + "𐓩": "𐓁", + "𐓪": "𐓂", + "𐓫": "𐓃", + "𐓬": "𐓄", + "𐓭": "𐓅", + "𐓮": "𐓆", + "𐓯": "𐓇", + "𐓰": "𐓈", + "𐓱": "𐓉", + "𐓲": "𐓊", + "𐓳": "𐓋", + "𐓴": "𐓌", + "𐓵": "𐓍", + "𐓶": "𐓎", + "𐓷": "𐓏", + "𐓸": "𐓐", + "𐓹": "𐓑", + "𐓺": "𐓒", + "𐓻": "𐓓", + "𐖗": "𐕰", + "𐖘": "𐕱", + "𐖙": "𐕲", + "𐖚": "𐕳", + "𐖛": "𐕴", + "𐖜": "𐕵", + "𐖝": "𐕶", + "𐖞": "𐕷", + "𐖟": "𐕸", + "𐖠": "𐕹", + "𐖡": "𐕺", + "𐖣": "𐕼", + "𐖤": "𐕽", + "𐖥": "𐕾", + "𐖦": "𐕿", + "𐖧": "𐖀", + "𐖨": "𐖁", + "𐖩": "𐖂", + "𐖪": "𐖃", + "𐖫": "𐖄", + "𐖬": "𐖅", + "𐖭": "𐖆", + "𐖮": "𐖇", + "𐖯": "𐖈", + "𐖰": "𐖉", + "𐖱": "𐖊", + "𐖳": "𐖌", + "𐖴": "𐖍", + "𐖵": "𐖎", + "𐖶": "𐖏", + "𐖷": "𐖐", + "𐖸": "𐖑", + "𐖹": "𐖒", + "𐖻": "𐖔", + "𐖼": "𐖕", + "𐳀": "𐲀", + "𐳁": "𐲁", + "𐳂": "𐲂", + "𐳃": "𐲃", + "𐳄": "𐲄", + "𐳅": "𐲅", + "𐳆": "𐲆", + "𐳇": "𐲇", + "𐳈": "𐲈", + "𐳉": "𐲉", + "𐳊": "𐲊", + "𐳋": "𐲋", + "𐳌": "𐲌", + "𐳍": "𐲍", + "𐳎": "𐲎", + "𐳏": "𐲏", + "𐳐": "𐲐", + "𐳑": "𐲑", + "𐳒": "𐲒", + "𐳓": "𐲓", + "𐳔": "𐲔", + "𐳕": "𐲕", + "𐳖": "𐲖", + "𐳗": "𐲗", + "𐳘": "𐲘", + "𐳙": "𐲙", + "𐳚": "𐲚", + "𐳛": "𐲛", + "𐳜": "𐲜", + "𐳝": "𐲝", + "𐳞": "𐲞", + "𐳟": "𐲟", + "𐳠": "𐲠", + "𐳡": "𐲡", + "𐳢": "𐲢", + "𐳣": "𐲣", + "𐳤": "𐲤", + "𐳥": "𐲥", + "𐳦": "𐲦", + "𐳧": "𐲧", + "𐳨": "𐲨", + "𐳩": "𐲩", + "𐳪": "𐲪", + "𐳫": "𐲫", + "𐳬": "𐲬", + "𐳭": "𐲭", + "𐳮": "𐲮", + "𐳯": "𐲯", + "𐳰": "𐲰", + "𐳱": "𐲱", + "𐳲": "𐲲", + "𑣀": "𑢠", + "𑣁": "𑢡", + "𑣂": "𑢢", + "𑣃": "𑢣", + "𑣄": "𑢤", + "𑣅": "𑢥", + "𑣆": "𑢦", + "𑣇": "𑢧", + "𑣈": "𑢨", + "𑣉": "𑢩", + "𑣊": "𑢪", + "𑣋": "𑢫", + "𑣌": "𑢬", + "𑣍": "𑢭", + "𑣎": "𑢮", + "𑣏": "𑢯", + "𑣐": "𑢰", + "𑣑": "𑢱", + "𑣒": "𑢲", + "𑣓": "𑢳", + "𑣔": "𑢴", + "𑣕": "𑢵", + "𑣖": "𑢶", + "𑣗": "𑢷", + "𑣘": "𑢸", + "𑣙": "𑢹", + "𑣚": "𑢺", + "𑣛": "𑢻", + "𑣜": "𑢼", + "𑣝": "𑢽", + "𑣞": "𑢾", + "𑣟": "𑢿", + "𖹠": "𖹀", + "𖹡": "𖹁", + "𖹢": "𖹂", + "𖹣": "𖹃", + "𖹤": "𖹄", + "𖹥": "𖹅", + "𖹦": "𖹆", + "𖹧": "𖹇", + "𖹨": "𖹈", + "𖹩": "𖹉", + "𖹪": "𖹊", + "𖹫": "𖹋", + "𖹬": "𖹌", + "𖹭": "𖹍", + "𖹮": "𖹎", + "𖹯": "𖹏", + "𖹰": "𖹐", + "𖹱": "𖹑", + "𖹲": "𖹒", + "𖹳": "𖹓", + "𖹴": "𖹔", + "𖹵": "𖹕", + "𖹶": "𖹖", + "𖹷": "𖹗", + "𖹸": "𖹘", + "𖹹": "𖹙", + "𖹺": "𖹚", + "𖹻": "𖹛", + "𖹼": "𖹜", + "𖹽": "𖹝", + "𖹾": "𖹞", + "𖹿": "𖹟", + "𞤢": "𞤀", + "𞤣": "𞤁", + "𞤤": "𞤂", + "𞤥": "𞤃", + "𞤦": "𞤄", + "𞤧": "𞤅", + "𞤨": "𞤆", + "𞤩": "𞤇", + "𞤪": "𞤈", + "𞤫": "𞤉", + "𞤬": "𞤊", + "𞤭": "𞤋", + "𞤮": "𞤌", + "𞤯": "𞤍", + "𞤰": "𞤎", + "𞤱": "𞤏", + "𞤲": "𞤐", + "𞤳": "𞤑", + "𞤴": "𞤒", + "𞤵": "𞤓", + "𞤶": "𞤔", + "𞤷": "𞤕", + "𞤸": "𞤖", + "𞤹": "𞤗", + "𞤺": "𞤘", + "𞤻": "𞤙", + "𞤼": "𞤚", + "𞤽": "𞤛", + "𞤾": "𞤜", + "𞤿": "𞤝", + "𞥀": "𞤞", + "𞥁": "𞤟", + "𞥂": "𞤠", + "𞥃": "𞤡" + }, + "S": { + "ß": "ẞ", + "ᾀ": "ᾈ", + "ᾁ": "ᾉ", + "ᾂ": "ᾊ", + "ᾃ": "ᾋ", + "ᾄ": "ᾌ", + "ᾅ": "ᾍ", + "ᾆ": "ᾎ", + "ᾇ": "ᾏ", + "ᾐ": "ᾘ", + "ᾑ": "ᾙ", + "ᾒ": "ᾚ", + "ᾓ": "ᾛ", + "ᾔ": "ᾜ", + "ᾕ": "ᾝ", + "ᾖ": "ᾞ", + "ᾗ": "ᾟ", + "ᾠ": "ᾨ", + "ᾡ": "ᾩ", + "ᾢ": "ᾪ", + "ᾣ": "ᾫ", + "ᾤ": "ᾬ", + "ᾥ": "ᾭ", + "ᾦ": "ᾮ", + "ᾧ": "ᾯ", + "ᾳ": "ᾼ", + "ῃ": "ῌ", + "ῳ": "ῼ" + } +} \ No newline at end of file diff --git a/node_modules/es-abstract/helpers/defaultEndianness.js b/node_modules/es-abstract/helpers/defaultEndianness.js new file mode 100644 index 0000000000000..faba47022e31f --- /dev/null +++ b/node_modules/es-abstract/helpers/defaultEndianness.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); +var $Uint32Array = GetIntrinsic('%Uint32Array%', true); + +var typedArrayBuffer = require('typed-array-buffer'); + +var uInt32 = $Uint32Array && new $Uint32Array([0x12345678]); +var uInt8 = uInt32 && new $Uint8Array(typedArrayBuffer(uInt32)); + +module.exports = uInt8 + ? uInt8[0] === 0x78 + ? 'little' + : uInt8[0] === 0x12 + ? 'big' + : uInt8[0] === 0x34 + ? 'mixed' // https://developer.mozilla.org/en-US/docs/Glossary/Endianness + : 'unknown' // ??? + : 'indeterminate'; // no way to know diff --git a/node_modules/es-abstract/helpers/every.js b/node_modules/es-abstract/helpers/every.js new file mode 100644 index 0000000000000..42a458211ede1 --- /dev/null +++ b/node_modules/es-abstract/helpers/every.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function every(array, predicate) { + for (var i = 0; i < array.length; i += 1) { + if (!predicate(array[i], i, array)) { + return false; + } + } + return true; +}; diff --git a/node_modules/es-abstract/helpers/forEach.js b/node_modules/es-abstract/helpers/forEach.js new file mode 100644 index 0000000000000..35915a656a07e --- /dev/null +++ b/node_modules/es-abstract/helpers/forEach.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function forEach(array, callback) { + for (var i = 0; i < array.length; i += 1) { + callback(array[i], i, array); // eslint-disable-line callback-return + } +}; diff --git a/node_modules/es-abstract/helpers/fractionToBinaryString.js b/node_modules/es-abstract/helpers/fractionToBinaryString.js new file mode 100644 index 0000000000000..1ba671da6603f --- /dev/null +++ b/node_modules/es-abstract/helpers/fractionToBinaryString.js @@ -0,0 +1,33 @@ +'use strict'; + +var MAX_ITER = 1075; // 1023+52 (subnormals) => BIAS+NUM_SIGNFICAND_BITS-1 +var maxBits = 54; // only 53 bits for fraction + +module.exports = function fractionToBitString(x) { + var str = ''; + if (x === 0) { + return str; + } + var j = MAX_ITER; + + var y; + // Each time we multiply by 2 and find a ones digit, add a '1'; otherwise, add a '0'.. + for (var i = 0; i < MAX_ITER; i += 1) { + y = x * 2; + if (y >= 1) { + x = y - 1; // eslint-disable-line no-param-reassign + str += '1'; + if (j === MAX_ITER) { + j = i; // first 1 + } + } else { + x = y; // eslint-disable-line no-param-reassign + str += '0'; + } + // Stop when we have no more decimals to process or in the event we found a fraction which cannot be represented in a finite number of bits... + if (y === 1 || i - j > maxBits) { + return str; + } + } + return str; +}; diff --git a/node_modules/es-abstract/helpers/fromPropertyDescriptor.js b/node_modules/es-abstract/helpers/fromPropertyDescriptor.js new file mode 100644 index 0000000000000..878861271cbed --- /dev/null +++ b/node_modules/es-abstract/helpers/fromPropertyDescriptor.js @@ -0,0 +1,27 @@ +'use strict'; + +module.exports = function fromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + var obj = {}; + if ('[[Value]]' in Desc) { + obj.value = Desc['[[Value]]']; + } + if ('[[Writable]]' in Desc) { + obj.writable = !!Desc['[[Writable]]']; + } + if ('[[Get]]' in Desc) { + obj.get = Desc['[[Get]]']; + } + if ('[[Set]]' in Desc) { + obj.set = Desc['[[Set]]']; + } + if ('[[Enumerable]]' in Desc) { + obj.enumerable = !!Desc['[[Enumerable]]']; + } + if ('[[Configurable]]' in Desc) { + obj.configurable = !!Desc['[[Configurable]]']; + } + return obj; +}; diff --git a/node_modules/es-abstract/helpers/getInferredName.js b/node_modules/es-abstract/helpers/getInferredName.js new file mode 100644 index 0000000000000..5fd24ffa8c614 --- /dev/null +++ b/node_modules/es-abstract/helpers/getInferredName.js @@ -0,0 +1,4 @@ +'use strict'; + +// TODO: remove, semver-major +module.exports = require('get-symbol-description/getInferredName'); diff --git a/node_modules/es-abstract/helpers/getIteratorMethod.js b/node_modules/es-abstract/helpers/getIteratorMethod.js new file mode 100644 index 0000000000000..d052645b5a74a --- /dev/null +++ b/node_modules/es-abstract/helpers/getIteratorMethod.js @@ -0,0 +1,47 @@ +'use strict'; + +var hasSymbols = require('has-symbols')(); +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var isString = require('is-string'); + +var $iterator = GetIntrinsic('%Symbol.iterator%', true); +var $stringSlice = callBound('String.prototype.slice'); +var $String = GetIntrinsic('%String%'); + +module.exports = function getIteratorMethod(ES, iterable) { + var usingIterator; + if (hasSymbols) { + usingIterator = ES.GetMethod(iterable, $iterator); + } else if (ES.IsArray(iterable)) { + usingIterator = function () { + var i = -1; + var arr = this; // eslint-disable-line no-invalid-this + return { + next: function () { + i += 1; + return { + done: i >= arr.length, + value: arr[i] + }; + } + }; + }; + } else if (isString(iterable)) { + usingIterator = function () { + var i = 0; + return { + next: function () { + var nextIndex = ES.AdvanceStringIndex($String(iterable), i, true); + var value = $stringSlice(iterable, i, nextIndex); + i = nextIndex; + return { + done: nextIndex > iterable.length, + value: value + }; + } + }; + }; + } + return usingIterator; +}; diff --git a/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js b/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js new file mode 100644 index 0000000000000..e0f823d108f26 --- /dev/null +++ b/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js @@ -0,0 +1,5 @@ +'use strict'; + +// TODO: remove, semver-major + +module.exports = require('gopd'); diff --git a/node_modules/es-abstract/helpers/getProto.js b/node_modules/es-abstract/helpers/getProto.js new file mode 100644 index 0000000000000..d63903ad46a8d --- /dev/null +++ b/node_modules/es-abstract/helpers/getProto.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var originalGetProto = GetIntrinsic('%Object.getPrototypeOf%', true); + +var hasProto = require('has-proto')(); + +module.exports = originalGetProto || ( + hasProto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); diff --git a/node_modules/es-abstract/helpers/getSymbolDescription.js b/node_modules/es-abstract/helpers/getSymbolDescription.js new file mode 100644 index 0000000000000..699705f4f9bec --- /dev/null +++ b/node_modules/es-abstract/helpers/getSymbolDescription.js @@ -0,0 +1,4 @@ +'use strict'; + +// TODO: remove, semver-major +module.exports = require('get-symbol-description'); diff --git a/node_modules/es-abstract/helpers/intToBinaryString.js b/node_modules/es-abstract/helpers/intToBinaryString.js new file mode 100644 index 0000000000000..beeb2e77dbfa3 --- /dev/null +++ b/node_modules/es-abstract/helpers/intToBinaryString.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $floor = GetIntrinsic('%Math.floor%'); + +// https://runestone.academy/ns/books/published/pythonds/BasicDS/ConvertingDecimalNumberstoBinaryNumbers.html#:~:text=The%20Divide%20by%202%20algorithm,have%20a%20remainder%20of%200 + +module.exports = function intToBinaryString(x) { + var str = ''; + var y; + + while (x > 0) { + y = x / 2; + x = $floor(y); // eslint-disable-line no-param-reassign + if (y === x) { + str = '0' + str; + } else { + str = '1' + str; + } + } + return str; +}; diff --git a/node_modules/es-abstract/helpers/integerToNBytes.js b/node_modules/es-abstract/helpers/integerToNBytes.js new file mode 100644 index 0000000000000..dd3f98c051891 --- /dev/null +++ b/node_modules/es-abstract/helpers/integerToNBytes.js @@ -0,0 +1,28 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +module.exports = function integerToNBytes(intValue, n, isLittleEndian) { + var Z = typeof intValue === 'bigint' ? $BigInt : $Number; + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue >>>= 0; // eslint-disable-line no-param-reassign + } + + var rawBytes = []; + for (var i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = $Number(intValue & Z(0xFF)); + intValue >>= Z(8); // eslint-disable-line no-param-reassign + } + + return rawBytes; // step 4 +}; diff --git a/node_modules/es-abstract/helpers/isAbstractClosure.js b/node_modules/es-abstract/helpers/isAbstractClosure.js new file mode 100644 index 0000000000000..503200dc5d5df --- /dev/null +++ b/node_modules/es-abstract/helpers/isAbstractClosure.js @@ -0,0 +1,9 @@ +'use strict'; + +var functionName = require('function.prototype.name'); + +var anon = functionName(function () {}); + +module.exports = function isAbstractClosure(x) { + return typeof x === 'function' && (!x.prototype || functionName(x) === anon); +}; diff --git a/node_modules/es-abstract/helpers/isByteValue.js b/node_modules/es-abstract/helpers/isByteValue.js new file mode 100644 index 0000000000000..1a7d0d3530647 --- /dev/null +++ b/node_modules/es-abstract/helpers/isByteValue.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isByteValue(value) { + return typeof value === 'number' && value >= 0 && value <= 255 && (value | 0) === value; +}; diff --git a/node_modules/es-abstract/helpers/isCodePoint.js b/node_modules/es-abstract/helpers/isCodePoint.js new file mode 100644 index 0000000000000..acda02e993789 --- /dev/null +++ b/node_modules/es-abstract/helpers/isCodePoint.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isCodePoint(cp) { + return typeof cp === 'number' && cp >= 0 && cp <= 0x10FFFF && (cp | 0) === cp; +}; diff --git a/node_modules/es-abstract/helpers/isFinite.js b/node_modules/es-abstract/helpers/isFinite.js new file mode 100644 index 0000000000000..3bcd663b24793 --- /dev/null +++ b/node_modules/es-abstract/helpers/isFinite.js @@ -0,0 +1,5 @@ +'use strict'; + +var $isNaN = require('./isNaN'); + +module.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; diff --git a/node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js b/node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js new file mode 100644 index 0000000000000..88d2ff9e6229f --- /dev/null +++ b/node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function isFullyPopulatedPropertyDescriptor(ES, Desc) { + return !!Desc + && typeof Desc === 'object' + && '[[Enumerable]]' in Desc + && '[[Configurable]]' in Desc + && (ES.IsAccessorDescriptor(Desc) || ES.IsDataDescriptor(Desc)); +}; diff --git a/node_modules/es-abstract/helpers/isInteger.js b/node_modules/es-abstract/helpers/isInteger.js new file mode 100644 index 0000000000000..8ff972c7aef8e --- /dev/null +++ b/node_modules/es-abstract/helpers/isInteger.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); + +var $isNaN = require('./isNaN'); +var $isFinite = require('./isFinite'); + +module.exports = function isInteger(argument) { + if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = $abs(argument); + return $floor(absValue) === absValue; +}; + diff --git a/node_modules/es-abstract/helpers/isLeadingSurrogate.js b/node_modules/es-abstract/helpers/isLeadingSurrogate.js new file mode 100644 index 0000000000000..fec61b2a573c1 --- /dev/null +++ b/node_modules/es-abstract/helpers/isLeadingSurrogate.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isLeadingSurrogate(charCode) { + return typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF; +}; diff --git a/node_modules/es-abstract/helpers/isLineTerminator.js b/node_modules/es-abstract/helpers/isLineTerminator.js new file mode 100644 index 0000000000000..baa683901616d --- /dev/null +++ b/node_modules/es-abstract/helpers/isLineTerminator.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/5.1/#sec-7.3 + +module.exports = function isLineTerminator(c) { + return c === '\n' || c === '\r' || c === '\u2028' || c === '\u2029'; +}; diff --git a/node_modules/es-abstract/helpers/isMatchRecord.js b/node_modules/es-abstract/helpers/isMatchRecord.js new file mode 100644 index 0000000000000..fbffebb05d0ef --- /dev/null +++ b/node_modules/es-abstract/helpers/isMatchRecord.js @@ -0,0 +1,16 @@ +'use strict'; + +var hasOwn = require('hasown'); + +// https://262.ecma-international.org/13.0/#sec-match-records + +module.exports = function isMatchRecord(record) { + return ( + hasOwn(record, '[[StartIndex]]') + && hasOwn(record, '[[EndIndex]]') + && record['[[StartIndex]]'] >= 0 + && record['[[EndIndex]]'] >= record['[[StartIndex]]'] + && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]']) + && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]']) + ); +}; diff --git a/node_modules/es-abstract/helpers/isNaN.js b/node_modules/es-abstract/helpers/isNaN.js new file mode 100644 index 0000000000000..cb8631dca6c00 --- /dev/null +++ b/node_modules/es-abstract/helpers/isNaN.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; diff --git a/node_modules/es-abstract/helpers/isNegativeZero.js b/node_modules/es-abstract/helpers/isNegativeZero.js new file mode 100644 index 0000000000000..045b36adf2991 --- /dev/null +++ b/node_modules/es-abstract/helpers/isNegativeZero.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isNegativeZero(x) { + return x === 0 && 1 / x === 1 / -0; +}; diff --git a/node_modules/es-abstract/helpers/isPrefixOf.js b/node_modules/es-abstract/helpers/isPrefixOf.js new file mode 100644 index 0000000000000..0f644d746f740 --- /dev/null +++ b/node_modules/es-abstract/helpers/isPrefixOf.js @@ -0,0 +1,13 @@ +'use strict'; + +var $strSlice = require('call-bind/callBound')('String.prototype.slice'); + +module.exports = function isPrefixOf(prefix, string) { + if (prefix === string) { + return true; + } + if (prefix.length > string.length) { + return false; + } + return $strSlice(string, 0, prefix.length) === prefix; +}; diff --git a/node_modules/es-abstract/helpers/isPrimitive.js b/node_modules/es-abstract/helpers/isPrimitive.js new file mode 100644 index 0000000000000..06f0bf042525a --- /dev/null +++ b/node_modules/es-abstract/helpers/isPrimitive.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/node_modules/es-abstract/helpers/isPropertyDescriptor.js b/node_modules/es-abstract/helpers/isPropertyDescriptor.js new file mode 100644 index 0000000000000..d223983ce4e6d --- /dev/null +++ b/node_modules/es-abstract/helpers/isPropertyDescriptor.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasOwn = require('hasown'); +var $TypeError = GetIntrinsic('%TypeError%'); + +module.exports = function IsPropertyDescriptor(ES, Desc) { + if (ES.Type(Desc) !== 'Object') { + return false; + } + var allowed = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true + }; + + for (var key in Desc) { // eslint-disable-line no-restricted-syntax + if (hasOwn(Desc, key) && !allowed[key]) { + return false; + } + } + + if (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; +}; diff --git a/node_modules/es-abstract/helpers/isSamePropertyDescriptor.js b/node_modules/es-abstract/helpers/isSamePropertyDescriptor.js new file mode 100644 index 0000000000000..a6162a1d3c79d --- /dev/null +++ b/node_modules/es-abstract/helpers/isSamePropertyDescriptor.js @@ -0,0 +1,20 @@ +'use strict'; + +var every = require('./every'); + +module.exports = function isSamePropertyDescriptor(ES, D1, D2) { + var fields = [ + '[[Configurable]]', + '[[Enumerable]]', + '[[Get]]', + '[[Set]]', + '[[Value]]', + '[[Writable]]' + ]; + return every(fields, function (field) { + if ((field in D1) !== (field in D2)) { + return false; + } + return ES.SameValue(D1[field], D2[field]); + }); +}; diff --git a/node_modules/es-abstract/helpers/isStringOrHole.js b/node_modules/es-abstract/helpers/isStringOrHole.js new file mode 100644 index 0000000000000..dea9aafef2f93 --- /dev/null +++ b/node_modules/es-abstract/helpers/isStringOrHole.js @@ -0,0 +1,9 @@ +'use strict'; + +// TODO: semver-major: remove + +var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false + +module.exports = function isStringOrHole(item, index, arr) { + return typeof item === 'string' || (canDistinguishSparseFromUndefined ? !(index in arr) : typeof item === 'undefined'); +}; diff --git a/node_modules/es-abstract/helpers/isStringOrUndefined.js b/node_modules/es-abstract/helpers/isStringOrUndefined.js new file mode 100644 index 0000000000000..7fc485779c3ad --- /dev/null +++ b/node_modules/es-abstract/helpers/isStringOrUndefined.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isStringOrUndefined(item) { + return typeof item === 'string' || typeof item === 'undefined'; +}; diff --git a/node_modules/es-abstract/helpers/isTrailingSurrogate.js b/node_modules/es-abstract/helpers/isTrailingSurrogate.js new file mode 100644 index 0000000000000..002930accf80e --- /dev/null +++ b/node_modules/es-abstract/helpers/isTrailingSurrogate.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isTrailingSurrogate(charCode) { + return typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF; +}; diff --git a/node_modules/es-abstract/helpers/maxSafeInteger.js b/node_modules/es-abstract/helpers/maxSafeInteger.js new file mode 100644 index 0000000000000..6eef5f23acf79 --- /dev/null +++ b/node_modules/es-abstract/helpers/maxSafeInteger.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1; diff --git a/node_modules/es-abstract/helpers/maxValue.js b/node_modules/es-abstract/helpers/maxValue.js new file mode 100644 index 0000000000000..71f490309a1b2 --- /dev/null +++ b/node_modules/es-abstract/helpers/maxValue.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = Number.MAX_VALUE || 1.7976931348623157e+308; diff --git a/node_modules/es-abstract/helpers/mod.js b/node_modules/es-abstract/helpers/mod.js new file mode 100644 index 0000000000000..67c8b78a26f61 --- /dev/null +++ b/node_modules/es-abstract/helpers/mod.js @@ -0,0 +1,8 @@ +'use strict'; + +var $floor = Math.floor; + +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return $floor(remain >= 0 ? remain : remain + modulo); +}; diff --git a/node_modules/es-abstract/helpers/modBigInt.js b/node_modules/es-abstract/helpers/modBigInt.js new file mode 100644 index 0000000000000..22be2a1a70d8d --- /dev/null +++ b/node_modules/es-abstract/helpers/modBigInt.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function bigIntMod(BigIntRemainder, bigint, modulo) { + var remain = BigIntRemainder(bigint, modulo); + return remain >= 0 ? remain : remain + modulo; +}; diff --git a/node_modules/es-abstract/helpers/padTimeComponent.js b/node_modules/es-abstract/helpers/padTimeComponent.js new file mode 100644 index 0000000000000..0d8afc059ce07 --- /dev/null +++ b/node_modules/es-abstract/helpers/padTimeComponent.js @@ -0,0 +1,9 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $strSlice = callBound('String.prototype.slice'); + +module.exports = function padTimeComponent(c, count) { + return $strSlice('00' + c, -(count || 2)); +}; diff --git a/node_modules/es-abstract/helpers/reduce.js b/node_modules/es-abstract/helpers/reduce.js new file mode 100644 index 0000000000000..fb9a56f6da123 --- /dev/null +++ b/node_modules/es-abstract/helpers/reduce.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function reduce(arr, fn, init) { + var acc = init; + for (var i = 0; i < arr.length; i += 1) { + acc = fn(acc, arr[i], i); + } + return acc; +}; diff --git a/node_modules/es-abstract/helpers/regexTester.js b/node_modules/es-abstract/helpers/regexTester.js new file mode 100644 index 0000000000000..41e48bec34c66 --- /dev/null +++ b/node_modules/es-abstract/helpers/regexTester.js @@ -0,0 +1,5 @@ +'use strict'; + +// TODO: remove, semver-major + +module.exports = require('safe-regex-test'); diff --git a/node_modules/es-abstract/helpers/setProto.js b/node_modules/es-abstract/helpers/setProto.js new file mode 100644 index 0000000000000..57092680b604f --- /dev/null +++ b/node_modules/es-abstract/helpers/setProto.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var originalSetProto = GetIntrinsic('%Object.setPrototypeOf%', true); + +var hasProto = require('has-proto')(); + +module.exports = originalSetProto || ( + + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); diff --git a/node_modules/es-abstract/helpers/sign.js b/node_modules/es-abstract/helpers/sign.js new file mode 100644 index 0000000000000..598ea7d8b47f4 --- /dev/null +++ b/node_modules/es-abstract/helpers/sign.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function sign(number) { + return number >= 0 ? 1 : -1; +}; diff --git a/node_modules/es-abstract/helpers/some.js b/node_modules/es-abstract/helpers/some.js new file mode 100644 index 0000000000000..c0b440507745b --- /dev/null +++ b/node_modules/es-abstract/helpers/some.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function some(array, predicate) { + for (var i = 0; i < array.length; i += 1) { + if (predicate(array[i], i, array)) { + return true; + } + } + return false; +}; diff --git a/node_modules/es-abstract/helpers/timeConstants.js b/node_modules/es-abstract/helpers/timeConstants.js new file mode 100644 index 0000000000000..c275b40e70f12 --- /dev/null +++ b/node_modules/es-abstract/helpers/timeConstants.js @@ -0,0 +1,19 @@ +'use strict'; + +var HoursPerDay = 24; +var MinutesPerHour = 60; +var SecondsPerMinute = 60; +var msPerSecond = 1e3; +var msPerMinute = msPerSecond * SecondsPerMinute; +var msPerHour = msPerMinute * MinutesPerHour; +var msPerDay = 86400000; + +module.exports = { + HoursPerDay: HoursPerDay, + MinutesPerHour: MinutesPerHour, + SecondsPerMinute: SecondsPerMinute, + msPerSecond: msPerSecond, + msPerMinute: msPerMinute, + msPerHour: msPerHour, + msPerDay: msPerDay +}; diff --git a/node_modules/es-abstract/helpers/typedArrayConstructors.js b/node_modules/es-abstract/helpers/typedArrayConstructors.js new file mode 100644 index 0000000000000..2d35fa347b096 --- /dev/null +++ b/node_modules/es-abstract/helpers/typedArrayConstructors.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var constructors = { + __proto__: null, + $Int8Array: GetIntrinsic('%Int8Array%', true), + $Uint8Array: GetIntrinsic('%Uint8Array%', true), + $Uint8ClampedArray: GetIntrinsic('%Uint8ClampedArray%', true), + $Int16Array: GetIntrinsic('%Int16Array%', true), + $Uint16Array: GetIntrinsic('%Uint16Array%', true), + $Int32Array: GetIntrinsic('%Int32Array%', true), + $Uint32Array: GetIntrinsic('%Uint32Array%', true), + $BigInt64Array: GetIntrinsic('%BigInt64Array%', true), + $BigUint64Array: GetIntrinsic('%BigUint64Array%', true), + $Float32Array: GetIntrinsic('%Float32Array%', true), + $Float64Array: GetIntrinsic('%Float64Array%', true) +}; + +module.exports = function getConstructor(kind) { + return constructors['$' + kind]; +}; diff --git a/node_modules/es-abstract/helpers/valueToFloat32Bytes.js b/node_modules/es-abstract/helpers/valueToFloat32Bytes.js new file mode 100644 index 0000000000000..cf30576d8b9c6 --- /dev/null +++ b/node_modules/es-abstract/helpers/valueToFloat32Bytes.js @@ -0,0 +1,69 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); +var $pow = GetIntrinsic('%Math.pow%'); + +var isFinite = require('./isFinite'); +var isNaN = require('./isNaN'); +var isNegativeZero = require('./isNegativeZero'); + +var maxFiniteFloat32 = 3.4028234663852886e+38; // roughly 2 ** 128 - 1 + +module.exports = function valueToFloat32Bytes(value, isLittleEndian) { + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = isNegativeZero(value) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if ($abs(value) > maxFiniteFloat32 || !isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = $abs(value); // eslint-disable-line no-param-reassign + + var exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23) + 0.5; + mantissa = $floor(mantissa); + + exponent += 127; + exponent <<= 23; + + var result = (sign << 31) + | exponent + | mantissa; + + var byte0 = result & 255; + result >>= 8; + var byte1 = result & 255; + result >>= 8; + var byte2 = result & 255; + result >>= 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; +}; diff --git a/node_modules/es-abstract/helpers/valueToFloat64Bytes.js b/node_modules/es-abstract/helpers/valueToFloat64Bytes.js new file mode 100644 index 0000000000000..3c7d75cfd2952 --- /dev/null +++ b/node_modules/es-abstract/helpers/valueToFloat64Bytes.js @@ -0,0 +1,83 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $parseInt = GetIntrinsic('%parseInt%'); +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); + +var callBound = require('call-bind/callBound'); + +var $strIndexOf = callBound('String.prototype.indexOf'); +var $strSlice = callBound('String.prototype.slice'); + +var fractionToBitString = require('../helpers/fractionToBinaryString'); +var intToBinString = require('../helpers/intToBinaryString'); +var isNegativeZero = require('./isNegativeZero'); + +var float64bias = 1023; + +var elevenOnes = '11111111111'; +var elevenZeroes = '00000000000'; +var fiftyOneZeroes = elevenZeroes + elevenZeroes + elevenZeroes + elevenZeroes + '0000000'; + +// IEEE 754-1985 +module.exports = function valueToFloat64Bytes(value, isLittleEndian) { + var signBit = value < 0 || isNegativeZero(value) ? '1' : '0'; + var exponentBits; + var significandBits; + + if (isNaN(value)) { + exponentBits = elevenOnes; + significandBits = '1' + fiftyOneZeroes; + } else if (!isFinite(value)) { + exponentBits = elevenOnes; + significandBits = '0' + fiftyOneZeroes; + } else if (value === 0) { + exponentBits = elevenZeroes; + significandBits = '0' + fiftyOneZeroes; + } else { + value = $abs(value); // eslint-disable-line no-param-reassign + + // Isolate the integer part (digits before the decimal): + var integerPart = $floor(value); + + var intBinString = intToBinString(integerPart); // bit string for integer part + var fracBinString = fractionToBitString(value - integerPart); // bit string for fractional part + + var numberOfBits; + // find exponent needed to normalize integer+fractional parts + if (intBinString) { + exponentBits = intBinString.length - 1; // move the decimal to the left + } else { + var first1 = $strIndexOf(fracBinString, '1'); + if (first1 > -1) { + numberOfBits = first1 + 1; + } + exponentBits = -numberOfBits; // move the decimal to the right + } + + significandBits = intBinString + fracBinString; + if (exponentBits < 0) { + // subnormals + if (exponentBits <= -float64bias) { + numberOfBits = float64bias - 1; // limit number of removed bits + } + significandBits = $strSlice(significandBits, numberOfBits); // remove all leading 0s and the first 1 for normal values; for subnormals, remove up to `float64bias - 1` leading bits + } else { + significandBits = $strSlice(significandBits, 1); // remove the leading '1' (implicit/hidden bit) + } + exponentBits = $strSlice(elevenZeroes + intToBinString(exponentBits + float64bias), -11); // Convert the exponent to a bit string + + significandBits = $strSlice(significandBits + fiftyOneZeroes + '0', 0, 52); // fill in any trailing zeros and ensure we have only 52 fraction bits + } + + var bits = signBit + exponentBits + significandBits; + var rawBytes = []; + for (var i = 0; i < 8; i++) { + var targetIndex = isLittleEndian ? 8 - i - 1 : i; + rawBytes[targetIndex] = $parseInt($strSlice(bits, i * 8, (i + 1) * 8), 2); + } + + return rawBytes; +}; diff --git a/node_modules/es-abstract/index.js b/node_modules/es-abstract/index.js new file mode 100644 index 0000000000000..11bddca8c16af --- /dev/null +++ b/node_modules/es-abstract/index.js @@ -0,0 +1,34 @@ +'use strict'; + +var assign = require('./helpers/assign'); + +var ES5 = require('./es5'); +var ES2015 = require('./es2015'); +var ES2016 = require('./es2016'); +var ES2017 = require('./es2017'); +var ES2018 = require('./es2018'); +var ES2019 = require('./es2019'); +var ES2020 = require('./es2020'); +var ES2021 = require('./es2021'); +var ES2022 = require('./es2022'); +var ES2023 = require('./es2023'); + +var ES = { + ES5: ES5, + ES6: ES2015, + ES2015: ES2015, + ES7: ES2016, + ES2016: ES2016, + ES2017: ES2017, + ES2018: ES2018, + ES2019: ES2019, + ES2020: ES2020, + ES2021: ES2021, + ES2022: ES2022, + ES2023: ES2023 +}; +assign(ES, ES5); +delete ES.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible +assign(ES, ES2015); + +module.exports = ES; diff --git a/node_modules/es-abstract/operations/.eslintrc b/node_modules/es-abstract/operations/.eslintrc new file mode 100644 index 0000000000000..bcd76f767154a --- /dev/null +++ b/node_modules/es-abstract/operations/.eslintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "id-length": 0, + }, +} diff --git a/node_modules/es-abstract/operations/2015.js b/node_modules/es-abstract/operations/2015.js new file mode 100644 index 0000000000000..9edb26779c498 --- /dev/null +++ b/node_modules/es-abstract/operations/2015.js @@ -0,0 +1,744 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op + + abs: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/6.0/#sec-abstract-relational-comparison' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/6.0/#sec-addrestrictedfunctionproperties' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/6.0/#sec-advancestringindex' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-allocatearraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/6.0/#sec-allocatetypedarray' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/6.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-arrayspeciescreate' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/6.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/6.0/#sec-implicit-completion-values' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/6.0/#sec-completion-record-specification-type' + }, + Construct: { + url: 'https://262.ecma-international.org/6.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/6.0/#sec-copydatablockbytes' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/6.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-createarrayiterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/6.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/6.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/6.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/6.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/6.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/6.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/6.0/#sec-createlistfromarraylike' + }, + CreateListIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-createlistiterator' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/6.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/6.0/#sec-createrealm' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-createsetiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/6.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-date-number' + }, + Day: { + url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + }, + DaylightSavingTA: { + url: 'https://262.ecma-international.org/6.0/#sec-daylight-saving-time-adjustment' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/6.0/#sec-month-number' + }, + Decode: { + url: 'https://262.ecma-international.org/6.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/6.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/6.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/6.0/#sec-enqueuejob' + }, + EnumerableOwnNames: { + url: 'https://262.ecma-international.org/6.0/#sec-enumerableownnames' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/6.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/6.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/6.0/#sec-evaluatecall' + }, + EvaluateDirectCall: { + url: 'https://262.ecma-international.org/6.0/#sec-evaluatedirectcall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/6.0/#sec-evaluatenew' + }, + floor: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/6.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/6.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/6.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-functioncreate' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/6.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/6.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/6.0/#sec-get-o-p' + }, + GetBase: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/6.0/#sec-getfunctionrealm' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/6.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/6.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/6.0/#sec-getmethod' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/6.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/6.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/6.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/6.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/6.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/6.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/6.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/6.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/6.0/#sec-getviewvalue' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + HasProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-hasproperty' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/6.0/#sec-importedlocalnames' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/6.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/6.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/6.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/6.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/6.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/6.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/6.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/6.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/6.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/6.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/6.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/6.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/6.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/6.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/6.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/6.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/6.0/#sec-isregexp' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratorvalue' + }, + LocalTime: { + url: 'https://262.ecma-international.org/6.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/6.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/6.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/6.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/6.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/6.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/6.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/6.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/6.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + min: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-month-number' + }, + msFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds' + }, + msPerDay: { + url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/6.0/#sec-newpromisecapability' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/6.0/#sec-normalcompletion' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/6.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty' + }, + ParseModule: { + url: 'https://262.ecma-international.org/6.0/#sec-parsemodule' + }, + PerformEval: { + url: 'https://262.ecma-international.org/6.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/6.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/6.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/6.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/6.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/6.0/#sec-preparefortailcall' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/6.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/6.0/#sec-quotejsonstring' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/6.0/#sec-rejectpromise' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/6.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/6.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/6.0/#sec-resolvethisbinding' + }, + SameValue: { + url: 'https://262.ecma-international.org/6.0/#sec-samevalue' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/6.0/#sec-samevaluezero' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/6.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/6.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/6.0/#sec-setdefaultglobalbindings' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/6.0/#sec-setfunctionname' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/6.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/6.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/6.0/#sec-setviewvalue' + }, + sign: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + SortCompare: { + url: 'https://262.ecma-international.org/6.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/6.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/6.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-stringcreate' + }, + StringGetIndexProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-stringgetindexproperty' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/6.0/#sec-symboldescriptivestring' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/6.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object' + }, + TimeClip: { + url: 'https://262.ecma-international.org/6.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/6.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/6.0/#sec-todatestring' + }, + ToInt16: { + url: 'https://262.ecma-international.org/6.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/6.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/6.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/6.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/6.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/6.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/6.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/6.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/6.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/6.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/6.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/6.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/6.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/6.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/6.0/#sec-triggerpromisereactions' + }, + Type: { + url: 'https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayFrom: { + url: 'https://262.ecma-international.org/6.0/#sec-typedarrayfrom' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/6.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/6.0/#sec-utc-t' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/6.0/#sec-validatetypedarray' + }, + WeekDay: { + url: 'https://262.ecma-international.org/6.0/#sec-week-day' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + } +}; diff --git a/node_modules/es-abstract/operations/2016.js b/node_modules/es-abstract/operations/2016.js new file mode 100644 index 0000000000000..66e6d4afc8534 --- /dev/null +++ b/node_modules/es-abstract/operations/2016.js @@ -0,0 +1,813 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op + + abs: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/7.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/7.0/#sec-abstract-relational-comparison' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/7.0/#sec-addrestrictedfunctionproperties' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/7.0/#sec-advancestringindex' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-allocatearraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/7.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/7.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-arrayspeciescreate' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/7.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/7.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/7.0/#sec-canonicalnumericindexstring' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/7.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/7.0/#sec-completion-record-specification-type' + }, + Construct: { + url: 'https://262.ecma-international.org/7.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/7.0/#sec-copydatablockbytes' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/7.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createarrayiterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/7.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/7.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/7.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/7.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/7.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/7.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/7.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/7.0/#sec-createlistfromarraylike' + }, + CreateListIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createlistiterator' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/7.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/7.0/#sec-createrealm' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/7.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createsetiterator' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/7.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-date-number' + }, + Day: { + url: 'https://262.ecma-international.org/7.0/#sec-day-number-and-time-within-day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + }, + DaylightSavingTA: { + url: 'https://262.ecma-international.org/7.0/#sec-daylight-saving-time-adjustment' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/7.0/#sec-month-number' + }, + Decode: { + url: 'https://262.ecma-international.org/7.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/7.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/7.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/7.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/7.0/#sec-enqueuejob' + }, + EnumerableOwnNames: { + url: 'https://262.ecma-international.org/7.0/#sec-enumerableownnames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/7.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/7.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/7.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/7.0/#sec-evaluatecall' + }, + EvaluateDirectCall: { + url: 'https://262.ecma-international.org/7.0/#sec-evaluatedirectcall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/7.0/#sec-evaluatenew' + }, + floor: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/7.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/7.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/7.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-functioncreate' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/7.0/#sec-functiondeclarationinstantiation' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/7.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/7.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/7.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/7.0/#sec-getactivescriptormodule' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/7.0/#sec-getfunctionrealm' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/7.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/7.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/7.0/#sec-getmethod' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/7.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/7.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/7.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-getprototypefromconstructor' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/7.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/7.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/7.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/7.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/7.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/7.0/#sec-getviewvalue' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/7.0/#sec-globaldeclarationinstantiation' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-hasownproperty' + }, + HasProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-hasproperty' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/7.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/7.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/7.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/7.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/7.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/7.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/7.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/7.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/7.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/7.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/7.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/7.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/7.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/7.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/7.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/7.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/7.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/7.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/7.0/#sec-ispropertykey' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/7.0/#sec-isregexp' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToArrayLike: { + url: 'https://262.ecma-international.org/7.0/#sec-iterabletoarraylike' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratorvalue' + }, + LocalTime: { + url: 'https://262.ecma-international.org/7.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/7.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/7.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/7.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/7.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/7.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/7.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/7.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/7.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + min: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-month-number' + }, + msFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/7.0/#sec-newpromisecapability' + }, + NextJob: { + url: 'https://262.ecma-international.org/7.0/#sec-nextjob-result' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/7.0/#sec-normalcompletion' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/7.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarydelete' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryisextensible' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof' + }, + ParseModule: { + url: 'https://262.ecma-international.org/7.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/7.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/7.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/7.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/7.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/7.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/7.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/7.0/#sec-preparefortailcall' + }, + PromiseReactionJob: { + url: 'https://262.ecma-international.org/7.0/#sec-promisereactionjob' + }, + PromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/7.0/#sec-promiseresolvethenablejob' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/7.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/7.0/#sec-quotejsonstring' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/7.0/#sec-rejectpromise' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/7.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/7.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/7.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/7.0/#sec-returnifabrupt' + }, + SameValue: { + url: 'https://262.ecma-international.org/7.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/7.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/7.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-scriptevaluation' + }, + ScriptEvaluationJob: { + url: 'https://262.ecma-international.org/7.0/#sec-scriptevaluationjob' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/7.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/7.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/7.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/7.0/#sec-setdefaultglobalbindings' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/7.0/#sec-setfunctionname' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/7.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/7.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/7.0/#sec-setviewvalue' + }, + SortCompare: { + url: 'https://262.ecma-international.org/7.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/7.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/7.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-stringcreate' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/7.0/#sec-symboldescriptivestring' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/7.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/7.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-number-prototype-object' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-string-prototype-object' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-date-prototype-object' + }, + TimeClip: { + url: 'https://262.ecma-international.org/7.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/7.0/#sec-day-number-and-time-within-day' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/7.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/7.0/#sec-todatestring' + }, + ToInt16: { + url: 'https://262.ecma-international.org/7.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/7.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/7.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/7.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/7.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/7.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/7.0/#sec-toobject' + }, + TopLevelModuleEvaluationJob: { + url: 'https://262.ecma-international.org/7.0/#sec-toplevelmoduleevaluationjob' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/7.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/7.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/7.0/#sec-tostring' + }, + 'ToString Applied to the Number Type': { + url: 'https://262.ecma-international.org/7.0/#sec-tostring-applied-to-the-number-type' + }, + ToUint16: { + url: 'https://262.ecma-international.org/7.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/7.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/7.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/7.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/7.0/#sec-triggerpromisereactions' + }, + Type: { + url: 'https://262.ecma-international.org/7.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/7.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/7.0/#typedarray-species-create' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/7.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/7.0/#sec-utc-t' + }, + UTF16Decode: { + url: 'https://262.ecma-international.org/7.0/#sec-utf16decode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/7.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-validateandapplypropertydescriptor' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/7.0/#sec-validatetypedarray' + }, + WeekDay: { + url: 'https://262.ecma-international.org/7.0/#sec-week-day' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + } +}; diff --git a/node_modules/es-abstract/operations/2017.js b/node_modules/es-abstract/operations/2017.js new file mode 100644 index 0000000000000..5fa6e6aeafdbe --- /dev/null +++ b/node_modules/es-abstract/operations/2017.js @@ -0,0 +1,954 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op + + abs: { + url: 'https://262.ecma-international.org/8.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/8.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/8.0/#sec-abstract-relational-comparison' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/8.0/#sec-addrestrictedfunctionproperties' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/8.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/8.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/8.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/8.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/8.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/8.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/8.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-arrayspeciescreate' + }, + AsyncFunctionAwait: { + url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-await' + }, + AsyncFunctionCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-create' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AtomicLoad: { + url: 'https://262.ecma-international.org/8.0/#sec-atomicload' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/8.0/#sec-atomicreadmodifywrite' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/8.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/8.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/8.0/#sec-canonicalnumericindexstring' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/8.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/8.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/8.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/8.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/8.0/#sec-copydatablockbytes' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/8.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createarrayiterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/8.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/8.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/8.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/8.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/8.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/8.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/8.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/8.0/#sec-createlistfromarraylike' + }, + CreateListIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createlistiterator' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/8.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/8.0/#sec-createrealm' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/8.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/8.0/#sec-createsharedbytedatablock' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/8.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/8.0/#sec-date-number' + }, + Day: { + url: 'https://262.ecma-international.org/8.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-DaysFromYear' + }, + DaylightSavingTA: { + url: 'https://262.ecma-international.org/8.0/#sec-daylight-saving-time-adjustment' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/8.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/8.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/8.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/8.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/8.0/#sec-enqueuejob' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/8.0/#sec-entercriticalsection' + }, + EnumerableOwnProperties: { + url: 'https://262.ecma-international.org/8.0/#sec-enumerableownproperties' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/8.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/8.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/8.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/8.0/#sec-evaluatecall' + }, + EvaluateDirectCall: { + url: 'https://262.ecma-international.org/8.0/#sec-evaluatedirectcall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/8.0/#sec-evaluatenew' + }, + EventSet: { + url: 'https://262.ecma-international.org/8.0/#sec-event-set' + }, + floor: { + url: 'https://262.ecma-international.org/8.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/8.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/8.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/8.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-functioncreate' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/8.0/#sec-functiondeclarationinstantiation' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/8.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/8.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/8.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/8.0/#sec-getactivescriptormodule' + }, + GetBase: { + url: 'https://262.ecma-international.org/8.0/#ao-getbase' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/8.0/#sec-getfunctionrealm' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/8.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/8.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/8.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/8.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/8.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/8.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/8.0/#ao-getreferencedname' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/8.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/8.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/8.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/8.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/8.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/8.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/8.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/8.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/8.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/8.0/#ao-hasprimitivebase' + }, + HasProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/8.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/8.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/8.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/8.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/8.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/8.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/8.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-InLeapYear' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/8.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/8.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/8.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/8.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/8.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/8.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/8.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/8.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/8.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/8.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/8.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/8.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/8.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/8.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/8.0/#ao-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/8.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-issharedarraybuffer' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/8.0/#ao-isstrictreference' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/8.0/#ao-issuperreference' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/8.0/#ao-isunresolvablereference' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/8.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/8.0/#sec-leavecriticalsection' + }, + LocalTime: { + url: 'https://262.ecma-international.org/8.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/8.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/8.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/8.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/8.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/8.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/8.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/8.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/8.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/8.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/8.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/8.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/8.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/8.0/#sec-newpromisecapability' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/8.0/#sec-normalcompletion' + }, + NumberToRawBytes: { + url: 'https://262.ecma-international.org/8.0/#sec-numbertorawbytes' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/8.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarydelete' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryisextensible' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarysetprototypeof' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/8.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/8.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/8.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/8.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/8.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/8.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/8.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/8.0/#sec-preparefortailcall' + }, + PromiseReactionJob: { + url: 'https://262.ecma-international.org/8.0/#sec-promisereactionjob' + }, + PromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/8.0/#sec-promiseresolvethenablejob' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/8.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/8.0/#sec-quotejsonstring' + }, + RawBytesToNumber: { + url: 'https://262.ecma-international.org/8.0/#sec-rawbytestonumber' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/8.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/8.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/8.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/8.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/8.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/8.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/8.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/8.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/8.0/#sec-returnifabrupt' + }, + RunJobs: { + url: 'https://262.ecma-international.org/8.0/#sec-runjobs' + }, + SameValue: { + url: 'https://262.ecma-international.org/8.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/8.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/8.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-scriptevaluation' + }, + ScriptEvaluationJob: { + url: 'https://262.ecma-international.org/8.0/#sec-scriptevaluationjob' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/8.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/8.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/8.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/8.0/#sec-setdefaultglobalbindings' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/8.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/8.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/8.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/8.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/8.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/8.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/8.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/8.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/8.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-stringgetownproperty' + }, + Suspend: { + url: 'https://262.ecma-international.org/8.0/#sec-suspend' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/8.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/8.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/8.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/8.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/8.0/#sec-thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/8.0/#sec-thisstringvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/8.0/#sec-thistimevalue' + }, + TimeClip: { + url: 'https://262.ecma-international.org/8.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-TimeFromYear' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/8.0/#eqn-TimeWithinDay' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/8.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/8.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/8.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/8.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/8.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/8.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/8.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/8.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/8.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/8.0/#sec-toobject' + }, + TopLevelModuleEvaluationJob: { + url: 'https://262.ecma-international.org/8.0/#sec-toplevelmoduleevaluationjob' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/8.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/8.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/8.0/#sec-tostring' + }, + 'ToString Applied to the Number Type': { + url: 'https://262.ecma-international.org/8.0/#sec-tostring-applied-to-the-number-type' + }, + ToUint16: { + url: 'https://262.ecma-international.org/8.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/8.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/8.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/8.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/8.0/#sec-triggerpromisereactions' + }, + Type: { + url: 'https://262.ecma-international.org/8.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/8.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/8.0/#typedarray-species-create' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/8.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/8.0/#sec-utc-t' + }, + UTF16Decode: { + url: 'https://262.ecma-international.org/8.0/#sec-utf16decode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/8.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/8.0/#sec-validateatomicaccess' + }, + ValidateSharedIntegerTypedArray: { + url: 'https://262.ecma-international.org/8.0/#sec-validatesharedintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/8.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/8.0/#sec-valueofreadevent' + }, + WakeWaiter: { + url: 'https://262.ecma-international.org/8.0/#sec-wakewaiter' + }, + WeekDay: { + url: 'https://262.ecma-international.org/8.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-YearFromTime' + } +}; diff --git a/node_modules/es-abstract/operations/2018.js b/node_modules/es-abstract/operations/2018.js new file mode 100644 index 0000000000000..251a409205fa4 --- /dev/null +++ b/node_modules/es-abstract/operations/2018.js @@ -0,0 +1,1033 @@ +'use strict'; + +module.exports = { + abs: { + url: 'https://262.ecma-international.org/9.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/9.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/9.0/#sec-addrestrictedfunctionproperties' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/9.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/9.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/9.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/9.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/9.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/9.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/9.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-arrayspeciescreate' + }, + AsyncFunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-async-functions-abstract-operations-async-function-create' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/9.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorfunctioncreate' + }, + AsyncGeneratorReject: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorreject' + }, + AsyncGeneratorResolve: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorresolve' + }, + AsyncGeneratorResumeNext: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorresumenext' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/9.0/#sec-asynciteratorclose' + }, + AtomicLoad: { + url: 'https://262.ecma-international.org/9.0/#sec-atomicload' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/9.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/9.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/9.0/#sec-backreference-matcher' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/9.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/9.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/9.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/9.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/9.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/9.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/9.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/9.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/9.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createasyncfromsynciterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/9.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/9.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/9.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/9.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/9.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/9.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/9.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/9.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/9.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/9.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/9.0/#sec-createrealm' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/9.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/9.0/#sec-createsharedbytedatablock' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/9.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/9.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/9.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/9.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/9.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/9.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/9.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/9.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/9.0/#sec-enqueuejob' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/9.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/9.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/9.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/9.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/9.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/9.0/#sec-evaluatenew' + }, + EventSet: { + url: 'https://262.ecma-international.org/9.0/#sec-event-set' + }, + floor: { + url: 'https://262.ecma-international.org/9.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/9.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/9.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/9.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-functioncreate' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-functiondeclarationinstantiation' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/9.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/9.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/9.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/9.0/#sec-getactivescriptormodule' + }, + GetBase: { + url: 'https://262.ecma-international.org/9.0/#sec-getbase' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/9.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/9.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/9.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/9.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/9.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/9.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/9.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/9.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/9.0/#sec-getreferencedname' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/9.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/9.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/9.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/9.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/9.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/9.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/9.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/9.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/9.0/#sec-hasprimitivebase' + }, + HasProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/9.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/9.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/9.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/9.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/9.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/9.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/9.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/9.0/#sec-innermoduleevaluation' + }, + InnerModuleInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-innermoduleinstantiation' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/9.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/9.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/9.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/9.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/9.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/9.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/9.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/9.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/9.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/9.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/9.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/9.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/9.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/9.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/9.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/9.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-issharedarraybuffer' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/9.0/#sec-isstrictreference' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/9.0/#sec-isstringprefix' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/9.0/#sec-issuperreference' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/9.0/#sec-isunresolvablereference' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/9.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/9.0/#sec-leavecriticalsection' + }, + LocalTime: { + url: 'https://262.ecma-international.org/9.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/9.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/9.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/9.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/9.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/9.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/9.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/9.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/9.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/9.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/9.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/9.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-MinFromTime' + }, + ModuleDeclarationEnvironmentSetup: { + url: 'https://262.ecma-international.org/9.0/#sec-moduledeclarationenvironmentsetup' + }, + ModuleExecution: { + url: 'https://262.ecma-international.org/9.0/#sec-moduleexecution' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/9.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/9.0/#sec-newpromisecapability' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/9.0/#sec-normalcompletion' + }, + NumberToRawBytes: { + url: 'https://262.ecma-international.org/9.0/#sec-numbertorawbytes' + }, + NumberToString: { + url: 'https://262.ecma-international.org/9.0/#sec-tostring-applied-to-the-number-type' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/9.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarydelete' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryisextensible' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/9.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/9.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/9.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/9.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/9.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/9.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/9.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/9.0/#sec-preparefortailcall' + }, + PromiseReactionJob: { + url: 'https://262.ecma-international.org/9.0/#sec-promisereactionjob' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/9.0/#sec-promise-resolve' + }, + PromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/9.0/#sec-promiseresolvethenablejob' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/9.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/9.0/#sec-quotejsonstring' + }, + RawBytesToNumber: { + url: 'https://262.ecma-international.org/9.0/#sec-rawbytestonumber' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/9.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/9.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/9.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/9.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/9.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/9.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/9.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/9.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/9.0/#sec-returnifabrupt' + }, + RunJobs: { + url: 'https://262.ecma-international.org/9.0/#sec-runjobs' + }, + SameValue: { + url: 'https://262.ecma-international.org/9.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/9.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/9.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-scriptevaluation' + }, + ScriptEvaluationJob: { + url: 'https://262.ecma-international.org/9.0/#sec-scriptevaluationjob' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/9.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/9.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/9.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/9.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/9.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/9.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/9.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/9.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/9.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/9.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/9.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/9.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/9.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/9.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-stringgetownproperty' + }, + Suspend: { + url: 'https://262.ecma-international.org/9.0/#sec-suspend' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/9.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/9.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/9.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/9.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/9.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/9.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/9.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/9.0/#sec-timezoneestring' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/9.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/9.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/9.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/9.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/9.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/9.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/9.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/9.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/9.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/9.0/#sec-toobject' + }, + TopLevelModuleEvaluationJob: { + url: 'https://262.ecma-international.org/9.0/#sec-toplevelmoduleevaluationjob' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/9.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/9.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/9.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/9.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/9.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/9.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/9.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/9.0/#sec-triggerpromisereactions' + }, + Type: { + url: 'https://262.ecma-international.org/9.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/9.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/9.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/9.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/9.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/9.0/#sec-utc-t' + }, + UTF16Decode: { + url: 'https://262.ecma-international.org/9.0/#sec-utf16decode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/9.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/9.0/#sec-validateatomicaccess' + }, + ValidateSharedIntegerTypedArray: { + url: 'https://262.ecma-international.org/9.0/#sec-validatesharedintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/9.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/9.0/#sec-valueofreadevent' + }, + WakeWaiter: { + url: 'https://262.ecma-international.org/9.0/#sec-wakewaiter' + }, + WeekDay: { + url: 'https://262.ecma-international.org/9.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-YearFromTime' + } +}; diff --git a/node_modules/es-abstract/operations/2019.js b/node_modules/es-abstract/operations/2019.js new file mode 100644 index 0000000000000..d19150c8dc45c --- /dev/null +++ b/node_modules/es-abstract/operations/2019.js @@ -0,0 +1,1048 @@ +'use strict'; + +module.exports = { + abs: { + url: 'https://262.ecma-international.org/10.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/10.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/10.0/#sec-abstract-relational-comparison' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/10.0/#sec-addrestrictedfunctionproperties' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/10.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/10.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/10.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/10.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/10.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/10.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/10.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-arrayspeciescreate' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-async-functions-abstract-operations-async-function-create' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/10.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorfunctioncreate' + }, + AsyncGeneratorReject: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorreject' + }, + AsyncGeneratorResolve: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorresolve' + }, + AsyncGeneratorResumeNext: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorresumenext' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/10.0/#sec-asynciteratorclose' + }, + AtomicLoad: { + url: 'https://262.ecma-international.org/10.0/#sec-atomicload' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/10.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/10.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/10.0/#sec-backreference-matcher' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/10.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/10.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/10.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/10.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/10.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/10.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/10.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/10.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/10.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createasyncfromsynciterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/10.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/10.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/10.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/10.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/10.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/10.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/10.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/10.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/10.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/10.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/10.0/#sec-createrealm' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/10.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/10.0/#sec-createsharedbytedatablock' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/10.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/10.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/10.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/10.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/10.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/10.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/10.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/10.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/10.0/#sec-enqueuejob' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/10.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/10.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/10.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/10.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/10.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/10.0/#sec-evaluatenew' + }, + EventSet: { + url: 'https://262.ecma-international.org/10.0/#sec-event-set' + }, + ExecuteModule: { + url: 'https://262.ecma-international.org/10.0/#sec-source-text-module-record-execute-module' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/10.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/10.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/10.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/10.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/10.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-functioncreate' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-functiondeclarationinstantiation' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/10.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/10.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/10.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/10.0/#sec-getactivescriptormodule' + }, + GetBase: { + url: 'https://262.ecma-international.org/10.0/#sec-getbase' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/10.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/10.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/10.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/10.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/10.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/10.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/10.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/10.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/10.0/#sec-getreferencedname' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/10.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/10.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/10.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/10.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/10.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/10.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/10.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/10.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/10.0/#sec-hasprimitivebase' + }, + HasProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/10.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/10.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/10.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/10.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/10.0/#sec-initializeboundname' + }, + InitializeEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-source-text-module-record-initialize-environment' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/10.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/10.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/10.0/#sec-innermoduleevaluation' + }, + InnerModuleInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-innermoduleinstantiation' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/10.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/10.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/10.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/10.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/10.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/10.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/10.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/10.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/10.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/10.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/10.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/10.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/10.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/10.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/10.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/10.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-issharedarraybuffer' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/10.0/#sec-isstrictreference' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/10.0/#sec-isstringprefix' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/10.0/#sec-issuperreference' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/10.0/#sec-isunresolvablereference' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/10.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/10.0/#sec-leavecriticalsection' + }, + LocalTime: { + url: 'https://262.ecma-international.org/10.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/10.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/10.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/10.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/10.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/10.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/10.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/10.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/10.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/10.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/10.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/10.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/10.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/10.0/#sec-newpromisecapability' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/10.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/10.0/#sec-notifywaiter' + }, + NumberToRawBytes: { + url: 'https://262.ecma-international.org/10.0/#sec-numbertorawbytes' + }, + NumberToString: { + url: 'https://262.ecma-international.org/10.0/#sec-tostring-applied-to-the-number-type' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/10.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarydelete' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryisextensible' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/10.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/10.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/10.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/10.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/10.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/10.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/10.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/10.0/#sec-preparefortailcall' + }, + PromiseReactionJob: { + url: 'https://262.ecma-international.org/10.0/#sec-promisereactionjob' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/10.0/#sec-promise-resolve' + }, + PromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/10.0/#sec-promiseresolvethenablejob' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/10.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/10.0/#sec-quotejsonstring' + }, + RawBytesToNumber: { + url: 'https://262.ecma-international.org/10.0/#sec-rawbytestonumber' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/10.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/10.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/10.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/10.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/10.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/10.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/10.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/10.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/10.0/#sec-returnifabrupt' + }, + RunJobs: { + url: 'https://262.ecma-international.org/10.0/#sec-runjobs' + }, + SameValue: { + url: 'https://262.ecma-international.org/10.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/10.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/10.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-scriptevaluation' + }, + ScriptEvaluationJob: { + url: 'https://262.ecma-international.org/10.0/#sec-scriptevaluationjob' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/10.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/10.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/10.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/10.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/10.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/10.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/10.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/10.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/10.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/10.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/10.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/10.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/10.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/10.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-stringgetownproperty' + }, + Suspend: { + url: 'https://262.ecma-international.org/10.0/#sec-suspend' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/10.0/#sec-symboldescriptivestring' + }, + SynchronizeEventSet: { + url: 'https://262.ecma-international.org/10.0/#sec-synchronizeeventset' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/10.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/10.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/10.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/10.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/10.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/10.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/10.0/#sec-timezoneestring' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/10.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/10.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/10.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/10.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/10.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/10.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/10.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/10.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/10.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/10.0/#sec-toobject' + }, + TopLevelModuleEvaluationJob: { + url: 'https://262.ecma-international.org/10.0/#sec-toplevelmoduleevaluationjob' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/10.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/10.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/10.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/10.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/10.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/10.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/10.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/10.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/10.0/#sec-trimstring' + }, + Type: { + url: 'https://262.ecma-international.org/10.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/10.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/10.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/10.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/10.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/10.0/#sec-utc-t' + }, + UTF16Decode: { + url: 'https://262.ecma-international.org/10.0/#sec-utf16decode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/10.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/10.0/#sec-validateatomicaccess' + }, + ValidateSharedIntegerTypedArray: { + url: 'https://262.ecma-international.org/10.0/#sec-validatesharedintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/10.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/10.0/#sec-valueofreadevent' + }, + WeekDay: { + url: 'https://262.ecma-international.org/10.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-YearFromTime' + } +}; diff --git a/node_modules/es-abstract/operations/2020.js b/node_modules/es-abstract/operations/2020.js new file mode 100644 index 0000000000000..1e448539f245f --- /dev/null +++ b/node_modules/es-abstract/operations/2020.js @@ -0,0 +1,1228 @@ +'use strict'; + +module.exports = { + abs: { + url: 'https://262.ecma-international.org/11.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/11.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/11.0/#sec-abstract-relational-comparison' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/11.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/11.0/#sec-addrestrictedfunctionproperties' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/11.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/11.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/11.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/11.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/11.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/11.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/11.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-arrayspeciescreate' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/11.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorReject: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorreject' + }, + AsyncGeneratorResolve: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorresolve' + }, + AsyncGeneratorResumeNext: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorresumenext' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/11.0/#sec-asynciteratorclose' + }, + AtomicLoad: { + url: 'https://262.ecma-international.org/11.0/#sec-atomicload' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/11.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/11.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/11.0/#sec-backreference-matcher' + }, + 'BigInt::add': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add' + }, + 'BigInt::bitwiseAND': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND' + }, + 'BigInt::bitwiseNOT': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT' + }, + 'BigInt::bitwiseOR': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR' + }, + 'BigInt::bitwiseXOR': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR' + }, + 'BigInt::divide': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide' + }, + 'BigInt::equal': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal' + }, + 'BigInt::exponentiate': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate' + }, + 'BigInt::leftShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift' + }, + 'BigInt::lessThan': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan' + }, + 'BigInt::multiply': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply' + }, + 'BigInt::remainder': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder' + }, + 'BigInt::sameValue': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue' + }, + 'BigInt::sameValueZero': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero' + }, + 'BigInt::signedRightShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift' + }, + 'BigInt::subtract': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract' + }, + 'BigInt::toString': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring' + }, + 'BigInt::unaryMinus': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus' + }, + 'BigInt::unsignedRightShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift' + }, + BigIntBitwiseOp: { + url: 'https://262.ecma-international.org/11.0/#sec-bigintbitwiseop' + }, + BinaryAnd: { + url: 'https://262.ecma-international.org/11.0/#sec-binaryand' + }, + BinaryOr: { + url: 'https://262.ecma-international.org/11.0/#sec-binaryor' + }, + BinaryXor: { + url: 'https://262.ecma-international.org/11.0/#sec-binaryxor' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/11.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/11.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/11.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-clonearraybuffer' + }, + CodePointAt: { + url: 'https://262.ecma-international.org/11.0/#sec-codepointat' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/11.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/11.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/11.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/11.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/11.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/11.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/11.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/11.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/11.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/11.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/11.0/#sec-createdynamicfunction' + }, + CreateForInIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createforiniterator' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/11.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/11.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/11.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/11.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/11.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/11.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/11.0/#sec-createrealm' + }, + CreateRegExpStringIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createregexpstringiterator' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/11.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/11.0/#sec-createsharedbytedatablock' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/11.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/11.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/11.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/11.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/11.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/11.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/11.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/11.0/#sec-encode' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/11.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/11.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/11.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/11.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/11.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/11.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/11.0/#sec-evaluatenew' + }, + EvaluatePropertyAccessWithExpressionKey: { + url: 'https://262.ecma-international.org/11.0/#sec-evaluate-property-access-with-expression-key' + }, + EvaluatePropertyAccessWithIdentifierKey: { + url: 'https://262.ecma-international.org/11.0/#sec-evaluate-property-access-with-identifier-key' + }, + EventSet: { + url: 'https://262.ecma-international.org/11.0/#sec-event-set' + }, + ExecuteModule: { + url: 'https://262.ecma-international.org/11.0/#sec-source-text-module-record-execute-module' + }, + FinishDynamicImport: { + url: 'https://262.ecma-international.org/11.0/#sec-finishdynamicimport' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/11.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/11.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/11.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-forinofheadevaluation' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/11.0/#sec-fulfillpromise' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/11.0/#sec-functiondeclarationinstantiation' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/11.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/11.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/11.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/11.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/11.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/11.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/11.0/#sec-getactivescriptormodule' + }, + GetBase: { + url: 'https://262.ecma-international.org/11.0/#sec-getbase' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/11.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/11.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/11.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/11.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/11.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/11.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/11.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/11.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/11.0/#sec-getreferencedname' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/11.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/11.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/11.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/11.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/11.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/11.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/11.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/11.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/11.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/11.0/#sec-hasprimitivebase' + }, + HasProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/11.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/11.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/11.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/11.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/11.0/#sec-initializeboundname' + }, + InitializeEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-source-text-module-record-initialize-environment' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/11.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/11.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/11.0/#sec-innermoduleevaluation' + }, + InnerModuleLinking: { + url: 'https://262.ecma-international.org/11.0/#sec-InnerModuleLinking' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/11.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/11.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/11.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/11.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/11.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/11.0/#sec-isarray' + }, + IsBigIntElementType: { + url: 'https://262.ecma-international.org/11.0/#sec-isbigintelementtype' + }, + IsCallable: { + url: 'https://262.ecma-international.org/11.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/11.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/11.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/11.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/11.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/11.0/#sec-islabelledfunction' + }, + IsNonNegativeInteger: { + url: 'https://262.ecma-international.org/11.0/#sec-isnonnegativeinteger' + }, + IsNoTearConfiguration: { + url: 'https://262.ecma-international.org/11.0/#sec-isnotearconfiguration' + }, + IsPromise: { + url: 'https://262.ecma-international.org/11.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/11.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/11.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/11.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-issharedarraybuffer' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/11.0/#sec-isstrictreference' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/11.0/#sec-isstringprefix' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/11.0/#sec-issuperreference' + }, + IsUnclampedIntegerElementType: { + url: 'https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/11.0/#sec-isunresolvablereference' + }, + IsUnsignedElementType: { + url: 'https://262.ecma-international.org/11.0/#sec-isunsignedelementtype' + }, + IsValidIntegerIndex: { + url: 'https://262.ecma-international.org/11.0/#sec-isvalidintegerindex' + }, + IsValidRegularExpressionLiteral: { + url: 'https://262.ecma-international.org/11.0/#sec-isvalidregularexpressionliteral' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/11.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/11.0/#sec-leavecriticalsection' + }, + LengthOfArrayLike: { + url: 'https://262.ecma-international.org/11.0/#sec-lengthofarraylike' + }, + LocalTime: { + url: 'https://262.ecma-international.org/11.0/#sec-localtime' + }, + LocalTZA: { + url: 'https://262.ecma-international.org/11.0/#sec-local-time-zone-adjustment' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/11.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/11.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/11.0/#sec-makeargsetter' + }, + MakeBasicObject: { + url: 'https://262.ecma-international.org/11.0/#sec-makebasicobject' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/11.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/11.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/11.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/11.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/11.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/11.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/11.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/11.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/11.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/11.0/#sec-newpromisecapability' + }, + NewPromiseReactionJob: { + url: 'https://262.ecma-international.org/11.0/#sec-newpromisereactionjob' + }, + NewPromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/11.0/#sec-newpromiseresolvethenablejob' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/11.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/11.0/#sec-notifywaiter' + }, + 'Number::add': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-add' + }, + 'Number::bitwiseAND': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND' + }, + 'Number::bitwiseNOT': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT' + }, + 'Number::bitwiseOR': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR' + }, + 'Number::bitwiseXOR': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR' + }, + 'Number::divide': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide' + }, + 'Number::equal': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal' + }, + 'Number::exponentiate': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate' + }, + 'Number::leftShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-leftShift' + }, + 'Number::lessThan': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan' + }, + 'Number::multiply': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply' + }, + 'Number::remainder': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-remainder' + }, + 'Number::sameValue': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue' + }, + 'Number::sameValueZero': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero' + }, + 'Number::signedRightShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-signedRightShift' + }, + 'Number::subtract': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-subtract' + }, + 'Number::toString': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring' + }, + 'Number::unaryMinus': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus' + }, + 'Number::unsignedRightShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-unsignedRightShift' + }, + NumberBitwiseOp: { + url: 'https://262.ecma-international.org/11.0/#sec-numberbitwiseop' + }, + NumberToBigInt: { + url: 'https://262.ecma-international.org/11.0/#sec-numbertobigint' + }, + NumericToRawBytes: { + url: 'https://262.ecma-international.org/11.0/#sec-numerictorawbytes' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/11.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarydelete' + }, + OrdinaryFunctionCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryfunctioncreate' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryisextensible' + }, + OrdinaryObjectCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryobjectcreate' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/11.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/11.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/11.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/11.0/#sec-performpromiseall' + }, + PerformPromiseAllSettled: { + url: 'https://262.ecma-international.org/11.0/#sec-performpromiseallsettled' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/11.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/11.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/11.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/11.0/#sec-preparefortailcall' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/11.0/#sec-promise-resolve' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/11.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/11.0/#sec-quotejsonstring' + }, + RawBytesToNumeric: { + url: 'https://262.ecma-international.org/11.0/#sec-rawbytestonumeric' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/11.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/11.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/11.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/11.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/11.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireInternalSlot: { + url: 'https://262.ecma-international.org/11.0/#sec-requireinternalslot' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/11.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/11.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/11.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/11.0/#sec-returnifabrupt' + }, + SameValue: { + url: 'https://262.ecma-international.org/11.0/#sec-samevalue' + }, + SameValueNonNumeric: { + url: 'https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/11.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-scriptevaluation' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/11.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/11.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/11.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/11.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/11.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/11.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/11.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/11.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/11.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/11.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/11.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/11.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/11.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/11.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-stringgetownproperty' + }, + StringPad: { + url: 'https://262.ecma-international.org/11.0/#sec-stringpad' + }, + StringToBigInt: { + url: 'https://262.ecma-international.org/11.0/#sec-stringtobigint' + }, + Suspend: { + url: 'https://262.ecma-international.org/11.0/#sec-suspend' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/11.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/11.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/11.0/#sec-testintegritylevel' + }, + thisBigIntValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thisbigintvalue' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/11.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/11.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/11.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/11.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/11.0/#sec-timezoneestring' + }, + ToBigInt: { + url: 'https://262.ecma-international.org/11.0/#sec-tobigint' + }, + ToBigInt64: { + url: 'https://262.ecma-international.org/11.0/#sec-tobigint64' + }, + ToBigUint64: { + url: 'https://262.ecma-international.org/11.0/#sec-tobiguint64' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/11.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/11.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/11.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/11.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/11.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/11.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/11.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/11.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/11.0/#sec-tonumber' + }, + ToNumeric: { + url: 'https://262.ecma-international.org/11.0/#sec-tonumeric' + }, + ToObject: { + url: 'https://262.ecma-international.org/11.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/11.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/11.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/11.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/11.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/11.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/11.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/11.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/11.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/11.0/#sec-trimstring' + }, + Type: { + url: 'https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/11.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/11.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/11.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/11.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/11.0/#sec-utc-t' + }, + UTF16DecodeString: { + url: 'https://262.ecma-international.org/11.0/#sec-utf16decodestring' + }, + UTF16DecodeSurrogatePair: { + url: 'https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair' + }, + UTF16Encode: { + url: 'https://262.ecma-international.org/11.0/#sec-utf16encode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/11.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/11.0/#sec-validateatomicaccess' + }, + ValidateSharedIntegerTypedArray: { + url: 'https://262.ecma-international.org/11.0/#sec-validatesharedintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/11.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/11.0/#sec-valueofreadevent' + }, + WeekDay: { + url: 'https://262.ecma-international.org/11.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-YearFromTime' + } +}; diff --git a/node_modules/es-abstract/operations/2021.js b/node_modules/es-abstract/operations/2021.js new file mode 100644 index 0000000000000..7d4ff210a596d --- /dev/null +++ b/node_modules/es-abstract/operations/2021.js @@ -0,0 +1,1282 @@ +'use strict'; + +module.exports = { + abs: { + url: 'https://262.ecma-international.org/12.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/12.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/12.0/#sec-abstract-relational-comparison' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/12.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/12.0/#sec-addrestrictedfunctionproperties' + }, + AddToKeptObjects: { + url: 'https://262.ecma-international.org/12.0/#sec-addtokeptobjects' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/12.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/12.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/12.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/12.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/12.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-allocatetypedarraybuffer' + }, + ApplyStringOrNumericBinaryOperator: { + url: 'https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/12.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-arrayspeciescreate' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/12.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorReject: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorreject' + }, + AsyncGeneratorResolve: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorresolve' + }, + AsyncGeneratorResumeNext: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorresumenext' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorValidate: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorvalidate' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/12.0/#sec-asynciteratorclose' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/12.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/12.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/12.0/#sec-backreference-matcher' + }, + 'BigInt::add': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-add' + }, + 'BigInt::bitwiseAND': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-bitwiseAND' + }, + 'BigInt::bitwiseNOT': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-bitwiseNOT' + }, + 'BigInt::bitwiseOR': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-bitwiseOR' + }, + 'BigInt::bitwiseXOR': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-bitwiseXOR' + }, + 'BigInt::divide': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-divide' + }, + 'BigInt::equal': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-equal' + }, + 'BigInt::exponentiate': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-exponentiate' + }, + 'BigInt::leftShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-leftShift' + }, + 'BigInt::lessThan': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-lessThan' + }, + 'BigInt::multiply': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-multiply' + }, + 'BigInt::remainder': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-remainder' + }, + 'BigInt::sameValue': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-sameValue' + }, + 'BigInt::sameValueZero': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-sameValueZero' + }, + 'BigInt::signedRightShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-signedRightShift' + }, + 'BigInt::subtract': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-subtract' + }, + 'BigInt::toString': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-tostring' + }, + 'BigInt::unaryMinus': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-unaryMinus' + }, + 'BigInt::unsignedRightShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-unsignedRightShift' + }, + BigIntBitwiseOp: { + url: 'https://262.ecma-international.org/12.0/#sec-bigintbitwiseop' + }, + BinaryAnd: { + url: 'https://262.ecma-international.org/12.0/#sec-binaryand' + }, + BinaryOr: { + url: 'https://262.ecma-international.org/12.0/#sec-binaryor' + }, + BinaryXor: { + url: 'https://262.ecma-international.org/12.0/#sec-binaryxor' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/12.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-boundfunctioncreate' + }, + ByteListBitwiseOp: { + url: 'https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop' + }, + ByteListEqual: { + url: 'https://262.ecma-international.org/12.0/#sec-bytelistequal' + }, + Call: { + url: 'https://262.ecma-international.org/12.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/12.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + clamp: { + url: 'https://262.ecma-international.org/12.0/#clamping' + }, + CleanupFinalizationRegistry: { + url: 'https://262.ecma-international.org/12.0/#sec-cleanup-finalization-registry' + }, + ClearKeptObjects: { + url: 'https://262.ecma-international.org/12.0/#sec-clear-kept-objects' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-clonearraybuffer' + }, + CodePointAt: { + url: 'https://262.ecma-international.org/12.0/#sec-codepointat' + }, + CodePointsToString: { + url: 'https://262.ecma-international.org/12.0/#sec-codepointstostring' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/12.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/12.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/12.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/12.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/12.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/12.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/12.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createasyncfromsynciterator' + }, + CreateAsyncIteratorFromClosure: { + url: 'https://262.ecma-international.org/12.0/#sec-createasynciteratorfromclosure' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/12.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/12.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/12.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/12.0/#sec-createdynamicfunction' + }, + CreateForInIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createforiniterator' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/12.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/12.0/#sec-createintrinsics' + }, + CreateIteratorFromClosure: { + url: 'https://262.ecma-international.org/12.0/#sec-createiteratorfromclosure' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/12.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/12.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/12.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/12.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/12.0/#sec-createrealm' + }, + CreateRegExpStringIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createregexpstringiterator' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/12.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/12.0/#sec-createsharedbytedatablock' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/12.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/12.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/12.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/12.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/12.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/12.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/12.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/12.0/#sec-encode' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/12.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/12.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/12.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/12.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/12.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluatenew' + }, + EvaluatePropertyAccessWithExpressionKey: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluate-property-access-with-expression-key' + }, + EvaluatePropertyAccessWithIdentifierKey: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluate-property-access-with-identifier-key' + }, + EvaluateStringOrNumericBinaryExpression: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluatestringornumericbinaryexpression' + }, + EventSet: { + url: 'https://262.ecma-international.org/12.0/#sec-event-set' + }, + ExecuteModule: { + url: 'https://262.ecma-international.org/12.0/#sec-source-text-module-record-execute-module' + }, + FinishDynamicImport: { + url: 'https://262.ecma-international.org/12.0/#sec-finishdynamicimport' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/12.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/12.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/12.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-forinofheadevaluation' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/12.0/#sec-fulfillpromise' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/12.0/#sec-functiondeclarationinstantiation' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/12.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/12.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/12.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/12.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/12.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/12.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/12.0/#sec-getactivescriptormodule' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/12.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/12.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/12.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/12.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/12.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/12.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/12.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/12.0/#sec-getownpropertykeys' + }, + GetPromiseResolve: { + url: 'https://262.ecma-international.org/12.0/#sec-getpromiseresolve' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-getprototypefromconstructor' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/12.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/12.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/12.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/12.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/12.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/12.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/12.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/12.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/12.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-hasownproperty' + }, + HasProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/12.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/12.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/12.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/12.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/12.0/#sec-initializeboundname' + }, + InitializeEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-source-text-module-record-initialize-environment' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/12.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/12.0/#sec-initializereferencedbinding' + }, + InitializeTypedArrayFromArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-initializetypedarrayfromarraybuffer' + }, + InitializeTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/12.0/#sec-initializetypedarrayfromarraylike' + }, + InitializeTypedArrayFromList: { + url: 'https://262.ecma-international.org/12.0/#sec-initializetypedarrayfromlist' + }, + InitializeTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-initializetypedarrayfromtypedarray' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/12.0/#sec-innermoduleevaluation' + }, + InnerModuleLinking: { + url: 'https://262.ecma-international.org/12.0/#sec-InnerModuleLinking' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/12.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/12.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/12.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/12.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/12.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/12.0/#sec-isarray' + }, + IsBigIntElementType: { + url: 'https://262.ecma-international.org/12.0/#sec-isbigintelementtype' + }, + IsCallable: { + url: 'https://262.ecma-international.org/12.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/12.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/12.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/12.0/#sec-isintailposition' + }, + IsIntegralNumber: { + url: 'https://262.ecma-international.org/12.0/#sec-isintegralnumber' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/12.0/#sec-islabelledfunction' + }, + IsNoTearConfiguration: { + url: 'https://262.ecma-international.org/12.0/#sec-isnotearconfiguration' + }, + IsPromise: { + url: 'https://262.ecma-international.org/12.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/12.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/12.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/12.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-issharedarraybuffer' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/12.0/#sec-isstringprefix' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/12.0/#sec-issuperreference' + }, + IsUnclampedIntegerElementType: { + url: 'https://262.ecma-international.org/12.0/#sec-isunclampedintegerelementtype' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/12.0/#sec-isunresolvablereference' + }, + IsUnsignedElementType: { + url: 'https://262.ecma-international.org/12.0/#sec-isunsignedelementtype' + }, + IsValidIntegerIndex: { + url: 'https://262.ecma-international.org/12.0/#sec-isvalidintegerindex' + }, + IsValidRegularExpressionLiteral: { + url: 'https://262.ecma-international.org/12.0/#sec-isvalidregularexpressionliteral' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/12.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/12.0/#sec-leavecriticalsection' + }, + LengthOfArrayLike: { + url: 'https://262.ecma-international.org/12.0/#sec-lengthofarraylike' + }, + LocalTime: { + url: 'https://262.ecma-international.org/12.0/#sec-localtime' + }, + LocalTZA: { + url: 'https://262.ecma-international.org/12.0/#sec-local-time-zone-adjustment' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/12.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/12.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/12.0/#sec-makeargsetter' + }, + MakeBasicObject: { + url: 'https://262.ecma-international.org/12.0/#sec-makebasicobject' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/12.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/12.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/12.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/12.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/12.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/12.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/12.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/12.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/12.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/12.0/#sec-newpromisecapability' + }, + NewPromiseReactionJob: { + url: 'https://262.ecma-international.org/12.0/#sec-newpromisereactionjob' + }, + NewPromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/12.0/#sec-newpromiseresolvethenablejob' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/12.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/12.0/#sec-notifywaiter' + }, + 'Number::add': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-add' + }, + 'Number::bitwiseAND': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-bitwiseAND' + }, + 'Number::bitwiseNOT': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-bitwiseNOT' + }, + 'Number::bitwiseOR': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-bitwiseOR' + }, + 'Number::bitwiseXOR': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-bitwiseXOR' + }, + 'Number::divide': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-divide' + }, + 'Number::equal': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-equal' + }, + 'Number::exponentiate': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-exponentiate' + }, + 'Number::leftShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift' + }, + 'Number::lessThan': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-lessThan' + }, + 'Number::multiply': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-multiply' + }, + 'Number::remainder': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-remainder' + }, + 'Number::sameValue': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-sameValue' + }, + 'Number::sameValueZero': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-sameValueZero' + }, + 'Number::signedRightShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift' + }, + 'Number::subtract': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract' + }, + 'Number::toString': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-tostring' + }, + 'Number::unaryMinus': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-unaryMinus' + }, + 'Number::unsignedRightShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift' + }, + NumberBitwiseOp: { + url: 'https://262.ecma-international.org/12.0/#sec-numberbitwiseop' + }, + NumberToBigInt: { + url: 'https://262.ecma-international.org/12.0/#sec-numbertobigint' + }, + NumericToRawBytes: { + url: 'https://262.ecma-international.org/12.0/#sec-numerictorawbytes' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/12.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarydelete' + }, + OrdinaryFunctionCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryfunctioncreate' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryisextensible' + }, + OrdinaryObjectCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryobjectcreate' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/12.0/#sec-parsemodule' + }, + ParsePattern: { + url: 'https://262.ecma-international.org/12.0/#sec-parsepattern' + }, + ParseScript: { + url: 'https://262.ecma-international.org/12.0/#sec-parse-script' + }, + ParseText: { + url: 'https://262.ecma-international.org/12.0/#sec-parsetext' + }, + PerformEval: { + url: 'https://262.ecma-international.org/12.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromiseall' + }, + PerformPromiseAllSettled: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromiseallsettled' + }, + PerformPromiseAny: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromiseany' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/12.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/12.0/#sec-preparefortailcall' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/12.0/#sec-promise-resolve' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/12.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/12.0/#sec-quotejsonstring' + }, + RawBytesToNumeric: { + url: 'https://262.ecma-international.org/12.0/#sec-rawbytestonumeric' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/12.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/12.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/12.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/12.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/12.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireInternalSlot: { + url: 'https://262.ecma-international.org/12.0/#sec-requireinternalslot' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/12.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/12.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/12.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/12.0/#sec-returnifabrupt' + }, + SameValue: { + url: 'https://262.ecma-international.org/12.0/#sec-samevalue' + }, + SameValueNonNumeric: { + url: 'https://262.ecma-international.org/12.0/#sec-samevaluenonnumeric' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/12.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-scriptevaluation' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/12.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/12.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/12.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/12.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/12.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/12.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/12.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/12.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/12.0/#sec-setrealmglobalobject' + }, + SetTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/12.0/#sec-settypedarrayfromarraylike' + }, + SetTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-settypedarrayfromtypedarray' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/12.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/12.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/12.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/12.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/12.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-stringgetownproperty' + }, + StringIndexOf: { + url: 'https://262.ecma-international.org/12.0/#sec-stringindexof' + }, + StringPad: { + url: 'https://262.ecma-international.org/12.0/#sec-stringpad' + }, + StringToBigInt: { + url: 'https://262.ecma-international.org/12.0/#sec-stringtobigint' + }, + StringToCodePoints: { + url: 'https://262.ecma-international.org/12.0/#sec-stringtocodepoints' + }, + substring: { + url: 'https://262.ecma-international.org/12.0/#substring' + }, + SuspendAgent: { + url: 'https://262.ecma-international.org/12.0/#sec-suspendagent' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/12.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/12.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/12.0/#sec-testintegritylevel' + }, + thisBigIntValue: { + url: 'https://262.ecma-international.org/12.0/#thisbigintvalue' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/12.0/#thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/12.0/#thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/12.0/#thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/12.0/#thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/12.0/#thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/12.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/12.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/12.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/12.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/12.0/#sec-timezoneestring' + }, + ToBigInt: { + url: 'https://262.ecma-international.org/12.0/#sec-tobigint' + }, + ToBigInt64: { + url: 'https://262.ecma-international.org/12.0/#sec-tobigint64' + }, + ToBigUint64: { + url: 'https://262.ecma-international.org/12.0/#sec-tobiguint64' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/12.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/12.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/12.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/12.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/12.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/12.0/#sec-toint8' + }, + ToIntegerOrInfinity: { + url: 'https://262.ecma-international.org/12.0/#sec-tointegerorinfinity' + }, + ToLength: { + url: 'https://262.ecma-international.org/12.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/12.0/#sec-tonumber' + }, + ToNumeric: { + url: 'https://262.ecma-international.org/12.0/#sec-tonumeric' + }, + ToObject: { + url: 'https://262.ecma-international.org/12.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/12.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/12.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/12.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/12.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/12.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/12.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/12.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/12.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/12.0/#sec-trimstring' + }, + Type: { + url: 'https://262.ecma-international.org/12.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/12.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/12.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/12.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/12.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/12.0/#sec-utc-t' + }, + UTF16EncodeCodePoint: { + url: 'https://262.ecma-international.org/12.0/#sec-utf16encodecodepoint' + }, + UTF16SurrogatePairToCodePoint: { + url: 'https://262.ecma-international.org/12.0/#sec-utf16decodesurrogatepair' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/12.0/#sec-validateatomicaccess' + }, + ValidateIntegerTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-validateintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/12.0/#sec-valueofreadevent' + }, + WeakRefDeref: { + url: 'https://262.ecma-international.org/12.0/#sec-weakrefderef' + }, + WeekDay: { + url: 'https://262.ecma-international.org/12.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-YearFromTime' + }, + Yield: { + url: 'https://262.ecma-international.org/12.0/#sec-yield' + } +}; diff --git a/node_modules/es-abstract/operations/2022.js b/node_modules/es-abstract/operations/2022.js new file mode 100644 index 0000000000000..f678e68ead1a3 --- /dev/null +++ b/node_modules/es-abstract/operations/2022.js @@ -0,0 +1,1372 @@ +'use strict'; + +module.exports = { + abs: { + url: 'https://262.ecma-international.org/13.0/#eqn-abs' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/13.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-addrestrictedfunctionproperties' + }, + AddToKeptObjects: { + url: 'https://262.ecma-international.org/13.0/#sec-addtokeptobjects' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/13.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/13.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/13.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/13.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/13.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-allocatetypedarraybuffer' + }, + ApplyStringOrNumericBinaryOperator: { + url: 'https://262.ecma-international.org/13.0/#sec-applystringornumericbinaryoperator' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/13.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-arrayspeciescreate' + }, + AsyncBlockStart: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncblockstart' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/13.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorAwaitReturn: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorawaitreturn' + }, + AsyncGeneratorCompleteStep: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorcompletestep' + }, + AsyncGeneratorDrainQueue: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratordrainqueue' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorResume: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorresume' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorUnwrapYieldResumption: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorunwrapyieldresumption' + }, + AsyncGeneratorValidate: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorvalidate' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/13.0/#sec-asynciteratorclose' + }, + AsyncModuleExecutionFulfilled: { + url: 'https://262.ecma-international.org/13.0/#sec-async-module-execution-fulfilled' + }, + AsyncModuleExecutionRejected: { + url: 'https://262.ecma-international.org/13.0/#sec-async-module-execution-rejected' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/13.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/13.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/13.0/#sec-backreference-matcher' + }, + 'BigInt::add': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-add' + }, + 'BigInt::bitwiseAND': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-bitwiseAND' + }, + 'BigInt::bitwiseNOT': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-bitwiseNOT' + }, + 'BigInt::bitwiseOR': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-bitwiseOR' + }, + 'BigInt::bitwiseXOR': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-bitwiseXOR' + }, + 'BigInt::divide': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-divide' + }, + 'BigInt::equal': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-equal' + }, + 'BigInt::exponentiate': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-exponentiate' + }, + 'BigInt::leftShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-leftShift' + }, + 'BigInt::lessThan': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-lessThan' + }, + 'BigInt::multiply': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-multiply' + }, + 'BigInt::remainder': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-remainder' + }, + 'BigInt::sameValue': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-sameValue' + }, + 'BigInt::sameValueZero': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-sameValueZero' + }, + 'BigInt::signedRightShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-signedRightShift' + }, + 'BigInt::subtract': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-subtract' + }, + 'BigInt::toString': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-tostring' + }, + 'BigInt::unaryMinus': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-unaryMinus' + }, + 'BigInt::unsignedRightShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-unsignedRightShift' + }, + BigIntBitwiseOp: { + url: 'https://262.ecma-international.org/13.0/#sec-bigintbitwiseop' + }, + BinaryAnd: { + url: 'https://262.ecma-international.org/13.0/#sec-binaryand' + }, + BinaryOr: { + url: 'https://262.ecma-international.org/13.0/#sec-binaryor' + }, + BinaryXor: { + url: 'https://262.ecma-international.org/13.0/#sec-binaryxor' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/13.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-boundfunctioncreate' + }, + ByteListBitwiseOp: { + url: 'https://262.ecma-international.org/13.0/#sec-bytelistbitwiseop' + }, + ByteListEqual: { + url: 'https://262.ecma-international.org/13.0/#sec-bytelistequal' + }, + Call: { + url: 'https://262.ecma-international.org/13.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/13.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + clamp: { + url: 'https://262.ecma-international.org/13.0/#clamping' + }, + CleanupFinalizationRegistry: { + url: 'https://262.ecma-international.org/13.0/#sec-cleanup-finalization-registry' + }, + ClearKeptObjects: { + url: 'https://262.ecma-international.org/13.0/#sec-clear-kept-objects' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-clonearraybuffer' + }, + CodePointAt: { + url: 'https://262.ecma-international.org/13.0/#sec-codepointat' + }, + CodePointsToString: { + url: 'https://262.ecma-international.org/13.0/#sec-codepointstostring' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/13.0/#sec-completion-ao' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/13.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/13.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/13.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/13.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/13.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createasyncfromsynciterator' + }, + CreateAsyncIteratorFromClosure: { + url: 'https://262.ecma-international.org/13.0/#sec-createasynciteratorfromclosure' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/13.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/13.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/13.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/13.0/#sec-createdynamicfunction' + }, + CreateForInIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createforiniterator' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/13.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/13.0/#sec-createintrinsics' + }, + CreateIteratorFromClosure: { + url: 'https://262.ecma-international.org/13.0/#sec-createiteratorfromclosure' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/13.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/13.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/13.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/13.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-createmethodproperty' + }, + CreateNonEnumerableDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/13.0/#sec-createnonenumerabledatapropertyorthrow' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/13.0/#sec-createrealm' + }, + CreateRegExpStringIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createregexpstringiterator' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/13.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/13.0/#sec-createsharedbytedatablock' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/13.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/13.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/13.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/13.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/13.0/#sec-decode' + }, + DefineField: { + url: 'https://262.ecma-international.org/13.0/#sec-definefield' + }, + DefineMethodProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-definemethodproperty' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/13.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/13.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/13.0/#sec-encode' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/13.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/13.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/13.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/13.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluatenew' + }, + EvaluatePropertyAccessWithExpressionKey: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluate-property-access-with-expression-key' + }, + EvaluatePropertyAccessWithIdentifierKey: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluate-property-access-with-identifier-key' + }, + EvaluateStringOrNumericBinaryExpression: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluatestringornumericbinaryexpression' + }, + EventSet: { + url: 'https://262.ecma-international.org/13.0/#sec-event-set' + }, + ExecuteAsyncModule: { + url: 'https://262.ecma-international.org/13.0/#sec-execute-async-module' + }, + FinishDynamicImport: { + url: 'https://262.ecma-international.org/13.0/#sec-finishdynamicimport' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/13.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/13.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/13.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-forinofheadevaluation' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/13.0/#sec-fulfillpromise' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/13.0/#sec-functiondeclarationinstantiation' + }, + GatherAvailableAncestors: { + url: 'https://262.ecma-international.org/13.0/#sec-gather-available-ancestors' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/13.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/13.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/13.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/13.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/13.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/13.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/13.0/#sec-getactivescriptormodule' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/13.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/13.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/13.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/13.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-getiterator' + }, + GetMatchIndexPair: { + url: 'https://262.ecma-international.org/13.0/#sec-getmatchindexpair' + }, + GetMatchString: { + url: 'https://262.ecma-international.org/13.0/#sec-getmatchstring' + }, + GetMethod: { + url: 'https://262.ecma-international.org/13.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/13.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/13.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/13.0/#sec-getownpropertykeys' + }, + GetPromiseResolve: { + url: 'https://262.ecma-international.org/13.0/#sec-getpromiseresolve' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-getprototypefromconstructor' + }, + GetStringIndex: { + url: 'https://262.ecma-international.org/13.0/#sec-getstringindex' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/13.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/13.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/13.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/13.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/13.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/13.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/13.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/13.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/13.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-hasownproperty' + }, + HasProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/13.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/13.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-HourFromTime' + }, + IfAbruptCloseIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-ifabruptcloseiterator' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/13.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/13.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/13.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/13.0/#sec-initializehostdefinedrealm' + }, + InitializeInstanceElements: { + url: 'https://262.ecma-international.org/13.0/#sec-initializeinstanceelements' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/13.0/#sec-initializereferencedbinding' + }, + InitializeTypedArrayFromArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-initializetypedarrayfromarraybuffer' + }, + InitializeTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/13.0/#sec-initializetypedarrayfromarraylike' + }, + InitializeTypedArrayFromList: { + url: 'https://262.ecma-international.org/13.0/#sec-initializetypedarrayfromlist' + }, + InitializeTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-initializetypedarrayfromtypedarray' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/13.0/#sec-innermoduleevaluation' + }, + InnerModuleLinking: { + url: 'https://262.ecma-international.org/13.0/#sec-InnerModuleLinking' + }, + InstallErrorCause: { + url: 'https://262.ecma-international.org/13.0/#sec-installerrorcause' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/13.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/13.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/13.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/13.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/13.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/13.0/#sec-isarray' + }, + IsBigIntElementType: { + url: 'https://262.ecma-international.org/13.0/#sec-isbigintelementtype' + }, + IsCallable: { + url: 'https://262.ecma-international.org/13.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/13.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/13.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/13.0/#sec-isintailposition' + }, + IsIntegralNumber: { + url: 'https://262.ecma-international.org/13.0/#sec-isintegralnumber' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/13.0/#sec-islabelledfunction' + }, + IsLessThan: { + url: 'https://262.ecma-international.org/13.0/#sec-islessthan' + }, + IsLooselyEqual: { + url: 'https://262.ecma-international.org/13.0/#sec-islooselyequal' + }, + IsNoTearConfiguration: { + url: 'https://262.ecma-international.org/13.0/#sec-isnotearconfiguration' + }, + IsPrivateReference: { + url: 'https://262.ecma-international.org/13.0/#sec-isprivatereference' + }, + IsPromise: { + url: 'https://262.ecma-international.org/13.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/13.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/13.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/13.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-issharedarraybuffer' + }, + IsStrictlyEqual: { + url: 'https://262.ecma-international.org/13.0/#sec-isstrictlyequal' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/13.0/#sec-isstringprefix' + }, + IsStringWellFormedUnicode: { + url: 'https://262.ecma-international.org/13.0/#sec-isstringwellformedunicode' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/13.0/#sec-issuperreference' + }, + IsUnclampedIntegerElementType: { + url: 'https://262.ecma-international.org/13.0/#sec-isunclampedintegerelementtype' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/13.0/#sec-isunresolvablereference' + }, + IsUnsignedElementType: { + url: 'https://262.ecma-international.org/13.0/#sec-isunsignedelementtype' + }, + IsValidIntegerIndex: { + url: 'https://262.ecma-international.org/13.0/#sec-isvalidintegerindex' + }, + IsValidRegularExpressionLiteral: { + url: 'https://262.ecma-international.org/13.0/#sec-isvalidregularexpressionliteral' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/13.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/13.0/#sec-leavecriticalsection' + }, + LengthOfArrayLike: { + url: 'https://262.ecma-international.org/13.0/#sec-lengthofarraylike' + }, + LocalTime: { + url: 'https://262.ecma-international.org/13.0/#sec-localtime' + }, + LocalTZA: { + url: 'https://262.ecma-international.org/13.0/#sec-local-time-zone-adjustment' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/13.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/13.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/13.0/#sec-makeargsetter' + }, + MakeBasicObject: { + url: 'https://262.ecma-international.org/13.0/#sec-makebasicobject' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/13.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/13.0/#sec-makeday' + }, + MakeMatchIndicesIndexPairArray: { + url: 'https://262.ecma-international.org/13.0/#sec-makematchindicesindexpairarray' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/13.0/#sec-makemethod' + }, + MakePrivateReference: { + url: 'https://262.ecma-international.org/13.0/#sec-makeprivatereference' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/13.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/13.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/13.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/13.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/13.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/13.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newobjectenvironment' + }, + NewPrivateEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newprivateenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/13.0/#sec-newpromisecapability' + }, + NewPromiseReactionJob: { + url: 'https://262.ecma-international.org/13.0/#sec-newpromisereactionjob' + }, + NewPromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/13.0/#sec-newpromiseresolvethenablejob' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/13.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/13.0/#sec-notifywaiter' + }, + 'Number::add': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-add' + }, + 'Number::bitwiseAND': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-bitwiseAND' + }, + 'Number::bitwiseNOT': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-bitwiseNOT' + }, + 'Number::bitwiseOR': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-bitwiseOR' + }, + 'Number::bitwiseXOR': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-bitwiseXOR' + }, + 'Number::divide': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-divide' + }, + 'Number::equal': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-equal' + }, + 'Number::exponentiate': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-exponentiate' + }, + 'Number::leftShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-leftShift' + }, + 'Number::lessThan': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-lessThan' + }, + 'Number::multiply': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-multiply' + }, + 'Number::remainder': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-remainder' + }, + 'Number::sameValue': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-sameValue' + }, + 'Number::sameValueZero': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-sameValueZero' + }, + 'Number::signedRightShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-signedRightShift' + }, + 'Number::subtract': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-subtract' + }, + 'Number::toString': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-tostring' + }, + 'Number::unaryMinus': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-unaryMinus' + }, + 'Number::unsignedRightShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-unsignedRightShift' + }, + NumberBitwiseOp: { + url: 'https://262.ecma-international.org/13.0/#sec-numberbitwiseop' + }, + NumberToBigInt: { + url: 'https://262.ecma-international.org/13.0/#sec-numbertobigint' + }, + NumericToRawBytes: { + url: 'https://262.ecma-international.org/13.0/#sec-numerictorawbytes' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarydelete' + }, + OrdinaryFunctionCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryfunctioncreate' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryisextensible' + }, + OrdinaryObjectCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryobjectcreate' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/13.0/#sec-parsemodule' + }, + ParsePattern: { + url: 'https://262.ecma-international.org/13.0/#sec-parsepattern' + }, + ParseScript: { + url: 'https://262.ecma-international.org/13.0/#sec-parse-script' + }, + ParseText: { + url: 'https://262.ecma-international.org/13.0/#sec-parsetext' + }, + PerformEval: { + url: 'https://262.ecma-international.org/13.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromiseall' + }, + PerformPromiseAllSettled: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromiseallsettled' + }, + PerformPromiseAny: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromiseany' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/13.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/13.0/#sec-preparefortailcall' + }, + PrivateElementFind: { + url: 'https://262.ecma-international.org/13.0/#sec-privateelementfind' + }, + PrivateFieldAdd: { + url: 'https://262.ecma-international.org/13.0/#sec-privatefieldadd' + }, + PrivateGet: { + url: 'https://262.ecma-international.org/13.0/#sec-privateget' + }, + PrivateMethodOrAccessorAdd: { + url: 'https://262.ecma-international.org/13.0/#sec-privatemethodoraccessoradd' + }, + PrivateSet: { + url: 'https://262.ecma-international.org/13.0/#sec-privateset' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/13.0/#sec-promise-resolve' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/13.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/13.0/#sec-quotejsonstring' + }, + RawBytesToNumeric: { + url: 'https://262.ecma-international.org/13.0/#sec-rawbytestonumeric' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/13.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/13.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpexec' + }, + RegExpHasFlag: { + url: 'https://262.ecma-international.org/13.0/#sec-regexphasflag' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/13.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/13.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/13.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireInternalSlot: { + url: 'https://262.ecma-international.org/13.0/#sec-requireinternalslot' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/13.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/13.0/#sec-resolvebinding' + }, + ResolvePrivateIdentifier: { + url: 'https://262.ecma-international.org/13.0/#sec-resolve-private-identifier' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/13.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/13.0/#sec-returnifabrupt' + }, + RoundMVResult: { + url: 'https://262.ecma-international.org/13.0/#sec-roundmvresult' + }, + SameValue: { + url: 'https://262.ecma-international.org/13.0/#sec-samevalue' + }, + SameValueNonNumeric: { + url: 'https://262.ecma-international.org/13.0/#sec-samevaluenonnumeric' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/13.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-scriptevaluation' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/13.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/13.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/13.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/13.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/13.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/13.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/13.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/13.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/13.0/#sec-setrealmglobalobject' + }, + SetTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/13.0/#sec-settypedarrayfromarraylike' + }, + SetTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-settypedarrayfromtypedarray' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/13.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/13.0/#sec-sharedatablockeventset' + }, + SortIndexedProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-sortindexedproperties' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-speciesconstructor' + }, + StringCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-stringgetownproperty' + }, + StringIndexOf: { + url: 'https://262.ecma-international.org/13.0/#sec-stringindexof' + }, + StringPad: { + url: 'https://262.ecma-international.org/13.0/#sec-stringpad' + }, + StringToBigInt: { + url: 'https://262.ecma-international.org/13.0/#sec-stringtobigint' + }, + StringToCodePoints: { + url: 'https://262.ecma-international.org/13.0/#sec-stringtocodepoints' + }, + StringToNumber: { + url: 'https://262.ecma-international.org/13.0/#sec-stringtonumber' + }, + substring: { + url: 'https://262.ecma-international.org/13.0/#substring' + }, + SuspendAgent: { + url: 'https://262.ecma-international.org/13.0/#sec-suspendagent' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/13.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/13.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/13.0/#sec-testintegritylevel' + }, + thisBigIntValue: { + url: 'https://262.ecma-international.org/13.0/#thisbigintvalue' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/13.0/#thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/13.0/#thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/13.0/#thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/13.0/#thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/13.0/#thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/13.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/13.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/13.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/13.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/13.0/#sec-timezoneestring' + }, + ToBigInt: { + url: 'https://262.ecma-international.org/13.0/#sec-tobigint' + }, + ToBigInt64: { + url: 'https://262.ecma-international.org/13.0/#sec-tobigint64' + }, + ToBigUint64: { + url: 'https://262.ecma-international.org/13.0/#sec-tobiguint64' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/13.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/13.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/13.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/13.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/13.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/13.0/#sec-toint8' + }, + ToIntegerOrInfinity: { + url: 'https://262.ecma-international.org/13.0/#sec-tointegerorinfinity' + }, + ToLength: { + url: 'https://262.ecma-international.org/13.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/13.0/#sec-tonumber' + }, + ToNumeric: { + url: 'https://262.ecma-international.org/13.0/#sec-tonumeric' + }, + ToObject: { + url: 'https://262.ecma-international.org/13.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/13.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/13.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/13.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/13.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/13.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/13.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/13.0/#sec-touint8clamp' + }, + ToZeroPaddedDecimalString: { + url: 'https://262.ecma-international.org/13.0/#sec-tozeropaddeddecimalstring' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/13.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/13.0/#sec-trimstring' + }, + Type: { + url: 'https://262.ecma-international.org/13.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/13.0/#typedarray-create' + }, + TypedArrayElementSize: { + url: 'https://262.ecma-international.org/13.0/#sec-typedarrayelementsize' + }, + TypedArrayElementType: { + url: 'https://262.ecma-international.org/13.0/#sec-typedarrayelementtype' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/13.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/13.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/13.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/13.0/#sec-utc-t' + }, + UTF16EncodeCodePoint: { + url: 'https://262.ecma-international.org/13.0/#sec-utf16encodecodepoint' + }, + UTF16SurrogatePairToCodePoint: { + url: 'https://262.ecma-international.org/13.0/#sec-utf16decodesurrogatepair' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/13.0/#sec-validateatomicaccess' + }, + ValidateIntegerTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-validateintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/13.0/#sec-valueofreadevent' + }, + WeakRefDeref: { + url: 'https://262.ecma-international.org/13.0/#sec-weakrefderef' + }, + WeekDay: { + url: 'https://262.ecma-international.org/13.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-YearFromTime' + }, + Yield: { + url: 'https://262.ecma-international.org/13.0/#sec-yield' + } +}; diff --git a/node_modules/es-abstract/operations/2023.js b/node_modules/es-abstract/operations/2023.js new file mode 100644 index 0000000000000..9bd85dd79be49 --- /dev/null +++ b/node_modules/es-abstract/operations/2023.js @@ -0,0 +1,1441 @@ +'use strict'; + +module.exports = { + abs: { + url: 'https://262.ecma-international.org/14.0/#eqn-abs' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/14.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/14.0/#sec-addrestrictedfunctionproperties' + }, + AddToKeptObjects: { + url: 'https://262.ecma-international.org/14.0/#sec-addtokeptobjects' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/14.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/14.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/14.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/14.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/14.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/14.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-allocatetypedarraybuffer' + }, + ApplyStringOrNumericBinaryOperator: { + url: 'https://262.ecma-international.org/14.0/#sec-applystringornumericbinaryoperator' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/14.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-arrayspeciescreate' + }, + AsyncBlockStart: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncblockstart' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/14.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorAwaitReturn: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratorawaitreturn' + }, + AsyncGeneratorCompleteStep: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratorcompletestep' + }, + AsyncGeneratorDrainQueue: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratordrainqueue' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorResume: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratorresume' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorUnwrapYieldResumption: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratorunwrapyieldresumption' + }, + AsyncGeneratorValidate: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratorvalidate' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/14.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/14.0/#sec-asynciteratorclose' + }, + AsyncModuleExecutionFulfilled: { + url: 'https://262.ecma-international.org/14.0/#sec-async-module-execution-fulfilled' + }, + AsyncModuleExecutionRejected: { + url: 'https://262.ecma-international.org/14.0/#sec-async-module-execution-rejected' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/14.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/14.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/14.0/#sec-backreference-matcher' + }, + 'BigInt::add': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-add' + }, + 'BigInt::bitwiseAND': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-bitwiseAND' + }, + 'BigInt::bitwiseNOT': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-bitwiseNOT' + }, + 'BigInt::bitwiseOR': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-bitwiseOR' + }, + 'BigInt::bitwiseXOR': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-bitwiseXOR' + }, + 'BigInt::divide': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-divide' + }, + 'BigInt::equal': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-equal' + }, + 'BigInt::exponentiate': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-exponentiate' + }, + 'BigInt::leftShift': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-leftShift' + }, + 'BigInt::lessThan': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-lessThan' + }, + 'BigInt::multiply': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-multiply' + }, + 'BigInt::remainder': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-remainder' + }, + 'BigInt::signedRightShift': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-signedRightShift' + }, + 'BigInt::subtract': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-subtract' + }, + 'BigInt::toString': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-tostring' + }, + 'BigInt::unaryMinus': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-unaryMinus' + }, + 'BigInt::unsignedRightShift': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-bigint-unsignedRightShift' + }, + BigIntBitwiseOp: { + url: 'https://262.ecma-international.org/14.0/#sec-bigintbitwiseop' + }, + BinaryAnd: { + url: 'https://262.ecma-international.org/14.0/#sec-binaryand' + }, + BinaryOr: { + url: 'https://262.ecma-international.org/14.0/#sec-binaryor' + }, + BinaryXor: { + url: 'https://262.ecma-international.org/14.0/#sec-binaryxor' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/14.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-boundfunctioncreate' + }, + ByteListBitwiseOp: { + url: 'https://262.ecma-international.org/14.0/#sec-bytelistbitwiseop' + }, + ByteListEqual: { + url: 'https://262.ecma-international.org/14.0/#sec-bytelistequal' + }, + Call: { + url: 'https://262.ecma-international.org/14.0/#sec-call' + }, + CanBeHeldWeakly: { + url: 'https://262.ecma-international.org/14.0/#sec-canbeheldweakly' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/14.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + clamp: { + url: 'https://262.ecma-international.org/14.0/#clamping' + }, + CleanupFinalizationRegistry: { + url: 'https://262.ecma-international.org/14.0/#sec-cleanup-finalization-registry' + }, + ClearKeptObjects: { + url: 'https://262.ecma-international.org/14.0/#sec-clear-kept-objects' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-clonearraybuffer' + }, + CodePointAt: { + url: 'https://262.ecma-international.org/14.0/#sec-codepointat' + }, + CodePointsToString: { + url: 'https://262.ecma-international.org/14.0/#sec-codepointstostring' + }, + CompareArrayElements: { + url: 'https://262.ecma-international.org/14.0/#sec-comparearrayelements' + }, + CompareTypedArrayElements: { + url: 'https://262.ecma-international.org/14.0/#sec-comparetypedarrayelements' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/14.0/#sec-completion-ao' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/14.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/14.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/14.0/#sec-construct' + }, + ContinueDynamicImport: { + url: 'https://262.ecma-international.org/14.0/#sec-ContinueDynamicImport' + }, + ContinueModuleLoading: { + url: 'https://262.ecma-international.org/14.0/#sec-ContinueModuleLoading' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/14.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/14.0/#sec-copydataproperties' + }, + CountLeftCapturingParensBefore: { + url: 'https://262.ecma-international.org/14.0/#sec-countleftcapturingparensbefore' + }, + CountLeftCapturingParensWithin: { + url: 'https://262.ecma-international.org/14.0/#sec-countleftcapturingparenswithin' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/14.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/14.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/14.0/#sec-createasyncfromsynciterator' + }, + CreateAsyncIteratorFromClosure: { + url: 'https://262.ecma-international.org/14.0/#sec-createasynciteratorfromclosure' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/14.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/14.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/14.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/14.0/#sec-createdynamicfunction' + }, + CreateForInIterator: { + url: 'https://262.ecma-international.org/14.0/#sec-createforiniterator' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/14.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/14.0/#sec-createintrinsics' + }, + CreateIteratorFromClosure: { + url: 'https://262.ecma-international.org/14.0/#sec-createiteratorfromclosure' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/14.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/14.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/14.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/14.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/14.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-createmethodproperty' + }, + CreateNonEnumerableDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/14.0/#sec-createnonenumerabledatapropertyorthrow' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/14.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/14.0/#sec-createrealm' + }, + CreateRegExpStringIterator: { + url: 'https://262.ecma-international.org/14.0/#sec-createregexpstringiterator' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/14.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/14.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/14.0/#sec-createsharedbytedatablock' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/14.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/14.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/14.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/14.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/14.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/14.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/14.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/14.0/#sec-decode' + }, + DefaultTimeZone: { + url: 'https://262.ecma-international.org/14.0/#sec-defaulttimezone' + }, + DefineField: { + url: 'https://262.ecma-international.org/14.0/#sec-definefield' + }, + DefineMethodProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-definemethodproperty' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/14.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/14.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/14.0/#sec-encode' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/14.0/#sec-entercriticalsection' + }, + EnumerableOwnProperties: { + url: 'https://262.ecma-international.org/14.0/#sec-enumerableownproperties' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/14.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/14.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/14.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/14.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/14.0/#sec-evaluatenew' + }, + EvaluatePropertyAccessWithExpressionKey: { + url: 'https://262.ecma-international.org/14.0/#sec-evaluate-property-access-with-expression-key' + }, + EvaluatePropertyAccessWithIdentifierKey: { + url: 'https://262.ecma-international.org/14.0/#sec-evaluate-property-access-with-identifier-key' + }, + EvaluateStringOrNumericBinaryExpression: { + url: 'https://262.ecma-international.org/14.0/#sec-evaluatestringornumericbinaryexpression' + }, + EventSet: { + url: 'https://262.ecma-international.org/14.0/#sec-event-set' + }, + ExecuteAsyncModule: { + url: 'https://262.ecma-international.org/14.0/#sec-execute-async-module' + }, + '𝔽': { + url: 'https://262.ecma-international.org/14.0/#𝔽' + }, + FindViaPredicate: { + url: 'https://262.ecma-international.org/14.0/#sec-findviapredicate' + }, + FinishLoadingImportedModule: { + url: 'https://262.ecma-international.org/14.0/#sec-FinishLoadingImportedModule' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/14.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/14.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/14.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-forinofheadevaluation' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/14.0/#sec-fulfillpromise' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/14.0/#sec-functiondeclarationinstantiation' + }, + GatherAvailableAncestors: { + url: 'https://262.ecma-international.org/14.0/#sec-gather-available-ancestors' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/14.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/14.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/14.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/14.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/14.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/14.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/14.0/#sec-getactivescriptormodule' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/14.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/14.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/14.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/14.0/#sec-getidentifierreference' + }, + GetImportedModule: { + url: 'https://262.ecma-international.org/14.0/#sec-GetImportedModule' + }, + GetIterator: { + url: 'https://262.ecma-international.org/14.0/#sec-getiterator' + }, + GetIteratorFromMethod: { + url: 'https://262.ecma-international.org/14.0/#sec-getiteratorfrommethod' + }, + GetMatchIndexPair: { + url: 'https://262.ecma-international.org/14.0/#sec-getmatchindexpair' + }, + GetMatchString: { + url: 'https://262.ecma-international.org/14.0/#sec-getmatchstring' + }, + GetMethod: { + url: 'https://262.ecma-international.org/14.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/14.0/#sec-getmodulenamespace' + }, + GetNamedTimeZoneEpochNanoseconds: { + url: 'https://262.ecma-international.org/14.0/#sec-getnamedtimezoneepochnanoseconds' + }, + GetNamedTimeZoneOffsetNanoseconds: { + url: 'https://262.ecma-international.org/14.0/#sec-getnamedtimezoneoffsetnanoseconds' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/14.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/14.0/#sec-getownpropertykeys' + }, + GetPromiseResolve: { + url: 'https://262.ecma-international.org/14.0/#sec-getpromiseresolve' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/14.0/#sec-getprototypefromconstructor' + }, + GetStringIndex: { + url: 'https://262.ecma-international.org/14.0/#sec-getstringindex' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/14.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/14.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/14.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/14.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/14.0/#sec-getthisvalue' + }, + GetUTCEpochNanoseconds: { + url: 'https://262.ecma-international.org/14.0/#sec-getutcepochnanoseconds' + }, + GetV: { + url: 'https://262.ecma-international.org/14.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/14.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/14.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/14.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/14.0/#sec-globaldeclarationinstantiation' + }, + GroupSpecifiersThatMatch: { + url: 'https://262.ecma-international.org/14.0/#sec-groupspecifiersthatmatch' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/14.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-hasownproperty' + }, + HasProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/14.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/14.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/14.0/#eqn-HourFromTime' + }, + IfAbruptCloseIterator: { + url: 'https://262.ecma-international.org/14.0/#sec-ifabruptcloseiterator' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/14.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/14.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/14.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/14.0/#sec-initializehostdefinedrealm' + }, + InitializeInstanceElements: { + url: 'https://262.ecma-international.org/14.0/#sec-initializeinstanceelements' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/14.0/#sec-initializereferencedbinding' + }, + InitializeTypedArrayFromArrayBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-initializetypedarrayfromarraybuffer' + }, + InitializeTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/14.0/#sec-initializetypedarrayfromarraylike' + }, + InitializeTypedArrayFromList: { + url: 'https://262.ecma-international.org/14.0/#sec-initializetypedarrayfromlist' + }, + InitializeTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/14.0/#sec-initializetypedarrayfromtypedarray' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/14.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/14.0/#sec-innermoduleevaluation' + }, + InnerModuleLinking: { + url: 'https://262.ecma-international.org/14.0/#sec-InnerModuleLinking' + }, + InnerModuleLoading: { + url: 'https://262.ecma-international.org/14.0/#sec-InnerModuleLoading' + }, + InstallErrorCause: { + url: 'https://262.ecma-international.org/14.0/#sec-installerrorcause' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/14.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/14.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/14.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/14.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/14.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/14.0/#sec-isarray' + }, + IsBigIntElementType: { + url: 'https://262.ecma-international.org/14.0/#sec-isbigintelementtype' + }, + IsCallable: { + url: 'https://262.ecma-international.org/14.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/14.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/14.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/14.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/14.0/#sec-isintailposition' + }, + IsIntegralNumber: { + url: 'https://262.ecma-international.org/14.0/#sec-isintegralnumber' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/14.0/#sec-islabelledfunction' + }, + IsLessThan: { + url: 'https://262.ecma-international.org/14.0/#sec-islessthan' + }, + IsLooselyEqual: { + url: 'https://262.ecma-international.org/14.0/#sec-islooselyequal' + }, + IsNoTearConfiguration: { + url: 'https://262.ecma-international.org/14.0/#sec-isnotearconfiguration' + }, + IsPrivateReference: { + url: 'https://262.ecma-international.org/14.0/#sec-isprivatereference' + }, + IsPromise: { + url: 'https://262.ecma-international.org/14.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/14.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/14.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/14.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-issharedarraybuffer' + }, + IsStrictlyEqual: { + url: 'https://262.ecma-international.org/14.0/#sec-isstrictlyequal' + }, + IsStringWellFormedUnicode: { + url: 'https://262.ecma-international.org/14.0/#sec-isstringwellformedunicode' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/14.0/#sec-issuperreference' + }, + IsTimeZoneOffsetString: { + url: 'https://262.ecma-international.org/14.0/#sec-istimezoneoffsetstring' + }, + IsUnclampedIntegerElementType: { + url: 'https://262.ecma-international.org/14.0/#sec-isunclampedintegerelementtype' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/14.0/#sec-isunresolvablereference' + }, + IsUnsignedElementType: { + url: 'https://262.ecma-international.org/14.0/#sec-isunsignedelementtype' + }, + IsValidIntegerIndex: { + url: 'https://262.ecma-international.org/14.0/#sec-isvalidintegerindex' + }, + IsValidRegularExpressionLiteral: { + url: 'https://262.ecma-international.org/14.0/#sec-isvalidregularexpressionliteral' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/14.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/14.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/14.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/14.0/#sec-iteratorstep' + }, + IteratorToList: { + url: 'https://262.ecma-international.org/14.0/#sec-iteratortolist' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/14.0/#sec-iteratorvalue' + }, + KeyForSymbol: { + url: 'https://262.ecma-international.org/14.0/#sec-keyforsymbol' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/14.0/#sec-leavecriticalsection' + }, + LengthOfArrayLike: { + url: 'https://262.ecma-international.org/14.0/#sec-lengthofarraylike' + }, + LocalTime: { + url: 'https://262.ecma-international.org/14.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/14.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/14.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/14.0/#sec-makeargsetter' + }, + MakeBasicObject: { + url: 'https://262.ecma-international.org/14.0/#sec-makebasicobject' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/14.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/14.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/14.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/14.0/#sec-makeday' + }, + MakeMatchIndicesIndexPairArray: { + url: 'https://262.ecma-international.org/14.0/#sec-makematchindicesindexpairarray' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/14.0/#sec-makemethod' + }, + MakePrivateReference: { + url: 'https://262.ecma-international.org/14.0/#sec-makeprivatereference' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/14.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/14.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/14.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/14.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/14.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/14.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/14.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/14.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/14.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/14.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/14.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/14.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/14.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/14.0/#sec-newobjectenvironment' + }, + NewPrivateEnvironment: { + url: 'https://262.ecma-international.org/14.0/#sec-newprivateenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/14.0/#sec-newpromisecapability' + }, + NewPromiseReactionJob: { + url: 'https://262.ecma-international.org/14.0/#sec-newpromisereactionjob' + }, + NewPromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/14.0/#sec-newpromiseresolvethenablejob' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/14.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/14.0/#sec-notifywaiter' + }, + 'Number::add': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-add' + }, + 'Number::bitwiseAND': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-bitwiseAND' + }, + 'Number::bitwiseNOT': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-bitwiseNOT' + }, + 'Number::bitwiseOR': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-bitwiseOR' + }, + 'Number::bitwiseXOR': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-bitwiseXOR' + }, + 'Number::divide': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-divide' + }, + 'Number::equal': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-equal' + }, + 'Number::exponentiate': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-exponentiate' + }, + 'Number::leftShift': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-leftShift' + }, + 'Number::lessThan': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-lessThan' + }, + 'Number::multiply': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-multiply' + }, + 'Number::remainder': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-remainder' + }, + 'Number::sameValue': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-sameValue' + }, + 'Number::sameValueZero': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-sameValueZero' + }, + 'Number::signedRightShift': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-signedRightShift' + }, + 'Number::subtract': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-subtract' + }, + 'Number::toString': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-tostring' + }, + 'Number::unaryMinus': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-unaryMinus' + }, + 'Number::unsignedRightShift': { + url: 'https://262.ecma-international.org/14.0/#sec-numeric-types-number-unsignedRightShift' + }, + NumberBitwiseOp: { + url: 'https://262.ecma-international.org/14.0/#sec-numberbitwiseop' + }, + NumberToBigInt: { + url: 'https://262.ecma-international.org/14.0/#sec-numbertobigint' + }, + NumericToRawBytes: { + url: 'https://262.ecma-international.org/14.0/#sec-numerictorawbytes' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/14.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarydelete' + }, + OrdinaryFunctionCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinaryfunctioncreate' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinaryisextensible' + }, + OrdinaryObjectCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinaryobjectcreate' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/14.0/#sec-ordinarytoprimitive' + }, + ParseHexOctet: { + url: 'https://262.ecma-international.org/14.0/#sec-parsehexoctet' + }, + ParseModule: { + url: 'https://262.ecma-international.org/14.0/#sec-parsemodule' + }, + ParsePattern: { + url: 'https://262.ecma-international.org/14.0/#sec-parsepattern' + }, + ParseScript: { + url: 'https://262.ecma-international.org/14.0/#sec-parse-script' + }, + ParseText: { + url: 'https://262.ecma-international.org/14.0/#sec-parsetext' + }, + ParseTimeZoneOffsetString: { + url: 'https://262.ecma-international.org/14.0/#sec-parsetimezoneoffsetstring' + }, + PerformEval: { + url: 'https://262.ecma-international.org/14.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/14.0/#sec-performpromiseall' + }, + PerformPromiseAllSettled: { + url: 'https://262.ecma-international.org/14.0/#sec-performpromiseallsettled' + }, + PerformPromiseAny: { + url: 'https://262.ecma-international.org/14.0/#sec-performpromiseany' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/14.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/14.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/14.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/14.0/#sec-preparefortailcall' + }, + PrivateElementFind: { + url: 'https://262.ecma-international.org/14.0/#sec-privateelementfind' + }, + PrivateFieldAdd: { + url: 'https://262.ecma-international.org/14.0/#sec-privatefieldadd' + }, + PrivateGet: { + url: 'https://262.ecma-international.org/14.0/#sec-privateget' + }, + PrivateMethodOrAccessorAdd: { + url: 'https://262.ecma-international.org/14.0/#sec-privatemethodoraccessoradd' + }, + PrivateSet: { + url: 'https://262.ecma-international.org/14.0/#sec-privateset' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/14.0/#sec-promise-resolve' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/14.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/14.0/#sec-quotejsonstring' + }, + ℝ: { + url: 'https://262.ecma-international.org/14.0/#ℝ' + }, + RawBytesToNumeric: { + url: 'https://262.ecma-international.org/14.0/#sec-rawbytestonumeric' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/14.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/14.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/14.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/14.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/14.0/#sec-regexpexec' + }, + RegExpHasFlag: { + url: 'https://262.ecma-international.org/14.0/#sec-regexphasflag' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/14.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/14.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/14.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/14.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireInternalSlot: { + url: 'https://262.ecma-international.org/14.0/#sec-requireinternalslot' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/14.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/14.0/#sec-resolvebinding' + }, + ResolvePrivateIdentifier: { + url: 'https://262.ecma-international.org/14.0/#sec-resolve-private-identifier' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/14.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/14.0/#sec-returnifabrupt' + }, + RoundMVResult: { + url: 'https://262.ecma-international.org/14.0/#sec-roundmvresult' + }, + SameValue: { + url: 'https://262.ecma-international.org/14.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/14.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/14.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-scriptevaluation' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/14.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/14.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/14.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/14.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/14.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/14.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/14.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/14.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/14.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/14.0/#sec-setrealmglobalobject' + }, + SetTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/14.0/#sec-settypedarrayfromarraylike' + }, + SetTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/14.0/#sec-settypedarrayfromtypedarray' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/14.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/14.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/14.0/#sec-sharedatablockeventset' + }, + SortIndexedProperties: { + url: 'https://262.ecma-international.org/14.0/#sec-sortindexedproperties' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/14.0/#sec-speciesconstructor' + }, + StringCreate: { + url: 'https://262.ecma-international.org/14.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-stringgetownproperty' + }, + StringIndexOf: { + url: 'https://262.ecma-international.org/14.0/#sec-stringindexof' + }, + StringPad: { + url: 'https://262.ecma-international.org/14.0/#sec-stringpad' + }, + StringToBigInt: { + url: 'https://262.ecma-international.org/14.0/#sec-stringtobigint' + }, + StringToCodePoints: { + url: 'https://262.ecma-international.org/14.0/#sec-stringtocodepoints' + }, + StringToNumber: { + url: 'https://262.ecma-international.org/14.0/#sec-stringtonumber' + }, + substring: { + url: 'https://262.ecma-international.org/14.0/#substring' + }, + SuspendAgent: { + url: 'https://262.ecma-international.org/14.0/#sec-suspendagent' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/14.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/14.0/#sec-synchronizes-with' + }, + TemplateString: { + url: 'https://262.ecma-international.org/14.0/#sec-templatestring' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/14.0/#sec-testintegritylevel' + }, + thisBigIntValue: { + url: 'https://262.ecma-international.org/14.0/#thisbigintvalue' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/14.0/#thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/14.0/#thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/14.0/#thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/14.0/#thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/14.0/#thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/14.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/14.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/14.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/14.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/14.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/14.0/#sec-timezoneestring' + }, + ToBigInt: { + url: 'https://262.ecma-international.org/14.0/#sec-tobigint' + }, + ToBigInt64: { + url: 'https://262.ecma-international.org/14.0/#sec-tobigint64' + }, + ToBigUint64: { + url: 'https://262.ecma-international.org/14.0/#sec-tobiguint64' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/14.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/14.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/14.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/14.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/14.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/14.0/#sec-toint8' + }, + ToIntegerOrInfinity: { + url: 'https://262.ecma-international.org/14.0/#sec-tointegerorinfinity' + }, + ToLength: { + url: 'https://262.ecma-international.org/14.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/14.0/#sec-tonumber' + }, + ToNumeric: { + url: 'https://262.ecma-international.org/14.0/#sec-tonumeric' + }, + ToObject: { + url: 'https://262.ecma-international.org/14.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/14.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/14.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/14.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/14.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/14.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/14.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/14.0/#sec-touint8clamp' + }, + ToZeroPaddedDecimalString: { + url: 'https://262.ecma-international.org/14.0/#sec-tozeropaddeddecimalstring' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/14.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/14.0/#sec-trimstring' + }, + truncate: { + url: 'https://262.ecma-international.org/14.0/#eqn-truncate' + }, + Type: { + url: 'https://262.ecma-international.org/14.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/14.0/#typedarray-create' + }, + TypedArrayCreateSameType: { + url: 'https://262.ecma-international.org/14.0/#sec-typedarray-create-same-type' + }, + TypedArrayElementSize: { + url: 'https://262.ecma-international.org/14.0/#sec-typedarrayelementsize' + }, + TypedArrayElementType: { + url: 'https://262.ecma-international.org/14.0/#sec-typedarrayelementtype' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/14.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/14.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/14.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/14.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/14.0/#sec-utc-t' + }, + UTF16EncodeCodePoint: { + url: 'https://262.ecma-international.org/14.0/#sec-utf16encodecodepoint' + }, + UTF16SurrogatePairToCodePoint: { + url: 'https://262.ecma-international.org/14.0/#sec-utf16decodesurrogatepair' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/14.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/14.0/#sec-validateatomicaccess' + }, + ValidateIntegerTypedArray: { + url: 'https://262.ecma-international.org/14.0/#sec-validateintegertypedarray' + }, + ValidateNonRevokedProxy: { + url: 'https://262.ecma-international.org/14.0/#sec-validatenonrevokedproxy' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/14.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/14.0/#sec-valueofreadevent' + }, + WeakRefDeref: { + url: 'https://262.ecma-international.org/14.0/#sec-weakrefderef' + }, + WeekDay: { + url: 'https://262.ecma-international.org/14.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/14.0/#sec-wordcharacters' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/14.0/#eqn-YearFromTime' + }, + Yield: { + url: 'https://262.ecma-international.org/14.0/#sec-yield' + }, + ℤ: { + url: 'https://262.ecma-international.org/14.0/#ℤ' + } +}; diff --git a/node_modules/es-abstract/operations/build-unicode.mjs b/node_modules/es-abstract/operations/build-unicode.mjs new file mode 100644 index 0000000000000..f3300991b1c76 --- /dev/null +++ b/node_modules/es-abstract/operations/build-unicode.mjs @@ -0,0 +1,19 @@ +import fs from 'fs'; +import path from 'path'; + +import C from '@unicode/unicode-15.0.0/Case_Folding/C/symbols.js'; +import S from '@unicode/unicode-15.0.0/Case_Folding/S/symbols.js'; + +function normalize(map) { + return Object.fromEntries(Array.from(map, ([o, i]) => [i, [].concat(o)[0]])); +} + +const cases = { + C: normalize(C), + S: normalize(S), +}; + +fs.writeFileSync( + path.join(process.cwd(), './helpers/caseFolding.json'), + JSON.stringify(cases, null, '\t'), +); diff --git a/node_modules/es-abstract/package.json b/node_modules/es-abstract/package.json new file mode 100644 index 0000000000000..95243deefd5df --- /dev/null +++ b/node_modules/es-abstract/package.json @@ -0,0 +1,166 @@ +{ + "name": "es-abstract", + "version": "1.22.3", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "ECMAScript spec abstract operations.", + "license": "MIT", + "main": "index.js", + "browser": { + "worker_threads": false + }, + "type": "commonjs", + "sideEffects": false, + "scripts": { + "prespackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs rm || true", + "spackle": "node operations/spackle 1 && node operations/build-unicode.mjs", + "postspackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs git add", + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest && npm run spackle", + "pretest": "npm run lint", + "test": "npm run tests-only && npm run test:ses", + "test:ses": "node test/ses-compat", + "posttest": "aud --production", + "tests-only": "nyc node --stack-size=5120 test", + "lint": "eslint .", + "eccheck": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-abstract.git" + }, + "keywords": [ + "ECMAScript", + "ES", + "abstract", + "operation", + "abstract operation", + "JavaScript", + "ES5", + "ES6", + "ES7" + ], + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.13" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@unicode/unicode-15.0.0": "^1.5.2", + "array.from": "^1.1.5", + "array.prototype.filter": "^1.0.3", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.indexof": "^1.0.6", + "aud": "^2.0.3", + "available-regexp-flags": "^1.0.2", + "cheerio": "=1.0.0-rc.3", + "diff": "^5.1.0", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "function-bind": "^1.1.2", + "functions-have-names": "^1.2.3", + "has-bigints": "^1.0.2", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "is-core-module": "^2.13.1", + "is-registered-symbol": "^1.0.1", + "make-arrow-function": "^1.2.0", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "mock-property": "^1.0.2", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object.fromentries": "^2.0.7", + "safe-publish-latest": "^2.0.0", + "ses": "^0.18.8", + "tape": "^5.7.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "publishConfig": { + "ignore": [ + ".github", + "", + "# dev scripts", + "operations/*.js", + "!operations/20*.js", + "", + "test/", + "", + ".gitattributes" + ] + } +} diff --git a/node_modules/es-set-tostringtag/.eslintrc b/node_modules/es-set-tostringtag/.eslintrc new file mode 100644 index 0000000000000..2612ed8fefad4 --- /dev/null +++ b/node_modules/es-set-tostringtag/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/es-set-tostringtag/CHANGELOG.md b/node_modules/es-set-tostringtag/CHANGELOG.md new file mode 100644 index 0000000000000..f1ff780c8be8c --- /dev/null +++ b/node_modules/es-set-tostringtag/CHANGELOG.md @@ -0,0 +1,41 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.2](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.1...v2.0.2) - 2023-10-20 + +### Commits + +- [Refactor] use `hasown` instead of `has` [`0cc6c4e`](https://github.com/es-shims/es-set-tostringtag/commit/0cc6c4e61fd13e8f00b85424ae6e541ebf289e74) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`70e447c`](https://github.com/es-shims/es-set-tostringtag/commit/70e447cf9f82b896ddf359fda0a0498c16cf3ed2) +- [Deps] update `get-intrinsic` [`826aab7`](https://github.com/es-shims/es-set-tostringtag/commit/826aab76180392871c8efa99acc0f0bbf775c64e) + +## [v2.0.1](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.0...v2.0.1) - 2023-01-05 + +### Fixed + +- [Fix] move `has` to prod deps [`#2`](https://github.com/es-shims/es-set-tostringtag/issues/2) + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config` [`b9eecd2`](https://github.com/es-shims/es-set-tostringtag/commit/b9eecd23c10b7b43ba75089ac8ff8cc6b295798b) + +## [v2.0.0](https://github.com/es-shims/es-set-tostringtag/compare/v1.0.0...v2.0.0) - 2022-12-21 + +### Commits + +- [Tests] refactor tests [`168dcfb`](https://github.com/es-shims/es-set-tostringtag/commit/168dcfbb535c279dc48ccdc89419155125aaec18) +- [Breaking] do not set toStringTag if it is already set [`226ab87`](https://github.com/es-shims/es-set-tostringtag/commit/226ab874192c625d9e5f0e599d3f60d2b2aa83b5) +- [New] add `force` option to set even if already set [`1abd4ec`](https://github.com/es-shims/es-set-tostringtag/commit/1abd4ecb282f19718c4518284b0293a343564505) + +## v1.0.0 - 2022-12-21 + +### Commits + +- Initial implementation, tests, readme [`a0e1147`](https://github.com/es-shims/es-set-tostringtag/commit/a0e11473f79a233b46374525c962ea1b4d42418a) +- Initial commit [`ffd4aff`](https://github.com/es-shims/es-set-tostringtag/commit/ffd4afffbeebf29aff0d87a7cfc3f7844e09fe68) +- npm init [`fffe5bd`](https://github.com/es-shims/es-set-tostringtag/commit/fffe5bd1d1146d084730a387a9c672371f4a8fff) +- Only apps should have lockfiles [`d363871`](https://github.com/es-shims/es-set-tostringtag/commit/d36387139465623e161a15dbd39120537f150c62) diff --git a/node_modules/es-set-tostringtag/LICENSE b/node_modules/es-set-tostringtag/LICENSE new file mode 100644 index 0000000000000..c2a8460a3c4c3 --- /dev/null +++ b/node_modules/es-set-tostringtag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/es-set-tostringtag/README.md b/node_modules/es-set-tostringtag/README.md new file mode 100644 index 0000000000000..d2887e1a53fd3 --- /dev/null +++ b/node_modules/es-set-tostringtag/README.md @@ -0,0 +1,43 @@ +# es-set-tostringtag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A helper to optimistically set Symbol.toStringTag, when possible. + +Most common usage: +```js +var assert = require('assert'); +var setToStringTag = require('es-set-tostringtag'); + +var obj = {}; + +assert.equal(Object.prototype.toString.call(obj), '[object Object]'); + +setToStringTag(obj, 'tagged!'); + +assert.equal(Object.prototype.toString.call(obj), '[object tagged!]'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/es-set-tostringtag +[npm-version-svg]: https://versionbadg.es/es-shims/es-set-tostringtag.svg +[deps-svg]: https://david-dm.org/es-shims/es-set-tostringtag.svg +[deps-url]: https://david-dm.org/es-shims/es-set-tostringtag +[dev-deps-svg]: https://david-dm.org/es-shims/es-set-tostringtag/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/es-set-tostringtag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-set-tostringtag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-set-tostringtag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-set-tostringtag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-set-tostringtag +[codecov-image]: https://codecov.io/gh/es-shims/es-set-tostringtag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/es-set-tostringtag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/es-set-tostringtag +[actions-url]: https://github.com/es-shims/es-set-tostringtag/actions diff --git a/node_modules/es-set-tostringtag/index.js b/node_modules/es-set-tostringtag/index.js new file mode 100644 index 0000000000000..8d706a35aaa8e --- /dev/null +++ b/node_modules/es-set-tostringtag/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasToStringTag = require('has-tostringtag/shams')(); +var hasOwn = require('hasown'); + +var toStringTag = hasToStringTag ? Symbol.toStringTag : null; + +module.exports = function setToStringTag(object, value) { + var overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force; + if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { + if ($defineProperty) { + $defineProperty(object, toStringTag, { + configurable: true, + enumerable: false, + value: value, + writable: false + }); + } else { + object[toStringTag] = value; // eslint-disable-line no-param-reassign + } + } +}; diff --git a/node_modules/es-set-tostringtag/package.json b/node_modules/es-set-tostringtag/package.json new file mode 100644 index 0000000000000..7b0891ff960d0 --- /dev/null +++ b/node_modules/es-set-tostringtag/package.json @@ -0,0 +1,69 @@ +{ + "name": "es-set-tostringtag", + "version": "2.0.2", + "description": "A helper to optimistically set Symbol.toStringTag, when possible.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/es-set-tostringtag.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/es-shims/es-set-tostringtag/issues" + }, + "homepage": "https://github.com/es-shims/es-set-tostringtag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "dependencies": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "./test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/es-set-tostringtag/test/index.js b/node_modules/es-set-tostringtag/test/index.js new file mode 100644 index 0000000000000..4728372a9d93b --- /dev/null +++ b/node_modules/es-set-tostringtag/test/index.js @@ -0,0 +1,53 @@ +'use strict'; + +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); +var has = require('has'); + +var setToStringTag = require('../'); + +test('setToStringTag', function (t) { + t.equal(typeof setToStringTag, 'function', 'is a function'); + + var obj = {}; + var sentinel = {}; + + setToStringTag(obj, sentinel); + + t.test('has Symbol.toStringTag', { skip: !hasToStringTag }, function (st) { + st.ok(has(obj, Symbol.toStringTag), 'has toStringTag property'); + + st.equal(obj[Symbol.toStringTag], sentinel, 'toStringTag property is as expected'); + + st.equal(String(obj), '[object Object]', 'toStringTag works'); + + var tagged = {}; + tagged[Symbol.toStringTag] = 'already tagged'; + st.equal(String(tagged), '[object already tagged]', 'toStringTag works'); + + setToStringTag(tagged, 'new tag'); + st.equal(String(tagged), '[object already tagged]', 'toStringTag is unchanged'); + + setToStringTag(tagged, 'new tag', { force: true }); + st.equal(String(tagged), '[object new tag]', 'toStringTag is changed with force: true'); + + st.end(); + }); + + t.test('does not have Symbol.toStringTag', { skip: hasToStringTag }, function (st) { + var passed = true; + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (has(obj, key)) { + st.fail('object has own key ' + key); + passed = false; + } + } + if (passed) { + st.ok(true, 'object has no enumerable own keys'); + } + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/es-to-primitive/.eslintrc b/node_modules/es-to-primitive/.eslintrc new file mode 100644 index 0000000000000..b6639b96c4a2c --- /dev/null +++ b/node_modules/es-to-primitive/.eslintrc @@ -0,0 +1,22 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 14], + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 24, "properties": "never" }], + "max-statements": [2, 20], + "new-cap": [2, { "capIsNewExceptions": ["GetMethod"] }] + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": [2, { "max": 68 }], + }, + } + ], +} diff --git a/node_modules/es-to-primitive/.github/FUNDING.yml b/node_modules/es-to-primitive/.github/FUNDING.yml new file mode 100644 index 0000000000000..9f928ae809d50 --- /dev/null +++ b/node_modules/es-to-primitive/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-to-primitive +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/es-to-primitive/.travis.yml b/node_modules/es-to-primitive/.travis.yml new file mode 100644 index 0000000000000..d4c5a842fab66 --- /dev/null +++ b/node_modules/es-to-primitive/.travis.yml @@ -0,0 +1,15 @@ +version: ~> 1.0 +language: node_js +cache: + directories: + - "$(nvm cache dir)" +os: + - linux +import: + - ljharb/travis-ci:node/all.yml + - ljharb/travis-ci:node/pretest.yml + - ljharb/travis-ci:node/posttest.yml + - ljharb/travis-ci:node/coverage.yml +matrix: + allow_failures: + - env: COVERAGE=true diff --git a/node_modules/es-to-primitive/CHANGELOG.md b/node_modules/es-to-primitive/CHANGELOG.md new file mode 100644 index 0000000000000..0a5dda7806207 --- /dev/null +++ b/node_modules/es-to-primitive/CHANGELOG.md @@ -0,0 +1,49 @@ +1.2.1 / 2019-11-08 +================= + * [readme] remove testling URLs + * [meta] add `funding` field + * [meta] create FUNDING.yml + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `replace`, `semver`, `tape`, `function.prototype.name` + * [Tests] use shared travis-ci configs + * [Tests] Add es5 tests for `symbol` types (#45) + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] remove `jscs` + +1.2.0 / 2018-09-27 +================= + * [New] create ES2015 entry point/property, to replace ES6 + * [Fix] Ensure optional arguments are not part of the length (#29) + * [Deps] update `is-callable` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `object-inspect`, `replace` + * [Tests] avoid util.inspect bug with `new Date(NaN)` on node v6.0 and v6.1. + * [Tests] up to `node` `v10.11`, `v9.11`, `v8.12`, `v6.14`, `v4.9` + +1.1.1 / 2016-01-03 +================= + * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) + +1.1.0 / 2015-12-27 +================= + * [New] add `Symbol.toPrimitive` support + * [Deps] update `is-callable`, `is-date-object` + * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` + * [Dev Deps] remove unused deps + * [Tests] up to `node` `v5.3` + * [Tests] fix npm upgrades on older node versions + * [Tests] fix testling + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.1 / 2016-01-03 +================= + * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) + * [Deps] update `is-callable`, `is-date-object` + * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` + * [Dev Deps] remove unused deps + * [Tests] up to `node` `v5.3` + * [Tests] fix npm upgrades on older node versions + * [Tests] fix testling + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.0 / 2015-03-19 +================= + * Initial release. diff --git a/node_modules/es-to-primitive/LICENSE b/node_modules/es-to-primitive/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/es-to-primitive/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/es-to-primitive/Makefile b/node_modules/es-to-primitive/Makefile new file mode 100644 index 0000000000000..b9e4fe1aab3dd --- /dev/null +++ b/node_modules/es-to-primitive/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/node_modules/es-to-primitive/README.md b/node_modules/es-to-primitive/README.md new file mode 100644 index 0000000000000..5ce322bfac162 --- /dev/null +++ b/node_modules/es-to-primitive/README.md @@ -0,0 +1,49 @@ +# es-to-primitive [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions. +When different versions of the spec conflict, the default export will be the latest version of the abstract operation. +Alternative versions will also be available under an `es5`/`es2015` exported property if you require a specific version. + +## Example + +```js +var toPrimitive = require('es-to-primitive'); +var assert = require('assert'); + +assert(toPrimitive(function () {}) === String(function () {})); + +var date = new Date(); +assert(toPrimitive(date) === String(date)); + +assert(toPrimitive({ valueOf: function () { return 3; } }) === 3); + +assert(toPrimitive(['a', 'b', 3]) === String(['a', 'b', 3])); + +var sym = Symbol(); +assert(toPrimitive(Object(sym)) === sym); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/es-to-primitive +[npm-version-svg]: http://versionbadg.es/ljharb/es-to-primitive.svg +[travis-svg]: https://travis-ci.org/ljharb/es-to-primitive.svg +[travis-url]: https://travis-ci.org/ljharb/es-to-primitive +[deps-svg]: https://david-dm.org/ljharb/es-to-primitive.svg +[deps-url]: https://david-dm.org/ljharb/es-to-primitive +[dev-deps-svg]: https://david-dm.org/ljharb/es-to-primitive/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-to-primitive#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-to-primitive.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/es-to-primitive.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/es-to-primitive.svg +[downloads-url]: http://npm-stat.com/charts.html?package=es-to-primitive diff --git a/node_modules/es-to-primitive/es2015.js b/node_modules/es-to-primitive/es2015.js new file mode 100644 index 0000000000000..4a11a346c608c --- /dev/null +++ b/node_modules/es-to-primitive/es2015.js @@ -0,0 +1,75 @@ +'use strict'; + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var isPrimitive = require('./helpers/isPrimitive'); +var isCallable = require('is-callable'); +var isDate = require('is-date-object'); +var isSymbol = require('is-symbol'); + +var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === 'undefined' || O === null) { + throw new TypeError('Cannot call method on ' + O); + } + if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError('No default value'); +}; + +var GetMethod = function GetMethod(O, P) { + var func = O[P]; + if (func !== null && typeof func !== 'undefined') { + if (!isCallable(func)) { + throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); + } + return func; + } + return void 0; +}; + +// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = 'default'; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = 'string'; + } else if (arguments[1] === Number) { + hint = 'number'; + } + } + + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== 'undefined') { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError('unable to convert exotic object to primitive'); + } + if (hint === 'default' && (isDate(input) || isSymbol(input))) { + hint = 'string'; + } + return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); +}; diff --git a/node_modules/es-to-primitive/es5.js b/node_modules/es-to-primitive/es5.js new file mode 100644 index 0000000000000..602aa362c7e3e --- /dev/null +++ b/node_modules/es-to-primitive/es5.js @@ -0,0 +1,45 @@ +'use strict'; + +var toStr = Object.prototype.toString; + +var isPrimitive = require('./helpers/isPrimitive'); + +var isCallable = require('is-callable'); + +// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8 +var ES5internalSlots = { + '[[DefaultValue]]': function (O) { + var actualHint; + if (arguments.length > 1) { + actualHint = arguments[1]; + } else { + actualHint = toStr.call(O) === '[object Date]' ? String : Number; + } + + if (actualHint === String || actualHint === Number) { + var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var value, i; + for (i = 0; i < methods.length; ++i) { + if (isCallable(O[methods[i]])) { + value = O[methods[i]](); + if (isPrimitive(value)) { + return value; + } + } + } + throw new TypeError('No default value'); + } + throw new TypeError('invalid [[DefaultValue]] hint supplied'); + } +}; + +// http://ecma-international.org/ecma-262/5.1/#sec-9.1 +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + if (arguments.length > 1) { + return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]); + } + return ES5internalSlots['[[DefaultValue]]'](input); +}; diff --git a/node_modules/es-to-primitive/es6.js b/node_modules/es-to-primitive/es6.js new file mode 100644 index 0000000000000..2d1f4dc927a90 --- /dev/null +++ b/node_modules/es-to-primitive/es6.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2015'); diff --git a/node_modules/es-to-primitive/helpers/isPrimitive.js b/node_modules/es-to-primitive/helpers/isPrimitive.js new file mode 100644 index 0000000000000..06f0bf042525a --- /dev/null +++ b/node_modules/es-to-primitive/helpers/isPrimitive.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/node_modules/es-to-primitive/index.js b/node_modules/es-to-primitive/index.js new file mode 100644 index 0000000000000..e60d912e11332 --- /dev/null +++ b/node_modules/es-to-primitive/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var ES5 = require('./es5'); +var ES6 = require('./es6'); +var ES2015 = require('./es2015'); + +if (Object.defineProperty) { + Object.defineProperty(ES2015, 'ES5', { enumerable: false, value: ES5 }); + Object.defineProperty(ES2015, 'ES6', { enumerable: false, value: ES6 }); + Object.defineProperty(ES2015, 'ES2015', { enumerable: false, value: ES2015 }); +} else { + ES6.ES5 = ES5; + ES6.ES6 = ES6; + ES6.ES2015 = ES2015; +} + +module.exports = ES2015; diff --git a/node_modules/es-to-primitive/package.json b/node_modules/es-to-primitive/package.json new file mode 100644 index 0000000000000..136f87783cd25 --- /dev/null +++ b/node_modules/es-to-primitive/package.json @@ -0,0 +1,81 @@ +{ + "name": "es-to-primitive", + "version": "1.2.1", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npx aud", + "tests-only": "node --es-staging test", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "eslint ." + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-to-primitive.git" + }, + "keywords": [ + "primitive", + "abstract", + "ecmascript", + "es5", + "es6", + "es2015", + "toPrimitive", + "coerce", + "type", + "object", + "string", + "number", + "boolean", + "symbol", + "null", + "undefined" + ], + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^15.0.0", + "covert": "^1.1.1", + "eslint": "^6.6.0", + "foreach": "^2.0.5", + "function.prototype.name": "^1.1.1", + "has-symbols": "^1.0.0", + "object-inspect": "^1.6.0", + "object-is": "^1.0.1", + "replace": "^1.1.1", + "semver": "^6.3.0", + "tape": "^4.11.0" + }, + "testling": { + "files": "test", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/es-to-primitive/test/es2015.js b/node_modules/es-to-primitive/test/es2015.js new file mode 100644 index 0000000000000..80f4083dd9315 --- /dev/null +++ b/node_modules/es-to-primitive/test/es2015.js @@ -0,0 +1,151 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es2015'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; +var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Symbols', { skip: !hasSymbols }, function (t) { + var symbols = [ + Symbol('foo'), + Symbol.iterator, + Symbol['for']('foo') // eslint-disable-line no-restricted-properties + ]; + forEach(symbols, function (sym) { + t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); + t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); + t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); + }); + + var primitiveSym = Symbol('primitiveSym'); + var objectSym = Object(primitiveSym); + t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); + + t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { + var overriddenObject = { toString: st.fail, valueOf: st.fail }; + overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; + + st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); + st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); + st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); + + var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; + nullToPrimitive[Symbol.toPrimitive] = null; + st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); + + st.test('exceptions', function (sst) { + var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + nonFunctionToPrimitive[Symbol.toPrimitive] = {}; + sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); + + var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { + return { toString: function () { return hint; } }; + }; + sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); + + var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; + sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); + + sst.end(); + }); + + st.end(); + }); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st.end(); + }); + t.end(); +}); diff --git a/node_modules/es-to-primitive/test/es5.js b/node_modules/es-to-primitive/test/es5.js new file mode 100644 index 0000000000000..79444b0b4c091 --- /dev/null +++ b/node_modules/es-to-primitive/test/es5.js @@ -0,0 +1,118 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es5'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); +var hasSymbols = require('has-symbols')(); + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Symbols', { skip: !hasSymbols }, function (t) { + var symbols = [ + Symbol('foo'), + Symbol.iterator, + Symbol['for']('foo') // eslint-disable-line no-restricted-properties + ]; + forEach(symbols, function (sym) { + t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); + t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); + t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); + }); + + var primitiveSym = Symbol('primitiveSym'); + var stringSym = Symbol.prototype.toString.call(primitiveSym); + var objectSym = Object(primitiveSym); + t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); + + // This is different from ES2015, as the ES5 algorithm doesn't account for the existence of Symbols: + t.equal(toPrimitive(objectSym, String), stringSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(stringSym)); + t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.ok(is(toPrimitive(arr), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + t.equal(toPrimitive(arr, String), arr.toString(), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + t.ok(is(toPrimitive(arr, Number), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); + t.equal(toPrimitive(date, String), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); + t.ok(is(toPrimitive(date, Number), date.valueOf()), 'toPrimitive(' + debug(date) + ') returns valueOf of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to toString'); + + t.ok(is(toPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + t.ok(is(toPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/es-to-primitive/test/es6.js b/node_modules/es-to-primitive/test/es6.js new file mode 100644 index 0000000000000..16ea0e8f3f680 --- /dev/null +++ b/node_modules/es-to-primitive/test/es6.js @@ -0,0 +1,151 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es6'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); + +var hasSymbols = require('has-symbols')(); +var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Symbols', { skip: !hasSymbols }, function (t) { + var symbols = [ + Symbol('foo'), + Symbol.iterator, + Symbol['for']('foo') // eslint-disable-line no-restricted-properties + ]; + forEach(symbols, function (sym) { + t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); + t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); + t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); + }); + + var primitiveSym = Symbol('primitiveSym'); + var objectSym = Object(primitiveSym); + t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); + + t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { + var overriddenObject = { toString: st.fail, valueOf: st.fail }; + overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; + + st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); + st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); + st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); + + var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; + nullToPrimitive[Symbol.toPrimitive] = null; + st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); + + st.test('exceptions', function (sst) { + var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + nonFunctionToPrimitive[Symbol.toPrimitive] = {}; + sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); + + var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { + return { toString: function () { return hint; } }; + }; + sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); + + var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; + sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); + + sst.end(); + }); + + st.end(); + }); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st.end(); + }); + t.end(); +}); diff --git a/node_modules/es-to-primitive/test/index.js b/node_modules/es-to-primitive/test/index.js new file mode 100644 index 0000000000000..ad71f39e2581e --- /dev/null +++ b/node_modules/es-to-primitive/test/index.js @@ -0,0 +1,20 @@ +'use strict'; + +var toPrimitive = require('../'); +var ES5 = require('../es5'); +var ES6 = require('../es6'); +var ES2015 = require('../es2015'); + +var test = require('tape'); + +test('default export', function (t) { + t.equal(toPrimitive, ES2015, 'default export is ES2015'); + t.equal(toPrimitive.ES5, ES5, 'ES5 property has ES5 method'); + t.equal(toPrimitive.ES6, ES6, 'ES6 property has ES6 method'); + t.equal(toPrimitive.ES2015, ES2015, 'ES2015 property has ES2015 method'); + t.end(); +}); + +require('./es5'); +require('./es6'); +require('./es2015'); diff --git a/node_modules/escape-string-regexp/index.js b/node_modules/escape-string-regexp/index.js new file mode 100644 index 0000000000000..7834bf9b24c48 --- /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 0000000000000..654d0bfe94343 --- /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 0000000000000..f307df34a232c --- /dev/null +++ b/node_modules/escape-string-regexp/package.json @@ -0,0 +1,41 @@ +{ + "name": "escape-string-regexp", + "version": "1.0.5", + "description": "Escape RegExp special characters", + "license": "MIT", + "repository": "sindresorhus/escape-string-regexp", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Boy Nicolai Appelman (jbna.nl)" + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "escape", + "regex", + "regexp", + "re", + "regular", + "expression", + "string", + "str", + "special", + "characters" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/escape-string-regexp/readme.md b/node_modules/escape-string-regexp/readme.md new file mode 100644 index 0000000000000..87ac82d5ef8bc --- /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/event-stream/.npmignore b/node_modules/event-stream/.npmignore new file mode 100644 index 0000000000000..13abef4f58898 --- /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 0000000000000..6e5919de39a31 --- /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 0000000000000..2af26fe758c1e --- /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 0000000000000..af043401c6ad9 --- /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 0000000000000..97da560b0d08b --- /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/package.json b/node_modules/event-stream/package.json new file mode 100644 index 0000000000000..335b332a44a15 --- /dev/null +++ b/node_modules/event-stream/package.json @@ -0,0 +1,54 @@ +{ + "name": "event-stream", + "version": "3.3.4", + "description": "construct pipes of streams of events", + "homepage": "http://github.com/dominictarr/event-stream", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/event-stream.git" + }, + "dependencies": { + "through": "~2.3.1", + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4" + }, + "devDependencies": { + "asynct": "*", + "it-is": "1", + "ubelt": "~3.2.2", + "stream-spec": "~0.3.5", + "tape": "~2.3.0" + }, + "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 + ] + } + }, + "license": "MIT", + "author": "Dominic Tarr (http://bit.ly/dominictarr)" +} diff --git a/node_modules/event-stream/readme.markdown b/node_modules/event-stream/readme.markdown new file mode 100644 index 0000000000000..0150b055e5165 --- /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 0000000000000..e6a442bb3188e --- /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 0000000000000..96abaebe093fb --- /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 0000000000000..68f38ba93c183 --- /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 0000000000000..a5fefcf903a61 --- /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 0000000000000..b0736040f8bcd --- /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 0000000000000..f07c6fa588f31 --- /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 0000000000000..3eeb90a35fd1d --- /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 0000000000000..6ea2fdbf5071f --- /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 0000000000000..1c8735bd52e3a --- /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 0000000000000..25121f93d92d7 --- /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 0000000000000..6d5fb6b873ca8 --- /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 0000000000000..7d44bac0e4060 --- /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 0000000000000..d158185a8a6e4 --- /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 0000000000000..5d705de80ef64 --- /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/expand-brackets/LICENSE b/node_modules/expand-brackets/LICENSE new file mode 100644 index 0000000000000..1e49edf81fee9 --- /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 0000000000000..d3c913e7a699a --- /dev/null +++ b/node_modules/expand-brackets/README.md @@ -0,0 +1,107 @@ +# expand-brackets [![NPM version](https://img.shields.io/npm/v/expand-brackets.svg?style=flat)](https://www.npmjs.com/package/expand-brackets) [![NPM downloads](https://img.shields.io/npm/dm/expand-brackets.svg?style=flat)](https://npmjs.org/package/expand-brackets) [![Build Status](https://img.shields.io/travis/jonschlinkert/expand-brackets.svg?style=flat)](https://travis-ci.org/jonschlinkert/expand-brackets) + +> Expand POSIX bracket expressions (character classes) in glob patterns. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install expand-brackets --save +``` + +## Usage + +```js +var brackets = require('expand-brackets'); + +brackets('[![:lower:]]'); +//=> '[^a-z]' +``` + +## .isMatch + +Return true if the given string matches the bracket expression: + +```js +brackets.isMatch('A', '[![:lower:]]'); +//=> true + +brackets.isMatch('a', '[![:lower:]]'); +//=> false +``` + +## .makeRe + +Make a regular expression from a bracket expression: + +```js +brackets.makeRe('[![:lower:]]'); +//=> /[^a-z]/ +``` + +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]`) + +Collating sequences are not supported. + +## Related projects + +You might also be interested in these projects: + +* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://www.npmjs.com/package/extglob) | [homepage](https://github.com/jonschlinkert/extglob) +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob) +* [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://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) +* [is-posix-bracket](https://www.npmjs.com/package/is-posix-bracket): Returns true if the given string is a POSIX bracket expression (POSIX character class). | [homepage](https://github.com/jonschlinkert/is-posix-bracket) +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/expand-brackets/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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 + +verb © 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](https://github.com/verbose/verb), v, on April 01, 2016._ \ No newline at end of file diff --git a/node_modules/expand-brackets/index.js b/node_modules/expand-brackets/index.js new file mode 100644 index 0000000000000..b843cc2b15fdb --- /dev/null +++ b/node_modules/expand-brackets/index.js @@ -0,0 +1,163 @@ +/*! + * expand-brackets + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +var isPosixBracket = require('is-posix-bracket'); + +/** + * POSIX character classes + */ + +var POSIX = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E', + punct: '-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9', +}; + +/** + * Expose `brackets` + */ + +module.exports = brackets; + +function brackets(str) { + if (!isPosixBracket(str)) { + return str; + } + + var negated = false; + if (str.indexOf('[^') !== -1) { + negated = true; + str = str.split('[^').join('['); + } + if (str.indexOf('[!') !== -1) { + negated = true; + str = str.split('[!').join('['); + } + + var a = str.split('['); + var b = str.split(']'); + var imbalanced = a.length !== b.length; + + var parts = str.split(/(?::\]\[:|\[?\[:|:\]\]?)/); + var len = parts.length, i = 0; + var end = '', beg = ''; + var res = []; + + // start at the end (innermost) first + while (len--) { + var inner = parts[i++]; + if (inner === '^[!' || inner === '[!') { + inner = ''; + negated = true; + } + + var prefix = negated ? '^' : ''; + var ch = POSIX[inner]; + + if (ch) { + res.push('[' + prefix + ch + ']'); + } else if (inner) { + if (/^\[?\w-\w\]?$/.test(inner)) { + if (i === parts.length) { + res.push('[' + prefix + inner); + } else if (i === 1) { + res.push(prefix + inner + ']'); + } else { + res.push(prefix + inner); + } + } else { + if (i === 1) { + beg += inner; + } else if (i === parts.length) { + end += inner; + } else { + res.push('[' + prefix + inner + ']'); + } + } + } + } + + var result = res.join('|'); + var rlen = res.length || 1; + if (rlen > 1) { + result = '(?:' + result + ')'; + rlen = 1; + } + if (beg) { + rlen++; + if (beg.charAt(0) === '[') { + if (imbalanced) { + beg = '\\[' + beg.slice(1); + } else { + beg += ']'; + } + } + result = beg + result; + } + if (end) { + rlen++; + if (end.slice(-1) === ']') { + if (imbalanced) { + end = end.slice(0, end.length - 1) + '\\]'; + } else { + end = '[' + end; + } + } + result += end; + } + + if (rlen > 1) { + result = result.split('][').join(']|['); + if (result.indexOf('|') !== -1 && !/\(\?/.test(result)) { + result = '(?:' + result + ')'; + } + } + + result = result.replace(/\[+=|=\]+/g, '\\b'); + return result; +} + +brackets.makeRe = function(pattern) { + try { + return new RegExp(brackets(pattern)); + } catch (err) {} +}; + +brackets.isMatch = function(str, pattern) { + try { + return brackets.makeRe(pattern).test(str); + } catch (err) { + return false; + } +}; + +brackets.match = function(arr, pattern) { + var len = arr.length, i = 0; + var res = arr.slice(); + + var re = brackets.makeRe(pattern); + while (i < len) { + var ele = arr[i++]; + if (!re.test(ele)) { + continue; + } + res.splice(i, 1); + } + return res; +}; diff --git a/node_modules/expand-brackets/package.json b/node_modules/expand-brackets/package.json new file mode 100644 index 0000000000000..99dddafc75b17 --- /dev/null +++ b/node_modules/expand-brackets/package.json @@ -0,0 +1,62 @@ +{ + "name": "expand-brackets", + "description": "Expand POSIX bracket expressions (character classes) in glob patterns.", + "version": "0.1.5", + "homepage": "https://github.com/jonschlinkert/expand-brackets", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/expand-brackets", + "bugs": { + "url": "https://github.com/jonschlinkert/expand-brackets/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-posix-bracket": "^0.1.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.2.5", + "should": "^7.0.2" + }, + "keywords": [ + "bracket", + "character class", + "expression", + "posix" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "extglob", + "is-extglob", + "is-glob", + "is-posix-bracket", + "micromatch" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/expand-range/LICENSE b/node_modules/expand-range/LICENSE new file mode 100644 index 0000000000000..b1e51ff714af2 --- /dev/null +++ b/node_modules/expand-range/LICENSE @@ -0,0 +1,24 @@ +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/expand-range/README.md b/node_modules/expand-range/README.md new file mode 100644 index 0000000000000..72c7e8c6c7652 --- /dev/null +++ b/node_modules/expand-range/README.md @@ -0,0 +1,145 @@ +# expand-range [![NPM version](https://img.shields.io/npm/v/expand-range.svg?style=flat)](https://www.npmjs.com/package/expand-range) [![NPM downloads](https://img.shields.io/npm/dm/expand-range.svg?style=flat)](https://npmjs.org/package/expand-range) [![Build Status](https://img.shields.io/travis/jonschlinkert/expand-range.svg?style=flat)](https://travis-ci.org/jonschlinkert/expand-range) + +Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install expand-range --save +``` + +Wraps [fill-range] to do range expansion using `..` separated strings. See [fill-range] for the full list of options and features. + +## Example usage + +```js +var expand = require('expand-range'); +``` + +**Params** + +```js +expand(start, stop, increment); +``` + +* `start`: the number or letter to start with +* `end`: the number or letter to end with +* `increment`: optionally pass the increment to use. works for letters or numbers + +**Examples** + +```js +expand('a..e') +//=> ['a', 'b', 'c', 'd', 'e'] + +expand('a..e..2') +//=> ['a', 'c', 'e'] + +expand('A..E..2') +//=> ['A', 'C', 'E'] + +expand('1..3') +//=> ['1', '2', '3'] + +expand('0..-5') +//=> [ '0', '-1', '-2', '-3', '-4', '-5' ] + +expand('-9..9..3') +//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ]) + +expand('-1..-10..-2') +//=> [ '-1', '-3', '-5', '-7', '-9' ] + +expand('1..10..2') +//=> [ '1', '3', '5', '7', '9' ] +``` + +### Custom function + +Optionally pass a custom function as the second argument: + +```js +expand('a..e', function (val, isNumber, pad, i) { + if (!isNumber) { + return String.fromCharCode(val) + i; + } + return val; +}); +//=> ['a0', 'b1', 'c2', 'd3', 'e4'] +``` + +## Benchmarks + +```sh +# benchmark/fixtures/alpha-lower.js (29 bytes) + brace-expansion x 145,653 ops/sec ±0.89% (87 runs sampled) + expand-range x 453,213 ops/sec ±1.66% (85 runs sampled) + minimatch x 152,193 ops/sec ±1.17% (86 runs sampled) + +# benchmark/fixtures/alpha-upper.js (29 bytes) + brace-expansion x 149,975 ops/sec ±1.10% (88 runs sampled) + expand-range x 459,390 ops/sec ±1.27% (84 runs sampled) + minimatch x 155,253 ops/sec ±1.25% (88 runs sampled) + +# benchmark/fixtures/padded.js (33 bytes) + brace-expansion x 14,694 ops/sec ±1.37% (85 runs sampled) + expand-range x 169,393 ops/sec ±1.76% (80 runs sampled) + minimatch x 15,052 ops/sec ±1.15% (88 runs sampled) + +# benchmark/fixtures/range.js (29 bytes) + brace-expansion x 142,968 ops/sec ±1.35% (86 runs sampled) + expand-range x 465,579 ops/sec ±1.43% (86 runs sampled) + minimatch x 126,872 ops/sec ±1.18% (90 runs sampled) +``` + +## Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces) +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range) +* [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) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/expand-range/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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-range/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 05, 2016._ \ No newline at end of file diff --git a/node_modules/expand-range/index.js b/node_modules/expand-range/index.js new file mode 100644 index 0000000000000..369962a872a56 --- /dev/null +++ b/node_modules/expand-range/index.js @@ -0,0 +1,43 @@ +/*! + * expand-range + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +var fill = require('fill-range'); + +module.exports = function expandRange(str, options, fn) { + if (typeof str !== 'string') { + throw new TypeError('expand-range expects a string.'); + } + + if (typeof options === 'function') { + fn = options; + options = {}; + } + + if (typeof options === 'boolean') { + options = {}; + options.makeRe = true; + } + + // create arguments to pass to fill-range + var opts = options || {}; + var args = str.split('..'); + var len = args.length; + if (len > 3) { return str; } + + // if only one argument, it can't expand so return it + if (len === 1) { return args; } + + // if `true`, tell fill-range to regexify the string + if (typeof fn === 'boolean' && fn === true) { + opts.makeRe = true; + } + + args.push(opts); + return fill.apply(null, args.concat(fn)); +}; diff --git a/node_modules/expand-range/package.json b/node_modules/expand-range/package.json new file mode 100644 index 0000000000000..01df494cd5ec6 --- /dev/null +++ b/node_modules/expand-range/package.json @@ -0,0 +1,73 @@ +{ + "name": "expand-range", + "description": "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.", + "version": "1.8.2", + "homepage": "https://github.com/jonschlinkert/expand-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/expand-range", + "bugs": { + "url": "https://github.com/jonschlinkert/expand-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "fill-range": "^2.1.0" + }, + "devDependencies": { + "benchmarked": "^0.2.4", + "brace-expansion": "^1.1.4", + "glob": "^7.0.3", + "gulp-format-md": "^0.1.9", + "minimatch": "^3.0.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "expand", + "expansion", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "sh" + ], + "verb": { + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "toc": false, + "layout": "default", + "lint": { + "reflinks": true + }, + "tasks": [ + "readme" + ], + "related": { + "list": [ + "micromatch", + "fill-range", + "braces" + ] + } + } +} diff --git a/node_modules/extend-shallow/LICENSE b/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000000000..99c936915d5d0 --- /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 0000000000000..dee226f4501f0 --- /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 0000000000000..c9582f8f947bb --- /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 0000000000000..c0d7f136277fb --- /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 0000000000000..875b56a739ba7 --- /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 0000000000000..b96d507544e4a --- /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 0000000000000..a8b26ad08ece8 --- /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 0000000000000..2aaab65a8c50a --- /dev/null +++ b/node_modules/extend-shallow/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "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 + } + } +} diff --git a/node_modules/extend-shallow/package.json b/node_modules/extend-shallow/package.json new file mode 100644 index 0000000000000..e5e91053176df --- /dev/null +++ b/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "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" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "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 + } + } +} diff --git a/node_modules/extglob/LICENSE b/node_modules/extglob/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/extglob/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/extglob/README.md b/node_modules/extglob/README.md new file mode 100644 index 0000000000000..6664406695625 --- /dev/null +++ b/node_modules/extglob/README.md @@ -0,0 +1,88 @@ +# extglob [![NPM version](https://badge.fury.io/js/extglob.svg)](http://badge.fury.io/js/extglob) [![Build Status](https://travis-ci.org/jonschlinkert/extglob.svg)](https://travis-ci.org/jonschlinkert/extglob) + +> Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i extglob --save +``` + +Used by [micromatch](https://github.com/jonschlinkert/micromatch). + +**Features** + +* Convert an extglob string to a regex-compatible string. **Only converts extglobs**, to handle full globs use [micromatch](https://github.com/jonschlinkert/micromatch). +* Pass `{regex: true}` to return a regex +* Handles nested patterns +* More complete (and correct) support than [minimatch](https://github.com/isaacs/minimatch) + +## Usage + +```js +var extglob = require('extglob'); + +extglob('?(z)'); +//=> '(?:z)?' +extglob('*(z)'); +//=> '(?:z)*' +extglob('+(z)'); +//=> '(?:z)+' +extglob('@(z)'); +//=> '(?:z)' +extglob('!(z)'); +//=> '(?!^(?:(?!z)[^/]*?)).*$' +``` + +**Optionally return regex** + +```js +extglob('!(z)', {regex: true}); +//=> /(?!^(?:(?!z)[^/]*?)).*$/ +``` + +## Extglob patterns + +To learn more about how extglobs work, see the docs for [Bash pattern matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html): + +* `?(pattern)`: Match zero or one occurrence of the given pattern. +* `*(pattern)`: Match zero or more occurrences of the given pattern. +* `+(pattern)`: Match one or more occurrences of the given pattern. +* `@(pattern)`: Match one of the given pattern. +* `!(pattern)`: Match anything except one of the given pattern. + +## Related + +* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) +* [expand-brackets](https://github.com/jonschlinkert/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. +* [expand-range](https://github.com/jonschlinkert/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) +* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://github.com/jonschlinkert/fill-range) +* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://github.com/jonschlinkert/micromatch) + +## Run 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/extglob/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 01, 2015._ \ 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 0000000000000..2e774d4aae562 --- /dev/null +++ b/node_modules/extglob/index.js @@ -0,0 +1,178 @@ +/*! + * extglob + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Module dependencies + */ + +var isExtglob = require('is-extglob'); +var re, cache = {}; + +/** + * Expose `extglob` + */ + +module.exports = extglob; + +/** + * Convert the given extglob `string` to a regex-compatible + * string. + * + * ```js + * var extglob = require('extglob'); + * extglob('!(a?(b))'); + * //=> '(?!a(?:b)?)[^/]*?' + * ``` + * + * @param {String} `str` The string to convert. + * @param {Object} `options` + * @option {Boolean} [options] `esc` If `false` special characters will not be escaped. Defaults to `true`. + * @option {Boolean} [options] `regex` If `true` a regular expression is returned instead of a string. + * @return {String} + * @api public + */ + + +function extglob(str, opts) { + opts = opts || {}; + var o = {}, i = 0; + + // fix common character reversals + // '*!(.js)' => '*.!(js)' + str = str.replace(/!\(([^\w*()])/g, '$1!('); + + // support file extension negation + str = str.replace(/([*\/])\.!\([*]\)/g, function (m, ch) { + if (ch === '/') { + return escape('\\/[^.]+'); + } + return escape('[^.]+'); + }); + + // create a unique key for caching by + // combining the string and options + var key = str + + String(!!opts.regex) + + String(!!opts.contains) + + String(!!opts.escape); + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + + if (!(re instanceof RegExp)) { + re = regex(); + } + + opts.negate = false; + var m; + + while (m = re.exec(str)) { + var prefix = m[1]; + var inner = m[3]; + if (prefix === '!') { + opts.negate = true; + } + + var id = '__EXTGLOB_' + (i++) + '__'; + // use the prefix of the _last_ (outtermost) pattern + o[id] = wrap(inner, prefix, opts.escape); + str = str.split(m[0]).join(id); + } + + var keys = Object.keys(o); + var len = keys.length; + + // we have to loop again to allow us to convert + // patterns in reverse order (starting with the + // innermost/last pattern first) + while (len--) { + var prop = keys[len]; + str = str.split(prop).join(o[prop]); + } + + var result = opts.regex + ? toRegex(str, opts.contains, opts.negate) + : str; + + result = result.split('.').join('\\.'); + + // cache the result and return it + return (cache[key] = result); +} + +/** + * Convert `string` to a regex string. + * + * @param {String} `str` + * @param {String} `prefix` Character that determines how to wrap the string. + * @param {Boolean} `esc` If `false` special characters will not be escaped. Defaults to `true`. + * @return {String} + */ + +function wrap(inner, prefix, esc) { + if (esc) inner = escape(inner); + + switch (prefix) { + case '!': + return '(?!' + inner + ')[^/]' + (esc ? '%%%~' : '*?'); + case '@': + return '(?:' + inner + ')'; + case '+': + return '(?:' + inner + ')+'; + case '*': + return '(?:' + inner + ')' + (esc ? '%%' : '*') + case '?': + return '(?:' + inner + '|)'; + default: + return inner; + } +} + +function escape(str) { + str = str.split('*').join('[^/]%%%~'); + str = str.split('.').join('\\.'); + return str; +} + +/** + * extglob regex. + */ + +function regex() { + return /(\\?[@?!+*$]\\?)(\(([^()]*?)\))/; +} + +/** + * Negation regex + */ + +function negate(str) { + return '(?!^' + str + ').*$'; +} + +/** + * Create the regex to do the matching. If + * the leading character in the `pattern` is `!` + * a negation regex is returned. + * + * @param {String} `pattern` + * @param {Boolean} `contains` Allow loose matching. + * @param {Boolean} `isNegated` True if the pattern is a negation pattern. + */ + +function toRegex(pattern, contains, isNegated) { + var prefix = contains ? '^' : ''; + var after = contains ? '$' : ''; + pattern = ('(?:' + pattern + ')' + after); + if (isNegated) { + pattern = prefix + negate(pattern); + } + return new RegExp(prefix + pattern); +} diff --git a/node_modules/extglob/package.json b/node_modules/extglob/package.json new file mode 100644 index 0000000000000..969cbe5628135 --- /dev/null +++ b/node_modules/extglob/package.json @@ -0,0 +1,60 @@ +{ + "name": "extglob", + "description": "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.", + "version": "0.3.2", + "homepage": "https://github.com/jonschlinkert/extglob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/extglob.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "devDependencies": { + "ansi-green": "^0.1.1", + "micromatch": "^2.1.6", + "minimatch": "^2.0.1", + "minimist": "^1.1.0", + "mocha": "*", + "should": "*", + "success-symbol": "^0.1.0" + }, + "keywords": [ + "bash", + "extended", + "extglob", + "glob", + "ksh", + "match", + "wildcard" + ], + "verb": { + "related": { + "list": [ + "micromatch", + "expand-brackets", + "braces", + "fill-range", + "expand-range" + ] + } + } +} diff --git a/node_modules/filename-regex/LICENSE b/node_modules/filename-regex/LICENSE new file mode 100644 index 0000000000000..d290fe00b2ae5 --- /dev/null +++ b/node_modules/filename-regex/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/filename-regex/README.md b/node_modules/filename-regex/README.md new file mode 100644 index 0000000000000..2b6b06999e1e8 --- /dev/null +++ b/node_modules/filename-regex/README.md @@ -0,0 +1,63 @@ +# filename-regex [![NPM version](https://img.shields.io/npm/v/filename-regex.svg?style=flat)](https://www.npmjs.com/package/filename-regex) [![NPM monthly downloads](https://img.shields.io/npm/dm/filename-regex.svg?style=flat)](https://npmjs.org/package/filename-regex) [![NPM total downloads](https://img.shields.io/npm/dt/filename-regex.svg?style=flat)](https://npmjs.org/package/filename-regex) [![Linux Build Status](https://img.shields.io/travis/regexhq/filename-regex.svg?style=flat&label=Travis)](https://travis-ci.org/regexhq/filename-regex) + +> Regular expression for matching file names, with or without extension. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save filename-regex +``` + +## Usage + +```js +var regex = require('filename-regex'); + +'a/b/c/d.min.js'.match(regex()); +//=> match[0] = 'd.min.js' + +'a/b/c/.dotfile'.match(regex()); +//=> match[0] = '.dotfile' +``` + +## About + +### 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.4.3, on April 28, 2017._ \ No newline at end of file diff --git a/node_modules/filename-regex/index.js b/node_modules/filename-regex/index.js new file mode 100644 index 0000000000000..bb1888b4a3744 --- /dev/null +++ b/node_modules/filename-regex/index.js @@ -0,0 +1,10 @@ +/*! + * filename-regex + * + * Copyright (c) 2014-2015, Jon Schlinkert + * Licensed under the MIT license. + */ + +module.exports = function filenameRegex() { + return /([^\\\/]+)$/; +}; diff --git a/node_modules/filename-regex/package.json b/node_modules/filename-regex/package.json new file mode 100644 index 0000000000000..f79bafb3e98af --- /dev/null +++ b/node_modules/filename-regex/package.json @@ -0,0 +1,50 @@ +{ + "name": "filename-regex", + "description": "Regular expression for matching file names, with or without extension.", + "version": "2.0.1", + "homepage": "https://github.com/regexhq/filename-regex", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "regexhq/filename-regex", + "bugs": { + "url": "https://github.com/regexhq/filename-regex/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "keywords": [ + "basename", + "file", + "filename", + "filepath", + "match", + "name", + "path", + "regex", + "regexp", + "regular expression" + ], + "devDependencies": { + "gulp-format-md": "^0.1.12" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/fill-range/LICENSE b/node_modules/fill-range/LICENSE new file mode 100644 index 0000000000000..d32ab4426a5f6 --- /dev/null +++ b/node_modules/fill-range/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-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/fill-range/README.md b/node_modules/fill-range/README.md new file mode 100644 index 0000000000000..b70015b98b686 --- /dev/null +++ b/node_modules/fill-range/README.md @@ -0,0 +1,317 @@ +# 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 multiplier to use. + +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) + * [Invalid ranges](#invalid-ranges) + * [Custom function](#custom-function) + * [Special characters](#special-characters) + + [plus](#plus) + + [pipe and tilde](#pipe-and-tilde) + + [angle bracket](#angle-bracket) + + [question mark](#question-mark) +- [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 +``` + +## Usage + +```js +var range = require('fill-range'); + +range('a', 'e'); +//=> ['a', 'b', 'c', 'd', 'e'] +``` + +**Params** + +```js +range(start, stop, step, options, fn); +``` + +* `start`: **{String|Number}** the number or letter to start with +* `end`: **{String|Number}** the number or letter to end with +* `step`: **{String|Number}** optionally pass the step to use. works for letters or numbers. +* `options`: **{Object}**: + - `makeRe`: return a regex-compatible string (still returned as an array for consistency) + - `step`: pass the step on the options as an alternative to passing it as an argument + - `silent`: `true` by default, set to false to throw errors for invalid ranges. +* `fn`: **{Function}** optionally [pass a function](#custom-function) to modify each character + +**Examples** + +```js +range(1, 3) +//=> ['1', '2', '3'] + +range('1', '3') +//=> ['1', '2', '3'] + +range('0', '-5') +//=> [ '0', '-1', '-2', '-3', '-4', '-5' ] + +range(-9, 9, 3) +//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ]) + +range('-1', '-10', '-2') +//=> [ '-1', '-3', '-5', '-7', '-9' ] + +range('1', '10', '2') +//=> [ '1', '3', '5', '7', '9' ] + +range('a', 'e') +//=> ['a', 'b', 'c', 'd', 'e'] + +range('a', 'e', 2) +//=> ['a', 'c', 'e'] + +range('A', 'E', 2) +//=> ['A', 'C', 'E'] +``` + +### Invalid ranges + +When an invalid range is passed, `null` is returned. + +```js +range('1.1', '2'); +//=> null + +range('a', '2'); +//=> null + +range(1, 10, 'foo'); +//=> null +``` + +If you want errors to be throw, pass `silent: false` on the options: + +### Custom function + +Optionally pass a custom function as the third or fourth argument: + +```js +range('a', 'e', function (val, isNumber, pad, i) { + if (!isNumber) { + return String.fromCharCode(val) + i; + } + return val; +}); +//=> ['a0', 'b1', 'c2', 'd3', 'e4'] +``` + +### Special characters + +A special character may be passed as the third arg instead of a step increment. These characters can be pretty useful for brace expansion, creating file paths, test fixtures and similar use case. + +```js +range('a', 'z', SPECIAL_CHARACTER_HERE); +``` + +**Supported characters** + +* `+`: repeat the given string `n` times +* `|`: create a regex-ready string, instead of an array +* `>`: join values to single array element +* `?`: randomize the given pattern using [randomatic] + +#### plus + +Character: _(`+`)_ + +Repeat the first argument the number of times passed on the second argument. + +**Examples:** + +```js +range('a', 3, '+'); +//=> ['a', 'a', 'a'] + +range('abc', 2, '+'); +//=> ['abc', 'abc'] +``` + +#### pipe and tilde + +Characters: _(`|` and `~`)_ + +Creates a regex-capable string (either a logical `or` or a character class) from the expanded arguments. + +**Examples:** + +```js +range('a', 'c', '|'); +//=> ['(a|b|c)' + +range('a', 'c', '~'); +//=> ['[a-c]' + +range('a', 'z', '|5'); +//=> ['(a|f|k|p|u|z)' +``` + +**Automatic separator correction** + +To avoid this error: + +> `Range out of order in character class` + +Fill-range detects invalid sequences and uses the correct syntax. For example: + +**invalid** (regex) + +If you pass these: + +```js +range('a', 'z', '~5'); +// which would result in this +//=> ['[a-f-k-p-u-z]'] + +range('10', '20', '~'); +// which would result in this +//=> ['[10-20]'] +``` + +**valid** (regex) + +fill-range corrects them to this: + +```js +range('a', 'z', '~5'); +//=> ['(a|f|k|p|u|z)' + +range('10', '20', '~'); +//=> ['(10-20)' +``` + +#### angle bracket + +Character: _(`>`)_ + +Joins all values in the returned array to a single value. + +**Examples:** + +```js +range('a', 'e', '>'); +//=> ['abcde'] + +range('5', '8', '>'); +//=> ['5678'] + +range('2', '20', '2>'); +//=> ['2468101214161820'] +``` + +#### question mark + +Character: _(`?`)_ + +Uses [randomatic] to generate randomized alpha, numeric, or alpha-numeric patterns based on the provided arguments. + +**Examples:** + +_(actual results would obviously be randomized)_ + +Generate a 5-character, uppercase, alphabetical string: + +```js +range('A', 5, '?'); +//=> ['NSHAK'] +``` + +Generate a 5-digit random number: + +```js +range('0', 5, '?'); +//=> ['36583'] +``` + +Generate a 10-character alpha-numeric string: + +```js +range('A0', 10, '?'); +//=> ['5YJD60VQNN'] +``` + +See the [randomatic] repo for all available options and or to create issues or feature requests related to randomization. + +## 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-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].") +* [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/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 111 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulmillr](https://github.com/paulmillr) | +| 1 | [edorivai](https://github.com/edorivai) | +| 1 | [realityking](https://github.com/realityking) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](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 May 08, 2018._ \ 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 0000000000000..4c0fe8dd4cedf --- /dev/null +++ b/node_modules/fill-range/index.js @@ -0,0 +1,408 @@ +/*! + * fill-range + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var isNumber = require('is-number'); +var randomize = require('randomatic'); +var repeatStr = require('repeat-string'); +var repeat = require('repeat-element'); + +/** + * Expose `fillRange` + */ + +module.exports = fillRange; + +/** + * Return a range of numbers or letters. + * + * @param {String} `a` Start of the range + * @param {String} `b` 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(a, b, step, options, fn) { + if (a == null || b == null) { + throw new Error('fill-range expects the first and second args to be strings.'); + } + + if (typeof step === 'function') { + fn = step; options = {}; step = null; + } + + if (typeof options === 'function') { + fn = options; options = {}; + } + + if (isObject(step)) { + options = step; step = ''; + } + + var expand, regex = false, sep = ''; + var opts = options || {}; + + if (typeof opts.silent === 'undefined') { + opts.silent = true; + } + + step = step || opts.step; + + // store a ref to unmodified arg + var origA = a, origB = b; + + b = (b.toString() === '-0') ? 0 : b; + + if (opts.optimize || opts.makeRe) { + step = step ? (step += '~') : step; + expand = true; + regex = true; + sep = '~'; + } + + // handle special step characters + if (typeof step === 'string') { + var match = stepRe().exec(step); + + if (match) { + var i = match.index; + var m = match[0]; + + // repeat string + if (m === '+') { + return repeat(a, b); + + // randomize a, `b` times + } else if (m === '?') { + return [randomize(a, b)]; + + // expand right, no regex reduction + } else if (m === '>') { + step = step.substr(0, i) + step.substr(i + 1); + expand = true; + + // expand to an array, or if valid create a reduced + // string for a regex logic `or` + } else if (m === '|') { + step = step.substr(0, i) + step.substr(i + 1); + expand = true; + regex = true; + sep = m; + + // expand to an array, or if valid create a reduced + // string for a regex range + } else if (m === '~') { + step = step.substr(0, i) + step.substr(i + 1); + expand = true; + regex = true; + sep = m; + } + } else if (!isNumber(step)) { + if (!opts.silent) { + throw new TypeError('fill-range: invalid step.'); + } + return null; + } + } + + if (/[.&*()[\]^%$#@!]/.test(a) || /[.&*()[\]^%$#@!]/.test(b)) { + if (!opts.silent) { + throw new RangeError('fill-range: invalid range arguments.'); + } + return null; + } + + // has neither a letter nor number, or has both letters and numbers + // this needs to be after the step logic + if (!noAlphaNum(a) || !noAlphaNum(b) || hasBoth(a) || hasBoth(b)) { + if (!opts.silent) { + throw new RangeError('fill-range: invalid range arguments.'); + } + return null; + } + + // validate arguments + var isNumA = isNumber(zeros(a)); + var isNumB = isNumber(zeros(b)); + + if ((!isNumA && isNumB) || (isNumA && !isNumB)) { + if (!opts.silent) { + throw new TypeError('fill-range: first range argument is incompatible with second.'); + } + return null; + } + + // by this point both are the same, so we + // can use A to check going forward. + var isNum = isNumA; + var num = formatStep(step); + + // is the range alphabetical? or numeric? + if (isNum) { + // if numeric, coerce to an integer + a = +a; b = +b; + } else { + // otherwise, get the charCode to expand alpha ranges + a = a.charCodeAt(0); + b = b.charCodeAt(0); + } + + // is the pattern descending? + var isDescending = a > b; + + // don't create a character class if the args are < 0 + if (a < 0 || b < 0) { + expand = false; + regex = false; + } + + // detect padding + var padding = isPadded(origA, origB); + var res, pad, arr = []; + var ii = 0; + + // character classes, ranges and logical `or` + if (regex) { + if (shouldExpand(a, b, num, isNum, padding, opts)) { + // make sure the correct separator is used + if (sep === '|' || sep === '~') { + sep = detectSeparator(a, b, num, isNum, isDescending); + } + return wrap([origA, origB], sep, opts); + } + } + + while (isDescending ? (a >= b) : (a <= b)) { + if (padding && isNum) { + pad = padding(a); + } + + // custom function + if (typeof fn === 'function') { + res = fn(a, isNum, pad, ii++); + + // letters + } else if (!isNum) { + if (regex && isInvalidChar(a)) { + res = null; + } else { + res = String.fromCharCode(a); + } + + // numbers + } else { + res = formatPadding(a, pad); + } + + // add result to the array, filtering any nulled values + if (res !== null) arr.push(res); + + // increment or decrement + if (isDescending) { + a -= num; + } else { + a += num; + } + } + + // now that the array is expanded, we need to handle regex + // character classes, ranges or logical `or` that wasn't + // already handled before the loop + if ((regex || expand) && !opts.noexpand) { + // make sure the correct separator is used + if (sep === '|' || sep === '~') { + sep = detectSeparator(a, b, num, isNum, isDescending); + } + if (arr.length === 1 || a < 0 || b < 0) { return arr; } + return wrap(arr, sep, opts); + } + + return arr; +} + +/** + * Wrap the string with the correct regex + * syntax. + */ + +function wrap(arr, sep, opts) { + if (sep === '~') { sep = '-'; } + var str = arr.join(sep); + var pre = opts && opts.regexPrefix; + + // regex logical `or` + if (sep === '|') { + str = pre ? pre + str : str; + str = '(' + str + ')'; + } + + // regex character class + if (sep === '-') { + str = (pre && pre === '^') + ? pre + str + : str; + str = '[' + str + ']'; + } + return [str]; +} + +/** + * Check for invalid characters + */ + +function isCharClass(a, b, step, isNum, isDescending) { + if (isDescending) { return false; } + if (isNum) { return a <= 9 && b <= 9; } + if (a < b) { return step === 1; } + return false; +} + +/** + * Detect the correct separator to use + */ + +function shouldExpand(a, b, num, isNum, padding, opts) { + if (isNum && (a > 9 || b > 9)) { return false; } + return !padding && num === 1 && a < b; +} + +/** + * Detect the correct separator to use + */ + +function detectSeparator(a, b, step, isNum, isDescending) { + var isChar = isCharClass(a, b, step, isNum, isDescending); + if (!isChar) { + return '|'; + } + return '~'; +} + +/** + * Correctly format the step based on type + */ + +function formatStep(step) { + return Math.abs(step >> 0) || 1; +} + +/** + * Format padding, taking leading `-` into account + */ + +function formatPadding(ch, pad) { + var res = pad ? pad + ch : ch; + if (pad && ch.toString().charAt(0) === '-') { + res = '-' + pad + ch.toString().substr(1); + } + return res.toString(); +} + +/** + * Check for invalid characters + */ + +function isInvalidChar(str) { + var ch = toStr(str); + return ch === '\\' + || ch === '[' + || ch === ']' + || ch === '^' + || ch === '(' + || ch === ')' + || ch === '`'; +} + +/** + * Convert to a string from a charCode + */ + +function toStr(ch) { + return String.fromCharCode(ch); +} + + +/** + * Step regex + */ + +function stepRe() { + return /\?|>|\||\+|\~/g; +} + +/** + * Return true if `val` has either a letter + * or a number + */ + +function noAlphaNum(val) { + return /[a-z0-9]/i.test(val); +} + +/** + * Return true if `val` has both a letter and + * a number (invalid) + */ + +function hasBoth(val) { + return /[a-z][0-9]|[0-9][a-z]/i.test(val); +} + +/** + * Normalize zeros for checks + */ + +function zeros(val) { + if (/^-*0+$/.test(val.toString())) { + return '0'; + } + return val; +} + +/** + * Return true if `val` has leading zeros, + * or a similar valid pattern. + */ + +function hasZeros(val) { + return /[^.]\.|^-*0+[0-9]/.test(val); +} + +/** + * If the string is padded, returns a curried function with + * the a cached padding string, or `false` if no padding. + * + * @param {*} `origA` String or number. + * @return {String|Boolean} + */ + +function isPadded(origA, origB) { + if (hasZeros(origA) || hasZeros(origB)) { + var alen = length(origA); + var blen = length(origB); + + var len = alen >= blen + ? alen + : blen; + + return function (a) { + return repeatStr('0', len - length(a)); + }; + } + return false; +} + +/** + * Get the string length of `val` + */ + +function length(val) { + return val.toString().length; +} diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json new file mode 100644 index 0000000000000..5e1669dc61ca4 --- /dev/null +++ b/node_modules/fill-range/package.json @@ -0,0 +1,78 @@ +{ + "name": "fill-range", + "description": "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.", + "version": "2.2.4", + "homepage": "https://github.com/jonschlinkert/fill-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/fill-range", + "bugs": { + "url": "https://github.com/jonschlinkert/fill-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + }, + "devDependencies": { + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "gulp-format-md": "^1.0.0", + "should": "^13.2.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "expand", + "expansion", + "fill", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": true, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "braces", + "expand-range", + "is-glob", + "micromatch" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "micromatch", + "randomatic" + ] + } +} diff --git a/node_modules/for-each/.editorconfig b/node_modules/for-each/.editorconfig new file mode 100644 index 0000000000000..ac29adef0361c --- /dev/null +++ b/node_modules/for-each/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/for-each/.eslintrc b/node_modules/for-each/.eslintrc new file mode 100644 index 0000000000000..2b8ea2a379127 --- /dev/null +++ b/node_modules/for-each/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "indent": [2, 4], + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 14], + "no-invalid-this": [1], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], + } +} diff --git a/node_modules/for-each/.travis.yml b/node_modules/for-each/.travis.yml new file mode 100644 index 0000000000000..e9e54bda664f4 --- /dev/null +++ b/node_modules/for-each/.travis.yml @@ -0,0 +1,45 @@ +language: node_js +os: + - linux +node_js: + - "8" + - "7" + - "6" + - "5" + - "4" + - "iojs" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "node" + env: POSTTEST=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/node_modules/for-each/LICENSE b/node_modules/for-each/LICENSE new file mode 100644 index 0000000000000..53f19aa771439 --- /dev/null +++ b/node_modules/for-each/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-each/README.md b/node_modules/for-each/README.md new file mode 100644 index 0000000000000..16dfbb6ea4f60 --- /dev/null +++ b/node_modules/for-each/README.md @@ -0,0 +1,43 @@ +# for-each [![build status][1]][2] + +[![browser support][3]][4] + +A better forEach. + +## Example + +Like `Array.prototype.forEach` but works on objects. + +```js +var forEach = require("for-each") + +forEach({ key: "value" }, function (value, key, object) { + /* code */ +}) +``` + +As a bonus, it's also a perfectly function shim/polyfill for arrays too! + +```js +var forEach = require("for-each") + +forEach([1, 2, 3], function (value, index, array) { + /* code */ +}) +``` + +## Installation + +`npm install for-each` + +## Contributors + + - Raynos + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Raynos/for-each.png + [2]: http://travis-ci.org/Raynos/for-each + [3]: https://ci.testling.com/Raynos/for-each.png + [4]: https://ci.testling.com/Raynos/for-each + diff --git a/node_modules/for-each/index.js b/node_modules/for-each/index.js new file mode 100644 index 0000000000000..609ef9fcc8869 --- /dev/null +++ b/node_modules/for-each/index.js @@ -0,0 +1,62 @@ +'use strict'; + +var isCallable = require('is-callable'); + +var toStr = Object.prototype.toString; +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var forEachArray = function forEachArray(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } +}; + +var forEachString = function forEachString(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } +}; + +var forEachObject = function forEachObject(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } +}; + +var forEach = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError('iterator must be a function'); + } + + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + + if (toStr.call(list) === '[object Array]') { + forEachArray(list, iterator, receiver); + } else if (typeof list === 'string') { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } +}; + +module.exports = forEach; diff --git a/node_modules/for-each/package.json b/node_modules/for-each/package.json new file mode 100644 index 0000000000000..f21d15e4c13cb --- /dev/null +++ b/node_modules/for-each/package.json @@ -0,0 +1,65 @@ +{ + "name": "for-each", + "version": "0.3.3", + "description": "A better forEach", + "keywords": [], + "author": "Raynos ", + "repository": "git://github.com/Raynos/for-each.git", + "main": "index", + "homepage": "https://github.com/Raynos/for-each", + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/for-each/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": { + "is-callable": "^1.1.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "eslint": "^4.19.1", + "nsp": "^3.2.1", + "tape": "^4.9.0" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/Raynos/for-each/raw/master/LICENSE" + } + ], + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node test/test", + "posttest": "npm run security", + "lint": "eslint *.js test/*.js", + "security": "nsp check" + }, + "testling": { + "files": "test/test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + } +} diff --git a/node_modules/for-each/test/.eslintrc b/node_modules/for-each/test/.eslintrc new file mode 100644 index 0000000000000..a6c04b9174546 --- /dev/null +++ b/node_modules/for-each/test/.eslintrc @@ -0,0 +1,8 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/for-each/test/test.js b/node_modules/for-each/test/test.js new file mode 100644 index 0000000000000..8c93787286a95 --- /dev/null +++ b/node_modules/for-each/test/test.js @@ -0,0 +1,182 @@ +'use strict'; + +/* globals window */ + +var test = require('tape'); +var forEach = require('../'); + +test('forEach calls each iterator', function (t) { + var count = 0; + t.plan(4); + forEach({ a: 1, b: 2 }, function (value, key) { + if (count === 0) { + t.equal(value, 1); + t.equal(key, 'a'); + } else { + t.equal(value, 2); + t.equal(key, 'b'); + } + count += 1; + }); +}); + +test('forEach calls iterator with correct this value', function (t) { + var thisValue = {}; + + t.plan(1); + + forEach([0], function () { + t.equal(this, thisValue); + }, thisValue); +}); + +test('second argument: iterator', function (t) { + var arr = []; + t['throws'](function () { forEach(arr); }, TypeError, 'undefined is not a function'); + t['throws'](function () { forEach(arr, null); }, TypeError, 'null is not a function'); + t['throws'](function () { forEach(arr, ''); }, TypeError, 'string is not a function'); + t['throws'](function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); + t['throws'](function () { forEach(arr, true); }, TypeError, 'true is not a function'); + t['throws'](function () { forEach(arr, false); }, TypeError, 'false is not a function'); + t['throws'](function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); + t['throws'](function () { forEach(arr, 42); }, TypeError, '42 is not a function'); + t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); + t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); + if (typeof window !== 'undefined') { + t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); + } + t.end(); +}); + +test('array', function (t) { + var arr = [1, 2, 3]; + + t.test('iterates over every item', function (st) { + var index = 0; + forEach(arr, function () { index += 1; }); + st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(arr.length); + forEach(arr, function (item) { + st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(arr.length); + forEach(arr, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(arr.length); + forEach(arr, function (item, index, array) { + st.deepEqual(arr, array, 'array is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + forEach([], function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('object', function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + var keys = ['a', 'b', 'c']; + + var F = function F() { + this.a = 1; + this.b = 2; + }; + F.prototype.c = 3; + var fKeys = ['a', 'b']; + + t.test('iterates over every object literal key', function (st) { + var counter = 0; + forEach(obj, function () { counter += 1; }); + st.equal(counter, keys.length, 'iterated ' + counter + ' times'); + st.end(); + }); + + t.test('iterates only over own keys', function (st) { + var counter = 0; + forEach(new F(), function () { counter += 1; }); + st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(keys.length); + forEach(obj, function (item) { + st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(keys.length); + forEach(obj, function (item, key) { + st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(keys.length); + forEach(obj, function (item, key, object) { + st.deepEqual(obj, object, 'object is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + forEach({}, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('string', function (t) { + var str = 'str'; + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan((str.length * 2) + 1); + forEach(str, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + st.equal(str.charAt(index), item); + counter += 1; + }); + st.equal(counter, str.length, 'iterates ' + str.length + ' times'); + st.end(); + }); + t.end(); +}); diff --git a/node_modules/for-in/LICENSE b/node_modules/for-in/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /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 0000000000000..874e1895a3997 --- /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 0000000000000..0b5f95f025352 --- /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 0000000000000..48810a18d3847 --- /dev/null +++ b/node_modules/for-in/package.json @@ -0,0 +1,68 @@ +{ + "name": "for-in", + "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", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/for-in", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Irish (http://paulirish.com)" + ], + "repository": "jonschlinkert/for-in", + "bugs": { + "url": "https://github.com/jonschlinkert/for-in/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "keywords": [ + "for", + "for-in", + "for-own", + "has", + "has-own", + "hasOwn", + "in", + "key", + "keys", + "object", + "own", + "value" + ], + "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 + } + } +} diff --git a/node_modules/for-own/LICENSE b/node_modules/for-own/LICENSE new file mode 100644 index 0000000000000..d290fe00b2ae5 --- /dev/null +++ b/node_modules/for-own/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/for-own/README.md b/node_modules/for-own/README.md new file mode 100644 index 0000000000000..fd56877aeb4ed --- /dev/null +++ b/node_modules/for-own/README.md @@ -0,0 +1,85 @@ +# for-own [![NPM version](https://img.shields.io/npm/v/for-own.svg?style=flat)](https://www.npmjs.com/package/for-own) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![NPM total downloads](https://img.shields.io/npm/dt/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-own.svg?style=flat&label=Travis)](https://travis-ci.org/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. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save for-own +``` + +## Usage + +```js +var forOwn = require('for-own'); + +var obj = {a: 'foo', b: 'bar', c: 'baz'}; +var values = []; +var keys = []; + +forOwn(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-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") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 10 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [javiercejudo](https://github.com/javiercejudo) | + +### 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 26, 2017._ \ No newline at end of file diff --git a/node_modules/for-own/index.js b/node_modules/for-own/index.js new file mode 100644 index 0000000000000..74e2d755100f8 --- /dev/null +++ b/node_modules/for-own/index.js @@ -0,0 +1,19 @@ +/*! + * for-own + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var forIn = require('for-in'); +var hasOwn = Object.prototype.hasOwnProperty; + +module.exports = function forOwn(obj, fn, thisArg) { + forIn(obj, function(val, key) { + if (hasOwn.call(obj, key)) { + return fn.call(thisArg, obj[key], key, obj); + } + }); +}; diff --git a/node_modules/for-own/package.json b/node_modules/for-own/package.json new file mode 100644 index 0000000000000..0f1b50245e11e --- /dev/null +++ b/node_modules/for-own/package.json @@ -0,0 +1,70 @@ +{ + "name": "for-own", + "description": "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.", + "version": "0.1.5", + "homepage": "https://github.com/jonschlinkert/for-own", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Javier Cejudo (https://www.javiercejudo.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/for-own", + "bugs": { + "url": "https://github.com/jonschlinkert/for-own/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "for-in": "^1.0.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "keywords": [ + "for", + "for-in", + "for-own", + "has", + "has-own", + "hasOwn", + "key", + "keys", + "object", + "own", + "value" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "collection-map", + "for-in" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/fragment-cache/LICENSE b/node_modules/fragment-cache/LICENSE new file mode 100644 index 0000000000000..b11cb7968e5bd --- /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 0000000000000..541ef0fb41f53 --- /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 0000000000000..8ce6216800ed5 --- /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 0000000000000..f87c5dad393dc --- /dev/null +++ b/node_modules/fragment-cache/package.json @@ -0,0 +1,60 @@ +{ + "name": "fragment-cache", + "description": "A cache for managing namespaced sub-caches", + "version": "0.2.1", + "homepage": "https://github.com/jonschlinkert/fragment-cache", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/fragment-cache", + "bugs": { + "url": "https://github.com/jonschlinkert/fragment-cache/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "map-cache": "^0.2.2" + }, + "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" + }, + "keywords": [ + "cache", + "fragment" + ], + "verb": { + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "map-cache", + "verb" + ], + "related": { + "list": [ + "base", + "map-cache" + ] + }, + "layout": "default", + "toc": false, + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/from/.npmignore b/node_modules/from/.npmignore new file mode 100644 index 0000000000000..3c3629e647f5d --- /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 0000000000000..76db03fdba5b3 --- /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 0000000000000..6366c04716fb9 --- /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 0000000000000..6eafbd734a6e0 --- /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 0000000000000..e3e7bfd31e650 --- /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 0000000000000..a265d8462b6dd --- /dev/null +++ b/node_modules/from/package.json @@ -0,0 +1,26 @@ +{ + "name": "from", + "version": "0.1.7", + "description": "Easy way to make a Readable Stream", + "main": "index.js", + "scripts": { + "test": "asynct test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/from.git" + }, + "keywords": [ + "stream", + "streams", + "readable", + "easy" + ], + "devDependencies": { + "asynct": "1", + "stream-spec": "0", + "assertions": "~2.3.0" + }, + "author": "Dominic Tarr (dominictarr.com)", + "license": "MIT" +} diff --git a/node_modules/from/readme.markdown b/node_modules/from/readme.markdown new file mode 100644 index 0000000000000..c84fc9b36c1dc --- /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 0000000000000..5e2f161b96f63 --- /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/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc new file mode 100644 index 0000000000000..71a054fd370a6 --- /dev/null +++ b/node_modules/function-bind/.eslintrc @@ -0,0 +1,21 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "no-new-func": [1], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + "strict": [0] + }, + }, + ], +} diff --git a/node_modules/function-bind/.github/FUNDING.yml b/node_modules/function-bind/.github/FUNDING.yml new file mode 100644 index 0000000000000..74482195934a9 --- /dev/null +++ b/node_modules/function-bind/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/function-bind +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function-bind/.github/SECURITY.md b/node_modules/function-bind/.github/SECURITY.md new file mode 100644 index 0000000000000..82e4285adc628 --- /dev/null +++ b/node_modules/function-bind/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/function-bind/.nycrc b/node_modules/function-bind/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/function-bind/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/function-bind/CHANGELOG.md b/node_modules/function-bind/CHANGELOG.md new file mode 100644 index 0000000000000..f9e6cc078dadd --- /dev/null +++ b/node_modules/function-bind/CHANGELOG.md @@ -0,0 +1,136 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12 + +### Merged + +- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16) + +### Commits + +- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8) +- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f) +- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed) +- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e) +- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d) +- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7) +- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd) +- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48) +- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c) +- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6) +- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964) +- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7) +- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae) +- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c) +- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28) +- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397) +- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b) +- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2) +- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9) + +## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28 + +### Commits + +- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e) +- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd) +- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908) +- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381) + +## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14 + +### Commits + +- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097) +- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad) +- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b) +- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9) +- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a) +- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed) +- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101) +- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc) +- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57) +- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4) +- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115) +- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e) +- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f) +- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831) +- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4) +- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9) +- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453) +- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266) +- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d) +- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430) + +## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04 + +## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03 + +### Merged + +- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3) + +### Commits + +- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a) +- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10) +- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95) +- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65) +- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77) +- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00) +- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c) +- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16) +- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5) +- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e) +- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a) +- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845) +- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc) +- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c) +- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd) +- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8) +- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14) +- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0) +- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71) +- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc) +- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0) +- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987) +- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9) + +## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09 + +### Commits + +- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75) +- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731) +- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502) +- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c) +- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74) +- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464) + +## v0.2.0 - 2014-03-23 + +### Commits + +- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4) +- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066) +- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25) +- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f) +- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750) +- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3) +- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565) +- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07) diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE new file mode 100644 index 0000000000000..62d6d237ff179 --- /dev/null +++ b/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/function-bind/README.md b/node_modules/function-bind/README.md new file mode 100644 index 0000000000000..814c20b5a9e3c --- /dev/null +++ b/node_modules/function-bind/README.md @@ -0,0 +1,46 @@ +# function-bind [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] + +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Implementation of function.prototype.bind + +Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`. + +## Example + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + +[package-url]: https://npmjs.org/package/function-bind +[npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg +[deps-svg]: https://david-dm.org/Raynos/function-bind.svg +[deps-url]: https://david-dm.org/Raynos/function-bind +[dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg +[dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/function-bind.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/function-bind.svg +[downloads-url]: https://npm-stat.com/charts.html?package=function-bind +[codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind +[actions-url]: https://github.com/Raynos/function-bind/actions diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js new file mode 100644 index 0000000000000..fd4384cc0c34c --- /dev/null +++ b/node_modules/function-bind/implementation.js @@ -0,0 +1,84 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js new file mode 100644 index 0000000000000..3bb6b9609889f --- /dev/null +++ b/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json new file mode 100644 index 0000000000000..6185963897790 --- /dev/null +++ b/node_modules/function-bind/package.json @@ -0,0 +1,87 @@ +{ + "name": "function-bind", + "version": "1.1.2", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": { + "type": "git", + "url": "https://github.com/Raynos/function-bind.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1" + }, + "license": "MIT", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepack": "npmignore --auto --commentLines=autogenerated", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..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" + ] + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc new file mode 100644 index 0000000000000..8a56d5b72fb00 --- /dev/null +++ b/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js new file mode 100644 index 0000000000000..2edecce2f0fa5 --- /dev/null +++ b/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/node_modules/function.prototype.name/.editorconfig b/node_modules/function.prototype.name/.editorconfig new file mode 100644 index 0000000000000..b2bccd44f9603 --- /dev/null +++ b/node_modules/function.prototype.name/.editorconfig @@ -0,0 +1,24 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = off + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[README.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/function.prototype.name/.eslintrc b/node_modules/function.prototype.name/.eslintrc new file mode 100644 index 0000000000000..92e59ca6f08aa --- /dev/null +++ b/node_modules/function.prototype.name/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-lines-per-function": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "HasOwnProperty", + "IsCallable", + ], + }], + }, +} diff --git a/node_modules/function.prototype.name/.github/FUNDING.yml b/node_modules/function.prototype.name/.github/FUNDING.yml new file mode 100644 index 0000000000000..6a3b00c775c8d --- /dev/null +++ b/node_modules/function.prototype.name/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/function.prototype.name +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function.prototype.name/.nycrc b/node_modules/function.prototype.name/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/function.prototype.name/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/function.prototype.name/CHANGELOG.md b/node_modules/function.prototype.name/CHANGELOG.md new file mode 100644 index 0000000000000..6ad93bc1477ec --- /dev/null +++ b/node_modules/function.prototype.name/CHANGELOG.md @@ -0,0 +1,123 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.6](https://github.com/es-shims/Function.prototype.name/compare/v1.1.5...v1.1.6) - 2023-08-28 + +### Commits + +- [actions] reuse common workflows [`5f6bfba`](https://github.com/es-shims/Function.prototype.name/commit/5f6bfba9d2c42fbac8f4812396bc71f79464846c) +- [meta] use `npmignore` to autogenerate an npmignore file [`28ea2f9`](https://github.com/es-shims/Function.prototype.name/commit/28ea2f9a9dd48623cba04e94c491033f1c9d1e90) +- [Fix] properly recognize `document.all` in IE 6-8 [`316d676`](https://github.com/es-shims/Function.prototype.name/commit/316d67641d54bf221ed5edfdb9e04af3b98caad8) +- [Fix] only return an own `name` [`d647609`](https://github.com/es-shims/Function.prototype.name/commit/d6476090e110733b52a922f4d0dbfdbc9478c653) +- [Tests] add browserstack browser tests [`67ae402`](https://github.com/es-shims/Function.prototype.name/commit/67ae402aabcad83df2f7d7e356d059a84fe71f44) +- [meta] better `eccheck` command [`728df4c`](https://github.com/es-shims/Function.prototype.name/commit/728df4cc81a51a131a36c0768c4adb7668ad7569) +- [meta] add `auto-changelog` [`dbb700b`](https://github.com/es-shims/Function.prototype.name/commit/dbb700b38ef4c18e0ce0670a2ffface9ffd251a0) +- [readme] fix eclint [`c98fdf1`](https://github.com/es-shims/Function.prototype.name/commit/c98fdf1bc5451de667945c41187a67022f750001) +- [readme] add tested browsers [`d41325c`](https://github.com/es-shims/Function.prototype.name/commit/d41325ceec61627f63281d0649e4e0004f3e0609) +- [actions] update rebase action to use reusable workflow [`085f340`](https://github.com/es-shims/Function.prototype.name/commit/085f3400785cd4f3fb762b73b095f5dfb795a0b3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`3f071ce`](https://github.com/es-shims/Function.prototype.name/commit/3f071cef2e1feebfd7d0daea7d6392c2feada091) +- [actions] update codecov uploader [`a187b4f`](https://github.com/es-shims/Function.prototype.name/commit/a187b4fd07dbbeee12e8dc60651f122ab3f41f8d) +- [Deps] update `define-properties`, `es-abstract` [`3ca42ef`](https://github.com/es-shims/Function.prototype.name/commit/3ca42ef76d5d4016d1ea87d806dc7e4a09d9b4f8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`8de25d2`](https://github.com/es-shims/Function.prototype.name/commit/8de25d2b9b523bd385b0bf3bb9213c11ecf8f1ba) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`8b04da7`](https://github.com/es-shims/Function.prototype.name/commit/8b04da71695a1b9cf285ee926ffeec55b543595b) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`39d8538`](https://github.com/es-shims/Function.prototype.name/commit/39d853854136a749c94e10f9fb06ba73903671a6) +- [meta] reorder scripts [`054f96b`](https://github.com/es-shims/Function.prototype.name/commit/054f96b5e88e08e65c4e27bcb799c7cea2bc3462) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`bebee89`](https://github.com/es-shims/Function.prototype.name/commit/bebee894a7989aef6e9db0dc8b16cbd9134b629c) +- [Dev Deps] update `aud`, `tape` [`8e68159`](https://github.com/es-shims/Function.prototype.name/commit/8e681599b4fbf26e921f61fd603da0524369b72c) +- [Tests] handle Function.prototype in Opera 12.1 [`f3b8f9a`](https://github.com/es-shims/Function.prototype.name/commit/f3b8f9a40b88f6da5ad41b874c3f2acf6fb30378) +- [Deps] update `es-abstract`, `functions-have-names` [`6a59889`](https://github.com/es-shims/Function.prototype.name/commit/6a598893f013182070479a8cc52afd44e556561f) +- [Deps] update `define-properties`, `es-abstract` [`cd1c5e7`](https://github.com/es-shims/Function.prototype.name/commit/cd1c5e773c3740ec563a26e657d764aba7c35a8c) +- [Deps] update `es-abstract` [`3584585`](https://github.com/es-shims/Function.prototype.name/commit/35845851109f767e3bc84ebef989ca93e5851276) +- [Deps] update `es-abstract` [`0e2f6d9`](https://github.com/es-shims/Function.prototype.name/commit/0e2f6d99d554a8b6b7c835702c8408832f9a2684) +- [Deps] update `es-abstract` [`b11748e`](https://github.com/es-shims/Function.prototype.name/commit/b11748ebbda2d840ac625ae6627cfdb090b94434) +- [Dev Deps] update `tape` [`d787a81`](https://github.com/es-shims/Function.prototype.name/commit/d787a81a1e1ce6d00dda6272e93a43bb193b1286) +- [Deps] update `es-abstract` [`4692639`](https://github.com/es-shims/Function.prototype.name/commit/469263915b07db8342f0aad29ad7eba083bea277) +- [Dev Deps] add `in-publish` [`568e263`](https://github.com/es-shims/Function.prototype.name/commit/568e2635099de326768f40d9e0eacbd024861676) + + +1.1.5 / 2021-10-01 +================= + * [Deps] update `es-abstract` + * [meta] use `prepublishOnly` script for npm 7+ + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `tape` + * [actions] update workflows + * [actions] use `node/install` instead of `node/run`; use `codecov` action + +1.1.4 / 2021-02-22 +================= + * [readme] remove travis badge + * [meta] remove audit-level + * [meta] gitignore coverage output + * [meta] do not publish github action workflow files + * [Deps] update `call-bind`, `es-abstract`, `functions-have-names` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-strict-mode`, `tape` + * [Tests] increase coverage + * [actions] update workflows + +1.1.3 / 2020-11-27 +================= + * [Deps] update `es-abstract`, `functions-have-names`; use `call-bind` where applicable + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `make-arrow-function`, `make-generator-function`; add `aud`, `make-async-function` + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests + * [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner + * [Tests] only audit prod deps + +1.1.2 / 2019-12-14 +================= + * [Refactor] use `es-abstract` + * [Deps] update `functions-have-names` + * [meta] add `funding` field + * [meta] fix repo capitalization + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` + * [Tests] use shared travis-ci configs + * [actions] add automatic rebasing / merge commit blocking + +1.1.1 / 2019-07-24 +================= + * [Refactor] use `functions-have-names` + * [meta] clean up package.json scripts + * [meta] update links + * [meta] create FUNDING.yml + * [Deps] update `is-callable`, `define-properties` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `covert` + * [Tests] use `eccheck` over `editorconfig-tools` + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] up to `node` `v11.7`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9` + * [Test] remove `jscs` + +1.1.0 / 2017-12-31 +================= + * [New] add `auto` entry point + * [Deps] update `function-bind` + * [Dev Deps] update `uglify-register`, `tape`, `nsp`, `eslint`, `@ljharb/eslint-config`, `@es-shims/api` + * [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS + +1.0.3 / 2017-07-21 +================= + * [Fix] be robust against function name mangling + * [Refactor] move function name detection to separate file + +1.0.2 / 2017-07-14 +================= + * [Refactor] shim: Remove unnecessary `!functionsHaveNames` check + +1.0.1 / 2017-07-11 +================= + * [Fix] in IE 9-11, we must rely on `.call` being available (#13) + * [Fix] ensure that `Function.prototype.name` does not erase the getter + * [Deps] update `is-callable` + * [Dev Deps] add `safe-publish-latest` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `@es-shims/api` + * [Tests] up to `node` `v8.1`; `v7.10`, `v6.11`, `v4.8`; improve matrix; newer npm fails on older nodes + * [Tests] use `Object` to avoid function name inference in node 7 + +1.0.0 / 2016-02-27 +================= + * Initial release. diff --git a/node_modules/function.prototype.name/LICENSE b/node_modules/function.prototype.name/LICENSE new file mode 100644 index 0000000000000..44f679ad414f6 --- /dev/null +++ b/node_modules/function.prototype.name/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/function.prototype.name/README.md b/node_modules/function.prototype.name/README.md new file mode 100644 index 0000000000000..d1ce7ce379854 --- /dev/null +++ b/node_modules/function.prototype.name/README.md @@ -0,0 +1,55 @@ +# function.prototype.name [![Version Badge][2]][1] + +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +An ES2015 spec-compliant `Function.prototype.name` shim. Invoke its "shim" method to shim Function.prototype.name if it is unavailable. +*Note*: `Function#name` requires a true ES5 environment - specifically, one with ES5 getters. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags). + +Most common usage: + +## Example + +```js +var functionName = require('function.prototype.name'); +var assert = require('assert'); + +assert.equal(functionName(function foo() {}), 'foo'); + +functionName.shim(); +assert.equal(function foo() {}.name, 'foo'); +``` + +## Supported engines +Automatically tested in every minor version of node. + +Manually tested in: + - Safari: v4 - v15 (4, 5, 5.1, 6.0.5, 6.2, 7.1, 8, 9.1.3, 10.1.2, 11.1.2, 12.1, 13.1.2, 14.1.2, 15.3, 15.6.1) + - Chrome: v15 - v81, v83 - v106(every integer version) + - Note: This includes Edge v80+ and Opera v15+, which matches Chrome + - Firefox: v3, v3.6, v4 - v105 (every integer version) + - Note: in v42 - v63, `Function.prototype.toString` throws on HTML element constructors, or a Proxy to a function + - Note: in v20 - v35, HTML element constructors are not callable, despite having typeof `function` + - IE: v6 - v11(every integer version + - Opera: v11.1, v11.5, v11.6, v12.0, v12.1, v12.14, v12.15, v12.16, v15+ v15+ matches Chrome + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/function.prototype.name +[2]: https://versionbadg.es/es-shims/Function.prototype.name.svg +[5]: https://david-dm.org/es-shims/Function.prototype.name.svg +[6]: https://david-dm.org/es-shims/Function.prototype.name +[7]: https://david-dm.org/es-shims/Function.prototype.name/dev-status.svg +[8]: https://david-dm.org/es-shims/Function.prototype.name#info=devDependencies +[11]: https://nodei.co/npm/function.prototype.name.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/function.prototype.name.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/function.prototype.name.svg +[downloads-url]: https://npm-stat.com/charts.html?package=function.prototype.name diff --git a/node_modules/function.prototype.name/auto.js b/node_modules/function.prototype.name/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/function.prototype.name/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/function.prototype.name/helpers/functionsHaveNames.js b/node_modules/function.prototype.name/helpers/functionsHaveNames.js new file mode 100644 index 0000000000000..0aa8532eaeb3b --- /dev/null +++ b/node_modules/function.prototype.name/helpers/functionsHaveNames.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('functions-have-names')(); + +// TODO: semver-major, remove diff --git a/node_modules/function.prototype.name/implementation.js b/node_modules/function.prototype.name/implementation.js new file mode 100644 index 0000000000000..a43a5988a0140 --- /dev/null +++ b/node_modules/function.prototype.name/implementation.js @@ -0,0 +1,72 @@ +'use strict'; + +var IsCallable = require('es-abstract/2023/IsCallable'); +var HasOwnProperty = require('es-abstract/2023/HasOwnProperty'); +var functionsHaveNames = require('functions-have-names')(); +var callBound = require('call-bind/callBound'); +var $functionToString = callBound('Function.prototype.toString'); +var $stringMatch = callBound('String.prototype.match'); +var toStr = callBound('Object.prototype.toString'); + +var classRegex = /^class /; + +var isClass = function isClassConstructor(fn) { + if (IsCallable(fn)) { + return false; + } + if (typeof fn !== 'function') { + return false; + } + try { + var match = $stringMatch($functionToString(fn), classRegex); + return !!match; + } catch (e) {} + return false; +}; + +var regex = /\s*function\s+([^(\s]*)\s*/; + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var objectClass = '[object Object]'; +var ddaClass = '[object HTMLAllCollection]'; + +var functionProto = Function.prototype; + +var isDDA = function isDocumentDotAll() { + return false; +}; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr(all) === toStr(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr(value); + // IE 6-8 uses `objectClass` + return (str === ddaClass || str === objectClass) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} + +module.exports = function getName() { + if (isDDA(this) || (!isClass(this) && !IsCallable(this))) { + throw new TypeError('Function.prototype.name sham getter called on non-function'); + } + if (functionsHaveNames && HasOwnProperty(this, 'name')) { + return this.name; + } + if (this === functionProto) { + return ''; + } + var str = $functionToString(this); + var match = $stringMatch(str, regex); + var name = match && match[1]; + return name; +}; diff --git a/node_modules/function.prototype.name/index.js b/node_modules/function.prototype.name/index.js new file mode 100644 index 0000000000000..ee9573a889fa8 --- /dev/null +++ b/node_modules/function.prototype.name/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(implementation); + +define(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; diff --git a/node_modules/function.prototype.name/package.json b/node_modules/function.prototype.name/package.json new file mode 100644 index 0000000000000..06f97046512ee --- /dev/null +++ b/node_modules/function.prototype.name/package.json @@ -0,0 +1,99 @@ +{ + "name": "function.prototype.name", + "version": "1.1.6", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "An ES2015 spec-compliant `Function.prototype.name` shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/Function.prototype.name.git" + }, + "keywords": [ + "Function.prototype.name", + "function", + "name", + "ES6", + "ES2015", + "shim", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "make-arrow-function": "^1.2.0", + "make-async-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6", + "uglify-register": "^1.0.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "v1.1.6" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/function.prototype.name/polyfill.js b/node_modules/function.prototype.name/polyfill.js new file mode 100644 index 0000000000000..382fb9b6a45f3 --- /dev/null +++ b/node_modules/function.prototype.name/polyfill.js @@ -0,0 +1,7 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + return implementation; +}; diff --git a/node_modules/function.prototype.name/shim.js b/node_modules/function.prototype.name/shim.js new file mode 100644 index 0000000000000..587e3e94ccc82 --- /dev/null +++ b/node_modules/function.prototype.name/shim.js @@ -0,0 +1,35 @@ +'use strict'; + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var functionsHaveNames = require('functions-have-names')(); +var getPolyfill = require('./polyfill'); +var defineProperty = Object.defineProperty; +var TypeErr = TypeError; + +module.exports = function shimName() { + var polyfill = getPolyfill(); + if (functionsHaveNames) { + return polyfill; + } + if (!supportsDescriptors) { + throw new TypeErr('Shimming Function.prototype.name support requires ES5 property descriptor support.'); + } + var functionProto = Function.prototype; + defineProperty(functionProto, 'name', { + configurable: true, + enumerable: false, + get: function () { + var name = polyfill.call(this); + if (this !== functionProto) { + defineProperty(this, 'name', { + configurable: true, + enumerable: false, + value: name, + writable: false + }); + } + return name; + } + }); + return polyfill; +}; diff --git a/node_modules/function.prototype.name/test/implementation.js b/node_modules/function.prototype.name/test/implementation.js new file mode 100644 index 0000000000000..7fdf95b7da1a5 --- /dev/null +++ b/node_modules/function.prototype.name/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(implementation), t); + + t.end(); +}); diff --git a/node_modules/function.prototype.name/test/index.js b/node_modules/function.prototype.name/test/index.js new file mode 100644 index 0000000000000..68e33af686db3 --- /dev/null +++ b/node_modules/function.prototype.name/test/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var getName = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('non-functions', function (st) { + st['throws'](function () { getName(); }, TypeError, 'undefined is not a function'); + st['throws'](function () { getName(null); }, TypeError, 'null is not a function'); + st['throws'](function () { getName(true); }, TypeError, 'true is not a function'); + st['throws'](function () { getName(false); }, TypeError, 'false is not a function'); + st['throws'](function () { getName('foo'); }, TypeError, '"foo" is not a function'); + st['throws'](function () { getName([]); }, TypeError, '[] is not a function'); + st['throws'](function () { getName({}); }, TypeError, '{} is not a function'); + st['throws'](function () { getName(/a/g); }, TypeError, '/a/g is not a function'); + st.end(); + }); + + runTests(getName, t); + + t.end(); +}); diff --git a/node_modules/function.prototype.name/test/shimmed.js b/node_modules/function.prototype.name/test/shimmed.js new file mode 100644 index 0000000000000..c2ed13a3df2ff --- /dev/null +++ b/node_modules/function.prototype.name/test/shimmed.js @@ -0,0 +1,21 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var supportsDescriptors = require('define-properties').supportsDescriptors; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.test('enumerability', { skip: !supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Function.prototype, 'name'), 'Function#name is not enumerable'); + et.equal(false, isEnumerable.call(function foo() {}, 'name'), 'a function’s name is not enumerable'); + et.end(); + }); + + runTests(function (fn) { return fn.name; }, t); + + t.end(); +}); diff --git a/node_modules/function.prototype.name/test/tests.js b/node_modules/function.prototype.name/test/tests.js new file mode 100644 index 0000000000000..81761a6972725 --- /dev/null +++ b/node_modules/function.prototype.name/test/tests.js @@ -0,0 +1,104 @@ +'use strict'; + +var functionsHaveNames = require('functions-have-names')(); +var arrows = require('make-arrow-function').list(); +var generators = require('make-generator-function')(); +var asyncs = require('make-async-function').list(); +var IsCallable = require('es-abstract/2023/IsCallable'); +var forEach = require('for-each'); + +var foo = Object(function foo() {}); +var anon = Object(function () {}); +var evalled = Object(Function()); // eslint-disable-line no-new-func + +module.exports = function (getName, t) { + t.test('functions', function (st) { + if (functionsHaveNames) { + st.equal(getName(foo), foo.name, 'foo has name "foo"'); + st.equal(getName(anon), anon.name, 'anonymous function has name of empty string'); + st.equal(getName(evalled), evalled.name, 'eval-d function has name "anonymous" (or empty string)'); + } + st.equal(getName(foo), 'foo', 'foo has name "foo"'); + st.equal(getName(anon), '', 'anonymous function has name of empty string'); + var evalledName = getName(evalled); + st.equal(evalledName === 'anonymous' || evalledName === '', true, 'eval-d function has name "anonymous" (or empty string'); + st.end(); + }); + + t.test('arrow functions', { skip: arrows.length === 0 }, function (st) { + st.equal(true, functionsHaveNames, 'functions have names in any env with arrow functions'); + forEach(arrows, function (arrowFn) { + st.equal(getName(arrowFn), arrowFn.name, 'arrow function name matches for ' + arrowFn); + }); + st.end(); + }); + + t.test('generators', { skip: generators.length === 0 }, function (st) { + st.equal(true, functionsHaveNames, 'functions have names in any env with generator functions'); + forEach(generators, function (genFn) { + st.equal(getName(genFn), genFn.name, 'generator function name matches for ' + genFn); + }); + st.end(); + }); + + t.test('asyncs', { skip: asyncs.length === 0 }, function (st) { + st.equal(true, functionsHaveNames, 'functions have names in any env with async functions'); + forEach(asyncs, function (asyncFn) { + st.equal(getName(asyncFn), asyncFn.name, 'async function name matches for ' + asyncFn); + }); + st.end(); + }); + + t.test('Function.prototype.name', function (st) { + st.equal(getName(function before() {}), 'before', 'function prior to accessing Function.prototype has the right name'); + var protoName = getName(Function.prototype); + // on <= node v2.5, this is "Empty"; on Opera 12.1, "Function.prototype" - otherwise, the empty string + st.equal(protoName === '' || protoName === 'Empty' || protoName === 'Function.prototype', true, 'Function.prototype has the right name'); + st.equal(getName(function after() {}), 'after', 'function after accessing Function.prototype has the right name'); + + st.end(); + }); + + t.test('DOM', function (st) { + /* eslint-env browser */ + + st.test('document.all', { skip: typeof document !== 'object' }, function (s2t) { + s2t['throws']( + function () { getName(document.all); }, + TypeError, + 'a document.all has no name' + ); + + s2t.end(); + }); + + forEach([ + 'HTMLElement', + 'HTMLAnchorElement' + ], function (name) { + var constructor = global[name]; + + st.test(name, { skip: !constructor }, function (s2t) { + s2t.match(typeof constructor, /^(?:function|object)$/, name + ' is a function or an object'); + + if (IsCallable(constructor)) { + try { + s2t.equal(getName(constructor), name, name + ' has the right name'); + } catch (e) { + s2t.fail(e); + } + } else { + s2t['throws']( + function () { getName(constructor); }, + TypeError, + name + ' is not callable' + ); + } + + s2t.end(); + }); + }); + + st.end(); + }); +}; diff --git a/node_modules/function.prototype.name/test/uglified.js b/node_modules/function.prototype.name/test/uglified.js new file mode 100644 index 0000000000000..77733abd85d03 --- /dev/null +++ b/node_modules/function.prototype.name/test/uglified.js @@ -0,0 +1,17 @@ +'use strict'; + +var test = require('tape'); +var runTests = require('./tests'); + +test('with uglify', function (t) { + /* eslint global-require: 0 */ + require('uglify-register/api').register({ + exclude: [/\/node_modules\//, /\/test\//], + uglify: { mangle: true } + }); + + var getName = require('../'); + runTests(getName, t); + + t.end(); +}); diff --git a/node_modules/functions-have-names/.editorconfig b/node_modules/functions-have-names/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/functions-have-names/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/functions-have-names/.eslintrc b/node_modules/functions-have-names/.eslintrc new file mode 100644 index 0000000000000..2807df70cb18d --- /dev/null +++ b/node_modules/functions-have-names/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": [2, "always"], + "id-length": 1, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "func-name-matching": 0, + }, + }, + ], +} diff --git a/node_modules/functions-have-names/.github/FUNDING.yml b/node_modules/functions-have-names/.github/FUNDING.yml new file mode 100644 index 0000000000000..1b81d18bc0ae2 --- /dev/null +++ b/node_modules/functions-have-names/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/functions-have-names +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/functions-have-names/.nycrc b/node_modules/functions-have-names/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/functions-have-names/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/functions-have-names/CHANGELOG.md b/node_modules/functions-have-names/CHANGELOG.md new file mode 100644 index 0000000000000..1026b701d7865 --- /dev/null +++ b/node_modules/functions-have-names/CHANGELOG.md @@ -0,0 +1,89 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.3](https://github.com/inspect-js/functions-have-names/compare/v1.2.2...v1.2.3) - 2022-04-19 + +### Fixed + +- [Fix] in IE 9-11, the descriptor is absent [`#11`](https://github.com/inspect-js/functions-have-names/issues/11) [`#25`](https://github.com/es-shims/RegExp.prototype.flags/issues/25) + +### Commits + +- [actions] reuse common workflows [`4ed274a`](https://github.com/inspect-js/functions-have-names/commit/4ed274a2441c7fd38ff6add741c309e268550d97) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`96dfcaa`](https://github.com/inspect-js/functions-have-names/commit/96dfcaaf1c9c5305f2b66ef69f9cddf1d9d9a578) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`9e674f8`](https://github.com/inspect-js/functions-have-names/commit/9e674f85520a93235e412a3fd7671d2356c6e45b) +- [readme] add github actions/codecov badges; update URLs [`d913f5b`](https://github.com/inspect-js/functions-have-names/commit/d913f5bf38ccab32d5fbea4a044b9cd93a4b9bec) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `safe-publish-latest`, `tape` [`f61058f`](https://github.com/inspect-js/functions-have-names/commit/f61058fe1e34f2cfa9235283a4fc6c0c0172c91a) +- [actions] update codecov uploader [`3348839`](https://github.com/inspect-js/functions-have-names/commit/33488394e7cadbf499bee4775c627c1370d033d0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`ee1a321`](https://github.com/inspect-js/functions-have-names/commit/ee1a3211a40902af59aa629e3ac41ec36360dc1b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`b8dc1a2`](https://github.com/inspect-js/functions-have-names/commit/b8dc1a277b08362bebedfeba2faca8964f68283b) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`0e825c4`](https://github.com/inspect-js/functions-have-names/commit/0e825c4ba8525b02d9acaaf2511371f76c0562ce) +- [meta] use `prepublishOnly` script for npm 7+ [`9489d66`](https://github.com/inspect-js/functions-have-names/commit/9489d666c59702ea6bafd3ff611b3eadfee6570e) + +## [v1.2.2](https://github.com/inspect-js/functions-have-names/compare/v1.2.1...v1.2.2) - 2020-12-14 + +### Commits + +- [Tests] migrate tests to Github Actions [`39bf4fe`](https://github.com/inspect-js/functions-have-names/commit/39bf4fe5ae5b3610a80ba13726f3ee00e3c49e2f) +- [meta] do not publish github action workflow files [`45ab0cb`](https://github.com/inspect-js/functions-have-names/commit/45ab0cbdc0da2efd64f5deb9810be63009bac4a0) +- [readme] add docs, fix URLs [`fad3af6`](https://github.com/inspect-js/functions-have-names/commit/fad3af61e9cbc27f47d2097614f43c62ae1022dd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`82df94a`](https://github.com/inspect-js/functions-have-names/commit/82df94ae06f05a5fa321dda9b7d902ac9fc26424) +- [Tests] run `nyc` on all tests; use `tape` runner [`8038329`](https://github.com/inspect-js/functions-have-names/commit/8038329fec493043639d9d8c779141dcb7d00c2d) +- [actions] add automatic rebasing / merge commit blocking [`49795eb`](https://github.com/inspect-js/functions-have-names/commit/49795ebf38ae3ba724ff7ac5c53598ec66ab814b) +- [actions] add "Allow Edits" workflow [`2096fe6`](https://github.com/inspect-js/functions-have-names/commit/2096fe6d67d435c0e0da25f3cfe9ff02991c41e6) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`ec1c6fe`](https://github.com/inspect-js/functions-have-names/commit/ec1c6fe209419c722d732cd512e4375c48366392) +- [Dev Deps] update `auto-changelog`; add `aud` [`79fdb23`](https://github.com/inspect-js/functions-have-names/commit/79fdb23d1ed2b4125f443be193c37330e634e654) +- [Tests] only audit prod deps [`d9ca245`](https://github.com/inspect-js/functions-have-names/commit/d9ca2455e26a45994024d1027344c268a06818bd) +- [Dev Deps] update `auto-changelog`, `tape` [`ac026d4`](https://github.com/inspect-js/functions-have-names/commit/ac026d4bda77e9820b74456fc752d2069e5b8a7f) +- [Dev Deps] update `tape` [`a8c5ee3`](https://github.com/inspect-js/functions-have-names/commit/a8c5ee3622b487938462f82698dae3ceb32da1a7) +- [Dev Deps] update `@ljharb/eslint-config` [`b25fafd`](https://github.com/inspect-js/functions-have-names/commit/b25fafd0923dcf53c3aeca92268e497ffd96ec34) + +## [v1.2.1](https://github.com/inspect-js/functions-have-names/compare/v1.2.0...v1.2.1) - 2020-01-19 + +### Commits + +- [Tests] use shared travis-ci configs [`612823a`](https://github.com/inspect-js/functions-have-names/commit/612823a064b4be4c61a1e52d1009abed4a4fc4fb) +- [Fix] IE 8 has a broken `Object.getOwnPropertyDescriptor` [`ba01c22`](https://github.com/inspect-js/functions-have-names/commit/ba01c22795162b787a698950ea34250ce68a7bb1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`; add `safe-publish-latest` [`b28d9d2`](https://github.com/inspect-js/functions-have-names/commit/b28d9d2e8bc0b758671bcaf2f7aa0d4ad4b42046) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`a62fbd6`](https://github.com/inspect-js/functions-have-names/commit/a62fbd69a34a2b1d1860acfa2afc6dcc839bc180) +- [meta] add `funding` field [`8734a94`](https://github.com/inspect-js/functions-have-names/commit/8734a940e39acdf7619eb89e358746bd278b4c90) + +## [v1.2.0](https://github.com/inspect-js/functions-have-names/compare/v1.1.1...v1.2.0) - 2019-10-20 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog` [`7e07444`](https://github.com/inspect-js/functions-have-names/commit/7e0744437789641ea462005d2e350ef476aa7141) +- [New] add `boundFunctionsHaveNames()` [`05661be`](https://github.com/inspect-js/functions-have-names/commit/05661be26c3c260bb3984e433dc9cea3fd82f9ac) + +## [v1.1.1](https://github.com/inspect-js/functions-have-names/compare/v1.1.0...v1.1.1) - 2019-07-24 + +### Commits + +- [Tests] fix linting errors [`0cb8017`](https://github.com/inspect-js/functions-have-names/commit/0cb8017203ae37d1e019bb1c99120f3f56a266a5) +- [Tests] fix tests when name is not configurable [`38a8aee`](https://github.com/inspect-js/functions-have-names/commit/38a8aeee0403bd7aa7f35da76dc433cbcdd3f85a) +- [Fix] ensure function name mangling does not break detection [`f6926ab`](https://github.com/inspect-js/functions-have-names/commit/f6926abaaebc81366f73cf0c3f874ad7e4ba16d2) + +## [v1.1.0](https://github.com/inspect-js/functions-have-names/compare/v1.0.0...v1.1.0) - 2019-07-23 + +### Commits + +- [New] add `functionsHaveConfigurableNames` function on main export [`ce73f75`](https://github.com/inspect-js/functions-have-names/commit/ce73f75891640a462326df7266d90b09519a5fca) + +## v1.0.0 - 2019-07-22 + +### Commits + +- [Tests] add travis.yml [`06ed096`](https://github.com/inspect-js/functions-have-names/commit/06ed09681a3dc067094562e8d21a31400a782add) +- Initial commit [`ced60bd`](https://github.com/inspect-js/functions-have-names/commit/ced60bd089539eb228c68fc2ad7c7bc04b959b02) +- npm init [`79088ab`](https://github.com/inspect-js/functions-have-names/commit/79088ab607e7e91a402e198ab6d1837a317c6fa9) +- add tests [`c9e8e09`](https://github.com/inspect-js/functions-have-names/commit/c9e8e09c5153797c97c324cca4b837540eddeff8) +- [Tests] add `npm run lint` [`988b924`](https://github.com/inspect-js/functions-have-names/commit/988b924a8a49ea5c0f30d5aa2b2ea9add0b39474) +- [meta] create FUNDING.yml [`2e443ef`](https://github.com/inspect-js/functions-have-names/commit/2e443ef67748214d05898b3da76f908a7e2d7488) +- [meta] add version scripts [`52005e3`](https://github.com/inspect-js/functions-have-names/commit/52005e3794fd0799db5963a5359846798cb95c14) +- implementation [`b7b4942`](https://github.com/inspect-js/functions-have-names/commit/b7b49421ef69fb5e042194a650cb4f71bb4996e4) +- Only apps should have lockfiles [`81d2e04`](https://github.com/inspect-js/functions-have-names/commit/81d2e04e7a43cbff2e46e72781bb0693dbb67800) +- [Tests] use `npx aud` [`baa92d8`](https://github.com/inspect-js/functions-have-names/commit/baa92d8aba331fe8821663bc14baf2e11685474a) diff --git a/node_modules/functions-have-names/LICENSE b/node_modules/functions-have-names/LICENSE new file mode 100644 index 0000000000000..3900dd7e2ffe6 --- /dev/null +++ b/node_modules/functions-have-names/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/functions-have-names/README.md b/node_modules/functions-have-names/README.md new file mode 100644 index 0000000000000..70962607cd607 --- /dev/null +++ b/node_modules/functions-have-names/README.md @@ -0,0 +1,40 @@ +# functions-have-names [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Does this JS environment support the `name` property on functions? + +## Example + +```js +var functionsHaveNames = require('functions-have-names'); +var assert = require('assert'); + +assert.equal(functionsHaveNames(), true); // will be `false` in IE 6-8 +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/functions-have-names +[npm-version-svg]: https://versionbadg.es/inspect-js/functions-have-names.svg +[deps-svg]: https://david-dm.org/inspect-js/functions-have-names.svg +[deps-url]: https://david-dm.org/inspect-js/functions-have-names +[dev-deps-svg]: https://david-dm.org/inspect-js/functions-have-names/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/functions-have-names#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/functions-have-names.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/functions-have-names.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/functions-have-names.svg +[downloads-url]: https://npm-stat.com/charts.html?package=functions-have-names +[codecov-image]: https://codecov.io/gh/inspect-js/functions-have-names/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/functions-have-names/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/functions-have-names +[actions-url]: https://github.com/inspect-js/functions-have-names/actions diff --git a/node_modules/functions-have-names/index.js b/node_modules/functions-have-names/index.js new file mode 100644 index 0000000000000..9d699dc190ed1 --- /dev/null +++ b/node_modules/functions-have-names/index.js @@ -0,0 +1,31 @@ +'use strict'; + +var functionsHaveNames = function functionsHaveNames() { + return typeof function f() {}.name === 'string'; +}; + +var gOPD = Object.getOwnPropertyDescriptor; +if (gOPD) { + try { + gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + gOPD = null; + } +} + +functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { + if (!functionsHaveNames() || !gOPD) { + return false; + } + var desc = gOPD(function () {}, 'name'); + return !!desc && !!desc.configurable; +}; + +var $bind = Function.prototype.bind; + +functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { + return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== ''; +}; + +module.exports = functionsHaveNames; diff --git a/node_modules/functions-have-names/package.json b/node_modules/functions-have-names/package.json new file mode 100644 index 0000000000000..3a513cb3e6cc0 --- /dev/null +++ b/node_modules/functions-have-names/package.json @@ -0,0 +1,55 @@ +{ + "name": "functions-have-names", + "version": "1.2.3", + "description": "Does this JS environment support the `name` property on functions?", + "main": "index.js", + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/functions-have-names.git" + }, + "keywords": [ + "function", + "name", + "es5", + "names", + "functions", + "ie" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/functions-have-names/issues" + }, + "homepage": "https://github.com/inspect-js/functions-have-names#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/functions-have-names/test/index.js b/node_modules/functions-have-names/test/index.js new file mode 100644 index 0000000000000..0d451ce62b6ed --- /dev/null +++ b/node_modules/functions-have-names/test/index.js @@ -0,0 +1,65 @@ +'use strict'; + +var test = require('tape'); + +var hasNames = require('../'); + +test('named functions', function (t) { + function f() {} // eslint-disable-line func-style + var g = function h() {}; + + t.equal(typeof hasNames, 'function', 'is a function'); + t.equal(hasNames(), f.name === 'f' && g.name === 'h', 'functions have names or not as expected'); + + t.end(); +}); + +var oDP = Object.defineProperty; +if (oDP) { + try { + oDP({}, 'a', { value: 1 }); + } catch (e) { + oDP = null; + } +} + +test('functionsHaveConfigurableNames', function (t) { + t.equal(typeof hasNames.functionsHaveConfigurableNames, 'function', 'is a function'); + + if (hasNames()) { + var fn = function f() {}; + if (oDP) { + try { + oDP(fn, 'name', { configurable: true, value: 'foo' }); + } catch (e) {} + if (fn.name === 'f') { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'function names are not configurable'); + } else if (fn.name === 'foo') { + t.equal(hasNames.functionsHaveConfigurableNames(), true, 'function names are not configurable'); + } else { + t.fail('functions have names, but something surprising has happened. Please report this!'); + } + } else { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'function names are not configurable'); + } + } else { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'functions do not have names'); + } + + t.end(); +}); + +test('boundFunctionsHaveNames', function (t) { + t.equal(typeof hasNames.boundFunctionsHaveNames, 'function', 'is a function'); + + var fn = function f() {}; + if (typeof fn.bind !== 'function') { + t.equal(hasNames.boundFunctionsHaveNames(), false, 'bound functions do not have names, because .bind does not exist'); + } else if (hasNames()) { + t.equal(hasNames.boundFunctionsHaveNames(), fn.bind().name !== '', 'bound functions have names'); + } else { + t.equal(hasNames.boundFunctionsHaveNames(), false, 'bound functions do not have names, because none do'); + } + + t.end(); +}); diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc new file mode 100644 index 0000000000000..8376636235836 --- /dev/null +++ b/node_modules/get-intrinsic/.eslintrc @@ -0,0 +1,38 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "es6": true, + "es2017": true, + "es2020": true, + "es2021": true, + "es2022": true, + }, + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": 0, + "max-lines": 0, + "max-lines-per-function": [2, 90], + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "multiline-comment-style": 0, + "no-magic-numbers": 0, + "sort-keys": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "new-cap": 0, + }, + }, + ], +} diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml new file mode 100644 index 0000000000000..8e8da0dda153d --- /dev/null +++ b/node_modules/get-intrinsic/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/get-intrinsic +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/get-intrinsic/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md new file mode 100644 index 0000000000000..870b590ce7972 --- /dev/null +++ b/node_modules/get-intrinsic/CHANGELOG.md @@ -0,0 +1,125 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.2](https://github.com/ljharb/get-intrinsic/compare/v1.2.1...v1.2.2) - 2023-10-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `call-bind`, `es-abstract`, `mock-property`, `object-inspect`, `tape` [`f51bcf2`](https://github.com/ljharb/get-intrinsic/commit/f51bcf26412d58d17ce17c91c9afd0ad271f0762) +- [Refactor] use `hasown` instead of `has` [`18d14b7`](https://github.com/ljharb/get-intrinsic/commit/18d14b799bea6b5765e1cec91890830cbcdb0587) +- [Deps] update `function-bind` [`6e109c8`](https://github.com/ljharb/get-intrinsic/commit/6e109c81e03804cc5e7824fb64353cdc3d8ee2c7) + +## [v1.2.1](https://github.com/ljharb/get-intrinsic/compare/v1.2.0...v1.2.1) - 2023-05-13 + +### Commits + +- [Fix] avoid a crash in envs without `__proto__` [`7bad8d0`](https://github.com/ljharb/get-intrinsic/commit/7bad8d061bf8721733b58b73a2565af2b6756b64) +- [Dev Deps] update `es-abstract` [`c60e6b7`](https://github.com/ljharb/get-intrinsic/commit/c60e6b7b4cf9660c7f27ed970970fd55fac48dc5) + +## [v1.2.0](https://github.com/ljharb/get-intrinsic/compare/v1.1.3...v1.2.0) - 2023-01-19 + +### Commits + +- [actions] update checkout action [`ca6b12f`](https://github.com/ljharb/get-intrinsic/commit/ca6b12f31eaacea4ea3b055e744cd61623385ffb) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `tape` [`41a3727`](https://github.com/ljharb/get-intrinsic/commit/41a3727d0026fa04273ae216a5f8e12eefd72da8) +- [Fix] ensure `Error.prototype` is undeniable [`c511e97`](https://github.com/ljharb/get-intrinsic/commit/c511e97ae99c764c4524b540dee7a70757af8da3) +- [Dev Deps] update `aud`, `es-abstract`, `tape` [`1bef8a8`](https://github.com/ljharb/get-intrinsic/commit/1bef8a8fd439ebb80863199b6189199e0851ac67) +- [Dev Deps] update `aud`, `es-abstract` [`0d41f16`](https://github.com/ljharb/get-intrinsic/commit/0d41f16bcd500bc28b7bfc98043ebf61ea081c26) +- [New] add `BigInt64Array` and `BigUint64Array` [`a6cca25`](https://github.com/ljharb/get-intrinsic/commit/a6cca25f29635889b7e9bd669baf9e04be90e48c) +- [Tests] use `gopd` [`ecf7722`](https://github.com/ljharb/get-intrinsic/commit/ecf7722240d15cfd16edda06acf63359c10fb9bd) + +## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) +- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) + +## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 + +### Fixed + +- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) + +### Commits + +- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) +- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) +- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) +- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) +- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) +- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) +- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) +- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) +- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) +- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) +- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) +- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) + +## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 + +### Fixed + +- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) + +### Commits + +- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) +- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) +- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) + +## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 + +### Fixed + +- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) + +### Commits + +- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) +- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) +- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) +- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) + +## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 + +### Commits + +- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) +- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) +- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) + +## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 + +### Commits + +- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) +- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) +- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) + +## v1.0.0 - 2020-10-29 + +### Commits + +- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) +- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) +- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) +- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) +- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) +- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) +- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) +- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE new file mode 100644 index 0000000000000..48f05d01d0aca --- /dev/null +++ b/node_modules/get-intrinsic/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-intrinsic/README.md b/node_modules/get-intrinsic/README.md new file mode 100644 index 0000000000000..3aa0bba4037e5 --- /dev/null +++ b/node_modules/get-intrinsic/README.md @@ -0,0 +1,71 @@ +# get-intrinsic [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Get and robustly cache all JS language-level intrinsics at first require time. + +See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. + +## Example + +```js +var GetIntrinsic = require('get-intrinsic'); +var assert = require('assert'); + +// static methods +assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); +assert.equal(Math.pow(2, 3), 8); +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); +delete Math.pow; +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); + +// instance methods +var arr = [1]; +assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); +assert.deepEqual(arr, [1]); + +arr.push(2); +assert.deepEqual(arr, [1, 2]); + +GetIntrinsic('%Array.prototype.push%').call(arr, 3); +assert.deepEqual(arr, [1, 2, 3]); + +delete Array.prototype.push; +GetIntrinsic('%Array.prototype.push%').call(arr, 4); +assert.deepEqual(arr, [1, 2, 3, 4]); + +// missing features +delete JSON.parse; // to simulate a real intrinsic that is missing in the environment +assert.throws(() => GetIntrinsic('%JSON.parse%')); +assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/get-intrinsic +[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg +[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg +[deps-url]: https://david-dm.org/ljharb/get-intrinsic +[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic +[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic +[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js new file mode 100644 index 0000000000000..be180b0ae9ced --- /dev/null +++ b/node_modules/get-intrinsic/index.js @@ -0,0 +1,351 @@ +'use strict'; + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); +var hasProto = require('has-proto')(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('hasown'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json new file mode 100644 index 0000000000000..ffffe09c02410 --- /dev/null +++ b/node_modules/get-intrinsic/package.json @@ -0,0 +1,93 @@ +{ + "name": "get-intrinsic", + "version": "1.2.2", + "description": "Get and robustly cache all JS language-level intrinsics at first require time", + "main": "index.js", + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/get-intrinsic.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "intrinsic", + "getintrinsic", + "es-abstract" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/get-intrinsic/issues" + }, + "homepage": "https://github.com/ljharb/get-intrinsic#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "call-bind": "^1.0.5", + "es-abstract": "^1.22.2", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "mock-property": "^1.0.2", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "testling": { + "files": "test/GetIntrinsic.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js new file mode 100644 index 0000000000000..1cc08e00ce925 --- /dev/null +++ b/node_modules/get-intrinsic/test/GetIntrinsic.js @@ -0,0 +1,274 @@ +'use strict'; + +var GetIntrinsic = require('../'); + +var test = require('tape'); +var forEach = require('for-each'); +var debug = require('object-inspect'); +var generatorFns = require('make-generator-function')(); +var asyncFns = require('make-async-function').list(); +var asyncGenFns = require('make-async-generator-function')(); +var mockProperty = require('mock-property'); + +var callBound = require('call-bind/callBound'); +var v = require('es-value-fixtures'); +var $gOPD = require('gopd'); +var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow'); + +var $isProto = callBound('%Object.prototype.isPrototypeOf%'); + +test('export', function (t) { + t.equal(typeof GetIntrinsic, 'function', 'it is a function'); + t.equal(GetIntrinsic.length, 2, 'function has length of 2'); + + t.end(); +}); + +test('throws', function (t) { + t['throws']( + function () { GetIntrinsic('not an intrinsic'); }, + SyntaxError, + 'nonexistent intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic(''); }, + TypeError, + 'empty string intrinsic throws a type error' + ); + + t['throws']( + function () { GetIntrinsic('.'); }, + SyntaxError, + '"just a dot" intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('%String'); }, + SyntaxError, + 'Leading % without trailing % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('String%'); }, + SyntaxError, + 'Trailing % without leading % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic("String['prototype]"); }, + SyntaxError, + 'Dynamic property access is disallowed for intrinsics (unterminated string)' + ); + + t['throws']( + function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, + TypeError, + "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%garbage%'); }, + SyntaxError, + 'Throws with extra percent signs' + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%push%'); }, + SyntaxError, + 'Throws with extra percent signs, even on an existing intrinsic' + ); + + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { GetIntrinsic(nonString); }, + TypeError, + debug(nonString) + ' is not a String' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { GetIntrinsic('%', nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + forEach([ + 'toString', + 'propertyIsEnumerable', + 'hasOwnProperty' + ], function (objectProtoMember) { + t['throws']( + function () { GetIntrinsic(objectProtoMember); }, + SyntaxError, + debug(objectProtoMember) + ' is not an intrinsic' + ); + }); + + t.end(); +}); + +test('base intrinsics', function (t) { + t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); + t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); + t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); + t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); + + t.end(); +}); + +test('dotted paths', function (t) { + t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); + t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); + t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); + t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); + + test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%ObjProto_toString%'); + + forEach([ + '%Object.prototype.toString%', + 'Object.prototype.toString', + '%ObjectPrototype.toString%', + 'ObjectPrototype.toString', + '%ObjProto_toString%', + 'ObjProto_toString' + ], function (name) { + DefinePropertyOrThrow(Object.prototype, 'toString', { + '[[Value]]': function toString() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); + }); + + DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); + st.end(); + }); + + test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); + + forEach([ + '%Object.prototype.propertyIsEnumerable%', + 'Object.prototype.propertyIsEnumerable', + '%ObjectPrototype.propertyIsEnumerable%', + 'ObjectPrototype.propertyIsEnumerable' + ], function (name) { + var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { + value: function propertyIsEnumerable() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); + + restore(); + }); + + st.end(); + }); + + test('dotted path reports correct error', function (st) { + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); + }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); + + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); + }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); + + st.end(); + }); + + t.end(); +}); + +test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { + var actual = $gOPD(Map.prototype, 'size'); + t.ok(actual, 'Map.prototype.size has a descriptor'); + t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); + t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); + t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); + + t.end(); +}); + +test('generator functions', { skip: !generatorFns.length }, function (t) { + var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); + var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); + var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); + + forEach(generatorFns, function (genFn) { + var fnName = genFn.name; + fnName = fnName ? "'" + fnName + "'" : 'genFn'; + + t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); + t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); + t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('async functions', { skip: !asyncFns.length }, function (t) { + var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); + var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); + + forEach(asyncFns, function (asyncFn) { + var fnName = asyncFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; + + t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); + t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); + }); + + t.end(); +}); + +test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { + var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); + var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); + var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); + + forEach(asyncGenFns, function (asyncGenFn) { + var fnName = asyncGenFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; + + t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); + t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); + t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('%ThrowTypeError%', function (t) { + var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); + + t.equal(typeof $ThrowTypeError, 'function', 'is a function'); + t['throws']( + $ThrowTypeError, + TypeError, + '%ThrowTypeError% throws a TypeError' + ); + + t.end(); +}); + +test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { + t['throws']( + function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, + TypeError, + 'throws when missing' + ); + + t.equal( + GetIntrinsic('%AsyncGeneratorPrototype%', true), + undefined, + 'does not throw when allowMissing' + ); + + t.end(); +}); diff --git a/node_modules/get-symbol-description/.eslintignore b/node_modules/get-symbol-description/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/get-symbol-description/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/get-symbol-description/.eslintrc b/node_modules/get-symbol-description/.eslintrc new file mode 100644 index 0000000000000..e824dabcc490f --- /dev/null +++ b/node_modules/get-symbol-description/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/get-symbol-description/.github/FUNDING.yml b/node_modules/get-symbol-description/.github/FUNDING.yml new file mode 100644 index 0000000000000..499729c5c6be5 --- /dev/null +++ b/node_modules/get-symbol-description/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/symbol-description +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-symbol-description/.nycrc b/node_modules/get-symbol-description/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/get-symbol-description/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-symbol-description/CHANGELOG.md b/node_modules/get-symbol-description/CHANGELOG.md new file mode 100644 index 0000000000000..1e1c0794fc284 --- /dev/null +++ b/node_modules/get-symbol-description/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2021-08-17 + +### Commits + +- Initial commit: pulled from es-abstract [`6e34a05`](https://github.com/inspect-js/get-symbol-description/commit/6e34a05ef10ce8620078cf4cecbe276c1fc1ae77) +- Initial commit [`3862092`](https://github.com/inspect-js/get-symbol-description/commit/3862092248d8ffa071ec90ec39d73e8be14ba6f1) +- [meta] do not publish github action workflow files [`9d1e2b9`](https://github.com/inspect-js/get-symbol-description/commit/9d1e2b94dd97664da5d0666985a3695c23f45865) +- npm init [`5051b32`](https://github.com/inspect-js/get-symbol-description/commit/5051b3221829f364c44b4d5e9a0c35aab3247f6a) +- Only apps should have lockfiles [`b866d1c`](https://github.com/inspect-js/get-symbol-description/commit/b866d1c4b4029277618d968cfb3cbe00f012d1a7) diff --git a/node_modules/get-symbol-description/LICENSE b/node_modules/get-symbol-description/LICENSE new file mode 100644 index 0000000000000..7948bc02a7937 --- /dev/null +++ b/node_modules/get-symbol-description/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-symbol-description/README.md b/node_modules/get-symbol-description/README.md new file mode 100644 index 0000000000000..c44e72aa17f08 --- /dev/null +++ b/node_modules/get-symbol-description/README.md @@ -0,0 +1,43 @@ +# get-symbol-description [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible. + +## Example + +```js +var getSymbolDescription = require('get-symbol-description'); +var assert = require('assert'); + +assert(getSymbolDescription(Symbol()) === undefined); +assert(getSymbolDescription(Symbol('')) === ''); // or `undefined`, if in an engine that lacks name inference from concise method +assert(getSymbolDescription(Symbol('foo')) === 'foo'); +assert(getSymbolDescription(Symbol.iterator) === 'Symbol.iterator'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/get-symbol-description +[2]: https://versionbadg.es/inspect-js/get-symbol-description.svg +[5]: https://david-dm.org/inspect-js/get-symbol-description.svg +[6]: https://david-dm.org/inspect-js/get-symbol-description +[7]: https://david-dm.org/inspect-js/get-symbol-description/dev-status.svg +[8]: https://david-dm.org/inspect-js/get-symbol-description#info=devDependencies +[11]: https://nodei.co/npm/get-symbol-description.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-symbol-description.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-symbol-description.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-symbol-description +[codecov-image]: https://codecov.io/gh/inspect-js/get-symbol-description/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/get-symbol-description/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/get-symbol-description +[actions-url]: https://github.com/inspect-js/get-symbol-description/actions diff --git a/node_modules/get-symbol-description/getInferredName.js b/node_modules/get-symbol-description/getInferredName.js new file mode 100644 index 0000000000000..2dab6e77bb8f7 --- /dev/null +++ b/node_modules/get-symbol-description/getInferredName.js @@ -0,0 +1,10 @@ +'use strict'; + +var getInferredName; +try { + // eslint-disable-next-line no-new-func + getInferredName = Function('s', 'return { [s]() {} }[s].name;'); +} catch (e) {} + +var inferred = function () {}; +module.exports = getInferredName && inferred.name === 'inferred' ? getInferredName : null; diff --git a/node_modules/get-symbol-description/index.js b/node_modules/get-symbol-description/index.js new file mode 100644 index 0000000000000..05d067fc11135 --- /dev/null +++ b/node_modules/get-symbol-description/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var getGlobalSymbolDescription = GetIntrinsic('%Symbol.keyFor%', true); +var thisSymbolValue = callBound('%Symbol.prototype.valueOf%', true); +var symToStr = callBound('Symbol.prototype.toString', true); + +var getInferredName = require('./getInferredName'); + +/* eslint-disable consistent-return */ +module.exports = callBound('%Symbol.prototype.description%', true) || function getSymbolDescription(symbol) { + if (!thisSymbolValue) { + throw new $SyntaxError('Symbols are not supported in this environment'); + } + + // will throw if not a symbol primitive or wrapper object + var sym = thisSymbolValue(symbol); + + if (getInferredName) { + var name = getInferredName(sym); + if (name === '') { + return; + } + return name.slice(1, -1); // name.slice('['.length, -']'.length); + } + + var desc; + if (getGlobalSymbolDescription) { + desc = getGlobalSymbolDescription(sym); + if (typeof desc === 'string') { + return desc; + } + } + + desc = symToStr(sym).slice(7, -1); // str.slice('Symbol('.length, -')'.length); + if (desc) { + return desc; + } +}; diff --git a/node_modules/get-symbol-description/package.json b/node_modules/get-symbol-description/package.json new file mode 100644 index 0000000000000..24b0e1ae6770f --- /dev/null +++ b/node_modules/get-symbol-description/package.json @@ -0,0 +1,71 @@ +{ + "name": "get-symbol-description", + "version": "1.0.0", + "description": "Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./getInferredName": "./getInferredName.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=.js,.mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/get-symbol-description.git" + }, + "keywords": [ + "symbol", + "ecmascript", + "javascript", + "description" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/get-symbol-description/issues" + }, + "homepage": "https://github.com/inspect-js/get-symbol-description#readme", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "es-value-fixtures": "^1.2.1", + "eslint": "^7.32.0", + "evalmd": "^0.0.19", + "foreach": "^2.0.5", + "has": "^1.0.3", + "nyc": "^10.3.2", + "object-inspect": "^1.11.0", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.1" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/get-symbol-description/test/index.js b/node_modules/get-symbol-description/test/index.js new file mode 100644 index 0000000000000..d5363c2b96a5f --- /dev/null +++ b/node_modules/get-symbol-description/test/index.js @@ -0,0 +1,67 @@ +'use strict'; + +var test = require('tape'); +var debug = require('object-inspect'); +var forEach = require('foreach'); +var has = require('has'); +var v = require('es-value-fixtures'); + +var getSymbolDescription = require('../'); +var getInferredName = require('../getInferredName'); + +test('getSymbolDescription', function (t) { + t.test('no symbols', { skip: v.hasSymbols }, function (st) { + st['throws']( + getSymbolDescription, + SyntaxError, + 'requires Symbol support' + ); + + st.end(); + }); + + forEach(v.nonSymbolPrimitives.concat(v.objects), function (nonSymbol) { + t['throws']( + function () { getSymbolDescription(nonSymbol); }, + v.hasSymbols ? TypeError : SyntaxError, + debug(nonSymbol) + ' is not a Symbol' + ); + }); + + t.test('with symbols', { skip: !v.hasSymbols }, function (st) { + forEach( + [ + [Symbol(), undefined], + [Symbol(undefined), undefined], + [Symbol(null), 'null'], + [Symbol.iterator, 'Symbol.iterator'], + [Symbol('foo'), 'foo'] + ], + function (pair) { + var sym = pair[0]; + var desc = pair[1]; + st.equal(getSymbolDescription(sym), desc, debug(sym) + ' description is ' + debug(desc)); + } + ); + + st.test('only possible when inference or native `Symbol.prototype.description` is supported', { + skip: !getInferredName && !has(Symbol.prototype, 'description') + }, function (s2t) { + s2t.equal(getSymbolDescription(Symbol('')), '', 'Symbol("") description is ""'); + + s2t.end(); + }); + + st.test('only possible when global symbols are supported', { + skip: !has(Symbol, 'for') || !has(Symbol, 'keyFor') + }, function (s2t) { + // eslint-disable-next-line no-restricted-properties + s2t.equal(getSymbolDescription(Symbol['for']('')), '', 'Symbol.for("") description is ""'); + s2t.end(); + }); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/get-value/LICENSE b/node_modules/get-value/LICENSE new file mode 100644 index 0000000000000..39245ac1c6061 --- /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 0000000000000..5879a8848d78a --- /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 0000000000000..df168cd88ac06 --- /dev/null +++ b/node_modules/get-value/package.json @@ -0,0 +1,79 @@ +{ + "name": "get-value", + "description": "Use property paths (`a.b.c`) to get a nested value from an object.", + "version": "2.0.6", + "homepage": "https://github.com/jonschlinkert/get-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/get-value", + "bugs": { + "url": "https://github.com/jonschlinkert/get-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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" + }, + "keywords": [ + "get", + "key", + "nested", + "object", + "path", + "paths", + "prop", + "properties", + "property", + "props", + "segment", + "value", + "values" + ], + "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 + } + } +} diff --git a/node_modules/glob-base/LICENSE b/node_modules/glob-base/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/glob-base/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/glob-base/README.md b/node_modules/glob-base/README.md new file mode 100644 index 0000000000000..1da2e82f15b6c --- /dev/null +++ b/node_modules/glob-base/README.md @@ -0,0 +1,158 @@ +# glob-base [![NPM version](https://badge.fury.io/js/glob-base.svg)](http://badge.fury.io/js/glob-base) [![Build Status](https://travis-ci.org/jonschlinkert/glob-base.svg)](https://travis-ci.org/jonschlinkert/glob-base) + +> Returns an object with the (non-glob) base path and the actual pattern. + +Use [glob-parent](https://github.com/es128/glob-parent) if you just want the base path. + +## Install with [npm](npmjs.org) + +```bash +npm i glob-base --save +``` + +## Related projects +* [glob-parent](https://github.com/es128/glob-parent): Strips glob magic from a string to provide the parent path +* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. +* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. +* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. +* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. +* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to use. +* [expand-range](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. + +## Usage + +```js +var globBase = require('glob-base'); + +globBase('a/b/.git/'); +//=> { base: 'a/b/.git/', isGlob: false, glob: '' }) + +globBase('a/b/**/e'); +//=> { base: 'a/b', isGlob: true, glob: '**/e' } + +globBase('a/b/*.{foo,bar}'); +//=> { base: 'a/b', isGlob: true, glob: '*.{foo,bar}' } + +globBase('a/b/.git/**'); +//=> { base: 'a/b/.git', isGlob: true, glob: '**' } + +globBase('a/b/c/*.md'); +//=> { base: 'a/b/c', isGlob: true, glob: '*.md' } + +globBase('a/b/c/.*.md'); +//=> { base: 'a/b/c', isGlob: true, glob: '.*.md' } + +globBase('a/b/{c,d}'); +//=> { base: 'a/b', isGlob: true, glob: '{c,d}' } + +globBase('!*.min.js'); +//=> { base: '.', isGlob: true, glob: '!*.min.js' } + +globBase('!foo'); +//=> { base: '.', isGlob: true, glob: '!foo' } + +globBase('!foo/(a|b).min.js'); +//=> { base: '.', isGlob: true, glob: '!foo/(a|b).min.js' } + +globBase(''); +//=> { base: '.', isGlob: false, glob: '' } + +globBase('**/*.md'); +//=> { base: '.', isGlob: true, glob: '**/*.md' } + +globBase('**/*.min.js'); +//=> { base: '.', isGlob: true, glob: '**/*.min.js' } + +globBase('**/.*'); +//=> { base: '.', isGlob: true, glob: '**/.*' } + +globBase('**/d'); +//=> { base: '.', isGlob: true, glob: '**/d' } + +globBase('*.*'); +//=> { base: '.', isGlob: true, glob: '*.*' } + +globBase('*.min.js'); +//=> { base: '.', isGlob: true, glob: '*.min.js' } + +globBase('*/*'); +//=> { base: '.', isGlob: true, glob: '*/*' } + +globBase('*b'); +//=> { base: '.', isGlob: true, glob: '*b' } + +globBase('.'); +//=> { base: '.', isGlob: false, glob: '.' } + +globBase('.*'); +//=> { base: '.', isGlob: true, glob: '.*' } + +globBase('./*'); +//=> { base: '.', isGlob: true, glob: '*' } + +globBase('/a'); +//=> { base: '/', isGlob: false, glob: 'a' } + +globBase('@(a|b)/e.f.g/'); +//=> { base: '.', isGlob: true, glob: '@(a|b)/e.f.g/' } + +globBase('[a-c]b*'); +//=> { base: '.', isGlob: true, glob: '[a-c]b*' } + +globBase('a'); +//=> { base: '.', isGlob: false, glob: 'a' } + +globBase('a.min.js'); +//=> { base: '.', isGlob: false, glob: 'a.min.js' } + +globBase('a/'); +//=> { base: 'a/', isGlob: false, glob: '' } + +globBase('a/**/j/**/z/*.md'); +//=> { base: 'a', isGlob: true, glob: '**/j/**/z/*.md' } + +globBase('a/*/c/*.md'); +//=> { base: 'a', isGlob: true, glob: '*/c/*.md' } + +globBase('a/?/c.md'); +//=> { base: 'a', isGlob: true, glob: '?/c.md' } + +globBase('a/??/c.js'); +//=> { base: 'a', isGlob: true, glob: '??/c.js' } + +globBase('a?b'); +//=> { base: '.', isGlob: true, glob: 'a?b' } + +globBase('bb'); +//=> { base: '.', isGlob: false, glob: 'bb' } + +globBase('c.md'); +//=> { base: '.', isGlob: false, glob: 'c.md' } +``` + +## Running tests +Install dev dependencies. + +```bash +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/glob-base/issues) + + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 08, 2015._ diff --git a/node_modules/glob-base/index.js b/node_modules/glob-base/index.js new file mode 100644 index 0000000000000..564b4a8854f32 --- /dev/null +++ b/node_modules/glob-base/index.js @@ -0,0 +1,51 @@ +/*! + * glob-base + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var path = require('path'); +var parent = require('glob-parent'); +var isGlob = require('is-glob'); + +module.exports = function globBase(pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('glob-base expects a string.'); + } + + var res = {}; + res.base = parent(pattern); + res.isGlob = isGlob(pattern); + + if (res.base !== '.') { + res.glob = pattern.substr(res.base.length); + if (res.glob.charAt(0) === '/') { + res.glob = res.glob.substr(1); + } + } else { + res.glob = pattern; + } + + if (!res.isGlob) { + res.base = dirname(pattern); + res.glob = res.base !== '.' + ? pattern.substr(res.base.length) + : pattern; + } + + if (res.glob.substr(0, 2) === './') { + res.glob = res.glob.substr(2); + } + if (res.glob.charAt(0) === '/') { + res.glob = res.glob.substr(1); + } + return res; +}; + +function dirname(glob) { + if (glob.slice(-1) === '/') return glob; + return path.dirname(glob); +} diff --git a/node_modules/glob-base/package.json b/node_modules/glob-base/package.json new file mode 100644 index 0000000000000..8cb2dbf5ea383 --- /dev/null +++ b/node_modules/glob-base/package.json @@ -0,0 +1,52 @@ +{ + "name": "glob-base", + "description": "Returns an object with the (non-glob) base path and the actual pattern.", + "version": "0.3.0", + "homepage": "https://github.com/jonschlinkert/glob-base", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/glob-base.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/glob-base/issues" + }, + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/glob-base/blob/master/LICENSE" + }, + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "devDependencies": { + "mocha": "*", + "should": "^5.1.0" + }, + "keywords": [ + "base", + "directory", + "dirname", + "expression", + "glob", + "parent", + "path", + "pattern", + "regex", + "regular", + "root" + ] +} diff --git a/node_modules/glob-parent/.npmignore b/node_modules/glob-parent/.npmignore new file mode 100644 index 0000000000000..33e391f0e0827 --- /dev/null +++ b/node_modules/glob-parent/.npmignore @@ -0,0 +1,4 @@ +node_modules +.DS_Store +npm-debug.log +coverage diff --git a/node_modules/glob-parent/.travis.yml b/node_modules/glob-parent/.travis.yml new file mode 100644 index 0000000000000..18fc42f69f5b0 --- /dev/null +++ b/node_modules/glob-parent/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "4" + - "iojs-v3" + - "iojs-v2" + - "iojs-v1" + - "0.12" + - "0.10" diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000000000..734076d8affcf --- /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 0000000000000..ff5310d3b4ce9 --- /dev/null +++ b/node_modules/glob-parent/README.md @@ -0,0 +1,43 @@ +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 +``` + +```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) + +``` + +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) diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js new file mode 100644 index 0000000000000..61615f1ac06ce --- /dev/null +++ b/node_modules/glob-parent/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var path = require('path'); +var isglob = require('is-glob'); + +module.exports = function globParent(str) { + str += 'a'; // preserves full path in case of trailing path separator + do {str = path.dirname(str)} while (isglob(str)); + return str; +}; diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json new file mode 100644 index 0000000000000..5499007fb7710 --- /dev/null +++ b/node_modules/glob-parent/package.json @@ -0,0 +1,35 @@ +{ + "name": "glob-parent", + "version": "2.0.0", + "description": "Strips glob magic from a string to provide the parent path", + "main": "index.js", + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "repository": { + "type": "git", + "url": "https://github.com/es128/glob-parent" + }, + "keywords": [ + "glob", + "parent", + "strip", + "path", + "directory", + "base" + ], + "author": "Elan Shanker", + "license": "ISC", + "bugs": { + "url": "https://github.com/es128/glob-parent/issues" + }, + "homepage": "https://github.com/es128/glob-parent", + "dependencies": { + "is-glob": "^2.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.5", + "mocha": "^2.1.0" + } +} diff --git a/node_modules/glob-parent/test.js b/node_modules/glob-parent/test.js new file mode 100644 index 0000000000000..01156d2ff0d88 --- /dev/null +++ b/node_modules/glob-parent/test.js @@ -0,0 +1,28 @@ +'use strict'; + +var gp = require('./'); +var assert = require('assert'); + +describe('glob-parent', function() { + it('should strip glob magic to return parent path', function() { + assert.equal(gp('path/to/*.js'), 'path/to'); + assert.equal(gp('/root/path/to/*.js'), '/root/path/to'); + assert.equal(gp('/*.js'), '/'); + assert.equal(gp('*.js'), '.'); + assert.equal(gp('**/*.js'), '.'); + assert.equal(gp('path/{to,from}'), 'path'); + assert.equal(gp('path/!(to|from)'), 'path'); + assert.equal(gp('path/?(to|from)'), 'path'); + assert.equal(gp('path/+(to|from)'), 'path'); + assert.equal(gp('path/*(to|from)'), 'path'); + assert.equal(gp('path/@(to|from)'), 'path'); + assert.equal(gp('path/**/*'), 'path'); + assert.equal(gp('path/**/subdir/foo.*'), 'path'); + }); + + it('should return parent dirname from non-glob paths', function() { + assert.equal(gp('path/foo/bar.js'), 'path/foo'); + assert.equal(gp('path/foo/'), 'path/foo'); + assert.equal(gp('path/foo'), 'path'); + }); +}); diff --git a/node_modules/globalthis/.eslintrc b/node_modules/globalthis/.eslintrc new file mode 100644 index 0000000000000..afbd40a7d774c --- /dev/null +++ b/node_modules/globalthis/.eslintrc @@ -0,0 +1,18 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "ignorePatterns": [ + "dist", + ], + + "rules": { + "max-statements-per-line": [2, { "max": 2 }] + } +} diff --git a/node_modules/globalthis/.nycrc b/node_modules/globalthis/.nycrc new file mode 100644 index 0000000000000..726d82ba29ae2 --- /dev/null +++ b/node_modules/globalthis/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "dist", + "test" + ] +} diff --git a/node_modules/globalthis/CHANGELOG.md b/node_modules/globalthis/CHANGELOG.md new file mode 100644 index 0000000000000..b2962da9a3253 --- /dev/null +++ b/node_modules/globalthis/CHANGELOG.md @@ -0,0 +1,96 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.3](https://github.com/es-shims/globalThis/compare/v1.0.2...v1.0.3) - 2022-05-07 + +### Commits + +- [actions] reuse common workflows [`65891e4`](https://github.com/es-shims/globalThis/commit/65891e4d285ae04e216ff01160cff861e0e41a4f) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`82f8481`](https://github.com/es-shims/globalThis/commit/82f84815027f666f625e1ccb41f723800a05d016) +- [meta] use `npmignore` to autogenerate an npmignore file [`53afc39`](https://github.com/es-shims/globalThis/commit/53afc39bfd3eb262c5e6e9dfd25e4f81f3578c1c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`03169d4`](https://github.com/es-shims/globalThis/commit/03169d4254c9ef177d6537becca5b0b56df50d91) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`4986e3e`](https://github.com/es-shims/globalThis/commit/4986e3e20c5f664601871a0fac68c1efd0a68472) +- [actions] update codecov uploader [`15c4b06`](https://github.com/es-shims/globalThis/commit/15c4b062b1a9434dbec93604ed31b6893d11d458) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`8b04a74`](https://github.com/es-shims/globalThis/commit/8b04a749d3cb2f825920beb700899f0c13ad2fb8) +- [Fix] `globalThis` should be writable [`8759985`](https://github.com/es-shims/globalThis/commit/87599852d5f91e2e1f06e424cdefcd443ec98476) +- [readme] add github actions/codecov badges [`0263f0d`](https://github.com/es-shims/globalThis/commit/0263f0debfa982b928fcd301b11fe3e3193bf33d) +- [Dev Deps] update `aud`, `eslint`, `tape` [`e88d296`](https://github.com/es-shims/globalThis/commit/e88d296bb026633bdd1be2e1542903a5d0107cd8) +- [meta] use `prepublishOnly` script for npm 7+ [`c81fde6`](https://github.com/es-shims/globalThis/commit/c81fde6a9e44345e56dada588e16db736809ddd9) +- [Tests] nycignore `dist` [`bde0c0d`](https://github.com/es-shims/globalThis/commit/bde0c0df46f684316ab414da1487a0cd2efe3eeb) +- [meta] gitignore coverage output [`79f73f8`](https://github.com/es-shims/globalThis/commit/79f73f8b0c1180567fba473f92c07d71efd4dd0b) + +## [v1.0.2](https://github.com/es-shims/globalThis/compare/v1.0.1...v1.0.2) - 2021-02-22 + +### Commits + +- [Tests] migrate tests to Github Actions [`a3f50f7`](https://github.com/es-shims/globalThis/commit/a3f50f77a392c0ffdaca18fb5881743b874d0a6f) +- [meta] do not publish github action workflow files [`eb5c787`](https://github.com/es-shims/globalThis/commit/eb5c7879317cd7f1fde52228660be8e779c9d4e3) +- [Tests] add `implementation` est; run `es-shim-api` in postlint; use `tape` runner [`c9dd792`](https://github.com/es-shims/globalThis/commit/c9dd792d492ec9744a5e5d5033e919b94d441bac) +- [Tests] fix native tests [`6b76dff`](https://github.com/es-shims/globalThis/commit/6b76dff3af3fe9bcd7b24d48c6ba55116169e840) +- [Tests] run `nyc` on all tests [`0407f79`](https://github.com/es-shims/globalThis/commit/0407f79f64bf9fc30111f3bf4dff7e4205331fb6) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape`, `browserify` [`b8cc020`](https://github.com/es-shims/globalThis/commit/b8cc020e5ecc2d5a5a5b4160aabc60cc42d50c03) +- [actions] add "Allow Edits" workflow [`e2854df`](https://github.com/es-shims/globalThis/commit/e2854df653667b16ff34a7a0a7b677231dfe2b02) +- [readme] remove travis badge [`262eb76`](https://github.com/es-shims/globalThis/commit/262eb76e4e0d3f2df354cc6aff1b18f50c7b147f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`; add `safe-publish-latest` [`3c76883`](https://github.com/es-shims/globalThis/commit/3c7688325f6aa050afe3ed978e423e70974e4d3b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`7276123`](https://github.com/es-shims/globalThis/commit/727612396262fc22275f44159ec5b39115dc359f) +- [actions] update workflows [`bcb0f42`](https://github.com/es-shims/globalThis/commit/bcb0f42c319cf19746e03a6667cf25d3e835f46e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5485851`](https://github.com/es-shims/globalThis/commit/548585148e874d6eb0b0463526a88e8b64e7c5eb) +- [Dev Deps] update `auto-changelog`, `tape` [`6a01da3`](https://github.com/es-shims/globalThis/commit/6a01da3f321983d1970d793711d31cf8508ef94d) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7a07f4e`](https://github.com/es-shims/globalThis/commit/7a07f4ebc5580933b40bbe67f357632e0f7d5586) +- [meta] only run the build script in publish [`797e492`](https://github.com/es-shims/globalThis/commit/797e492519ed0bf6270537290e69ca0456790575) +- [meta] combine duplicate `prepublish` scripts [`92bbef0`](https://github.com/es-shims/globalThis/commit/92bbef0f91f6e91163186f68b5f5f1ffd26c479d) +- [Dev Deps] update `auto-changelog`; add `aud` [`be6dbec`](https://github.com/es-shims/globalThis/commit/be6dbecefddb40493c5568a2cbe83f74e2e0385f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfd54f8`](https://github.com/es-shims/globalThis/commit/bfd54f8388758e7dec618dc34956e7075a7c15f0) +- [Tests] only audit prod deps [`0f64b47`](https://github.com/es-shims/globalThis/commit/0f64b47acfa812affbacbe487fcb0f6c02eccc25) + +## [v1.0.1](https://github.com/es-shims/globalThis/compare/v1.0.0...v1.0.1) - 2019-12-15 + +### Fixed + +- [Refactor] only use `global` in node; only check browser globals in browsers [`#2`](https://github.com/es-shims/globalThis/issues/2) + +### Commits + +- [Tests] use shared travis-ci configs [`edb1cc9`](https://github.com/es-shims/globalThis/commit/edb1cc9d900a40e8c1732264b6e85d4f9760920c) +- [Tests] remove `jscs` [`1847ac2`](https://github.com/es-shims/globalThis/commit/1847ac2487e2c13cf8bf717211c6a93fe60831f9) +- [meta] add `auto-changelog` [`933c381`](https://github.com/es-shims/globalThis/commit/933c381083890965ac848d3da21ed9e910cc09cf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `tape` [`93310bc`](https://github.com/es-shims/globalThis/commit/93310bc01ddacbe23a93b3022daebc9b6f6ae8c3) +- [actions] add automatic rebasing / merge commit blocking [`231dec5`](https://github.com/es-shims/globalThis/commit/231dec511c42e1509035d176e2451c55de20bfe7) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `covert`, `is`, `tape` [`e50c1f6`](https://github.com/es-shims/globalThis/commit/e50c1f6d2d45c66f53ffda471bbf62c08ed15c9b) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`4abd340`](https://github.com/es-shims/globalThis/commit/4abd3400fc8942963e77515d0cf2fbcac3cb7bc8) +- [meta] add `funding` field [`2d1f9eb`](https://github.com/es-shims/globalThis/commit/2d1f9eb00b2dea46f6de7d563b31db17f44f1899) +- [meta] remove unused deps [`5bd6bef`](https://github.com/es-shims/globalThis/commit/5bd6befefbaf0c7e6f70eb3c1919b5c5a271d29d) +- readme: Fix casing + phrasing [`66379cc`](https://github.com/es-shims/globalThis/commit/66379ccf5008f7676aac5f3dec1ea2fe55e3516c) +- [Deps] update `define-properties`, `object-keys` [`4585e5a`](https://github.com/es-shims/globalThis/commit/4585e5ab461093ab6c62ce0b22b959925e8f818c) +- fix issue with Webpack's CaseSensitivePathsPlugin [`842e84e`](https://github.com/es-shims/globalThis/commit/842e84e0096c9eea660c78fd19c9c07799b81537) + +## v1.0.0 - 2018-08-10 + +### Commits + +- Dotfiles. [`f01b02d`](https://github.com/es-shims/globalThis/commit/f01b02d315865c812e5b9158f71bb18f3b153def) +- [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm`; improve matrix [`ed1fa5d`](https://github.com/es-shims/globalThis/commit/ed1fa5d473d933b3270410b658183dc1c556a663) +- Tests [`ab99527`](https://github.com/es-shims/globalThis/commit/ab99527e3c434e89dd40f8cba3b0e2e976156611) +- [breaking] update property name, rename repo [`be42e3d`](https://github.com/es-shims/globalThis/commit/be42e3dce08b62a78260d487f62fa69b410d7918) +- package.json [`ca43a36`](https://github.com/es-shims/globalThis/commit/ca43a363e3ce0dbc2d4623169f8cb3d792f8bc84) +- implementation [`80b5a40`](https://github.com/es-shims/globalThis/commit/80b5a403ef532254b2af46ec3ba5f442a308a57d) +- read me [`f6df9b3`](https://github.com/es-shims/globalThis/commit/f6df9b3b69977f04e080d1720ba1203c13447884) +- Rename `System.global` to `global` [`fa8503c`](https://github.com/es-shims/globalThis/commit/fa8503cf94afe84b3729dd5b0e9f73f481fb1fee) +- Initial commit [`99f1dc3`](https://github.com/es-shims/globalThis/commit/99f1dc328d0b4c52a550037de0139d5452ac01de) +- [Tests] up to `node` `v6.7`, `v5.12`, `v4.6`; improve test matrix [`712ec0e`](https://github.com/es-shims/globalThis/commit/712ec0e545d1603c4e23f4ff1acb066cc4a3c9ee) +- [Dev Deps] update `browserify`, `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`73278bd`](https://github.com/es-shims/globalThis/commit/73278bd638d1e762eb7415350a738f5d345896f5) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `browserify`, `eslint`, `for-each`, `is`, `nsp`, `tape` [`75fa992`](https://github.com/es-shims/globalThis/commit/75fa9929be81afec43895c02e33d0b8a78f11d1f) +- [Dev Deps] update `browserify`, `is`, `tape`, `nsp`, `eslint` [`b223e86`](https://github.com/es-shims/globalThis/commit/b223e86d0868efb1f0c966370ff2f822516d6956) +- [Tests] fix linting; remove parallelshell [`271b329`](https://github.com/es-shims/globalThis/commit/271b329d174b94c08913060752a2e9f9116fe5b8) +- [Deps] update `function-bind`, `object-keys` [`002d0c5`](https://github.com/es-shims/globalThis/commit/002d0c5685a83f97e014a8a07134eb621794c649) +- Only apps should have lockfiles [`960f1d0`](https://github.com/es-shims/globalThis/commit/960f1d00598cbba5427849c863eb10b8de82fb1b) +- [Tests] on `node` `v10.8` [`37fad9d`](https://github.com/es-shims/globalThis/commit/37fad9db9860c654efe0a32ec187f21730d5fed8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`df28dfe`](https://github.com/es-shims/globalThis/commit/df28dfe7f0daf3db95a536a6ce64062bd706185d) +- [New] add `auto` entry point [`86eb2ab`](https://github.com/es-shims/globalThis/commit/86eb2ab4c4dc2babff20ac436cf7fb7f8da7d2f2) +- [Dev Deps] update `eslint` [`1bdc1aa`](https://github.com/es-shims/globalThis/commit/1bdc1aacfb94dcdc7bb61688c7634c435012e35d) +- [Deps] update `object-keys` [`72cdbf5`](https://github.com/es-shims/globalThis/commit/72cdbf596b16103ee711d52b2b645b42efc08c51) +- Update most common usage to invoke the function upon being required [`5026296`](https://github.com/es-shims/globalThis/commit/502629660da2c21cfb0f8ca233e2b9d427c052fe) diff --git a/node_modules/globalthis/LICENSE b/node_modules/globalthis/LICENSE new file mode 100644 index 0000000000000..44f679ad414f6 --- /dev/null +++ b/node_modules/globalthis/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/globalthis/README.md b/node_modules/globalthis/README.md new file mode 100644 index 0000000000000..6abffa03395be --- /dev/null +++ b/node_modules/globalthis/README.md @@ -0,0 +1,70 @@ +# globalThis [![Version Badge][npm-version-svg]][npm-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][npm-url] + +An ECMAScript spec-compliant polyfill/shim for `globalThis`. Invoke its "shim" method to shim `globalThis` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec proposal](https://github.com/tc39/proposal-global). + +Most common usage: +```js +var globalThis = require('globalthis')(); // returns native globalThis if compliant + /* or */ +var globalThis = require('globalthis/polyfill')(); // returns native globalThis if compliant +``` + +## Example + +```js +var assert = require('assert'); + +// the below function is not CSP-compliant, but reliably gets the +// global object in sloppy mode in every engine. +var getGlobal = Function('return this'); + +assert.equal(globalThis, getGlobal()); +``` + +```js +/* when `globalThis` is not present */ +var shimmedGlobal = require('globalthis').shim(); + /* or */ +var shimmedGlobal = require('globalthis/shim')(); + +assert.equal(shimmedGlobal, globalThis); +assert.equal(shimmedGlobal, getGlobal()); +``` + +```js +/* when `globalThis` is present */ +var shimmedGlobal = require('globalthis').shim(); + +assert.equal(shimmedGlobal, globalThis); +assert.equal(shimmedGlobal, getGlobal()); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[npm-url]: https://npmjs.org/package/globalthis +[npm-version-svg]: https://versionbadg.es/ljharb/globalThis.svg +[deps-svg]: https://david-dm.org/ljharb/globalThis.svg?theme=shields.io +[deps-url]: https://david-dm.org/ljharb/globalThis +[dev-deps-svg]: https://david-dm.org/ljharb/globalThis/dev-status.svg?theme=shields.io +[dev-deps-url]: https://david-dm.org/ljharb/globalThis#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/globalthis.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/globalthis.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/globalthis.svg +[downloads-url]: https://npm-stat.com/charts.html?package=globalthis +[codecov-image]: https://codecov.io/gh/es-shims/globalThis/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/globalThis/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/globalThis +[actions-url]: https://github.com/es-shims/globalThis/actions diff --git a/node_modules/globalthis/auto.js b/node_modules/globalthis/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/globalthis/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/globalthis/implementation.browser.js b/node_modules/globalthis/implementation.browser.js new file mode 100644 index 0000000000000..746a274d94c57 --- /dev/null +++ b/node_modules/globalthis/implementation.browser.js @@ -0,0 +1,11 @@ +/* eslint no-negated-condition: 0, no-new-func: 0 */ + +'use strict'; + +if (typeof self !== 'undefined') { + module.exports = self; +} else if (typeof window !== 'undefined') { + module.exports = window; +} else { + module.exports = Function('return this')(); +} diff --git a/node_modules/globalthis/implementation.js b/node_modules/globalthis/implementation.js new file mode 100644 index 0000000000000..46b8ceb3ae586 --- /dev/null +++ b/node_modules/globalthis/implementation.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = global; diff --git a/node_modules/globalthis/index.js b/node_modules/globalthis/index.js new file mode 100644 index 0000000000000..7c73cef2e86a0 --- /dev/null +++ b/node_modules/globalthis/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var defineProperties = require('define-properties'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var polyfill = getPolyfill(); + +var getGlobal = function () { return polyfill; }; + +defineProperties(getGlobal, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = getGlobal; diff --git a/node_modules/globalthis/package.json b/node_modules/globalthis/package.json new file mode 100644 index 0000000000000..3750c43d4b291 --- /dev/null +++ b/node_modules/globalthis/package.json @@ -0,0 +1,97 @@ +{ + "name": "globalthis", + "version": "1.0.3", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ECMAScript spec-compliant polyfill/shim for `globalThis`", + "license": "MIT", + "main": "index.js", + "browser": { + "./implementation": "./implementation.browser.js" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest && npm run build", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound --property", + "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/System.global.git" + }, + "keywords": [ + "window", + "self", + "global", + "globalThis", + "System.global", + "global object", + "global this value", + "ECMAScript", + "es-shim API", + "polyfill", + "shim" + ], + "dependencies": { + "define-properties": "^1.1.3" + }, + "devDependencies": { + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "browserify": "^16.5.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + "browserShim.js", + ".github/workflows" + ] + } +} diff --git a/node_modules/globalthis/polyfill.js b/node_modules/globalthis/polyfill.js new file mode 100644 index 0000000000000..e2e706bd53b98 --- /dev/null +++ b/node_modules/globalthis/polyfill.js @@ -0,0 +1,10 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + if (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) { + return implementation; + } + return global; +}; diff --git a/node_modules/globalthis/shim.js b/node_modules/globalthis/shim.js new file mode 100644 index 0000000000000..7ccf455d375f3 --- /dev/null +++ b/node_modules/globalthis/shim.js @@ -0,0 +1,22 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimGlobal() { + var polyfill = getPolyfill(); + if (define.supportsDescriptors) { + var descriptor = Object.getOwnPropertyDescriptor(polyfill, 'globalThis'); + if (!descriptor || (descriptor.configurable && (descriptor.enumerable || !descriptor.writable || globalThis !== polyfill))) { // eslint-disable-line max-len + Object.defineProperty(polyfill, 'globalThis', { + configurable: true, + enumerable: false, + value: polyfill, + writable: true + }); + } + } else if (typeof globalThis !== 'object' || globalThis !== polyfill) { + polyfill.globalThis = polyfill; + } + return polyfill; +}; diff --git a/node_modules/globalthis/test/implementation.js b/node_modules/globalthis/test/implementation.js new file mode 100644 index 0000000000000..36f1275bfd15f --- /dev/null +++ b/node_modules/globalthis/test/implementation.js @@ -0,0 +1,11 @@ +'use strict'; + +var implementation = require('../implementation'); +var test = require('tape'); +var runTests = require('./tests'); + +test('implementation', function (t) { + runTests(implementation, t); + + t.end(); +}); diff --git a/node_modules/globalthis/test/index.js b/node_modules/globalthis/test/index.js new file mode 100644 index 0000000000000..dac0a10a61df7 --- /dev/null +++ b/node_modules/globalthis/test/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var systemGlobal = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + runTests(systemGlobal(), t); + + t.end(); +}); diff --git a/node_modules/globalthis/test/native.js b/node_modules/globalthis/test/native.js new file mode 100644 index 0000000000000..7a085ab0a30c5 --- /dev/null +++ b/node_modules/globalthis/test/native.js @@ -0,0 +1,26 @@ +'use strict'; + +var test = require('tape'); +var defineProperties = require('define-properties'); +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var missing = {}; +var theGlobal = typeof globalThis === 'object' ? globalThis : missing; + +var runTests = require('./tests'); + +test('native', { todo: theGlobal === missing }, function (t) { + if (theGlobal !== missing) { + t.equal(typeof theGlobal, 'object', 'globalThis is an object'); + t.equal('globalThis' in theGlobal, true, 'globalThis is in globalThis'); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(theGlobal, 'globalThis'), 'globalThis is not enumerable'); + et.end(); + }); + + runTests(theGlobal, t); + } + + t.end(); +}); diff --git a/node_modules/globalthis/test/shimmed.js b/node_modules/globalthis/test/shimmed.js new file mode 100644 index 0000000000000..24b3f34d2dc3f --- /dev/null +++ b/node_modules/globalthis/test/shimmed.js @@ -0,0 +1,29 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(typeof globalThis, 'object', 'globalThis is an object'); + t.equal('globalThis' in globalThis, true, 'globalThis is in globalThis'); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(globalThis, 'globalThis'), 'globalThis.globalThis is not enumerable'); + et.end(); + }); + + t.test('writability', { skip: !defineProperties.supportsDescriptors }, function (wt) { + var desc = Object.getOwnPropertyDescriptor(globalThis, 'globalThis'); + wt.equal(desc.writable, true, 'globalThis.globalThis is writable'); + wt.end(); + }); + + runTests(globalThis.globalThis, t); + + t.end(); +}); diff --git a/node_modules/globalthis/test/tests.js b/node_modules/globalthis/test/tests.js new file mode 100644 index 0000000000000..2189640540047 --- /dev/null +++ b/node_modules/globalthis/test/tests.js @@ -0,0 +1,36 @@ +/* jscs:disable requireUseStrict */ +/* eslint strict: 0, max-statements: 0 */ + +module.exports = function (theGlobal, t) { + t.equal(typeof theGlobal, 'object', 'is an object'); + + t.test('built-in globals', function (st) { + st.equal(theGlobal.Math, Math, 'Math is on the global'); + st.equal(theGlobal.JSON, JSON, 'JSON is on the global'); + st.equal(theGlobal.String, String, 'String is on the global'); + st.equal(theGlobal.Array, Array, 'Array is on the global'); + st.equal(theGlobal.Number, Number, 'Number is on the global'); + st.equal(theGlobal.Boolean, Boolean, 'Boolean is on the global'); + st.equal(theGlobal.Object, Object, 'Object is on the global'); + st.equal(theGlobal.Function, Function, 'Function is on the global'); + st.equal(theGlobal.Date, Date, 'Date is on the global'); + st.equal(theGlobal.RegExp, RegExp, 'RegExp is on the global'); + + if (typeof Symbol === 'undefined') { + st.comment('# SKIP Symbol is not supported'); + } else { + st.equal(theGlobal.Symbol, Symbol, 'Symbol is on the global'); + } + st.end(); + }); + + t.test('custom property', function (st) { + var key = 'random_custom_key_' + new Date().getTime(); + var semaphore = {}; + /* eslint no-eval: 1 */ + eval(key + ' = semaphore;'); + st.equal(theGlobal[key], semaphore, 'global variable ends up on the global object'); + delete theGlobal[key]; // eslint-disable-line no-param-reassign + st.end(); + }); +}; diff --git a/node_modules/gopd/.eslintrc b/node_modules/gopd/.eslintrc new file mode 100644 index 0000000000000..e2550c0fb7e8a --- /dev/null +++ b/node_modules/gopd/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-style": [2, "declaration"], + "id-length": 0, + "multiline-comment-style": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/gopd/.github/FUNDING.yml b/node_modules/gopd/.github/FUNDING.yml new file mode 100644 index 0000000000000..94a44a8e83ff6 --- /dev/null +++ b/node_modules/gopd/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/gopd +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/gopd/CHANGELOG.md b/node_modules/gopd/CHANGELOG.md new file mode 100644 index 0000000000000..f111eb1784b5b --- /dev/null +++ b/node_modules/gopd/CHANGELOG.md @@ -0,0 +1,25 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01 + +### Commits + +- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f) + +## v1.0.0 - 2022-11-01 + +### Commits + +- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea) +- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe) +- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119) +- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582) +- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709) +- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002) +- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb) +- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b) diff --git a/node_modules/gopd/LICENSE b/node_modules/gopd/LICENSE new file mode 100644 index 0000000000000..6abfe1434ebd5 --- /dev/null +++ b/node_modules/gopd/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/gopd/README.md b/node_modules/gopd/README.md new file mode 100644 index 0000000000000..784e56a09695a --- /dev/null +++ b/node_modules/gopd/README.md @@ -0,0 +1,40 @@ +# gopd [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation. + +## Usage + +```javascript +var gOPD = require('gopd'); +var assert = require('assert'); + +if (gOPD) { + assert.equal(typeof gOPD, 'function', 'descriptors supported'); + // use gOPD like Object.getOwnPropertyDescriptor here +} else { + assert.ok(!gOPD, 'descriptors not supported'); +} +``` + +[package-url]: https://npmjs.org/package/gopd +[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg +[deps-svg]: https://david-dm.org/ljharb/gopd.svg +[deps-url]: https://david-dm.org/ljharb/gopd +[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/gopd.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/gopd.svg +[downloads-url]: https://npm-stat.com/charts.html?package=gopd +[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd +[actions-url]: https://github.com/ljharb/gopd/actions diff --git a/node_modules/gopd/index.js b/node_modules/gopd/index.js new file mode 100644 index 0000000000000..fb6d3bbefd021 --- /dev/null +++ b/node_modules/gopd/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; diff --git a/node_modules/gopd/package.json b/node_modules/gopd/package.json new file mode 100644 index 0000000000000..d5e1fa4a277b2 --- /dev/null +++ b/node_modules/gopd/package.json @@ -0,0 +1,71 @@ +{ + "name": "gopd", + "version": "1.0.1", + "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/gopd.git" + }, + "keywords": [ + "ecmascript", + "javascript", + "getownpropertydescriptor", + "property", + "descriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/gopd/issues" + }, + "homepage": "https://github.com/ljharb/gopd#readme", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/gopd/test/index.js b/node_modules/gopd/test/index.js new file mode 100644 index 0000000000000..0376bfbadeaa1 --- /dev/null +++ b/node_modules/gopd/test/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var test = require('tape'); +var gOPD = require('../'); + +test('gOPD', function (t) { + t.test('supported', { skip: !gOPD }, function (st) { + st.equal(typeof gOPD, 'function', 'is a function'); + + var obj = { x: 1 }; + st.ok('x' in obj, 'property exists'); + + var desc = gOPD(obj, 'x'); + st.deepEqual( + desc, + { + configurable: true, + enumerable: true, + value: 1, + writable: true + }, + 'descriptor is as expected' + ); + + st.end(); + }); + + t.test('not supported', { skip: gOPD }, function (st) { + st.notOk(gOPD, 'is falsy'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/graceful-fs/LICENSE b/node_modules/graceful-fs/LICENSE new file mode 100644 index 0000000000000..e906a25acfb5e --- /dev/null +++ b/node_modules/graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2011-2022 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 0000000000000..82d6e4daf0cdb --- /dev/null +++ b/node_modules/graceful-fs/README.md @@ -0,0 +1,143 @@ +# 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.readFile('some-file-or-whatever', (err, data) => { + // Do stuff here. +}) +``` + +## Sync methods + +This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync +methods. If you use sync methods which open file descriptors then you are +responsible for dealing with any errors. + +This is a known limitation, not a bug. + +## 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/clone.js b/node_modules/graceful-fs/clone.js new file mode 100644 index 0000000000000..dff3cc8c504b4 --- /dev/null +++ b/node_modules/graceful-fs/clone.js @@ -0,0 +1,23 @@ +'use strict' + +module.exports = clone + +var getPrototypeOf = Object.getPrototypeOf || function (obj) { + return obj.__proto__ +} + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) } + 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 0000000000000..8d5b89e4fa7fd --- /dev/null +++ b/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,448 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var clone = require('./clone.js') + +var util = require('util') + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue + } + }) +} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!fs[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = global[gracefulQueue] || [] + publishQueue(fs, queue) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + resetQueue() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + resetQueue() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(fs[gracefulQueue]) + require('assert').equal(fs[gracefulQueue].length, 0) + }) + } +} + +if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb, startTime) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + 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, startTime) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + 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, startTime) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$copyFile = fs.copyFile + if (fs$copyFile) + fs.copyFile = copyFile + function copyFile (src, dest, flags, cb) { + if (typeof flags === 'function') { + cb = flags + flags = 0 + } + return go$copyFile(src, dest, flags, cb) + + function go$copyFile (src, dest, flags, cb, startTime) { + return fs$copyFile(src, dest, flags, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + var noReaddirOptionVersions = /^v[0-5]\./ + function readdir (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + var go$readdir = noReaddirOptionVersions.test(process.version) + ? function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, fs$readdirCallback( + path, options, cb, startTime + )) + } + : function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, options, fs$readdirCallback( + path, options, cb, startTime + )) + } + + return go$readdir(path, options, cb) + + function fs$readdirCallback (path, options, cb, startTime) { + return function (err, files) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([ + go$readdir, + [path, options, cb], + err, + startTime || Date.now(), + Date.now() + ]) + else { + if (files && files.sort) + files.sort() + + if (typeof cb === 'function') + cb.call(this, err, files) + } + } + } + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb, startTime) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + fs[gracefulQueue].push(elem) + retry() +} + +// keep track of the timeout between retry() calls +var retryTimer + +// reset the startTime and lastTime to now +// this resets the start of the 60 second overall timeout as well as the +// delay between attempts so that we'll retry these jobs sooner +function resetQueue () { + var now = Date.now() + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + // entries that are only a length of 2 are from an older version, don't + // bother modifying those since they'll be retried anyway. + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now // startTime + fs[gracefulQueue][i][4] = now // lastTime + } + } + // call retry to make sure we're actively processing the queue + retry() +} + +function retry () { + // clear the timer and remove it to help prevent unintended concurrency + clearTimeout(retryTimer) + retryTimer = undefined + + if (fs[gracefulQueue].length === 0) + return + + var elem = fs[gracefulQueue].shift() + var fn = elem[0] + var args = elem[1] + // these items may be unset if they were added by an older graceful-fs + var err = elem[2] + var startTime = elem[3] + var lastTime = elem[4] + + // if we don't have a startTime we have no way of knowing if we've waited + // long enough, so go ahead and retry this item now + if (startTime === undefined) { + debug('RETRY', fn.name, args) + fn.apply(null, args) + } else if (Date.now() - startTime >= 60000) { + // it's been more than 60 seconds total, bail now + debug('TIMEOUT', fn.name, args) + var cb = args.pop() + if (typeof cb === 'function') + cb.call(null, err) + } else { + // the amount of time between the last attempt and right now + var sinceAttempt = Date.now() - lastTime + // the amount of time between when we first tried, and when we last tried + // rounded up to at least 1 + var sinceStart = Math.max(lastTime - startTime, 1) + // backoff. wait longer than the total time we've been retrying, but only + // up to a maximum of 100ms + var desiredDelay = Math.min(sinceStart * 1.2, 100) + // it's been long enough since the last retry, do it again + if (sinceAttempt >= desiredDelay) { + debug('RETRY', fn.name, args) + fn.apply(null, args.concat([startTime])) + } else { + // if we can't do this job yet, push it to the end of the queue + // and let the next iteration check again + fs[gracefulQueue].push(elem) + } + } + + // schedule our next run if one isn't already scheduled + if (retryTimer === undefined) { + retryTimer = setTimeout(retry, 0) + } +} diff --git a/node_modules/graceful-fs/legacy-streams.js b/node_modules/graceful-fs/legacy-streams.js new file mode 100644 index 0000000000000..d617b50fc0832 --- /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 0000000000000..87babf0248563 --- /dev/null +++ b/node_modules/graceful-fs/package.json @@ -0,0 +1,53 @@ +{ + "name": "graceful-fs", + "description": "A drop-in replacement for fs, making various improvements.", + "version": "4.2.11", + "repository": { + "type": "git", + "url": "https://github.com/isaacs/node-graceful-fs" + }, + "main": "graceful-fs.js", + "directories": { + "test": "test" + }, + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags", + "test": "nyc --silent node test.js | tap -c -", + "posttest": "nyc report" + }, + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "devDependencies": { + "import-fresh": "^2.0.0", + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^16.3.4" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js", + "clone.js" + ], + "tap": { + "reporter": "classic" + } +} diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js new file mode 100644 index 0000000000000..453f1a9e702d1 --- /dev/null +++ b/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,355 @@ +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) {} + +// This check is needed until node.js 12 is required +if (typeof process.chdir === 'function') { + var chdir = process.chdir + process.chdir = function (d) { + cwd = null + chdir.call(process, d) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) +} + +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.chmod && !fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (fs.chown && !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 = typeof fs.rename !== 'function' ? fs.rename + : (function (fs$rename) { + function rename (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" || er.code === "EBUSY") + && 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) + }) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) + return rename + })(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = typeof fs.read !== 'function' ? fs.read + : (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + + // This ensures `util.promisify` works as it does for native `fs.read`. + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) + return read + })(fs.read) + + fs.readSync = typeof fs.readSync !== 'function' ? 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.futimes) { + 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 if (fs.futimes) { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } + + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats) { + 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-ansi/index.js b/node_modules/has-ansi/index.js new file mode 100644 index 0000000000000..98fae06767373 --- /dev/null +++ b/node_modules/has-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +var ansiRegex = require('ansi-regex'); +var re = new RegExp(ansiRegex().source); // remove the `g` flag +module.exports = re.test.bind(re); diff --git a/node_modules/has-ansi/license b/node_modules/has-ansi/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/has-ansi/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/has-ansi/package.json b/node_modules/has-ansi/package.json new file mode 100644 index 0000000000000..01e08d4fd93d3 --- /dev/null +++ b/node_modules/has-ansi/package.json @@ -0,0 +1,55 @@ +{ + "name": "has-ansi", + "version": "2.0.0", + "description": "Check if a string has ANSI escape codes", + "license": "MIT", + "repository": "sindresorhus/has-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern", + "has" + ], + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "devDependencies": { + "ava": "0.0.4" + } +} diff --git a/node_modules/has-ansi/readme.md b/node_modules/has-ansi/readme.md new file mode 100644 index 0000000000000..02bc7c2300a67 --- /dev/null +++ b/node_modules/has-ansi/readme.md @@ -0,0 +1,36 @@ +# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi) + +> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save has-ansi +``` + + +## Usage + +```js +var hasAnsi = require('has-ansi'); + +hasAnsi('\u001b[4mcake\u001b[0m'); +//=> true + +hasAnsi('cake'); +//=> false +``` + + +## Related + +- [has-ansi-cli](https://github.com/sindresorhus/has-ansi-cli) - CLI for this module +- [strip-ansi](https://github.com/sindresorhus/strip-ansi) - Strip ANSI escape codes +- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/has-bigints/.eslintrc b/node_modules/has-bigints/.eslintrc new file mode 100644 index 0000000000000..3b5d9e90ec405 --- /dev/null +++ b/node_modules/has-bigints/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/has-bigints/.github/FUNDING.yml b/node_modules/has-bigints/.github/FUNDING.yml new file mode 100644 index 0000000000000..5b597c8467722 --- /dev/null +++ b/node_modules/has-bigints/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-bigints +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-bigints/.nycrc b/node_modules/has-bigints/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/has-bigints/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-bigints/CHANGELOG.md b/node_modules/has-bigints/CHANGELOG.md new file mode 100644 index 0000000000000..ef24d1e09387e --- /dev/null +++ b/node_modules/has-bigints/CHANGELOG.md @@ -0,0 +1,60 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/has-bigints/compare/v1.0.1...v1.0.2) - 2022-04-19 + +### Commits + +- [actions] reuse common workflows [`a655b7f`](https://github.com/inspect-js/has-bigints/commit/a655b7f7733ba2de078b3a59a704c2795440d08c) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`730a2e5`](https://github.com/inspect-js/has-bigints/commit/730a2e53d3f5f82ac43a11cb9753b11445d06d58) +- [readme] add github actions/codecov badges; update URLs [`9a83788`](https://github.com/inspect-js/has-bigints/commit/9a8378861917b41ebb360a9d8ab3d39aa33acf7b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`b1edc52`](https://github.com/inspect-js/has-bigints/commit/b1edc522ef6c23556e55b9c81b65fe884d1e2cc4) +- [actions] update codecov uploader [`cbb1bd0`](https://github.com/inspect-js/has-bigints/commit/cbb1bd0eff486070a19283238da6afd33ca73b4b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`8717e6d`](https://github.com/inspect-js/has-bigints/commit/8717e6d6ae6b5010aea1fac5e48dfdfaf35d8c72) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `safe-publish-latest`, `tape` [`5f70eab`](https://github.com/inspect-js/has-bigints/commit/5f70eab763118d40415f13e47446ea5c011fbe18) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`a1446bc`](https://github.com/inspect-js/has-bigints/commit/a1446bc3e806ce3911c73d6fbdd981f461c41019) +- [meta] use `prepublishOnly` script for npm 7+ [`f2dd197`](https://github.com/inspect-js/has-bigints/commit/f2dd19716a06ca7a971644761e864f0435db278e) +- [actions] use checkout v3 [`1ba72f1`](https://github.com/inspect-js/has-bigints/commit/1ba72f19ada076791ff193aca9d8537388d67ddb) +- [Refactor] use a global variable to get the original BigInt instead of a global property [`a7ccfac`](https://github.com/inspect-js/has-bigints/commit/a7ccfac0414e56dadd263fd07c0b5141388df502) +- [actions] skip `npm ls` on older nodes [`62d31e7`](https://github.com/inspect-js/has-bigints/commit/62d31e79658b16391458d0728e0dacbee8694ebb) + +## [v1.0.1](https://github.com/inspect-js/has-bigints/compare/v1.0.0...v1.0.1) - 2020-12-13 + +### Commits + +- [Tests] use shared travis-ci configs [`46a0d6b`](https://github.com/inspect-js/has-bigints/commit/46a0d6be7ed83bd7f5ead11e4eab7fc91570a448) +- [Tests] migrate tests to Github Actions [`91a38fa`](https://github.com/inspect-js/has-bigints/commit/91a38fa4b85a420b8cf4926b3799e6ceb60d8690) +- [meta] do not publish github action workflow files [`69aacba`](https://github.com/inspect-js/has-bigints/commit/69aacba320c1221e7fee1c71bde600bce063f24b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`64e2c08`](https://github.com/inspect-js/has-bigints/commit/64e2c0895b21ac91a137452fd2455932f62a2fc1) +- [Tests] run `nyc` on all tests; use `tape` runner [`8009375`](https://github.com/inspect-js/has-bigints/commit/8009375e5ec9faca6bbc09441002af5c5e59ff20) +- [actions] add automatic rebasing / merge commit blocking [`e599917`](https://github.com/inspect-js/has-bigints/commit/e599917fd1f751c9a6c0daac70acb243f8c3a01d) +- [actions] add "Allow Edits" workflow [`bd0126e`](https://github.com/inspect-js/has-bigints/commit/bd0126eba2d67e9b9d588bced34413f507698154) +- [readme] remove travis badge [`8e02a73`](https://github.com/inspect-js/has-bigints/commit/8e02a73db34827d24d2945f2db822973a0b49925) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `safe-publish-latest` [`95859f2`](https://github.com/inspect-js/has-bigints/commit/95859f28f23f5733481c52a501063802cf64f75b) +- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`0588f41`](https://github.com/inspect-js/has-bigints/commit/0588f415c6cc01d6b34668680044e03b2998e03f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5b024a6`](https://github.com/inspect-js/has-bigints/commit/5b024a664a8b7d2d2f750a4c11ce20c395b6f12a) +- [meta] add `version` scripts [`4788d61`](https://github.com/inspect-js/has-bigints/commit/4788d61101c009e4e2c1b4d944c263de06192c6a) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`be0e0de`](https://github.com/inspect-js/has-bigints/commit/be0e0de08298dfe483c5d7a2675e5133abeabc53) +- [Dev Deps] update `auto-changelog`; add `aud` [`13a8d1b`](https://github.com/inspect-js/has-bigints/commit/13a8d1bf1f661871d890bfa174de9514f016cdd9) +- [actions] fix action name [`f873d9a`](https://github.com/inspect-js/has-bigints/commit/f873d9a2f10718662528a755b12c61202f4e4afa) +- [meta] add `funding` field [`1b51f49`](https://github.com/inspect-js/has-bigints/commit/1b51f4921df1faf85d2679a0e4ba97ef015a73b7) +- [Dev Deps] update `auto-changelog` [`2322461`](https://github.com/inspect-js/has-bigints/commit/2322461789810434c447439f155eb3ca23eb29fb) +- [Tests] only audit prod deps [`aabdade`](https://github.com/inspect-js/has-bigints/commit/aabdadeaa1e126b91a2fbd82263cc49651ff5e7b) + +## v1.0.0 - 2019-08-10 + +### Commits + +- [Tests] add `.travis.yml` [`9730412`](https://github.com/inspect-js/has-bigints/commit/973041241dc172474bb9457aad41790fe54fec88) +- Initial commit [`65f7c38`](https://github.com/inspect-js/has-bigints/commit/65f7c3889d9a98e214e26d650723cbfc49338463) +- [Tests] add tests [`e374a78`](https://github.com/inspect-js/has-bigints/commit/e374a78033d457badcd47e06752fdec7f62e6c39) +- readme [`5d39092`](https://github.com/inspect-js/has-bigints/commit/5d3909249da442867180fb747eef27543627d250) +- npm init [`1be2e3d`](https://github.com/inspect-js/has-bigints/commit/1be2e3d69db6718901e6845cfc38a07cc46dfd96) +- implementation [`b7bc812`](https://github.com/inspect-js/has-bigints/commit/b7bc8121db1fb1a827625c4cb0608935e3dcbe31) +- [Tests] add linting [`04533be`](https://github.com/inspect-js/has-bigints/commit/04533bef57f60e322238f71f32ee3ae0c988bac4) +- [meta] create FUNDING.yml [`cf824a7`](https://github.com/inspect-js/has-bigints/commit/cf824a7d02e867957d8db17ee0a4c70c8ee5ff23) +- Only apps should have lockfiles [`64e8242`](https://github.com/inspect-js/has-bigints/commit/64e82429f1dca99f624dc971ff13516dee28d353) diff --git a/node_modules/has-bigints/LICENSE b/node_modules/has-bigints/LICENSE new file mode 100644 index 0000000000000..3900dd7e2ffe6 --- /dev/null +++ b/node_modules/has-bigints/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-bigints/README.md b/node_modules/has-bigints/README.md new file mode 100644 index 0000000000000..69414e42573b2 --- /dev/null +++ b/node_modules/has-bigints/README.md @@ -0,0 +1,39 @@ +# has-bigints [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the JS environment has BigInt support. + +## Example + +```js +var hasBigInts = require('has-bigints'); + +hasBigInts() === true; // if the environment has native BigInt support. Not polyfillable, not forgeable. +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/has-bigints +[npm-version-svg]: https://versionbadg.es/inspect-js/has-bigints.svg +[deps-svg]: https://david-dm.org/inspect-js/has-bigints.svg +[deps-url]: https://david-dm.org/inspect-js/has-bigints +[dev-deps-svg]: https://david-dm.org/inspect-js/has-bigints/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/has-bigints#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/has-bigints.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-bigints.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-bigints.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-bigints +[codecov-image]: https://codecov.io/gh/inspect-js/has-bigints/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-bigints/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-bigints +[actions-url]: https://github.com/inspect-js/has-bigints/actions diff --git a/node_modules/has-bigints/index.js b/node_modules/has-bigints/index.js new file mode 100644 index 0000000000000..894237404bf54 --- /dev/null +++ b/node_modules/has-bigints/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var $BigInt = typeof BigInt !== 'undefined' && BigInt; + +module.exports = function hasNativeBigInts() { + return typeof $BigInt === 'function' + && typeof BigInt === 'function' + && typeof $BigInt(42) === 'bigint' // eslint-disable-line no-magic-numbers + && typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers +}; diff --git a/node_modules/has-bigints/package.json b/node_modules/has-bigints/package.json new file mode 100644 index 0000000000000..6bed9afcd6a14 --- /dev/null +++ b/node_modules/has-bigints/package.json @@ -0,0 +1,54 @@ +{ + "name": "has-bigints", + "version": "1.0.2", + "description": "Determine if the JS environment has BigInt support.", + "main": "index.js", + "scripts": { + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/has-bigints.git" + }, + "keywords": [ + "BigInt", + "bigints", + "typeof", + "ES2020" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/has-bigints/issues" + }, + "homepage": "https://github.com/ljharb/has-bigints#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/has-bigints/test/index.js b/node_modules/has-bigints/test/index.js new file mode 100644 index 0000000000000..efbc98b5ba811 --- /dev/null +++ b/node_modules/has-bigints/test/index.js @@ -0,0 +1,44 @@ +'use strict'; + +var test = require('tape'); +var hasBigInts = require('..'); + +test('interface', function (t) { + t.equal(typeof hasBigInts, 'function', 'is a function'); + t.equal(typeof hasBigInts(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('BigInts are supported', { skip: !hasBigInts() }, function (t) { + t.equal(typeof BigInt, 'function', 'global BigInt is a function'); + if (typeof BigInt !== 'function') { + return; + } + + t.equal(BigInt(42), BigInt(42), '42n === 42n'); + t['throws']( + function () { BigInt(NaN); }, + RangeError, + 'NaN is not an integer; BigInt(NaN) throws' + ); + + t['throws']( + function () { BigInt(Infinity); }, + RangeError, + 'Infinity is not an integer; BigInt(Infinity) throws' + ); + + t['throws']( + function () { BigInt(1.1); }, + RangeError, + '1.1 is not an integer; BigInt(1.1) throws' + ); + + t.end(); +}); + +test('BigInts are not supported', { skip: hasBigInts() }, function (t) { + t.equal(typeof BigInt, 'undefined', 'global BigInt is undefined'); + + t.end(); +}); diff --git a/node_modules/has-property-descriptors/.eslintrc b/node_modules/has-property-descriptors/.eslintrc new file mode 100644 index 0000000000000..2fcc002b0a7f5 --- /dev/null +++ b/node_modules/has-property-descriptors/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": ["GetIntrinsic"], + }], + }, +} diff --git a/node_modules/has-property-descriptors/.github/FUNDING.yml b/node_modules/has-property-descriptors/.github/FUNDING.yml new file mode 100644 index 0000000000000..817aacf1f4268 --- /dev/null +++ b/node_modules/has-property-descriptors/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-property-descriptors +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-property-descriptors/.nycrc b/node_modules/has-property-descriptors/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/has-property-descriptors/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-property-descriptors/CHANGELOG.md b/node_modules/has-property-descriptors/CHANGELOG.md new file mode 100644 index 0000000000000..2cec99c888a01 --- /dev/null +++ b/node_modules/has-property-descriptors/CHANGELOG.md @@ -0,0 +1,27 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.0...v1.0.1) - 2023-10-20 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`5bbf4da`](https://github.com/inspect-js/has-property-descriptors/commit/5bbf4dae1b58950d87bb3af508bee7513e640868) +- [actions] update rebase action to use reusable workflow [`3a5585b`](https://github.com/inspect-js/has-property-descriptors/commit/3a5585bf74988f71a8f59e67a07d594e62c51fd8) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`e5c1212`](https://github.com/inspect-js/has-property-descriptors/commit/e5c1212048a8fda549794c47863724ca60b89cae) +- [Dev Deps] update `aud`, `tape` [`e942917`](https://github.com/inspect-js/has-property-descriptors/commit/e942917b6c2f7c090d5623048989cf20d0834ebf) +- [Deps] update `get-intrinsic` [`f4a44ec`](https://github.com/inspect-js/has-property-descriptors/commit/f4a44ec6d94146fa6c550d3c15c31a2062c83ef4) +- [Deps] update `get-intrinsic` [`eeb275b`](https://github.com/inspect-js/has-property-descriptors/commit/eeb275b473e5d72ca843b61ca25cfcb06a5d4300) + +## v1.0.0 - 2022-04-14 + +### Commits + +- Initial implementation, tests [`303559f`](https://github.com/inspect-js/has-property-descriptors/commit/303559f2a72dfe7111573a1aec475ed4a184c35a) +- Initial commit [`3a7ca2d`](https://github.com/inspect-js/has-property-descriptors/commit/3a7ca2dc49f1fff0279a28bb16265e7615e14749) +- read me [`dd73dce`](https://github.com/inspect-js/has-property-descriptors/commit/dd73dce09d89d0f7a4a6e3b1e562a506f979a767) +- npm init [`c1e6557`](https://github.com/inspect-js/has-property-descriptors/commit/c1e655779de632d68cb944c50da6b71bcb7b8c85) +- Only apps should have lockfiles [`e72f7c6`](https://github.com/inspect-js/has-property-descriptors/commit/e72f7c68de534b2d273ee665f8b18d4ecc7f70b0) diff --git a/node_modules/has-property-descriptors/LICENSE b/node_modules/has-property-descriptors/LICENSE new file mode 100644 index 0000000000000..2e7b9a3eacf26 --- /dev/null +++ b/node_modules/has-property-descriptors/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-property-descriptors/README.md b/node_modules/has-property-descriptors/README.md new file mode 100644 index 0000000000000..d81fbd99e91a3 --- /dev/null +++ b/node_modules/has-property-descriptors/README.md @@ -0,0 +1,43 @@ +# has-property-descriptors [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD. + +## Example + +```js +var hasPropertyDescriptors = require('has-property-descriptors'); +var assert = require('assert'); + +assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines + +// Arrays can not have their length `[[Defined]]` in some engines +assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6 +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/has-property-descriptors +[npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg +[deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg +[deps-url]: https://david-dm.org/inspect-js/has-property-descriptors +[dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors +[codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors +[actions-url]: https://github.com/inspect-js/has-property-descriptors/actions diff --git a/node_modules/has-property-descriptors/index.js b/node_modules/has-property-descriptors/index.js new file mode 100644 index 0000000000000..8e30683e39e98 --- /dev/null +++ b/node_modules/has-property-descriptors/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; diff --git a/node_modules/has-property-descriptors/package.json b/node_modules/has-property-descriptors/package.json new file mode 100644 index 0000000000000..831e0184fa04a --- /dev/null +++ b/node_modules/has-property-descriptors/package.json @@ -0,0 +1,77 @@ +{ + "name": "has-property-descriptors", + "version": "1.0.1", + "description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-property-descriptors.git" + }, + "keywords": [ + "property", + "descriptors", + "has", + "environment", + "env", + "defineProperty", + "getOwnPropertyDescriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/has-property-descriptors/issues" + }, + "homepage": "https://github.com/inspect-js/has-property-descriptors#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/has-property-descriptors/test/index.js b/node_modules/has-property-descriptors/test/index.js new file mode 100644 index 0000000000000..7f02bd3e68e63 --- /dev/null +++ b/node_modules/has-property-descriptors/test/index.js @@ -0,0 +1,57 @@ +'use strict'; + +var test = require('tape'); + +var hasPropertyDescriptors = require('../'); + +var sentinel = {}; + +test('hasPropertyDescriptors', function (t) { + t.equal(typeof hasPropertyDescriptors, 'function', 'is a function'); + t.equal(typeof hasPropertyDescriptors.hasArrayLengthDefineBug, 'function', '`hasArrayLengthDefineBug` property is a function'); + + var yes = hasPropertyDescriptors(); + t.test('property descriptors', { skip: !yes }, function (st) { + var o = { a: sentinel }; + + st.deepEqual( + Object.getOwnPropertyDescriptor(o, 'a'), + { + configurable: true, + enumerable: true, + value: sentinel, + writable: true + }, + 'has expected property descriptor' + ); + + Object.defineProperty(o, 'a', { enumerable: false, writable: false }); + + st.deepEqual( + Object.getOwnPropertyDescriptor(o, 'a'), + { + configurable: true, + enumerable: false, + value: sentinel, + writable: false + }, + 'has expected property descriptor after [[Define]]' + ); + + st.end(); + }); + + var arrayBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + t.test('defining array lengths', { skip: !yes || arrayBug }, function (st) { + var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays + st.equal(arr.length, 3, 'array starts with length 3'); + + Object.defineProperty(arr, 'length', { value: 5 }); + + st.equal(arr.length, 5, 'array ends with length 5'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/has-proto/.eslintrc b/node_modules/has-proto/.eslintrc new file mode 100644 index 0000000000000..3b5d9e90ec405 --- /dev/null +++ b/node_modules/has-proto/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/has-proto/.github/FUNDING.yml b/node_modules/has-proto/.github/FUNDING.yml new file mode 100644 index 0000000000000..613705c7eb37d --- /dev/null +++ b/node_modules/has-proto/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-proto +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-proto/CHANGELOG.md b/node_modules/has-proto/CHANGELOG.md new file mode 100644 index 0000000000000..c350e809bf94c --- /dev/null +++ b/node_modules/has-proto/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/inspect-js/has-proto/compare/v1.0.0...v1.0.1) - 2022-12-21 + +### Commits + +- [meta] correct URLs and description [`ef34483`](https://github.com/inspect-js/has-proto/commit/ef34483ca0d35680f271b6b96e35526151b25dfc) +- [patch] add an additional criteria [`e81959e`](https://github.com/inspect-js/has-proto/commit/e81959ed7c7a77fbf459f00cb4ef824f1099497f) +- [Dev Deps] update `aud` [`2bec2c4`](https://github.com/inspect-js/has-proto/commit/2bec2c47b072b122ff5443fba0263f6dc649531f) + +## v1.0.0 - 2022-12-12 + +### Commits + +- Initial implementation, tests, readme [`6886fea`](https://github.com/inspect-js/has-proto/commit/6886fea578f67daf69a7920b2eb7637ea6ebb0bc) +- Initial commit [`99129c8`](https://github.com/inspect-js/has-proto/commit/99129c8f42471ac89cb681ba9cb9d52a583eb94f) +- npm init [`2844ad8`](https://github.com/inspect-js/has-proto/commit/2844ad8e75b84d66a46765b3bab9d2e8ea692e10) +- Only apps should have lockfiles [`c65bc5e`](https://github.com/inspect-js/has-proto/commit/c65bc5e40b9004463f7336d47c67245fb139a36a) diff --git a/node_modules/has-proto/LICENSE b/node_modules/has-proto/LICENSE new file mode 100644 index 0000000000000..2e7b9a3eacf26 --- /dev/null +++ b/node_modules/has-proto/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-proto/README.md b/node_modules/has-proto/README.md new file mode 100644 index 0000000000000..145676547c24d --- /dev/null +++ b/node_modules/has-proto/README.md @@ -0,0 +1,38 @@ +# has-proto [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Does this environment have the ability to set the [[Prototype]] of an object on creation with `__proto__`? + +## Example + +```js +var hasProto = require('has-proto'); +var assert = require('assert'); + +assert.equal(typeof hasProto(), 'boolean'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/has-proto +[npm-version-svg]: https://versionbadg.es/inspect-js/has-proto.svg +[deps-svg]: https://david-dm.org/inspect-js/has-proto.svg +[deps-url]: https://david-dm.org/inspect-js/has-proto +[dev-deps-svg]: https://david-dm.org/inspect-js/has-proto/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/has-proto#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/has-proto.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-proto.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-proto.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-proto +[codecov-image]: https://codecov.io/gh/inspect-js/has-proto/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-proto/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-proto +[actions-url]: https://github.com/inspect-js/has-proto/actions diff --git a/node_modules/has-proto/index.js b/node_modules/has-proto/index.js new file mode 100644 index 0000000000000..d3e4be4ebfe44 --- /dev/null +++ b/node_modules/has-proto/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var test = { + foo: {} +}; + +var $Object = Object; + +module.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); +}; diff --git a/node_modules/has-proto/package.json b/node_modules/has-proto/package.json new file mode 100644 index 0000000000000..706f9510dd13e --- /dev/null +++ b/node_modules/has-proto/package.json @@ -0,0 +1,74 @@ +{ + "name": "has-proto", + "version": "1.0.1", + "description": "Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-proto.git" + }, + "keywords": [ + "prototype", + "proto", + "set", + "get", + "__proto__", + "getPrototypeOf", + "setPrototypeOf", + "has" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/has-proto/issues" + }, + "homepage": "https://github.com/inspect-js/has-proto#readme", + "testling": { + "files": "test/index.js" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/has-proto/test/index.js b/node_modules/has-proto/test/index.js new file mode 100644 index 0000000000000..5da1a3aa6c686 --- /dev/null +++ b/node_modules/has-proto/test/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var test = require('tape'); +var hasProto = require('../'); + +test('hasProto', function (t) { + var result = hasProto(); + t.equal(typeof result, 'boolean', 'returns a boolean (' + result + ')'); + + var obj = { __proto__: null }; + if (result) { + t.notOk('toString' in obj, 'null object lacks toString'); + } else { + t.ok('toString' in obj, 'without proto, null object has toString'); + t.equal(obj.__proto__, null); // eslint-disable-line no-proto + } + + t.end(); +}); diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc new file mode 100644 index 0000000000000..2d9a66a8acdba --- /dev/null +++ b/node_modules/has-symbols/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "multiline-comment-style": 0, + } +} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml new file mode 100644 index 0000000000000..04cf87e66ed8d --- /dev/null +++ b/node_modules/has-symbols/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-symbols +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/has-symbols/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 0000000000000..cd532a2b460b2 --- /dev/null +++ b/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,75 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) +- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) +- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) +- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) +- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) +- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) +- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) +- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) +- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) + +## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 + +### Fixed + +- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) + +### Commits + +- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) +- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) +- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) +- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) +- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) +- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) +- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) +- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) +- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) +- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) +- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) + +## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 + +### Commits + +- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) +- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) +- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) +- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) +- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) +- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) +- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) + +## v1.0.0 - 2016-09-19 + +### Commits + +- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) +- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) +- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) +- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) +- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE new file mode 100644 index 0000000000000..df31cbf3c064d --- /dev/null +++ b/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-symbols/README.md b/node_modules/has-symbols/README.md new file mode 100644 index 0000000000000..33905f0fc92c4 --- /dev/null +++ b/node_modules/has-symbols/README.md @@ -0,0 +1,46 @@ +# has-symbols [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: https://versionbadg.es/inspect-js/has-symbols.svg +[5]: https://david-dm.org/inspect-js/has-symbols.svg +[6]: https://david-dm.org/inspect-js/has-symbols +[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols +[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols +[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js new file mode 100644 index 0000000000000..17044fa21daa7 --- /dev/null +++ b/node_modules/has-symbols/index.js @@ -0,0 +1,13 @@ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json new file mode 100644 index 0000000000000..fe7004a10b169 --- /dev/null +++ b/node_modules/has-symbols/package.json @@ -0,0 +1,101 @@ +{ + "name": "has-symbols", + "version": "1.0.3", + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/has-symbols.git" + }, + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "greenkeeper": { + "ignore": [ + "core-js" + ] + } +} diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js new file mode 100644 index 0000000000000..1285210ef7cce --- /dev/null +++ b/node_modules/has-symbols/shams.js @@ -0,0 +1,42 @@ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js new file mode 100644 index 0000000000000..352129ca356c8 --- /dev/null +++ b/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 0000000000000..df5365c23ed74 --- /dev/null +++ b/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000000000..9191b248baa14 --- /dev/null +++ b/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js new file mode 100644 index 0000000000000..89edd1291ca79 --- /dev/null +++ b/node_modules/has-symbols/test/tests.js @@ -0,0 +1,56 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false; } + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + /* + var foo = Symbol('foo'); + + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + // eslint-disable-next-line no-restricted-syntax + for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/node_modules/has-tostringtag/.eslintrc b/node_modules/has-tostringtag/.eslintrc new file mode 100644 index 0000000000000..2d9a66a8acdba --- /dev/null +++ b/node_modules/has-tostringtag/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "multiline-comment-style": 0, + } +} diff --git a/node_modules/has-tostringtag/.github/FUNDING.yml b/node_modules/has-tostringtag/.github/FUNDING.yml new file mode 100644 index 0000000000000..7a450e70826f1 --- /dev/null +++ b/node_modules/has-tostringtag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-tostringtag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-tostringtag/CHANGELOG.md b/node_modules/has-tostringtag/CHANGELOG.md new file mode 100644 index 0000000000000..39fb77cf7dbc2 --- /dev/null +++ b/node_modules/has-tostringtag/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2021-08-05 + +### Commits + +- Tests [`6b6f573`](https://github.com/inspect-js/has-tostringtag/commit/6b6f5734dc2058badb300ff0783efdad95fe1a65) +- Initial commit [`2f8190e`](https://github.com/inspect-js/has-tostringtag/commit/2f8190e799fac32ba9b95a076c0255e01d7ce475) +- [meta] do not publish github action workflow files [`6e08cc4`](https://github.com/inspect-js/has-tostringtag/commit/6e08cc4e0fea7ec71ef66e70734b2af2c4a8b71b) +- readme [`94bed6c`](https://github.com/inspect-js/has-tostringtag/commit/94bed6c9560cbbfda034f8d6c260bb7b0db33c1a) +- npm init [`be67840`](https://github.com/inspect-js/has-tostringtag/commit/be67840ab92ee7adb98bcc65261975543f815fa5) +- Implementation [`c4914ec`](https://github.com/inspect-js/has-tostringtag/commit/c4914ecc51ddee692c85b471ae0a5d8123030fbf) +- [meta] use `auto-changelog` [`4aaf768`](https://github.com/inspect-js/has-tostringtag/commit/4aaf76895ae01d7b739f2b19f967ef2372506cd7) +- Only apps should have lockfiles [`bc4d99e`](https://github.com/inspect-js/has-tostringtag/commit/bc4d99e4bf494afbaa235c5f098df6e642edf724) +- [meta] add `safe-publish-latest` [`6523c05`](https://github.com/inspect-js/has-tostringtag/commit/6523c05c9b87140f3ae74c9daf91633dd9ff4e1f) diff --git a/node_modules/has-tostringtag/LICENSE b/node_modules/has-tostringtag/LICENSE new file mode 100644 index 0000000000000..7948bc02a7937 --- /dev/null +++ b/node_modules/has-tostringtag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-tostringtag/README.md b/node_modules/has-tostringtag/README.md new file mode 100644 index 0000000000000..67a5e929dfce4 --- /dev/null +++ b/node_modules/has-tostringtag/README.md @@ -0,0 +1,46 @@ +# has-tostringtag [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams. + +## Example + +```js +var hasSymbolToStringTag = require('has-tostringtag'); + +hasSymbolToStringTag() === true; // if the environment has native Symbol.toStringTag support. Not polyfillable, not forgeable. + +var hasSymbolToStringTagKinda = require('has-tostringtag/shams'); +hasSymbolToStringTagKinda() === true; // if the environment has a Symbol.toStringTag sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-tostringtag +[2]: https://versionbadg.es/inspect-js/has-tostringtag.svg +[5]: https://david-dm.org/inspect-js/has-tostringtag.svg +[6]: https://david-dm.org/inspect-js/has-tostringtag +[7]: https://david-dm.org/inspect-js/has-tostringtag/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-tostringtag#info=devDependencies +[11]: https://nodei.co/npm/has-tostringtag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-tostringtag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-tostringtag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-tostringtag +[codecov-image]: https://codecov.io/gh/inspect-js/has-tostringtag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-tostringtag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-tostringtag +[actions-url]: https://github.com/inspect-js/has-tostringtag/actions diff --git a/node_modules/has-tostringtag/index.js b/node_modules/has-tostringtag/index.js new file mode 100644 index 0000000000000..d626b7a82cf9d --- /dev/null +++ b/node_modules/has-tostringtag/index.js @@ -0,0 +1,7 @@ +'use strict'; + +var hasSymbols = require('has-symbols'); + +module.exports = function hasToStringTag() { + return hasSymbols() && typeof Symbol.toStringTag === 'symbol'; +}; diff --git a/node_modules/has-tostringtag/package.json b/node_modules/has-tostringtag/package.json new file mode 100644 index 0000000000000..9c74d6416ac08 --- /dev/null +++ b/node_modules/has-tostringtag/package.json @@ -0,0 +1,84 @@ +{ + "name": "has-tostringtag", + "version": "1.0.0", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.", + "license": "MIT", + "main": "index.js", + "exports": { + ".": "./index.js", + "./shams": "./shams.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-tostringtag.git" + }, + "bugs": { + "url": "https://github.com/inspect-js/has-tostringtag/issues" + }, + "homepage": "https://github.com/inspect-js/has-tostringtag#readme", + "keywords": [ + "javascript", + "ecmascript", + "symbol", + "symbols", + "tostringtag", + "Symbol.toStringTag" + ], + "dependencies": { + "has-symbols": "^1.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^2.6.12", + "eslint": "^7.32.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/has-tostringtag/shams.js b/node_modules/has-tostringtag/shams.js new file mode 100644 index 0000000000000..8b7e401177726 --- /dev/null +++ b/node_modules/has-tostringtag/shams.js @@ -0,0 +1,7 @@ +'use strict'; + +var hasSymbols = require('has-symbols/shams'); + +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; diff --git a/node_modules/has-tostringtag/test/index.js b/node_modules/has-tostringtag/test/index.js new file mode 100644 index 0000000000000..0679afdfa78bf --- /dev/null +++ b/node_modules/has-tostringtag/test/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var test = require('tape'); +var hasSymbolToStringTag = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbolToStringTag, 'function', 'is a function'); + t.equal(typeof hasSymbolToStringTag(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbol.toStringTag exists', { skip: !hasSymbolToStringTag() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbol.toStringTag does not exist', { skip: hasSymbolToStringTag() }, function (t) { + t.equal(typeof Symbol === 'undefined' ? 'undefined' : typeof Symbol.toStringTag, 'undefined', 'global Symbol.toStringTag is undefined'); + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/shams/core-js.js b/node_modules/has-tostringtag/test/shams/core-js.js new file mode 100644 index 0000000000000..692b86eb9af0e --- /dev/null +++ b/node_modules/has-tostringtag/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') { + test('has native Symbol.toStringTag support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol.toStringTag, 'symbol'); + t.end(); + }); + return; +} + +var hasSymbolToStringTag = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasToStringTagAfter = hasSymbolToStringTag(); + t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js b/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000000000..489fe83632f7c --- /dev/null +++ b/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbolToStringTag = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasToStringTagAfter = hasSymbolToStringTag(); + t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/tests.js b/node_modules/has-tostringtag/test/tests.js new file mode 100644 index 0000000000000..0dae885c0ba5b --- /dev/null +++ b/node_modules/has-tostringtag/test/tests.js @@ -0,0 +1,14 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + t.ok(Symbol.toStringTag, 'Symbol.toStringTag exists'); + + if (typeof Symbol !== 'function' || !Symbol.toStringTag) { return false; } + + var obj = {}; + obj[Symbol.toStringTag] = 'test'; + + t.equal(Object.prototype.toString.call(obj), '[object test]'); +}; diff --git a/node_modules/has-value/LICENSE b/node_modules/has-value/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /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 0000000000000..f9b428c9aac21 --- /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 0000000000000..c23749488f6e5 --- /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/node_modules/isobject/LICENSE b/node_modules/has-value/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..943e71d05511e --- /dev/null +++ b/node_modules/has-value/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/has-value/node_modules/isobject/README.md b/node_modules/has-value/node_modules/isobject/README.md new file mode 100644 index 0000000000000..d01feaa40bc13 --- /dev/null +++ b/node_modules/has-value/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/has-value/node_modules/isobject/index.d.ts b/node_modules/has-value/node_modules/isobject/index.d.ts new file mode 100644 index 0000000000000..55f81c275f150 --- /dev/null +++ b/node_modules/has-value/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/has-value/node_modules/isobject/index.js b/node_modules/has-value/node_modules/isobject/index.js new file mode 100644 index 0000000000000..2d59958bf4eab --- /dev/null +++ b/node_modules/has-value/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/has-value/node_modules/isobject/package.json b/node_modules/has-value/node_modules/isobject/package.json new file mode 100644 index 0000000000000..62aa8c1b2feea --- /dev/null +++ b/node_modules/has-value/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "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" + ] + } +} diff --git a/node_modules/has-value/package.json b/node_modules/has-value/package.json new file mode 100644 index 0000000000000..e65d4380dd7ea --- /dev/null +++ b/node_modules/has-value/package.json @@ -0,0 +1,83 @@ +{ + "name": "has-value", + "description": "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/has-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ryan M Harrison (https://linkedin.com/in/harrisonrm)" + ], + "repository": "jonschlinkert/has-value", + "bugs": { + "url": "https://github.com/jonschlinkert/has-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.1" + }, + "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" + ], + "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 + } + } +} diff --git a/node_modules/has-values/LICENSE b/node_modules/has-values/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /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 0000000000000..98d4367af4b80 --- /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 0000000000000..9bebb9fcb2197 --- /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/is-number/LICENSE b/node_modules/has-values/node_modules/is-number/LICENSE new file mode 100644 index 0000000000000..842218cf09a20 --- /dev/null +++ b/node_modules/has-values/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/has-values/node_modules/is-number/README.md b/node_modules/has-values/node_modules/is-number/README.md new file mode 100644 index 0000000000000..281165dcea345 --- /dev/null +++ b/node_modules/has-values/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/has-values/node_modules/is-number/index.js b/node_modules/has-values/node_modules/is-number/index.js new file mode 100644 index 0000000000000..7a2a45bed02f5 --- /dev/null +++ b/node_modules/has-values/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/has-values/node_modules/is-number/node_modules/kind-of/LICENSE b/node_modules/has-values/node_modules/is-number/node_modules/kind-of/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /dev/null +++ b/node_modules/has-values/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/has-values/node_modules/is-number/node_modules/kind-of/README.md b/node_modules/has-values/node_modules/is-number/node_modules/kind-of/README.md new file mode 100644 index 0000000000000..6a9df36d3bd2f --- /dev/null +++ b/node_modules/has-values/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/has-values/node_modules/is-number/node_modules/kind-of/index.js b/node_modules/has-values/node_modules/is-number/node_modules/kind-of/index.js new file mode 100644 index 0000000000000..b52c2917feb11 --- /dev/null +++ b/node_modules/has-values/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/has-values/node_modules/is-number/node_modules/kind-of/package.json b/node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json new file mode 100644 index 0000000000000..5de879e1162d0 --- /dev/null +++ b/node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "3.2.2", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "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" + }, + "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" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/has-values/node_modules/is-number/package.json b/node_modules/has-values/node_modules/is-number/package.json new file mode 100644 index 0000000000000..8c1f9ab48e72d --- /dev/null +++ b/node_modules/has-values/node_modules/is-number/package.json @@ -0,0 +1,83 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Charlike Mike Reagent (http://www.tunnckocore.tk)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "benchmarked": "^0.2.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "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" + ] + } +} \ No newline at end of file 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 0000000000000..d734237bdedc6 --- /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 0000000000000..83469b0b69a3b --- /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 0000000000000..4c0233bc77ec6 --- /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 0000000000000..222afc0b2d17c --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "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" + }, + "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" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/has-values/package.json b/node_modules/has-values/package.json new file mode 100644 index 0000000000000..bdd841d938aa2 --- /dev/null +++ b/node_modules/has-values/package.json @@ -0,0 +1,82 @@ +{ + "name": "has-values", + "description": "Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. ", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/has-values", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/has-values", + "bugs": { + "url": "https://github.com/jonschlinkert/has-values/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.1" + }, + "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" + ], + "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 + } + } +} diff --git a/node_modules/hasown/.eslintrc b/node_modules/hasown/.eslintrc new file mode 100644 index 0000000000000..3b5d9e90ec405 --- /dev/null +++ b/node_modules/hasown/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/hasown/.github/FUNDING.yml b/node_modules/hasown/.github/FUNDING.yml new file mode 100644 index 0000000000000..d68c8b716ff04 --- /dev/null +++ b/node_modules/hasown/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/hasown +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/hasown/.nycrc b/node_modules/hasown/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/hasown/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/hasown/CHANGELOG.md b/node_modules/hasown/CHANGELOG.md new file mode 100644 index 0000000000000..1cbd1f5f63f2f --- /dev/null +++ b/node_modules/hasown/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19 + +### Commits + +- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4) +- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458) +- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215) + +## v1.0.1 - 2023-10-10 + +### Commits + +- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62) diff --git a/node_modules/hasown/LICENSE b/node_modules/hasown/LICENSE new file mode 100644 index 0000000000000..0314929078de8 --- /dev/null +++ b/node_modules/hasown/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband 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/hasown/README.md b/node_modules/hasown/README.md new file mode 100644 index 0000000000000..f759b8a8396e3 --- /dev/null +++ b/node_modules/hasown/README.md @@ -0,0 +1,40 @@ +# hasown [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A robust, ES3 compatible, "has own property" predicate. + +## Example + +```js +const assert = require('assert'); +const hasOwn = require('hasown'); + +assert.equal(hasOwn({}, 'toString'), false); +assert.equal(hasOwn([], 'length'), true); +assert.equal(hasOwn({ a: 42 }, 'a'), true); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/hasown +[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg +[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg +[deps-url]: https://david-dm.org/inspect-js/hasOwn +[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/hasown.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/hasown.svg +[downloads-url]: https://npm-stat.com/charts.html?package=hasown +[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn +[actions-url]: https://github.com/inspect-js/hasOwn/actions diff --git a/node_modules/hasown/index.d.ts b/node_modules/hasown/index.d.ts new file mode 100644 index 0000000000000..caf4a060e07f4 --- /dev/null +++ b/node_modules/hasown/index.d.ts @@ -0,0 +1,3 @@ +declare const _exports: (o: {}, p: PropertyKey) => p is never; +export = _exports; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/hasown/index.d.ts.map b/node_modules/hasown/index.d.ts.map new file mode 100644 index 0000000000000..d40068a52f667 --- /dev/null +++ b/node_modules/hasown/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"4BAMe,EAAE,KAAK,WAAW"} \ No newline at end of file diff --git a/node_modules/hasown/index.js b/node_modules/hasown/index.js new file mode 100644 index 0000000000000..3b91618323842 --- /dev/null +++ b/node_modules/hasown/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ +module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json new file mode 100644 index 0000000000000..954500640223c --- /dev/null +++ b/node_modules/hasown/package.json @@ -0,0 +1,91 @@ +{ + "name": "hasown", + "version": "2.0.0", + "description": "A robust, ES3 compatible, \"has own property\" predicate.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated && npm run emit-types", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "preemit-types": "rm -f *.ts *.ts.map test/*.ts test/*.ts.map", + "emit-types": "npm run tsc -- --noEmit false --emitDeclarationOnly", + "pretest": "npm run lint", + "tsc": "tsc -p .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/hasOwn.git" + }, + "keywords": [ + "has", + "hasOwnProperty", + "hasOwn", + "has-own", + "own", + "has", + "property", + "in", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/hasOwn/issues" + }, + "homepage": "https://github.com/inspect-js/hasOwn#readme", + "dependencies": { + "function-bind": "^1.1.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/function-bind": "^1.1.9", + "@types/mock-property": "^1.0.1", + "@types/tape": "^5.6.3", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.0.2", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1", + "typescript": "^5.3.0-dev.20231019" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test", + "!*.d.ts", + "!*.d.ts.map" + ] + } +} diff --git a/node_modules/hasown/tsconfig.json b/node_modules/hasown/tsconfig.json new file mode 100644 index 0000000000000..fdab34fe31157 --- /dev/null +++ b/node_modules/hasown/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md new file mode 100644 index 0000000000000..6987fb4aebb57 --- /dev/null +++ b/node_modules/hosted-git-info/CHANGELOG.md @@ -0,0 +1,151 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [2.8.9](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9) (2021-04-07) + + +### Bug Fixes + +* backport regex fix from [#76](https://github.com/npm/hosted-git-info/issues/76) ([29adfe5](https://github.com/npm/hosted-git-info/commit/29adfe5)), closes [#84](https://github.com/npm/hosted-git-info/issues/84) + + + + +## [2.8.8](https://github.com/npm/hosted-git-info/compare/v2.8.7...v2.8.8) (2020-02-29) + + +### Bug Fixes + +* [#61](https://github.com/npm/hosted-git-info/issues/61) & [#65](https://github.com/npm/hosted-git-info/issues/65) addressing issues w/ url.URL implmentation which regressed node 6 support ([5038b18](https://github.com/npm/hosted-git-info/commit/5038b18)), closes [#66](https://github.com/npm/hosted-git-info/issues/66) + + + + +## [2.8.7](https://github.com/npm/hosted-git-info/compare/v2.8.6...v2.8.7) (2020-02-26) + + +### Bug Fixes + +* Do not attempt to use url.URL when unavailable ([2d0bb66](https://github.com/npm/hosted-git-info/commit/2d0bb66)), closes [#61](https://github.com/npm/hosted-git-info/issues/61) [#62](https://github.com/npm/hosted-git-info/issues/62) +* Do not pass scp-style URLs to the WhatWG url.URL ([f2cdfcf](https://github.com/npm/hosted-git-info/commit/f2cdfcf)), closes [#60](https://github.com/npm/hosted-git-info/issues/60) + + + + +## [2.8.6](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.6) (2020-02-25) + + + + +## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07) + + +### Bug Fixes + +* updated pathmatch for gitlab ([e8325b5](https://github.com/npm/hosted-git-info/commit/e8325b5)), closes [#51](https://github.com/npm/hosted-git-info/issues/51) +* updated pathmatch for gitlab ([ffe056f](https://github.com/npm/hosted-git-info/commit/ffe056f)) + + + + +## [2.8.4](https://github.com/npm/hosted-git-info/compare/v2.8.3...v2.8.4) (2019-08-12) + + + + +## [2.8.3](https://github.com/npm/hosted-git-info/compare/v2.8.2...v2.8.3) (2019-08-12) + + + + +## [2.8.2](https://github.com/npm/hosted-git-info/compare/v2.8.1...v2.8.2) (2019-08-05) + + +### Bug Fixes + +* http protocol use sshurl by default ([3b1d629](https://github.com/npm/hosted-git-info/commit/3b1d629)), closes [#48](https://github.com/npm/hosted-git-info/issues/48) + + + + +## [2.8.1](https://github.com/npm/hosted-git-info/compare/v2.8.0...v2.8.1) (2019-08-05) + + +### Bug Fixes + +* ignore noCommittish on tarball url generation ([5d4a8d7](https://github.com/npm/hosted-git-info/commit/5d4a8d7)) +* use gist tarball url that works for anonymous gists ([1692435](https://github.com/npm/hosted-git-info/commit/1692435)) + + + + +# [2.8.0](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.0) (2019-08-05) + + +### Bug Fixes + +* Allow slashes in gitlab project section ([bbcf7b2](https://github.com/npm/hosted-git-info/commit/bbcf7b2)), closes [#46](https://github.com/npm/hosted-git-info/issues/46) [#43](https://github.com/npm/hosted-git-info/issues/43) +* **git-host:** disallow URI-encoded slash (%2F) in `path` ([3776fa5](https://github.com/npm/hosted-git-info/commit/3776fa5)), closes [#44](https://github.com/npm/hosted-git-info/issues/44) +* **gitlab:** Do not URL encode slashes in project name for GitLab https URL ([cbf04f9](https://github.com/npm/hosted-git-info/commit/cbf04f9)), closes [#47](https://github.com/npm/hosted-git-info/issues/47) +* do not allow invalid gist urls ([d5cf830](https://github.com/npm/hosted-git-info/commit/d5cf830)) +* **cache:** Switch to lru-cache to save ourselves from unlimited memory consumption ([e518222](https://github.com/npm/hosted-git-info/commit/e518222)), closes [#38](https://github.com/npm/hosted-git-info/issues/38) + + +### Features + +* give these objects a name ([60abaea](https://github.com/npm/hosted-git-info/commit/60abaea)) + + + + +## [2.7.1](https://github.com/npm/hosted-git-info/compare/v2.7.0...v2.7.1) (2018-07-07) + + +### Bug Fixes + +* **index:** Guard against non-string types ([5bc580d](https://github.com/npm/hosted-git-info/commit/5bc580d)) +* **parse:** Crash on strings that parse to having no host ([c931482](https://github.com/npm/hosted-git-info/commit/c931482)), closes [#35](https://github.com/npm/hosted-git-info/issues/35) + + + + +# [2.7.0](https://github.com/npm/hosted-git-info/compare/v2.6.1...v2.7.0) (2018-07-06) + + +### Bug Fixes + +* **github tarball:** update github tarballtemplate ([6efd582](https://github.com/npm/hosted-git-info/commit/6efd582)), closes [#34](https://github.com/npm/hosted-git-info/issues/34) +* **gitlab docs:** switched to lowercase anchors for readmes ([701bcd1](https://github.com/npm/hosted-git-info/commit/701bcd1)) + + +### Features + +* **all:** Support www. prefixes on hostnames ([3349575](https://github.com/npm/hosted-git-info/commit/3349575)), closes [#32](https://github.com/npm/hosted-git-info/issues/32) + + + + +## [2.6.1](https://github.com/npm/hosted-git-info/compare/v2.6.0...v2.6.1) (2018-06-25) + +### Bug Fixes + +* **Revert:** "compat: remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25))" ([cce5a62](https://github.com/npm/hosted-git-info/commit/cce5a62)) +* **Revert:** "git-host: fix forgotten extend()" ([a815ec9](https://github.com/npm/hosted-git-info/commit/a815ec9)) + + + + +# [2.6.0](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.6.0) (2018-03-07) + + +### Bug Fixes + +* **compat:** remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25)) ([627ab55](https://github.com/npm/hosted-git-info/commit/627ab55)) +* **git-host:** fix forgotten extend() ([eba1f7b](https://github.com/npm/hosted-git-info/commit/eba1f7b)) + + +### Features + +* **browse:** fragment support for browse() ([#28](https://github.com/npm/hosted-git-info/issues/28)) ([cd5e5bb](https://github.com/npm/hosted-git-info/commit/cd5e5bb)) diff --git a/node_modules/hosted-git-info/LICENSE b/node_modules/hosted-git-info/LICENSE new file mode 100644 index 0000000000000..45055763dc838 --- /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 0000000000000..7b723f6b9e213 --- /dev/null +++ b/node_modules/hosted-git-info/README.md @@ -0,0 +1,133 @@ +# 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(path, fragment, opts) + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`, +`https://github.com/npm/hosted-git-info/tree/v1.2.0/package.json`, +`https://github.com/npm/hosted-git-info/tree/v1.2.0/REAMDE.md#supported-hosts` + +* 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 0000000000000..8147e3348f5e8 --- /dev/null +++ b/node_modules/hosted-git-info/git-host-info.js @@ -0,0 +1,79 @@ +'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://codeload.{domain}/{user}/{project}/tar.gz/{committish}' + }, + 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', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}', + 'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/ + }, + gist: { + 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gist.github.com', + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]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}', + 'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}', + 'tarballtemplate': 'https://codeload.github.com/gist/{project}/tar.gz/{committish}', + 'hashformat': function (fragment) { + return 'file-' + formatHashFragment(fragment) + } + } +} + +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}', + 'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}', + '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|[/])?$/, + 'hashformat': formatHashFragment +} + +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('|') + '):$') +}) + +function formatHashFragment (fragment) { + return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') +} 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 0000000000000..9616fbaa6b4af --- /dev/null +++ b/node_modules/hosted-git-info/git-host.js @@ -0,0 +1,156 @@ +'use strict' +var gitHosts = require('./git-host-info.js') +/* eslint-disable node/no-deprecated-api */ + +// copy-pasta util._extend from node's source, to avoid pulling +// the whole util module into peoples' webpack bundles. +/* istanbul ignore next */ +var extend = Object.assign || function _extend (target, source) { + // Don't do anything if source isn't an object + if (source === null || typeof source !== 'object') return target + + var keys = Object.keys(source) + var i = keys.length + while (i--) { + target[keys[i]] = source[keys[i]] + } + return target +} + +module.exports = GitHost +function GitHost (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.hash = function () { + return this.committish ? '#' + this.committish : '' +} + +GitHost.prototype._fill = function (template, opts) { + if (!template) return + var vars = extend({}, opts) + vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : '' + 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 rawcommittish = vars.committish + var rawFragment = vars.fragment + var rawPath = vars.path + var rawProject = vars.project + Object.keys(vars).forEach(function (key) { + var value = vars[key] + if ((key === 'path' || key === 'project') && typeof value === 'string') { + vars[key] = value.split('/').map(function (pathComponent) { + return encodeURIComponent(pathComponent) + }).join('/') + } else { + vars[key] = encodeURIComponent(value) + } + }) + vars['auth@'] = rawAuth ? rawAuth + '@' : '' + vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : '' + vars.fragment = vars.fragment ? vars.fragment : '' + vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : '' + vars['/path'] = vars.path ? '/' + vars.path : '' + vars.projectPath = rawProject.split('/').map(encodeURIComponent).join('/') + if (opts.noCommittish) { + vars['#committish'] = '' + vars['/tree/committish'] = '' + vars['/committish'] = '' + vars.committish = '' + } else { + vars['#committish'] = rawcommittish ? '#' + rawcommittish : '' + 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 (P, F, opts) { + if (typeof P === 'string') { + if (typeof F !== 'string') { + opts = F + F = null + } + return this._fill(this.browsefiletemplate, extend({ + fragment: F, + path: P + }, opts)) + } else { + return this._fill(this.browsetemplate, P) + } +} + +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_) { + var opts = extend({}, opts_, { noCommittish: false }) + return this._fill(this.tarballtemplate, opts) +} + +GitHost.prototype.file = function (P, opts) { + return this._fill(this.filetemplate, extend({ path: P }, opts)) +} + +GitHost.prototype.getDefaultRepresentation = function () { + return this.default +} + +GitHost.prototype.toString = function (opts) { + if (this.default && typeof this[this.default] === 'function') return this[this.default](opts) + return this.sshurl(opts) +} diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js new file mode 100644 index 0000000000000..0885772256362 --- /dev/null +++ b/node_modules/hosted-git-info/index.js @@ -0,0 +1,148 @@ +'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) { + return protocolToRepresentationMap[protocol] || protocol.slice(0, -1) +} + +var authProtocols = { + 'git:': true, + 'https:': true, + 'git+https:': true, + 'http:': true, + 'git+http:': true +} + +var cache = {} + +module.exports.fromUrl = function (giturl, opts) { + if (typeof giturl !== 'string') return + 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(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/) + var matches = Object.keys(gitHosts).map(function (gitHostName) { + try { + var gitHostInfo = gitHosts[gitHostName] + var auth = null + if (parsed.auth && authProtocols[parsed.protocol]) { + auth = 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].replace(/\.git$/, '')) + defaultRepresentation = 'shortcut' + } else { + if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== 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 + /* istanbul ignore else */ + if (matched[1] !== null && matched[1] !== undefined) { + user = decodeURIComponent(matched[1].replace(/^:/, '')) + } + project = decodeURIComponent(matched[2]) + defaultRepresentation = protocolToRepresentation(parsed.protocol) + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) + } catch (ex) { + /* istanbul ignore else */ + if (ex instanceof URIError) { + } else 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) { + var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) + if (!matched) { + var legacy = url.parse(giturl) + // If we don't have url.URL, then sorry, this is just not fixable. + // This affects Node <= 6.12. + if (legacy.auth && typeof url.URL === 'function') { + // git urls can be in the form of scp-style/ssh-connect strings, like + // git+ssh://user@host.com:some/path, which the legacy url parser + // supports, but WhatWG url.URL class does not. However, the legacy + // parser de-urlencodes the username and password, so something like + // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes + // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong. + // Pull off just the auth and host, so we dont' get the confusing + // scp-style URL, then pass that to the WhatWG parser to get the + // auth properly escaped. + var authmatch = giturl.match(/[^@]+@[^:/]+/) + /* istanbul ignore else - this should be impossible */ + if (authmatch) { + var whatwg = new url.URL(authmatch[0]) + legacy.auth = whatwg.username || '' + if (whatwg.password) legacy.auth += ':' + whatwg.password + } + } + return legacy + } + 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 0000000000000..8cc554c3e9608 --- /dev/null +++ b/node_modules/hosted-git-info/package.json @@ -0,0 +1,40 @@ +{ + "name": "hosted-git-info", + "version": "2.8.9", + "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/hosted-git-info.git" + }, + "keywords": [ + "git", + "github", + "bitbucket", + "gitlab" + ], + "author": "Rebecca Turner (http://re-becca.org)", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/hosted-git-info/issues" + }, + "homepage": "https://github.com/npm/hosted-git-info", + "scripts": { + "prerelease": "npm t", + "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", + "posttest": "standard", + "release": "standard-version -s", + "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js", + "test": "tap -J --coverage=90 --no-esm test/*.js" + }, + "devDependencies": { + "standard": "^11.0.1", + "standard-version": "^4.4.0", + "tap": "^12.7.0" + }, + "files": [ + "index.js", + "git-host.js", + "git-host-info.js" + ] +} diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE new file mode 100644 index 0000000000000..dea3013d6710e --- /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 0000000000000..b1c56658557b8 --- /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 0000000000000..f71f2d93294a6 --- /dev/null +++ b/node_modules/inherits/inherits.js @@ -0,0 +1,9 @@ +try { + var util = require('util'); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = require('./inherits_browser.js'); +} diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000000000..86bbb3dc29e48 --- /dev/null +++ b/node_modules/inherits/inherits_browser.js @@ -0,0 +1,27 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json new file mode 100644 index 0000000000000..37b4366b83e63 --- /dev/null +++ b/node_modules/inherits/package.json @@ -0,0 +1,29 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.4", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": "git://github.com/isaacs/inherits", + "license": "ISC", + "scripts": { + "test": "tap" + }, + "devDependencies": { + "tap": "^14.2.4" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ] +} diff --git a/node_modules/internal-slot/.editorconfig b/node_modules/internal-slot/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/internal-slot/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/internal-slot/.eslintrc b/node_modules/internal-slot/.eslintrc new file mode 100644 index 0000000000000..c42d8f2f7751f --- /dev/null +++ b/node_modules/internal-slot/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-params": [2, 3], + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + "no-magic-numbers": 0, + }, +} diff --git a/node_modules/internal-slot/.github/FUNDING.yml b/node_modules/internal-slot/.github/FUNDING.yml new file mode 100644 index 0000000000000..8dc96e28ff568 --- /dev/null +++ b/node_modules/internal-slot/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/internal-slot +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/internal-slot/.nycrc b/node_modules/internal-slot/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/internal-slot/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/internal-slot/CHANGELOG.md b/node_modules/internal-slot/CHANGELOG.md new file mode 100644 index 0000000000000..9bcccfea0b736 --- /dev/null +++ b/node_modules/internal-slot/CHANGELOG.md @@ -0,0 +1,96 @@ +### Changelog + +All notable changes to this project will be documented in this file. Dates are displayed in UTC. + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +#### [v1.0.6](https://github.com/ljharb/internal-slot/compare/v1.0.5...v1.0.6) + +> 20 October 2023 + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`4d568d2`](https://github.com/ljharb/internal-slot/commit/4d568d2897a2efe9b0604ae240bc89787924070f) +- [Refactor] use `hasown` instead of `has` [`f946e94`](https://github.com/ljharb/internal-slot/commit/f946e94885f5fa092a4de04f366d746c0c5a2f2f) +- [Deps] update `get-intrinsic` [`1bbc885`](https://github.com/ljharb/internal-slot/commit/1bbc885b0225dadac6e50f421cda5814c242b0bb) +- [meta] remove unused `.eslintignore` [`6fdde1a`](https://github.com/ljharb/internal-slot/commit/6fdde1a25348cf9fc41c9808d342e6502f37658d) + +#### [v1.0.5](https://github.com/ljharb/internal-slot/compare/v1.0.4...v1.0.5) + +> 9 February 2023 + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`e427703`](https://github.com/ljharb/internal-slot/commit/e427703bfc669c590a863ec77ecd3789d7b7c458) +- [Deps] update `get-intrinsic` [`aa652f0`](https://github.com/ljharb/internal-slot/commit/aa652f05c5c15b4ed1a118be60f0565e47bd7208) +- [Fix] improve assertion message [`8df86e3`](https://github.com/ljharb/internal-slot/commit/8df86e3ea21786b5eb7654f22202665c8b63accf) + +#### [v1.0.4](https://github.com/ljharb/internal-slot/compare/v1.0.3...v1.0.4) + +> 13 December 2022 + +- [actions] reuse common workflows [`82a1aee`](https://github.com/ljharb/internal-slot/commit/82a1aee603bce8627930597edb3a04b4970ed151) +- [meta] use `npmignore` to autogenerate an npmignore file [`56f7e71`](https://github.com/ljharb/internal-slot/commit/56f7e7182dd934dd6c1b80497a110670d02a91b9) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`e25ff67`](https://github.com/ljharb/internal-slot/commit/e25ff67d568f77c1b66168957d82b080779e1c0a) +- [actions] update rebase action to use reusable workflow [`227e81e`](https://github.com/ljharb/internal-slot/commit/227e81eaef7230a265103ef1ef0618d2920c3f30) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `foreach`, `object-inspect`, `tape` [`fc9f319`](https://github.com/ljharb/internal-slot/commit/fc9f319d136ddf2e79910390d1e7ad279d41cc01) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`0a72a0f`](https://github.com/ljharb/internal-slot/commit/0a72a0f389511b41645f441da19257a266cb37f7) +- [actions] update codecov uploader [`e2b993f`](https://github.com/ljharb/internal-slot/commit/e2b993f143278a30424ebd5526019e59828989d0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`8f0ab80`](https://github.com/ljharb/internal-slot/commit/8f0ab808afdd458001c35c828962dc714d824754) +- [actions] update checkout action [`8da4b91`](https://github.com/ljharb/internal-slot/commit/8da4b91c3454671da2e53a831ca0928147965a09) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@safe-publish-latest`, `tape` [`7ab37aa`](https://github.com/ljharb/internal-slot/commit/7ab37aabf01ded2605fa583a9866b62172f82e30) +- [readme] add github actions/codecov badges [`71234be`](https://github.com/ljharb/internal-slot/commit/71234bef4ef99e2f17d72ae3a1b7c0522519b7d7) +- [Fix] `assert`: throw on a nonexistent slot even when an object already has other slots [`12580bd`](https://github.com/ljharb/internal-slot/commit/12580bd26fe9f8603566e9e076092b5e1fb7340b) +- [Tests] use `for-each` instead of `foreach` [`7229df0`](https://github.com/ljharb/internal-slot/commit/7229df01666ccb022dde82686d84b97b7bcfc53a) +- [meta] use `prepublishOnly` script for npm 7+ [`8728872`](https://github.com/ljharb/internal-slot/commit/8728872cfbd735d3ae87e885c081a08d5b26edf0) +- [Deps] update `get-intrinsic` [`1b7088f`](https://github.com/ljharb/internal-slot/commit/1b7088fa970c33757816b08357814bdbf6d722b6) +- [Deps] update `get-intrinsic` [`063621e`](https://github.com/ljharb/internal-slot/commit/063621ec99d1b9262d3898c0ecad0e1e98be5f75) + +#### [v1.0.3](https://github.com/ljharb/internal-slot/compare/v1.0.2...v1.0.3) + +> 26 January 2021 + +- [Tests] use shared travis-ci configs [`0ef2263`](https://github.com/ljharb/internal-slot/commit/0ef22634fa2269d9df0d784aca3c5748e8eabd3b) +- [Tests] migrate tests to Github Actions [`6253915`](https://github.com/ljharb/internal-slot/commit/6253915d28721df2eda5630849bc6b57647e3ee2) +- [meta] do not publish github action workflow files [`ef94e55`](https://github.com/ljharb/internal-slot/commit/ef94e555727ed6a649ef64010904fe89a468d459) +- [Tests] run `nyc` on all tests; use `tape` runner [`917d6ca`](https://github.com/ljharb/internal-slot/commit/917d6ca630cdcd6b4da9a2c300c6a3abb6e724fe) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`8dcb6fe`](https://github.com/ljharb/internal-slot/commit/8dcb6fe01d6a45e1af17a9dace95ca47c99b4328) +- [actions] add "Allow Edits" workflow [`7aa3e86`](https://github.com/ljharb/internal-slot/commit/7aa3e86edb0149fd882717481885760aeb28474e) +- [Refactor] use `get-intrinsic` instead of `es-abstract`; update `side-channel` [`11ad17d`](https://github.com/ljharb/internal-slot/commit/11ad17d4255adcbc55fd4eca0bf6733bac59f1bf) +- [readme] remove travis badge [`5b75452`](https://github.com/ljharb/internal-slot/commit/5b754523aa07e8f67d0135df75059a18047292bb) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`d531688`](https://github.com/ljharb/internal-slot/commit/d5316880956b4dd83e6b6c9ab48fdd8171a4a268) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`c76fa91`](https://github.com/ljharb/internal-slot/commit/c76fa91a7e623a738e22332bee4e985aea41122e) +- [Dev Deps] update `eslint`, `tape` [`e733ccd`](https://github.com/ljharb/internal-slot/commit/e733ccd68e81c72ef2e02726e001895053de7887) +- [Dev Deps] update `auto-changelog`; add `aud` [`df20bf5`](https://github.com/ljharb/internal-slot/commit/df20bf5d3943a533c20799d8cc1449997e85d53b) +- [meta] fix autochangelog [`e89e6f1`](https://github.com/ljharb/internal-slot/commit/e89e6f1ff9f10f386e6400b586db78ad9c0f1309) +- [Tests] only audit prod deps [`71317b9`](https://github.com/ljharb/internal-slot/commit/71317b95ec6bbd9877807da0c0316ee9f5f30fab) +- [Deps] update `es-abstract` [`c17ccf4`](https://github.com/ljharb/internal-slot/commit/c17ccf45f4cb0d3b7a1536e9cd3a7ff9a7dafd21) +- [Dev Deps] update `tape` [`d81ae03`](https://github.com/ljharb/internal-slot/commit/d81ae030a0e8f58cee00f752601ce60405a93d78) +- [Deps] update `es-abstract` [`b56303b`](https://github.com/ljharb/internal-slot/commit/b56303b4c3af7a510f9f51860895a46fd2e14752) +- [Deps] update `es-abstract` [`9996d1c`](https://github.com/ljharb/internal-slot/commit/9996d1cf3507750c7a6845a2fb0d0f849ea898a1) + +#### [v1.0.2](https://github.com/ljharb/internal-slot/compare/v1.0.1...v1.0.2) + +> 20 December 2019 + +- [Deps] update `es-abstract`, `side-channel` [`5c9df03`](https://github.com/ljharb/internal-slot/commit/5c9df03a25518f5c482cff4e1447a26fa071df9a) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7820f98`](https://github.com/ljharb/internal-slot/commit/7820f984e523a64ddf3068c4e5631abf61eb1ea4) + +#### [v1.0.1](https://github.com/ljharb/internal-slot/compare/v1.0.0...v1.0.1) + +> 1 December 2019 + +- [Refactor] use `side-channel` package [`d38639f`](https://github.com/ljharb/internal-slot/commit/d38639f0a3cdb5090711179d0e78df857ecbd5d3) +- [actions] add automatic rebasing / merge commit blocking [`74267e6`](https://github.com/ljharb/internal-slot/commit/74267e6e591e18ba39186cb99139d3fd7a757c9f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest` [`b042eef`](https://github.com/ljharb/internal-slot/commit/b042eefc067b830bbd370833f7f21754e802b0b2) +- [Deps] update `es-abstract` [`98cf4e8`](https://github.com/ljharb/internal-slot/commit/98cf4e86c1bfe99eda7b11a8ea70394368f33e4f) + +#### v1.0.0 + +> 20 October 2019 + +- Tests [`b50fa41`](https://github.com/ljharb/internal-slot/commit/b50fa41b6f47aba39ac4cb733658580974a0b00a) +- implementation [`c5a59f3`](https://github.com/ljharb/internal-slot/commit/c5a59f3753677f81aa12a0226d3b1187846d06dd) +- Initial commit [`15ebe4d`](https://github.com/ljharb/internal-slot/commit/15ebe4dc6d46885f67969d64c9c3e705780963f8) +- readme [`382a3f5`](https://github.com/ljharb/internal-slot/commit/382a3f53d8975e6488373a0fc2abcdc7c4c44247) +- npm init [`d5e7c97`](https://github.com/ljharb/internal-slot/commit/d5e7c977ef694e89c245fd11165f63c06a7a5040) +- [meta] add FUNDING.yml [`685b608`](https://github.com/ljharb/internal-slot/commit/685b6087613f6735f4411a558500d92f8a3ec3f2) +- [meta] add `auto-changelog`, `safe-publish-latest` [`f8fdf1c`](https://github.com/ljharb/internal-slot/commit/f8fdf1c3f0c592f71746da6d7f8bea18f8946dda) +- [Tests] add `npm run lint` [`baaaa09`](https://github.com/ljharb/internal-slot/commit/baaaa09ab6e5bc5fcc0e7c76e10c55aa18f4ca7e) +- Only apps should have lockfiles [`dfa7efa`](https://github.com/ljharb/internal-slot/commit/dfa7efa3d5cd23261cb75c2adab6ee3c06790fee) diff --git a/node_modules/internal-slot/LICENSE b/node_modules/internal-slot/LICENSE new file mode 100644 index 0000000000000..3900dd7e2ffe6 --- /dev/null +++ b/node_modules/internal-slot/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/internal-slot/README.md b/node_modules/internal-slot/README.md new file mode 100644 index 0000000000000..73d9852e5bc89 --- /dev/null +++ b/node_modules/internal-slot/README.md @@ -0,0 +1,58 @@ +# internal-slot [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Truly private storage, akin to the JS spec’s concept of internal slots. + +Uses a WeakMap when available; a Map when not; and a regular object in even older engines. Performance and garbage collection behavior will reflect the environment’s capabilities accordingly. + +## Example + +```js +var SLOT = require('internal-slot'); +var assert = require('assert'); + +var o = {}; + +assert.throws(function () { SLOT.assert(o, 'foo'); }); + +assert.equal(SLOT.has(o, 'foo'), false); +assert.equal(SLOT.get(o, 'foo'), undefined); + +SLOT.set(o, 'foo', 42); + +assert.equal(SLOT.has(o, 'foo'), true); +assert.equal(SLOT.get(o, 'foo'), 42); + +assert.doesNotThrow(function () { SLOT.assert(o, 'foo'); }); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/internal-slot +[npm-version-svg]: https://versionbadg.es/ljharb/internal-slot.svg +[deps-svg]: https://david-dm.org/ljharb/internal-slot.svg +[deps-url]: https://david-dm.org/ljharb/internal-slot +[dev-deps-svg]: https://david-dm.org/ljharb/internal-slot/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/internal-slot#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/internal-slot.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/internal-slot.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/internal-slot.svg +[downloads-url]: https://npm-stat.com/charts.html?package=internal-slot +[codecov-image]: https://codecov.io/gh/ljharb/internal-slot/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/internal-slot/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/internal-slot +[actions-url]: https://github.com/ljharb/internal-slot/actions diff --git a/node_modules/internal-slot/index.js b/node_modules/internal-slot/index.js new file mode 100644 index 0000000000000..5d14408e9accd --- /dev/null +++ b/node_modules/internal-slot/index.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var hasOwn = require('hasown'); +var channel = require('side-channel')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SLOT = { + assert: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + channel.assert(O); + if (!SLOT.has(O, slot)) { + throw new $TypeError('`' + slot + '` is not present on `O`'); + } + }, + get: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + return slots && slots['$' + slot]; + }, + has: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + return !!slots && hasOwn(slots, '$' + slot); + }, + set: function (O, slot, V) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + if (!slots) { + slots = {}; + channel.set(O, slots); + } + slots['$' + slot] = V; + } +}; + +if (Object.freeze) { + Object.freeze(SLOT); +} + +module.exports = SLOT; diff --git a/node_modules/internal-slot/package.json b/node_modules/internal-slot/package.json new file mode 100644 index 0000000000000..6e41be8558612 --- /dev/null +++ b/node_modules/internal-slot/package.json @@ -0,0 +1,71 @@ +{ + "name": "internal-slot", + "version": "1.0.6", + "description": "ES spec-like internal slots", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "pretest": "npm run lint", + "lint": "eslint .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/internal-slot.git" + }, + "keywords": [ + "internal", + "slot", + "internal slot", + "ecmascript", + "es", + "spec", + "private", + "data", + "private data", + "weakmap" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/internal-slot/issues" + }, + "homepage": "https://github.com/ljharb/internal-slot#readme", + "engines": { + "node": ">= 0.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "dependencies": { + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/internal-slot/test/index.js b/node_modules/internal-slot/test/index.js new file mode 100644 index 0000000000000..d1db994ae7a58 --- /dev/null +++ b/node_modules/internal-slot/test/index.js @@ -0,0 +1,121 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); + +var SLOT = require('../'); + +test('assert', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.assert(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.assert({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + t['throws']( + function () { SLOT.assert({}, 'whatever'); }, + TypeError, + 'nonexistent slot throws' + ); + + var o = {}; + SLOT.set(o, 'x'); + t.doesNotThrow(function () { SLOT.assert(o, 'x'); }, 'existent slot noops'); + t['throws'](function () { SLOT.assert(o, 'y'); }, 'thing with a slot throws on a nonexistent slot'); + + t.end(); +}); + +test('has', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.has(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.has({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = {}; + + t.equal(SLOT.has(o, 'nonexistent'), false, 'nonexistent slot yields false'); + + SLOT.set(o, 'foo'); + t.equal(SLOT.has(o, 'foo'), true, 'existent slot yields true'); + + t.end(); +}); + +test('get', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.get(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.get({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = {}; + t.equal(SLOT.get(o, 'nonexistent'), undefined, 'nonexistent slot is undefined'); + + var v = {}; + SLOT.set(o, 'f', v); + t.equal(SLOT.get(o, 'f'), v, '"get" retrieves value set by "set"'); + + t.end(); +}); + +test('set', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.set(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.set({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = function () {}; + t.equal(SLOT.get(o, 'f'), undefined, 'slot not set'); + + SLOT.set(o, 'f', 42); + t.equal(SLOT.get(o, 'f'), 42, 'slot was set'); + + SLOT.set(o, 'f', Infinity); + t.equal(SLOT.get(o, 'f'), Infinity, 'slot was set again'); + + t.end(); +}); diff --git a/node_modules/is-accessor-descriptor/.editorconfig b/node_modules/is-accessor-descriptor/.editorconfig new file mode 100644 index 0000000000000..449f0da4c1605 --- /dev/null +++ b/node_modules/is-accessor-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/is-accessor-descriptor/.eslintrc b/node_modules/is-accessor-descriptor/.eslintrc new file mode 100644 index 0000000000000..1b155fcd2f777 --- /dev/null +++ b/node_modules/is-accessor-descriptor/.eslintrc @@ -0,0 +1,23 @@ +{ + "root": true, + + "extends": "@ljharb", + + "overrides": [ + { + "files": "index.js", + "rules": { + "complexity": "off", + "no-param-reassign": "warn", + }, + }, + { + "files": "test/**/*.js", + "rules": { + "id-length": "off", + "getter-return": "off", + "max-lines-per-function": "warn", + }, + }, + ], +} diff --git a/node_modules/is-accessor-descriptor/.github/FUNDING.yml b/node_modules/is-accessor-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000000000..25f4ee9ef5959 --- /dev/null +++ b/node_modules/is-accessor-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-accessor-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-accessor-descriptor/.nycrc b/node_modules/is-accessor-descriptor/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-accessor-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-accessor-descriptor/CHANGELOG.md b/node_modules/is-accessor-descriptor/CHANGELOG.md new file mode 100644 index 0000000000000..be5b184d8054f --- /dev/null +++ b/node_modules/is-accessor-descriptor/CHANGELOG.md @@ -0,0 +1,125 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.0.3](https://github.com/inspect-js/is-accessor-descriptor/compare/v3.0.2...v3.0.3) - 2023-10-25 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `has-property-descriptors`, `tape` [`908044d`](https://github.com/inspect-js/is-accessor-descriptor/commit/908044d05559496cddf61b8f634641e879305f24) +- [Refactor] use `hasown` [`8b94cc1`](https://github.com/inspect-js/is-accessor-descriptor/commit/8b94cc153ba580143fe27bab0437199e873e58e3) + +## [v3.0.2](https://github.com/inspect-js/is-accessor-descriptor/compare/v3.0.1...v3.0.2) - 2023-04-27 + +### Commits + +- [eslint] cleanup [`c0a3a34`](https://github.com/inspect-js/is-accessor-descriptor/commit/c0a3a34eabaed6634dd674600df2c647688d3a31) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`a45de10`](https://github.com/inspect-js/is-accessor-descriptor/commit/a45de10c8020a350df860c2c4fe7697a74cdb943) +- [readme] clean up docs, URLs, package.json, etc [`d2f3547`](https://github.com/inspect-js/is-accessor-descriptor/commit/d2f354741f4fecc8c0e1ed6a83d351028a2ce2ba) +- [New] increase support from node 6 down to node 0.4 [`825f88e`](https://github.com/inspect-js/is-accessor-descriptor/commit/825f88e69da75476b638e9879296a37d370ce9fd) +- [Tests] convert from mocha to tape [`072d097`](https://github.com/inspect-js/is-accessor-descriptor/commit/072d097f5bbe1d6383ec38c13bbe67b491c0c671) +- [Docs] remove `verb` [`7567b54`](https://github.com/inspect-js/is-accessor-descriptor/commit/7567b54961b87af9ae890584089f5f29f19d8537) +- [Tests] use `has-property-descriptors` to skip true getter tests in older engines [`0e26d80`](https://github.com/inspect-js/is-accessor-descriptor/commit/0e26d806b7f97e23f287eac39bb352e772ac3f3b) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`3962d00`](https://github.com/inspect-js/is-accessor-descriptor/commit/3962d006fbe65dce0bc0847e278af142829057cb) +- [Tests] add coverage [`6337da4`](https://github.com/inspect-js/is-accessor-descriptor/commit/6337da417af127694412e5f18ba853f47b9a4270) +- [meta] switch from `files` field to npmignore; add `exports` [`6e870be`](https://github.com/inspect-js/is-accessor-descriptor/commit/6e870be859d17221b11b8c9f2fcb3e8a1e649598) + +## [v3.0.1](https://github.com/inspect-js/is-accessor-descriptor/compare/v3.0.0...v3.0.1) - 2018-12-13 + +### Commits + +- cleanup readme [`5cce1d2`](https://github.com/inspect-js/is-accessor-descriptor/commit/5cce1d212f887f9b4afe2b29dd95d657e1ea210c) +- remove unnecessary check [`288d4b9`](https://github.com/inspect-js/is-accessor-descriptor/commit/288d4b9f407bd7a01a606456ac40b7c29d7fd407) + +## [v3.0.0](https://github.com/inspect-js/is-accessor-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`d01d897`](https://github.com/inspect-js/is-accessor-descriptor/commit/d01d897175f09d3fb285a6bb22e4eb46a46a6045) + +## [v2.0.0](https://github.com/inspect-js/is-accessor-descriptor/compare/v1.0.1...v2.0.0) - 2017-12-04 + +### Commits + +- refactor to be stricter [`f7370ef`](https://github.com/inspect-js/is-accessor-descriptor/commit/f7370efe312e338c7f3175d76b973bdd838d0d27) +- update docs [`fd1764c`](https://github.com/inspect-js/is-accessor-descriptor/commit/fd1764c14dc6bfba668cb502dad57e5e03855ecf) + +## [v1.0.1](https://github.com/inspect-js/is-accessor-descriptor/compare/v1.0.0...v1.0.1) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`a05c057`](https://github.com/inspect-js/is-accessor-descriptor/commit/a05c0576662de977798bcba0ffa037a1ffdb9f68) +- [readme] clean up docs, URLs, package.json, etc [`6648dcd`](https://github.com/inspect-js/is-accessor-descriptor/commit/6648dcde8c01fcb36f7d6aaa3f70e3563df54b67) +- [meta] update `.gitignore` [`cba0ea0`](https://github.com/inspect-js/is-accessor-descriptor/commit/cba0ea006594dd4583ba671c1643a1e96aaab7ff) +- [readme] remove verb [`2f07da4`](https://github.com/inspect-js/is-accessor-descriptor/commit/2f07da493d0c824b5738675999ea4a3db541c84e) +- [Tests] switch to tape [`7e39202`](https://github.com/inspect-js/is-accessor-descriptor/commit/7e392020781a23f4c1276e78da4bf8a798021d85) +- [Tests] migrate from travis to github actions [`aa436b0`](https://github.com/inspect-js/is-accessor-descriptor/commit/aa436b0bbeb03c1281e816445e4d495e582274c7) +- [Fix] properly handle an accessor descriptor with only a setter [`04647f4`](https://github.com/inspect-js/is-accessor-descriptor/commit/04647f45870a2d3a78e2ae8adf07b0e9d47e0fc9) +- [Refactor] properly guard for-in loop [`a0454cc`](https://github.com/inspect-js/is-accessor-descriptor/commit/a0454cca3ea0610c8cf5e0b70bd581689ded929a) +- [Fix] allow any non-primitive; arrays and functions are objects too [`123e3c3`](https://github.com/inspect-js/is-accessor-descriptor/commit/123e3c3da341a1a397e274805df88ed13646442f) +- [Refactor] use `hasown` [`7ad36a0`](https://github.com/inspect-js/is-accessor-descriptor/commit/7ad36a05be98c7f0ae3f4dc9b3a3df1fa392c7fd) +- [readme] fix incorrect example [`3ee754a`](https://github.com/inspect-js/is-accessor-descriptor/commit/3ee754af6cb65c690ccd9ade150b33e8ec2808f8) +- [Tests] move tests to test dir [`5d70880`](https://github.com/inspect-js/is-accessor-descriptor/commit/5d70880ae2256d1f5927dab02c0bf8fe78cafef3) +- [Dev Deps] add missing `npmignore` [`97ce4bc`](https://github.com/inspect-js/is-accessor-descriptor/commit/97ce4bca878e775672e3d7349906bd7fc7db5f24) +- [Robustness] use a null object just in case [`675af5b`](https://github.com/inspect-js/is-accessor-descriptor/commit/675af5b191ebe9e18fb65c0aecb2a5ae65a535e0) + +## [v1.0.0](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.6...v1.0.0) - 2017-11-01 + +### Merged + +- Pin mocha to version 3 to support Node 0.12 [`#3`](https://github.com/inspect-js/is-accessor-descriptor/pull/3) +- Update kind-of to version 6.0 [`#2`](https://github.com/inspect-js/is-accessor-descriptor/pull/2) + +### Commits + +- run update [`2489800`](https://github.com/inspect-js/is-accessor-descriptor/commit/2489800869cbecf53e9bc3596916abf2e6008edb) +- run verb to generate readme documentation [`22b0a26`](https://github.com/inspect-js/is-accessor-descriptor/commit/22b0a2617ccbebd131247c29e3700ca860d37d06) +- remove should [`4b10d2a`](https://github.com/inspect-js/is-accessor-descriptor/commit/4b10d2aa721021d5f7af69c47f49a1691a8c3fcd) + +## [v0.1.6](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.5...v0.1.6) - 2015-12-28 + +### Commits + +- update docs [`914d85d`](https://github.com/inspect-js/is-accessor-descriptor/commit/914d85d44b914b8b693889081942bf95ea172914) +- update related projects [`92679ea`](https://github.com/inspect-js/is-accessor-descriptor/commit/92679eab1c0eb16eef052218e309aa55b10ce606) + +## [v0.1.5](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.4...v0.1.5) - 2015-12-28 + +### Commits + +- run update [`139251c`](https://github.com/inspect-js/is-accessor-descriptor/commit/139251c5225d7cdc2b6d16e5c6c713b515643ce8) +- improve checks for valid/invalid properties [`de1be1e`](https://github.com/inspect-js/is-accessor-descriptor/commit/de1be1e6250ca2f084f5d0ac43fed8dd4f607376) +- use verb layout, add verb plugin for formatting markdown [`2324242`](https://github.com/inspect-js/is-accessor-descriptor/commit/23242429e18e6f518318cf1568ec53c636bc1085) +- run verb to generate readme [`84587a4`](https://github.com/inspect-js/is-accessor-descriptor/commit/84587a4269640683049cb06aa75ae9e33165b5fe) + +## [v0.1.4](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-20 + +### Commits + +- lint [`d076464`](https://github.com/inspect-js/is-accessor-descriptor/commit/d0764648b3428e7f01303ea7835e25be9d1b5c21) +- generate docs [`12e2143`](https://github.com/inspect-js/is-accessor-descriptor/commit/12e2143ca3d93ece7ae73ee3fcbdb8952d7c5091) + +## [v0.1.3](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.2...v0.1.3) - 2015-10-04 + +### Commits + +- files prop [`0bcef73`](https://github.com/inspect-js/is-accessor-descriptor/commit/0bcef73f2c7c90be7e05f3dd56f02fbe67790897) + +## [v0.1.2](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- lazy-cache [`fc6da15`](https://github.com/inspect-js/is-accessor-descriptor/commit/fc6da15ecef4a18c20f102a412d596407bb86a5c) +- update docs [`943c0cd`](https://github.com/inspect-js/is-accessor-descriptor/commit/943c0cd4d709eff029fa3880560aec27c0d0f458) + +## v0.1.1 - 2015-08-31 + +### Commits + +- first commit [`dca2279`](https://github.com/inspect-js/is-accessor-descriptor/commit/dca22793793cf208e65d8daee9d949d76252b647) +- 0.1.1 readme [`27c92b6`](https://github.com/inspect-js/is-accessor-descriptor/commit/27c92b65b85b9bfb39945d646f223cbfd262ab41) +- 0.1.1 docs [`09beed6`](https://github.com/inspect-js/is-accessor-descriptor/commit/09beed68a3c5a5ea76128d5faf2933848181750d) +- lint [`aa03d9b`](https://github.com/inspect-js/is-accessor-descriptor/commit/aa03d9ba1e65e2e71be0add9de75d25cc981e9e2) diff --git a/node_modules/is-accessor-descriptor/LICENSE b/node_modules/is-accessor-descriptor/LICENSE new file mode 100644 index 0000000000000..e33d14b754e8c --- /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 0000000000000..dde6c0033a4bf --- /dev/null +++ b/node_modules/is-accessor-descriptor/README.md @@ -0,0 +1,98 @@ +# is-accessor-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. + +## Examples + +```js +var isAccessor = require('is-accessor-descriptor'); +var assert = require('assert'); + +assert.equal(isAccessor({ get: function() {} }), true); +``` + +You may also pass an object and property name to check if the property is an accessor: + +```js +assert.equal(isAccessor({ bar: {} }, 'bar'), true); +``` + +## Examples + +`false` when not an object + +```js +assert.equal(isAccessor('a'), false); +assert.equal(isAccessor(null), false); +``` + +`true` when the object has valid properties + +and the properties all have the correct JavaScript types: + +```js +assert.equal(isAccessor({ get() {}, set() {} }), true); +assert.equal(isAccessor({ get() {} }), true); +assert.equal(isAccessor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isAccessor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isAccessor({ get() {}, writable: true }), false); +assert.equal(isAccessor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +isAccessor({ get() {}, set: 'baz' }); +isAccessor({ get: 'foo', set() {} }); +isAccessor({ get: 'foo', bar: 'baz' }); +isAccessor({ get: 'foo', set: 'baz' }); +//=> false +``` + +`false` when a value is not the correct type + +```js +isAccessor({ get() {}, set() {}, enumerable: 'foo' }); +isAccessor({ set() {}, configurable: 'foo' }); +isAccessor({ get() {}, configurable: 'foo' }); +//=> false +``` + +### Related projects + +You might also be interested in these projects: + +* [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. +* [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/inspect-js/is-descriptor) +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-accessor-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-accessor-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-accessor-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-accessor-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-accessor-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-accessor-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-accessor-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-accessor-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-accessor-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-accessor-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-accessor-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-accessor-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-accessor-descriptor +[actions-url]: https://github.com/inspect-js/is-accessor-descriptor/actions diff --git a/node_modules/is-accessor-descriptor/index.js b/node_modules/is-accessor-descriptor/index.js new file mode 100644 index 0000000000000..64e46d55f43ef --- /dev/null +++ b/node_modules/is-accessor-descriptor/index.js @@ -0,0 +1,50 @@ +'use strict'; + +var hasOwn = require('hasown'); + +// accessor descriptor properties +var accessor = { + __proto__: null, + configurable: 'boolean', + enumerable: 'boolean', + get: 'function', + set: 'function' +}; + +module.exports = function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!obj || typeof obj !== 'object') { + return false; + } + + if (hasOwn(obj, 'value') || hasOwn(obj, 'writable')) { + return false; + } + + // one of them must be a function + if ( + (!hasOwn(obj, 'get') || typeof obj.get !== 'function') + && (!hasOwn(obj, 'set') || typeof obj.set !== 'function') + ) { + return false; + } + + // both of them must be a function or undefined + if ( + (hasOwn(obj, 'get') && typeof obj.get !== 'function' && typeof obj.get !== 'undefined') + || (hasOwn(obj, 'set') && typeof obj.set !== 'function' && typeof obj.set !== 'undefined') + ) { + return false; + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (hasOwn(obj, key) && hasOwn(accessor, key) && typeof obj[key] !== accessor[key] && typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +}; diff --git a/node_modules/is-accessor-descriptor/package.json b/node_modules/is-accessor-descriptor/package.json new file mode 100644 index 0000000000000..ec2433e01be74 --- /dev/null +++ b/node_modules/is-accessor-descriptor/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-accessor-descriptor", + "version": "1.0.1", + "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-accessor-descriptor.git" + }, + "keywords": [ + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-accessor-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-accessor-descriptor", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "dependencies": { + "hasown": "^2.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.10" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-accessor-descriptor/test/index.js b/node_modules/is-accessor-descriptor/test/index.js new file mode 100644 index 0000000000000..a07b019079cad --- /dev/null +++ b/node_modules/is-accessor-descriptor/test/index.js @@ -0,0 +1,62 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('value type', function (st) { + st.notOk(isDescriptor('a'), 'string is not a descriptor'); + st.notOk(isDescriptor(null), 'null is not a descriptor'); + st.notOk(isDescriptor([]), 'Array is not a descriptor'); + + st.end(); + }); + + t.test('is false when the object has data descriptor properties:', function (st) { + st.notOk(isDescriptor({ get: noop, writable: true })); + st.notOk(isDescriptor({ get: noop, value: true })); + + st.end(); + }); + + t.test('is not false when unrecognized properties are defined:', function (st) { + st.ok(isDescriptor({ get: noop, foo: true })); + st.ok(isDescriptor({ get: noop, bar: true })); + + st.end(); + }); + + t.test('is false when a get or set are not functions:', function (st) { + st.notOk(isDescriptor({ get: noop, set: 'baz' })); + st.notOk(isDescriptor({ get: 'foo', set: noop })); + st.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + st.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + st.notOk(isDescriptor({ get: 'foo' })); + + st.end(); + }); + + t.test('is true when "get" is not defined:', function (st) { + st.ok(isDescriptor({ set: noop })); + + st.end(); + }); + + t.test('is true when the object has valid properties:', function (st) { + st.ok(isDescriptor({ get: noop, set: noop })); + st.ok(isDescriptor({ get: noop })); + + st.end(); + }); + + t.test('is false when a value is not the correct type:', function (st) { + st.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + st.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + st.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-array-buffer/.eslintrc b/node_modules/is-array-buffer/.eslintrc new file mode 100644 index 0000000000000..46f3b120b8724 --- /dev/null +++ b/node_modules/is-array-buffer/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/is-array-buffer/.github/FUNDING.yml b/node_modules/is-array-buffer/.github/FUNDING.yml new file mode 100644 index 0000000000000..61d7d6ce568c7 --- /dev/null +++ b/node_modules/is-array-buffer/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-array-buffer +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-array-buffer/.nycrc b/node_modules/is-array-buffer/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-array-buffer/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-array-buffer/CHANGELOG.md b/node_modules/is-array-buffer/CHANGELOG.md new file mode 100644 index 0000000000000..0c84af712b616 --- /dev/null +++ b/node_modules/is-array-buffer/CHANGELOG.md @@ -0,0 +1,58 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.0.2](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.1...v3.0.2) - 2023-03-01 + +### Commits + +- [Fix] `node` 0.8: an object arg to a TA only throws a RangeError when it is an ArrayBuffer of an incompatible byte length [`d5108f6`](https://github.com/fengyuanchen/is-array-buffer/commit/d5108f6d06245e616b6c563995f214a38732243c) +- [Dev Deps] update `object-inspect`, `tape` [`400f456`](https://github.com/fengyuanchen/is-array-buffer/commit/400f4563ccbe27c7fbb485665352c76210bba9cb) +- [Deps] update `get-intrinsic` [`133732e`](https://github.com/fengyuanchen/is-array-buffer/commit/133732ec88f8dded1c705b758badc2240077a6d8) + +## [v3.0.1](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.0...v3.0.1) - 2023-01-05 + +### Commits + +- [Fix] in node 0.8, TAs do not coerce Uint8Arrays to an ArrayBuffer properly [`e488763`](https://github.com/fengyuanchen/is-array-buffer/commit/e48876346f446825dad619e55dcc830ed93f2853) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8eebfa2`](https://github.com/fengyuanchen/is-array-buffer/commit/8eebfa21881f3a9fa5094f8c486f00e496658ea9) + +## [v3.0.0](https://github.com/fengyuanchen/is-array-buffer/compare/v2.0.0...v3.0.0) - 2023-01-04 + +### Commits + +- [Breaking] replace package implementation [`b65f929`](https://github.com/fengyuanchen/is-array-buffer/commit/b65f929d856d2a42f043be0f5a0fc2e067370ed1) +- Initial implementation, tests, readme [`06afa73`](https://github.com/fengyuanchen/is-array-buffer/commit/06afa73e775960802ea9257cc6b4cdf768c72d3f) +- Initial commit [`051813f`](https://github.com/fengyuanchen/is-array-buffer/commit/051813f15e3cbf515e2447306761dd9c42819150) +- npm init [`946d3de`](https://github.com/fengyuanchen/is-array-buffer/commit/946d3de82b15471fb2c00a4a2a5a52eb0515eb04) +- [meta] use `npmignore` to autogenerate an npmignore file [`ca4c446`](https://github.com/fengyuanchen/is-array-buffer/commit/ca4c446f37daf5ab8cc590f2194574c2706561ed) +- Only apps should have lockfiles [`be7d8eb`](https://github.com/fengyuanchen/is-array-buffer/commit/be7d8eb09dc5033c04df85d7ba9a8714f4e54357) +- docs: fix badge link [`9ea7fb6`](https://github.com/fengyuanchen/is-array-buffer/commit/9ea7fb638e79f8938161b3b7370cb965d8e93a8b) + + + +## 2.0.0 (Feb 12, 2021) + +- Refactor in TypeScript. +- Drop the `dist` directory. +- Drop the UMD bundled file. +- Add a declaration file for TypeScript. + +## 1.0.1 (Apr 1, 2018) + +- Improve code style. + +## 1.0.0 (Jul 25, 2017) + +- Supports UMD, CommonJS and ES Module. + +## 0.1.0 (Nov 28, 2015) + +- Check if ArrayBuffer is defined first. + +## 0.0.1 (Nov 11, 2015) + +- Initial release. diff --git a/node_modules/is-array-buffer/LICENSE b/node_modules/is-array-buffer/LICENSE new file mode 100644 index 0000000000000..a9b309c224b7b --- /dev/null +++ b/node_modules/is-array-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2015 Chen Gengyuan, Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-array-buffer/README.md b/node_modules/is-array-buffer/README.md new file mode 100644 index 0000000000000..7b0292f6d40ba --- /dev/null +++ b/node_modules/is-array-buffer/README.md @@ -0,0 +1,56 @@ +# is-array-buffer [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS ArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var assert = require('assert'); +var isArrayBuffer = require('is-array-buffer'); + +assert(!isArrayBuffer(function () {})); +assert(!isArrayBuffer(null)); +assert(!isArrayBuffer(function* () { yield 42; return Infinity; }); +assert(!isArrayBuffer(Symbol('foo'))); +assert(!isArrayBuffer(1n)); +assert(!isArrayBuffer(Object(1n))); + +assert(!isArrayBuffer(new Set())); +assert(!isArrayBuffer(new WeakSet())); +assert(!isArrayBuffer(new Map())); +assert(!isArrayBuffer(new WeakMap())); +assert(!isArrayBuffer(new WeakRef({}))); +assert(!isArrayBuffer(new FinalizationRegistry(() => {}))); +assert(!isArrayBuffer(new SharedArrayBuffer())); + +assert(isArrayBuffer(new ArrayBuffer())); + +class MyArrayBuffer extends ArrayBuffer {} +assert(isArrayBuffer(new MyArrayBuffer())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-array-buffer +[npm-version-svg]: https://versionbadg.es/inspect-js/is-array-buffer.svg +[deps-svg]: https://david-dm.org/inspect-js/is-array-buffer.svg +[deps-url]: https://david-dm.org/inspect-js/is-array-buffer +[dev-deps-svg]: https://david-dm.org/inspect-js/is-array-buffer/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-array-buffer#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-array-buffer.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-array-buffer.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-array-buffer.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-array-buffer +[codecov-image]: https://codecov.io/gh/inspect-js/is-array-buffer/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-array-buffer/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-array-buffer +[actions-url]: https://github.com/inspect-js/is-array-buffer/actions diff --git a/node_modules/is-array-buffer/index.js b/node_modules/is-array-buffer/index.js new file mode 100644 index 0000000000000..7674285eee05c --- /dev/null +++ b/node_modules/is-array-buffer/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var callBind = require('call-bind'); +var callBound = require('call-bind/callBound'); +var GetIntrinsic = require('get-intrinsic'); +var isTypedArray = require('is-typed-array'); + +var $ArrayBuffer = GetIntrinsic('ArrayBuffer', true); +var $Float32Array = GetIntrinsic('Float32Array', true); +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); + +// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method +var abSlice = $ArrayBuffer && !$byteLength && new $ArrayBuffer().slice; +var $abSlice = abSlice && callBind(abSlice); + +module.exports = $byteLength || $abSlice + ? function isArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + if ($byteLength) { + $byteLength(obj); + } else { + $abSlice(obj, 0); + } + return true; + } catch (e) { + return false; + } + } + : $Float32Array + // in node 0.8, ArrayBuffers have no prototype or own methods + ? function IsArrayBuffer(obj) { + try { + return (new $Float32Array(obj)).buffer === obj && !isTypedArray(obj); + } catch (e) { + return typeof obj === 'object' && e.name === 'RangeError'; + } + } + : function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; diff --git a/node_modules/is-array-buffer/package.json b/node_modules/is-array-buffer/package.json new file mode 100644 index 0000000000000..6b1f125750fb1 --- /dev/null +++ b/node_modules/is-array-buffer/package.json @@ -0,0 +1,78 @@ +{ + "name": "is-array-buffer", + "version": "3.0.2", + "description": "Is this value a JS ArrayBuffer?", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only --", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-array-buffer.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "is", + "arraybuffer", + "array", + "buffer" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-array-buffer/issues" + }, + "homepage": "https://github.com/inspect-js/is-array-buffer#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.1", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.5", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "2.0.1" + }, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-array-buffer/test/index.js b/node_modules/is-array-buffer/test/index.js new file mode 100644 index 0000000000000..7ddf9d72fc737 --- /dev/null +++ b/node_modules/is-array-buffer/test/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); +var availableTypedArrays = require('available-typed-arrays')(); + +var isArrayBuffer = require('..'); + +test('isArrayBuffer', function (t) { + t.equal(typeof isArrayBuffer, 'function', 'is a function'); + + var nonABs = v.primitives.concat( + v.objects, + typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer() : [] + ); + forEach(nonABs, function (nonAB) { + t.equal(isArrayBuffer(nonAB), false, inspect(nonAB) + ' is not an ArrayBuffer'); + }); + + t.test('actual ArrayBuffer instances', { skip: typeof ArrayBuffer === 'undefined' }, function (st) { + var ab = new ArrayBuffer(); + st.equal(isArrayBuffer(ab), true, inspect(ab) + ' is an ArrayBuffer'); + + var ab42 = new ArrayBuffer(42); + st.equal(isArrayBuffer(ab42), true, inspect(ab42) + ' is an ArrayBuffer'); + + st.end(); + }); + + t.test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (st) { + forEach(availableTypedArrays, function (TypedArray) { + var ta = new global[TypedArray](0); + st.equal(isArrayBuffer(ta.buffer), true, inspect(ta.buffer) + ', the TA\'s buffer, is an ArrayBuffer'); + st.equal(isArrayBuffer(ta), false, inspect(ta) + ' is not an ArrayBuffer'); + }); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-arrayish/.editorconfig b/node_modules/is-arrayish/.editorconfig new file mode 100644 index 0000000000000..4c017f8ad2149 --- /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 0000000000000..19fbec32b851d --- /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 0000000000000..8d5eacb3ef6d5 --- /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 0000000000000..5a0424350edc7 --- /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 0000000000000..0a5f461a69303 --- /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 0000000000000..7d360724c0151 --- /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 0000000000000..5b971868b6668 --- /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 0000000000000..8b2d1c3083fdd --- /dev/null +++ b/node_modules/is-arrayish/package.json @@ -0,0 +1,34 @@ +{ + "name": "is-arrayish", + "description": "Determines if an object can be used as an array", + "version": "0.2.1", + "author": "Qix (http://github.com/qix-)", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "repository": { + "type": "git", + "url": "https://github.com/qix-/node-is-arrayish.git" + }, + "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" + } +} diff --git a/node_modules/is-bigint/.eslintignore b/node_modules/is-bigint/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-bigint/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-bigint/.eslintrc b/node_modules/is-bigint/.eslintrc new file mode 100644 index 0000000000000..1283fcf6ee440 --- /dev/null +++ b/node_modules/is-bigint/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], + "operator-linebreak": [2, "before"], + }, +} diff --git a/node_modules/is-bigint/.github/FUNDING.yml b/node_modules/is-bigint/.github/FUNDING.yml new file mode 100644 index 0000000000000..59d03ba7df819 --- /dev/null +++ b/node_modules/is-bigint/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-bigint +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-bigint/.nycrc b/node_modules/is-bigint/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-bigint/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-bigint/CHANGELOG.md b/node_modules/is-bigint/CHANGELOG.md new file mode 100644 index 0000000000000..c1b0271ef8dc5 --- /dev/null +++ b/node_modules/is-bigint/CHANGELOG.md @@ -0,0 +1,71 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/inspect-js/is-bigint/compare/v1.0.3...v1.0.4) - 2021-08-11 + +### Commits + +- [eslint] remove unnecessary eslintrc file [`7220aa5`](https://github.com/inspect-js/is-bigint/commit/7220aa515c51649b48ba57bb77f92d85e27557d8) +- [readme] add github actions/codecov badges [`053a071`](https://github.com/inspect-js/is-bigint/commit/053a07123511eef5a91fd7889ae2d8323fbcf7d7) +- [Deps] add `has-bigints` as a runtime dependency [`0fc3c9d`](https://github.com/inspect-js/is-bigint/commit/0fc3c9d5165f62500ea9c27943cb302df65432f7) +- [Dev Deps] update `tape` [`145f11d`](https://github.com/inspect-js/is-bigint/commit/145f11d1d285d92b3144f48178fe0fb3b2f828d9) + +## [v1.0.3](https://github.com/inspect-js/is-bigint/compare/v1.0.2...v1.0.3) - 2021-08-06 + +### Commits + +- [Tests] use `has-tostringtag` for easier checking of Symbol.toStringTag [`3b44080`](https://github.com/inspect-js/is-bigint/commit/3b440801b69689d907b33184134f00d7e8a35f9f) +- [Dev Deps] update `auto-changelog`, `eslint`, `object-inspect`, `tape` [`e4d4a6c`](https://github.com/inspect-js/is-bigint/commit/e4d4a6c2ab743b52eda906abd1ed4b0608952533) +- [Fix] use `has-bigints` for more robust BigInt detection [`7bb9d7a`](https://github.com/inspect-js/is-bigint/commit/7bb9d7ab42214c12ce25e9f0cfe2af769388c3bb) + +## [v1.0.2](https://github.com/inspect-js/is-bigint/compare/v1.0.1...v1.0.2) - 2021-05-04 + +### Commits + +- [meta] do not publish github action workflow files [`276d677`](https://github.com/inspect-js/is-bigint/commit/276d677d1eac61e990a2f2b523c7cdef70784865) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`cea7fb6`](https://github.com/inspect-js/is-bigint/commit/cea7fb6e882ad7e2f550de2bd9317a4409bcd735) +- [readme] fix repo URLs; remove travis badge [`c8e7c36`](https://github.com/inspect-js/is-bigint/commit/c8e7c3651f3303fddafa61cf29cfbb79ea2d5d4b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `object-inspect`, `tape` [`32f3d90`](https://github.com/inspect-js/is-bigint/commit/32f3d909363045fe5d40dde9e4db354344ab4d50) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `tape` [`c2f20f5`](https://github.com/inspect-js/is-bigint/commit/c2f20f577d84e68b4e3224abb51024fbc4b9b2ba) +- [meta] remove unneeded token; update checkout action [`94e46e9`](https://github.com/inspect-js/is-bigint/commit/94e46e92a1a85ec022c8febf8d5d3c2369b46e97) +- [meta] use `prepublishOnly` script for npm 7+ [`3e663ec`](https://github.com/inspect-js/is-bigint/commit/3e663ecb09bfdc5dbaaa37aaef4adf28b5e49035) + +## [v1.0.1](https://github.com/inspect-js/is-bigint/compare/v1.0.0...v1.0.1) - 2020-11-30 + +### Commits + +- [Tests] use shared travis-ci configs [`28f1211`](https://github.com/inspect-js/is-bigint/commit/28f1211132ad2a6495d816140680fa16c12eb6f3) +- [Tests] migrate tests to Github Actions [`0998c64`](https://github.com/inspect-js/is-bigint/commit/0998c6443d603028f8b988bcdd52d23dbf513031) +- [meta] add `auto-changelog` [`2352de6`](https://github.com/inspect-js/is-bigint/commit/2352de6df8385b256d75ce50c360947243a599f6) +- [Tests] run `nyc` on all tests [`9c16a9a`](https://github.com/inspect-js/is-bigint/commit/9c16a9a5ddaf7c2c578542ab8f00dd4e72eff541) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `tape` [`4cd0edd`](https://github.com/inspect-js/is-bigint/commit/4cd0edd1917f789501291315c9eac5f895fd719e) +- [actions] add automatic rebasing / merge commit blocking [`f0f4b91`](https://github.com/inspect-js/is-bigint/commit/f0f4b91dba029dbca5b3cd27ef91c4fb8e3ec51a) +- [actions] add "Allow Edits" workflow [`7f4f46e`](https://github.com/inspect-js/is-bigint/commit/7f4f46ec07679c00e22287ec55b39ff1e4f809cf) +- [meta] create FUNDING.yml [`2d0cb9a`](https://github.com/inspect-js/is-bigint/commit/2d0cb9ae8ddf635f2c472ce49f95f717f2c432bf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`0ee110e`](https://github.com/inspect-js/is-bigint/commit/0ee110effdcaa96d90f21a0ec6e625941f77c45a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`, `object-inspect`, `tape` [`5bb7f3a`](https://github.com/inspect-js/is-bigint/commit/5bb7f3a8de6ec5ee2aa573c22e41884f3d2d1cc3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`d3d67d0`](https://github.com/inspect-js/is-bigint/commit/d3d67d05f8a3f4cb07085811629f56ef872949c3) +- [Dev Deps] update `auto-changelog`, `tape` [`54e270f`](https://github.com/inspect-js/is-bigint/commit/54e270fa29856dba90f86785fa61bffc79a2825d) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`d82bfe7`](https://github.com/inspect-js/is-bigint/commit/d82bfe75c63aeda40f7e473c57f26cea8790ba3a) +- [Dev Deps] update `auto-changelog`; add `aud` [`9c34bd1`](https://github.com/inspect-js/is-bigint/commit/9c34bd1873f08d77c82d8e54ad90c5a1a035e7ea) +- [Tests] add missing `posttest` script [`0690bd9`](https://github.com/inspect-js/is-bigint/commit/0690bd9868d4d8b43424b4224cdbb8659a1c6423) +- [meta] add `funding` field [`7ca36d0`](https://github.com/inspect-js/is-bigint/commit/7ca36d06ebcf6b01a592ecd6758bd2b39c0fb0db) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`5ffa8da`](https://github.com/inspect-js/is-bigint/commit/5ffa8dad9f634891cf739ee118f1b43142b0f01d) +- [Dev Deps] update `eslint` [`8512c2f`](https://github.com/inspect-js/is-bigint/commit/8512c2f29a9267fe8fe19209bcf77df94f127172) +- [Tests] only audit prod deps [`f2147dc`](https://github.com/inspect-js/is-bigint/commit/f2147dc54e72594985e8f6db3932a4f0819dc4db) +- [readme] fix header [`d6eff75`](https://github.com/inspect-js/is-bigint/commit/d6eff75d00471f465768deb92867e878c27733b3) + +## v1.0.0 - 2018-09-20 + +### Commits + +- [Tests] add tests [`847f12a`](https://github.com/inspect-js/is-bigint/commit/847f12af125fcefb75ed3517550feedf7dd73e88) +- Initial commit [`b53f3c6`](https://github.com/inspect-js/is-bigint/commit/b53f3c6754e7fd7a9982ff5b1466c4dc9799dad9) +- readme [`66c15fe`](https://github.com/inspect-js/is-bigint/commit/66c15fe1a0d965b8c78bf3a3bfc289dcfec53ee1) +- Implementation [`c2c0974`](https://github.com/inspect-js/is-bigint/commit/c2c0974397825a2a56e1ea8af0546171309d4805) +- package.json [`98b174c`](https://github.com/inspect-js/is-bigint/commit/98b174c24b070053f0548e58f9b87bc9dbdf922a) +- Only apps should have lockfiles [`a77c74b`](https://github.com/inspect-js/is-bigint/commit/a77c74bd8ca5f058f1e6165ae7b33bb84adef98c) diff --git a/node_modules/is-bigint/LICENSE b/node_modules/is-bigint/LICENSE new file mode 100644 index 0000000000000..9dd868f0f9e1c --- /dev/null +++ b/node_modules/is-bigint/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-bigint/README.md b/node_modules/is-bigint/README.md new file mode 100644 index 0000000000000..d64549fca0894 --- /dev/null +++ b/node_modules/is-bigint/README.md @@ -0,0 +1,44 @@ +# is-bigint [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this an ES BigInt value? + +## Example + +```js +var isBigInt = require('is-bigint'); +assert(!isBigInt(function () {})); +assert(!isBigInt(null)); +assert(!isBigInt(function* () { yield 42; return Infinity; }); +assert(!isBigInt(Symbol('foo'))); + +assert(isBigInt(1n)); +assert(isBigInt(Object(1n))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-bigint +[2]: https://versionbadg.es/inspect-js/is-bigint.svg +[5]: https://david-dm.org/inspect-js/is-bigint.svg +[6]: https://david-dm.org/inspect-js/is-bigint +[7]: https://david-dm.org/inspect-js/is-bigint/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-bigint#info=devDependencies +[11]: https://nodei.co/npm/is-bigint.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-bigint.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-bigint.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-bigint +[codecov-image]: https://codecov.io/gh/inspect-js/is-bigint/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-bigint/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-bigint +[actions-url]: https://github.com/inspect-js/is-bigint/actions diff --git a/node_modules/is-bigint/index.js b/node_modules/is-bigint/index.js new file mode 100644 index 0000000000000..8da47d7438e44 --- /dev/null +++ b/node_modules/is-bigint/index.js @@ -0,0 +1,38 @@ +'use strict'; + +var hasBigInts = require('has-bigints')(); + +if (hasBigInts) { + var bigIntValueOf = BigInt.prototype.valueOf; + var tryBigInt = function tryBigIntObject(value) { + try { + bigIntValueOf.call(value); + return true; + } catch (e) { + } + return false; + }; + + module.exports = function isBigInt(value) { + if ( + value === null + || typeof value === 'undefined' + || typeof value === 'boolean' + || typeof value === 'string' + || typeof value === 'number' + || typeof value === 'symbol' + || typeof value === 'function' + ) { + return false; + } + if (typeof value === 'bigint') { + return true; + } + + return tryBigInt(value); + }; +} else { + module.exports = function isBigInt(value) { + return false && value; + }; +} diff --git a/node_modules/is-bigint/package.json b/node_modules/is-bigint/package.json new file mode 100644 index 0000000000000..850dbd82bd1c5 --- /dev/null +++ b/node_modules/is-bigint/package.json @@ -0,0 +1,58 @@ +{ + "name": "is-bigint", + "version": "1.0.4", + "description": "Is this value an ES BigInt?", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-bigint.git" + }, + "keywords": [ + "bigint", + "es", + "integer", + "is" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-bigint/issues" + }, + "homepage": "https://github.com/inspect-js/is-bigint#readme", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^7.32.0", + "has-symbols": "^1.0.2", + "nyc": "^10.3.2", + "object-inspect": "^1.11.0", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-bigint/test/index.js b/node_modules/is-bigint/test/index.js new file mode 100644 index 0000000000000..21537d6a3f40a --- /dev/null +++ b/node_modules/is-bigint/test/index.js @@ -0,0 +1,81 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var hasBigInts = require('has-bigints')(); +var hasSymbols = require('has-symbols')(); +var hasToStringTag = require('has-tostringtag/shams')(); + +var isBigInt = require('../'); + +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +var forEach = function (arr, func) { + var i; + for (i = 0; i < arr.length; ++i) { + func(arr[i], i, arr); + } +}; + +test('non-BigInt values', function (t) { + var nonBigInts = [ + true, + false, + Object(true), + Object(false), + null, + undefined, + {}, + [], + /a/g, + 'string', + 42, + new Date(), + function () {}, + NaN + ]; + if (hasSymbols) { + nonBigInts.push(Symbol.iterator, Symbol('foo')); + } + t.plan(nonBigInts.length); + forEach(nonBigInts, function (nonBigInt) { + t.equal(false, isBigInt(nonBigInt), debug(nonBigInt, 'is not a BigInt')); + }); + t.end(); +}); + +test('faked BigInt values', function (t) { + t.test('real BigInt valueOf', { skip: !hasBigInts }, function (st) { + var fakeBigInt = { valueOf: function () { return BigInt(42); } }; + st.equal(false, isBigInt(fakeBigInt), 'object with valueOf returning a BigInt is not a BigInt'); + st.end(); + }); + + t.test('faked @@toStringTag', { skip: !hasBigInts || !hasToStringTag }, function (st) { + var fakeBigInt = { valueOf: function () { return BigInt(42); } }; + fakeBigInt[Symbol.toStringTag] = 'BigInt'; + st.equal(false, isBigInt(fakeBigInt), 'object with fake BigInt @@toStringTag and valueOf returning a BigInt is not a BigInt'); + + var notSoFakeBigInt = { valueOf: function () { return 42; } }; + notSoFakeBigInt[Symbol.toStringTag] = 'BigInt'; + st.equal(false, isBigInt(notSoFakeBigInt), 'object with fake BigInt @@toStringTag and valueOf not returning a BigInt is not a BigInt'); + st.end(); + }); + + var fakeBigIntString = { toString: function () { return '42n'; } }; + t.equal(false, isBigInt(fakeBigIntString), 'object with toString returning 42n is not a BigInt'); + + t.end(); +}); + +test('BigInt support', { skip: !hasBigInts }, function (t) { + forEach([ + Function('return 42n')(), // eslint-disable-line no-new-func + BigInt(42), + Object(BigInt(42)) + ], function (bigInt) { + t.equal(true, isBigInt(bigInt), debug(bigInt, 'is a BigInt')); + }); + + t.end(); +}); diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js new file mode 100644 index 0000000000000..6c8c7e7284193 --- /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 0000000000000..654d0bfe94343 --- /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 0000000000000..cd21d885cf1e7 --- /dev/null +++ b/node_modules/is-binary-path/package.json @@ -0,0 +1,39 @@ +{ + "name": "is-binary-path", + "version": "1.0.1", + "description": "Check if a filepath is a binary file", + "license": "MIT", + "repository": "sindresorhus/is-binary-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "bin", + "binary", + "ext", + "extensions", + "extension", + "file", + "path", + "check", + "detect", + "is" + ], + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "devDependencies": { + "ava": "0.0.4" + } +} diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md new file mode 100644 index 0000000000000..a17d6a245d184 --- /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-boolean-object/.editorconfig b/node_modules/is-boolean-object/.editorconfig new file mode 100644 index 0000000000000..8d93cc1d1bcae --- /dev/null +++ b/node_modules/is-boolean-object/.editorconfig @@ -0,0 +1,22 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[.github/workflows/*.yml] +indent_style = off +indent_size = off +max_line_length = off + +[{CHANGELOG.md,*.json}] +max_line_length = off diff --git a/node_modules/is-boolean-object/.eslintignore b/node_modules/is-boolean-object/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-boolean-object/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-boolean-object/.eslintrc b/node_modules/is-boolean-object/.eslintrc new file mode 100644 index 0000000000000..a0729161e10f2 --- /dev/null +++ b/node_modules/is-boolean-object/.eslintrc @@ -0,0 +1,22 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-nested-callbacks": [2, 3] + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "prefer-regex-literals": 0, + }, + }, + { + "files": "test-corejs.js", + "extends": "@ljharb/eslint-config/tests", + }, + ], +} diff --git a/node_modules/is-boolean-object/.github/FUNDING.yml b/node_modules/is-boolean-object/.github/FUNDING.yml new file mode 100644 index 0000000000000..fd049965b007a --- /dev/null +++ b/node_modules/is-boolean-object/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-boolean-object +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-boolean-object/.nycrc b/node_modules/is-boolean-object/.nycrc new file mode 100644 index 0000000000000..a69aa2d8273d8 --- /dev/null +++ b/node_modules/is-boolean-object/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-boolean-object/CHANGELOG.md b/node_modules/is-boolean-object/CHANGELOG.md new file mode 100644 index 0000000000000..f789bdb0c4820 --- /dev/null +++ b/node_modules/is-boolean-object/CHANGELOG.md @@ -0,0 +1,107 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/inspect-js/is-boolean-object/compare/v1.1.1...v1.1.2) - 2021-08-05 + +### Commits + +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`6d319ea`](https://github.com/inspect-js/is-boolean-object/commit/6d319eac0ba237f7ba440a1fc4b32d007b1b0cf3) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4f85bef`](https://github.com/inspect-js/is-boolean-object/commit/4f85bef244f8fdd9ab99db0afe0b8fa00c853709) + +## [v1.1.1](https://github.com/inspect-js/is-boolean-object/compare/v1.1.0...v1.1.1) - 2021-05-07 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7201c41`](https://github.com/inspect-js/is-boolean-object/commit/7201c41fc1fd9d64b51716b80fc63d95064a4a59) +- [Tests] run tests with core-js as well [`9590e61`](https://github.com/inspect-js/is-boolean-object/commit/9590e6135505e2e3f69c6d8785a539fca1b1e594) +- [meta] do not publish github action workflow files [`341472b`](https://github.com/inspect-js/is-boolean-object/commit/341472bbe9855030c7eda9340ee4284244f0a4ad) +- [readme] update repo URLs; remove travis badge [`9fdbbc6`](https://github.com/inspect-js/is-boolean-object/commit/9fdbbc64b2a70ee93fcfd95fc6c94c7ec2bbedd4) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1cd35c9`](https://github.com/inspect-js/is-boolean-object/commit/1cd35c9b9b0b4af203f20bda0d7fd60798e57f99) +- [readme] add actions and codecov badges [`03769fe`](https://github.com/inspect-js/is-boolean-object/commit/03769feb1466f03b1345882ca0e4f8cacbbce9ce) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`db6598c`](https://github.com/inspect-js/is-boolean-object/commit/db6598c4cabcd0ffd2ba9b4525b53907f8b2ff1f) +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`e0b8a9f`](https://github.com/inspect-js/is-boolean-object/commit/e0b8a9f0fc1290a0a29c75967d56bc1c17eb8d2d) +- [readme] remove defunct testling badge [`986a621`](https://github.com/inspect-js/is-boolean-object/commit/986a6217da7385f7063e1d4e4bf5be2892d00c20) +- [meta] use `prepublishOnly` script for npm 7+ [`7bb3b29`](https://github.com/inspect-js/is-boolean-object/commit/7bb3b2902008ca07af4185ca98bc41b3222d579f) +- [Deps] update `call-bind` [`3af6a71`](https://github.com/inspect-js/is-boolean-object/commit/3af6a71e1004c79567630ac9944b9f2cc184ac77) +- [meta] do not publish corejs test file [`d911f03`](https://github.com/inspect-js/is-boolean-object/commit/d911f0368b6922645d15b9e28f3ed92e1badcef4) +- [actions] update workflows [`9bb3d90`](https://github.com/inspect-js/is-boolean-object/commit/9bb3d9015f377280324b162a3062d21936707216) + +## [v1.1.0](https://github.com/inspect-js/is-boolean-object/compare/v1.0.1...v1.1.0) - 2020-12-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`6cdb652`](https://github.com/inspect-js/is-boolean-object/commit/6cdb652add3c6e44c2f7fe07c5ca4c0d14ddc2c1) +- [Tests] run `nyc` on all tests [`9a33076`](https://github.com/inspect-js/is-boolean-object/commit/9a33076d14869bf5120a6ca3903bcb9a008cf2e5) +- [Tests] add .editorconfig [`bb401c0`](https://github.com/inspect-js/is-boolean-object/commit/bb401c084416b010d64e0c5a74465b37addab31f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`5cb2405`](https://github.com/inspect-js/is-boolean-object/commit/5cb24052ca84d840e929f05cd1fe6c03b85ec032) +- [Robustness] use `call-bind` to avoid a dependency on `.call` [`76d87ae`](https://github.com/inspect-js/is-boolean-object/commit/76d87ae74235a9995d39bcf5783c04c744c34520) +- [actions] add "Allow Edits" workflow [`337206a`](https://github.com/inspect-js/is-boolean-object/commit/337206af74bd7c340bc938ab6dc0535c08490b3d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`11f0481`](https://github.com/inspect-js/is-boolean-object/commit/11f0481efca28a241a35d384e2a302b1bcdc9a37) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`b9602c8`](https://github.com/inspect-js/is-boolean-object/commit/b9602c8ca11be138722187c1fb0a5b25a57a4edc) +- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`999e9e2`](https://github.com/inspect-js/is-boolean-object/commit/999e9e224d4eec8b20fc9c3431e9ba42caad79c9) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bbb6728`](https://github.com/inspect-js/is-boolean-object/commit/bbb6728b9410f9d3e2d266523a477127e5e4c16f) + +## [v1.0.1](https://github.com/inspect-js/is-boolean-object/compare/v1.0.0...v1.0.1) - 2019-12-18 + +### Commits + +- [Tests] use shared travis-ci configs [`a1778b8`](https://github.com/inspect-js/is-boolean-object/commit/a1778b81ab4fe4479176de854e4e233cc441f183) +- Update `eslint`; use my personal shared `eslint` config. [`2c42c50`](https://github.com/inspect-js/is-boolean-object/commit/2c42c50a0654044b6c7e2a4ab18227e8c275464b) +- [Tests] remove `jscs` [`3807025`](https://github.com/inspect-js/is-boolean-object/commit/380702504fabc47fe22f61c4847379023d31a657) +- [Tests] up to `node` `v8.4`, `v7.10`, `v6.11`, `v5.12`, `v4.8`; improve matrix; newer npm breaks in older node; improve scripts. [`a02b986`](https://github.com/inspect-js/is-boolean-object/commit/a02b98682b285de09e2c5a895627771d6a7f552c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `jscs`, `nsp`, `semver`, `tape` [`d9030a9`](https://github.com/inspect-js/is-boolean-object/commit/d9030a99b8e274c76ae5f23f31d9d085a7e25272) +- Update `eslint`, `nsp` [`a1b6388`](https://github.com/inspect-js/is-boolean-object/commit/a1b6388fabd0de51a02c567953826344ef05890c) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`17a0fd3`](https://github.com/inspect-js/is-boolean-object/commit/17a0fd391e32635ec3434baca0d062f8abeeb592) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`0b1818f`](https://github.com/inspect-js/is-boolean-object/commit/0b1818fdcaebc6133e515dfe3b5a8930b38999b5) +- [meta] remove unused Makefile and associated utilities [`33dc0ae`](https://github.com/inspect-js/is-boolean-object/commit/33dc0ae35a03e91f81b1bb3db5ba763dacadbfa2) +- Update `covert`, `jscs`, `eslint`, `semver` [`7e513c1`](https://github.com/inspect-js/is-boolean-object/commit/7e513c12998a651c14f62b3ecfb7215a5cc5ee8f) +- [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15` [`992b849`](https://github.com/inspect-js/is-boolean-object/commit/992b84933760e0fe6ba2cee74ad7fff507f28128) +- [meta] add `auto-changelog` [`63d71b8`](https://github.com/inspect-js/is-boolean-object/commit/63d71b8beb9aeb77cab3d2db2cf643f1b8b1a55c) +- Update `tape`, `eslint`, `semver` [`76aea69`](https://github.com/inspect-js/is-boolean-object/commit/76aea699fb315ac460799182d707c388b4a4e017) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a6cbec0`](https://github.com/inspect-js/is-boolean-object/commit/a6cbec09940b6f2c7cf366526a94c0c4756508f5) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape`; add `safe-publish-latest` [`7cf6bb0`](https://github.com/inspect-js/is-boolean-object/commit/7cf6bb05ba7bac504df680dd9ca625fba6dccb5a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`57d713c`](https://github.com/inspect-js/is-boolean-object/commit/57d713cca2ccbbbf1da1142ee5e8236d12551f76) +- [actions] add automatic rebasing / merge commit blocking [`f7a2bdb`](https://github.com/inspect-js/is-boolean-object/commit/f7a2bdb905e07d75c65593359f81bfeda9fe9826) +- [meta] create FUNDING.yml [`9765e73`](https://github.com/inspect-js/is-boolean-object/commit/9765e738cccdd5ff6c89b21324119a2bf4064fbd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `replace`, `semver`, `tape` [`5c16b56`](https://github.com/inspect-js/is-boolean-object/commit/5c16b56a5a2d36c6a70c1bd396b3a6c931f655db) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`5717aad`](https://github.com/inspect-js/is-boolean-object/commit/5717aadd8b0e8c76ccb194d1845ad8cc120f29c6) +- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`80b924d`](https://github.com/inspect-js/is-boolean-object/commit/80b924dd270188e1e928f4141078bee14d810e9b) +- [Dev Deps] update `jscs` [`2e5479e`](https://github.com/inspect-js/is-boolean-object/commit/2e5479e56b6d33288582cfe8c254ca081e79500c) +- Test up to `io.js` `v2.2` [`93379a4`](https://github.com/inspect-js/is-boolean-object/commit/93379a4b48ba719113006ab08bbe6679c8a27293) +- [Tests] remove `nsp`; use `npm audit`; allow to fail for now [`36ae30a`](https://github.com/inspect-js/is-boolean-object/commit/36ae30acffe4a892ea0882a793b8a90f09d08fdf) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`ef76976`](https://github.com/inspect-js/is-boolean-object/commit/ef76976db22f2867fca2ee377fdbc9da81f0d142) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`a1182bd`](https://github.com/inspect-js/is-boolean-object/commit/a1182bd99e5d31e113107241f0d697e71b27bf7b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`4f79b47`](https://github.com/inspect-js/is-boolean-object/commit/4f79b474f0643fd2c9dbc863949a61cf01255b6f) +- [Tests] up to `node` `v10.3` [`5e96464`](https://github.com/inspect-js/is-boolean-object/commit/5e96464fc08eacc45f5f58fe7800ddbc45e40cea) +- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`e1eb3fa`](https://github.com/inspect-js/is-boolean-object/commit/e1eb3fad8bad65140db3bd2381bb3bea6a9c6242) +- Only apps should have lockfiles. [`c7f301f`](https://github.com/inspect-js/is-boolean-object/commit/c7f301ff368f9e04f7f64a2ce9b6ae1aec803e69) +- [meta] add `funding` field [`fad0366`](https://github.com/inspect-js/is-boolean-object/commit/fad03662becea5db7cef29d816d173ad771be86a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`80d39d9`](https://github.com/inspect-js/is-boolean-object/commit/80d39d90205d3bb564acb80b0625e90c267347fd) +- [Tests] use `eclint` instead of `editorconfig-tools` [`980e91b`](https://github.com/inspect-js/is-boolean-object/commit/980e91b186a728f77366ba16b7bebc813b9cc3b0) +- [Dev Deps] Update `tape`, `eslint` [`9960830`](https://github.com/inspect-js/is-boolean-object/commit/9960830876a3672686c569fde3d43bb7983955f1) +- Test up to `io.js` `v3.0` [`a3c3cd0`](https://github.com/inspect-js/is-boolean-object/commit/a3c3cd087d7fcefbf4f3525c05f4cee3b6e5b0ef) +- [Dev Deps] update `tape` [`217fbd6`](https://github.com/inspect-js/is-boolean-object/commit/217fbd6bb2989f9304ad95cd49697da7fe03b8d5) +- [Tests] only audit prod deps [`89284ee`](https://github.com/inspect-js/is-boolean-object/commit/89284ee17dce1d044df0ca9e006072f25742bbaf) +- [Performance] only use toStringTag code path when the value has that property [`2863bc5`](https://github.com/inspect-js/is-boolean-object/commit/2863bc5b72680f05ace8e66fddcf48966b942d55) +- [Dev Deps] update `replace` [`53e72a5`](https://github.com/inspect-js/is-boolean-object/commit/53e72a5ceca5b3a82e6407829f9227df9df6d329) +- [Enhancement] slight optimization for `null` [`a90a3c4`](https://github.com/inspect-js/is-boolean-object/commit/a90a3c4464d0300e23384d96fb4281b55b7fd723) +- [Dev Deps] update `tape` [`9377bd5`](https://github.com/inspect-js/is-boolean-object/commit/9377bd5110e99d8ec550f24ef3f6ead62a8f1f50) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`3085530`](https://github.com/inspect-js/is-boolean-object/commit/30855304841854f79e406372f524efe4bc7d8c04) +- Test on `io.js` `v2.4` [`8af335c`](https://github.com/inspect-js/is-boolean-object/commit/8af335ca82a0eeba4a0a593775e4caf744834ec4) +- Test on `io.js` `v2.3` [`1eb3424`](https://github.com/inspect-js/is-boolean-object/commit/1eb3424bef528551f5c99a754281a51d92e40ab1) + +## v1.0.0 - 2015-04-28 + +### Commits + +- Dotfiles [`6b9b998`](https://github.com/inspect-js/is-boolean-object/commit/6b9b998bb238a32d4829c9f9bf274e5ca15023ee) +- `make release` [`d5e50b3`](https://github.com/inspect-js/is-boolean-object/commit/d5e50b33a3cd8d8abe7de8ae36e2944c24ce76ba) +- package.json [`117676a`](https://github.com/inspect-js/is-boolean-object/commit/117676a48609e636d4257c1b35c695ff20939211) +- Read me [`ef327a7`](https://github.com/inspect-js/is-boolean-object/commit/ef327a74c7f73e64cfa3c20a9620ef7accf8b762) +- Initial commit [`2346886`](https://github.com/inspect-js/is-boolean-object/commit/2346886252b9637c1af6851a3fc2cbc98bc986aa) +- Tests [`67211f8`](https://github.com/inspect-js/is-boolean-object/commit/67211f8bff1a49e5df219935765b83573c097353) +- Implementation [`2d88bd6`](https://github.com/inspect-js/is-boolean-object/commit/2d88bd6e1ef0f07f5a639775eb89f3b78e12eb65) diff --git a/node_modules/is-boolean-object/LICENSE b/node_modules/is-boolean-object/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/is-boolean-object/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-boolean-object/README.md b/node_modules/is-boolean-object/README.md new file mode 100644 index 0000000000000..a77f3e9dfc052 --- /dev/null +++ b/node_modules/is-boolean-object/README.md @@ -0,0 +1,57 @@ +# is-boolean-object [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isBoolean = require('is-boolean-object'); +var assert = require('assert'); + +assert.notOk(isBoolean(undefined)); +assert.notOk(isBoolean(null)); +assert.notOk(isBoolean('foo')); +assert.notOk(isBoolean(function () {})); +assert.notOk(isBoolean([])); +assert.notOk(isBoolean({})); +assert.notOk(isBoolean(/a/g)); +assert.notOk(isBoolean(new RegExp('a', 'g'))); +assert.notOk(isBoolean(new Date())); +assert.notOk(isBoolean(42)); +assert.notOk(isBoolean(NaN)); +assert.notOk(isBoolean(Infinity)); + +assert.ok(isBoolean(new Boolean(42))); +assert.ok(isBoolean(false)); +assert.ok(isBoolean(Object(false))); +assert.ok(isBoolean(true)); +assert.ok(isBoolean(Object(true))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-boolean-object +[2]: https://versionbadg.es/inspect-js/is-boolean-object.svg +[5]: https://david-dm.org/inspect-js/is-boolean-object.svg +[6]: https://david-dm.org/inspect-js/is-boolean-object +[7]: https://david-dm.org/inspect-js/is-boolean-object/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-boolean-object#info=devDependencies +[11]: https://nodei.co/npm/is-boolean-object.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-boolean-object.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-boolean-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-boolean-object +[codecov-image]: https://codecov.io/gh/inspect-js/is-boolean-object/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-boolean-object/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-boolean-object +[actions-url]: https://github.com/inspect-js/is-boolean-object/actions diff --git a/node_modules/is-boolean-object/index.js b/node_modules/is-boolean-object/index.js new file mode 100644 index 0000000000000..e1011f6c32e66 --- /dev/null +++ b/node_modules/is-boolean-object/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $boolToStr = callBound('Boolean.prototype.toString'); +var $toString = callBound('Object.prototype.toString'); + +var tryBooleanObject = function booleanBrandCheck(value) { + try { + $boolToStr(value); + return true; + } catch (e) { + return false; + } +}; +var boolClass = '[object Boolean]'; +var hasToStringTag = require('has-tostringtag/shams')(); + +module.exports = function isBoolean(value) { + if (typeof value === 'boolean') { + return true; + } + if (value === null || typeof value !== 'object') { + return false; + } + return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass; +}; diff --git a/node_modules/is-boolean-object/package.json b/node_modules/is-boolean-object/package.json new file mode 100644 index 0000000000000..06196f6dc1285 --- /dev/null +++ b/node_modules/is-boolean-object/package.json @@ -0,0 +1,87 @@ +{ + "name": "is-boolean-object", + "version": "1.1.2", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only && npm run test:harmony && npm run test:corejs", + "tests-only": "nyc tape 'test/**/*.js'", + "test:harmony": "node --harmony --es-staging test", + "test:corejs": "nyc tape test-corejs.js", + "posttest": "aud --production", + "prelint": "npm run eccheck", + "lint": "eslint --ext=js,mjs .", + "eccheck": "eclint check $(git ls-files)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-boolean-object.git" + }, + "keywords": [ + "Boolean", + "ES6", + "toStringTag", + "@@toStringTag", + "Boolean object", + "true", + "false", + "is-boolean" + ], + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", + "eclint": "^2.8.1", + "eslint": "^7.32.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-boolean-object/test/index.js b/node_modules/is-boolean-object/test/index.js new file mode 100644 index 0000000000000..cd4c44fec6af2 --- /dev/null +++ b/node_modules/is-boolean-object/test/index.js @@ -0,0 +1,48 @@ +'use strict'; + +var test = require('tape'); +var isBoolean = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('not Booleans', function (t) { + t.test('primitives', function (st) { + st.notOk(isBoolean(), 'undefined is not Boolean'); + st.notOk(isBoolean(null), 'null is not Boolean'); + st.notOk(isBoolean(0), '0 is not Boolean'); + st.notOk(isBoolean(NaN), 'NaN is not Boolean'); + st.notOk(isBoolean(Infinity), 'Infinity is not Boolean'); + st.notOk(isBoolean('foo'), 'string is not Boolean'); + st.end(); + }); + + t.test('objects', function (st) { + st.notOk(isBoolean(Object(42)), 'number object is not Boolean'); + st.notOk(isBoolean([]), 'array is not Boolean'); + st.notOk(isBoolean({}), 'object is not Boolean'); + st.notOk(isBoolean(function () {}), 'function is not Boolean'); + st.notOk(isBoolean(/a/g), 'regex literal is not Boolean'); + st.notOk(isBoolean(new RegExp('a', 'g')), 'regex object is not Boolean'); + st.notOk(isBoolean(new Date()), 'new Date() is not Boolean'); + st.end(); + }); + + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var fakeBoolean = { + toString: function () { return 'true'; }, + valueOf: function () { return true; } + }; + fakeBoolean[Symbol.toStringTag] = 'Boolean'; + t.notOk(isBoolean(fakeBoolean), 'fake Boolean with @@toStringTag "Boolean" is not Boolean'); + t.end(); +}); + +test('Booleans', function (t) { + t.ok(isBoolean(true), 'true is Boolean'); + t.ok(isBoolean(false), 'false is Boolean'); + t.ok(isBoolean(Object(true)), 'Object(true) is Boolean'); + t.ok(isBoolean(Object(false)), 'Object(false) is Boolean'); + t.end(); +}); diff --git a/node_modules/is-buffer/LICENSE b/node_modules/is-buffer/LICENSE new file mode 100644 index 0000000000000..0c068ceecbd48 --- /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 0000000000000..cce0a8cf924d8 --- /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 0000000000000..9cce396594f60 --- /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 0000000000000..ea12137a63cf0 --- /dev/null +++ b/node_modules/is-buffer/package.json @@ -0,0 +1,51 @@ +{ + "name": "is-buffer", + "description": "Determine if an object is a Buffer", + "version": "1.1.6", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/is-buffer/issues" + }, + "dependencies": {}, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "keywords": [ + "buffer", + "buffers", + "type", + "core buffer", + "browser buffer", + "browserify", + "typed array", + "uint32array", + "int16array", + "int32array", + "float32array", + "float64array", + "browser", + "arraybuffer", + "dataview" + ], + "license": "MIT", + "main": "index.js", + "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" + } +} diff --git a/node_modules/is-buffer/test/basic.js b/node_modules/is-buffer/test/basic.js new file mode 100644 index 0000000000000..be4f8e4383dac --- /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-callable/.editorconfig b/node_modules/is-callable/.editorconfig new file mode 100644 index 0000000000000..f5f56790d4c5e --- /dev/null +++ b/node_modules/is-callable/.editorconfig @@ -0,0 +1,31 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 +max_line_length = off + +[README.md] +indent_style = off +indent_size = off +max_line_length = off + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off + +[coverage*/**/*] +indent_style = off +indent_size = off +max_line_length = off diff --git a/node_modules/is-callable/.eslintrc b/node_modules/is-callable/.eslintrc new file mode 100644 index 0000000000000..ce033bfe59fec --- /dev/null +++ b/node_modules/is-callable/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "max-statements-per-line": [2, { "max": 2 }], + }, +} diff --git a/node_modules/is-callable/.github/FUNDING.yml b/node_modules/is-callable/.github/FUNDING.yml new file mode 100644 index 0000000000000..0fdebd060b6b9 --- /dev/null +++ b/node_modules/is-callable/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-callable +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-callable/.nycrc b/node_modules/is-callable/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-callable/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-callable/CHANGELOG.md b/node_modules/is-callable/CHANGELOG.md new file mode 100644 index 0000000000000..32788cda9349e --- /dev/null +++ b/node_modules/is-callable/CHANGELOG.md @@ -0,0 +1,158 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.7](https://github.com/inspect-js/is-callable/compare/v1.2.6...v1.2.7) - 2022-09-23 + +### Commits + +- [Fix] recognize `document.all` in IE 6-10 [`06c1db2`](https://github.com/inspect-js/is-callable/commit/06c1db2b9b2e0f28428e1293eb572f8f93871ec7) +- [Tests] improve logic for FF 20-35 [`0f7d9b9`](https://github.com/inspect-js/is-callable/commit/0f7d9b9c7fe149ca87e71f0a125ade251a6a578c) +- [Fix] handle `document.all` in FF 27 (and +, probably) [`696c661`](https://github.com/inspect-js/is-callable/commit/696c661b8c0810c2d05ab172f1607f4e77ddf81e) +- [Tests] fix proxy tests in FF 42-63 [`985df0d`](https://github.com/inspect-js/is-callable/commit/985df0dd36f8cfe6f1993657b7c0f4cfc19dae30) +- [readme] update tested browsers [`389e919`](https://github.com/inspect-js/is-callable/commit/389e919493b1cb2010126b0411e5291bf76169bd) +- [Fix] detect `document.all` in Opera 12.16 [`b9f1022`](https://github.com/inspect-js/is-callable/commit/b9f1022b3d7e466b7f09080bd64c253caf644325) +- [Fix] HTML elements: properly report as callable in Opera 12.16 [`17391fe`](https://github.com/inspect-js/is-callable/commit/17391fe02b895777c4337be28dca3b364b743b34) +- [Tests] fix inverted logic in FF3 test [`056ebd4`](https://github.com/inspect-js/is-callable/commit/056ebd48790f46ca18ff5b12f51b44c08ccc3595) + +## [v1.2.6](https://github.com/inspect-js/is-callable/compare/v1.2.5...v1.2.6) - 2022-09-14 + +### Commits + +- [Fix] work for `document.all` in Firefox 3 and IE 6-8 [`015132a`](https://github.com/inspect-js/is-callable/commit/015132aaef886ec777b5b3593ef4ce461dd0c7d4) +- [Test] skip function toString check for nullish values [`8698116`](https://github.com/inspect-js/is-callable/commit/8698116f95eb59df8b48ec8e4585fc1cdd8cae9f) +- [readme] add "supported engines" section [`0442207`](https://github.com/inspect-js/is-callable/commit/0442207a89a1554d41ba36daf21862ef7ccbd500) +- [Tests] skip one of the fixture objects in FF 3.6 [`a501141`](https://github.com/inspect-js/is-callable/commit/a5011410bc6edb276c6ec8b47ce5c5d83c4bee15) +- [Tests] allow `class` constructor tests to fail in FF v45 - v54, which has undetectable classes [`b12e4a4`](https://github.com/inspect-js/is-callable/commit/b12e4a4d8c438678bd7710f9f896680150766b51) +- [Fix] Safari 4: regexes should not be considered callable [`4b732ff`](https://github.com/inspect-js/is-callable/commit/4b732ffa34346db3f0193ea4e46b7d4e637e6c82) +- [Fix] properly recognize `document.all` in Safari 4 [`3193735`](https://github.com/inspect-js/is-callable/commit/319373525dc4603346661641840cd9a3e0613136) + +## [v1.2.5](https://github.com/inspect-js/is-callable/compare/v1.2.4...v1.2.5) - 2022-09-11 + +### Commits + +- [actions] reuse common workflows [`5bb4b32`](https://github.com/inspect-js/is-callable/commit/5bb4b32dc93987328ab4f396601f751c4a7abd62) +- [meta] better `eccheck` command [`b9bd597`](https://github.com/inspect-js/is-callable/commit/b9bd597322b6e3a24c74c09881ca73e1d9f9f485) +- [meta] use `npmignore` to autogenerate an npmignore file [`3192d38`](https://github.com/inspect-js/is-callable/commit/3192d38527c7fc461d05d5aa93d47628e658bc45) +- [Fix] for HTML constructors, always use `tryFunctionObject` even in pre-toStringTag browsers [`3076ea2`](https://github.com/inspect-js/is-callable/commit/3076ea21d1f6ecc1cb711dcf1da08f257892c72b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `available-typed-arrays`, `object-inspect`, `safe-publish-latest`, `tape` [`8986746`](https://github.com/inspect-js/is-callable/commit/89867464c42adc5cd375ee074a4574b0295442cb) +- [meta] add `auto-changelog` [`7dda9d0`](https://github.com/inspect-js/is-callable/commit/7dda9d04e670a69ae566c8fa596da4ff4371e615) +- [Fix] properly report `document.all` [`da90b2b`](https://github.com/inspect-js/is-callable/commit/da90b2b68dc4f33702c2e01ad07b4f89bcb60984) +- [actions] update codecov uploader [`c8f847c`](https://github.com/inspect-js/is-callable/commit/c8f847c90e04e54ff73c7cfae86e96e94990e324) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`899ae00`](https://github.com/inspect-js/is-callable/commit/899ae00b6abd10d81fc8bc7f02b345fd885d5f56) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-value-fixtures`, `object-inspect`, `tape` [`344e913`](https://github.com/inspect-js/is-callable/commit/344e913b149609bf741aa7345fa32dc0b90d8893) +- [meta] remove greenkeeper config [`737dce5`](https://github.com/inspect-js/is-callable/commit/737dce5590b1abb16183a63cb9d7d26920b3b394) +- [meta] npmignore coverage output [`680a883`](https://github.com/inspect-js/is-callable/commit/680a8839071bf36a419fe66e1ced7a3303c27b28) + + +1.2.4 / 2021-08-05 +================= + * [Fix] use `has-tostringtag` approach to behave correctly in the presence of symbol shams + * [readme] fix repo URLs + * [readme] add actions and codecov badges + * [readme] remove defunct badges + * [meta] ignore eclint checking coverage output + * [meta] use `prepublishOnly` script for npm 7+ + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] remove unused workflow file + * [Tests] run `nyc` on all tests; use `tape` runner + * [Tests] use `available-typed-arrays`, `for-each`, `has-symbols`, `object-inspect` + * [Dev Deps] update `available-typed-arrays`, `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` + +1.2.3 / 2021-01-31 +================= + * [Fix] `document.all` is callable (do not use `document.all`!) + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` + * [Tests] migrate tests to Github Actions + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + +1.2.2 / 2020-09-21 +================= + * [Fix] include actual fix from 579179e + * [Dev Deps] update `eslint` + +1.2.1 / 2020-09-09 +================= + * [Fix] phantomjs‘ Reflect.apply does not throw properly on a bad array-like + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + * [meta] fix eclint error + +1.2.0 / 2020-06-02 +================= + * [New] use `Reflect.apply`‑based callability detection + * [readme] add install instructions (#55) + * [meta] only run `aud` on prod deps + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `make-arrow-function`, `make-generator-function`; add `aud`, `safe-publish-latest`, `make-async-function` + * [Tests] add tests for function proxies (#53, #25) + +1.1.5 / 2019-12-18 +================= + * [meta] remove unused Makefile and associated utilities + * [meta] add `funding` field; add FUNDING.yml + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `semver`, `tape`, `covert`, `rimraf` + * [Tests] use shared travis configs + * [Tests] use `eccheck` over `editorconfig-tools` + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] remove `jscs` + * [actions] add automatic rebasing / merge commit blocking + +1.1.4 / 2018-07-02 +================= + * [Fix] improve `class` and arrow function detection (#30, #31) + * [Tests] on all latest node minors; improve matrix + * [Dev Deps] update all dev deps + +1.1.3 / 2016-02-27 +================= + * [Fix] ensure “class “ doesn’t screw up “class” detection + * [Tests] up to `node` `v5.7`, `v4.3` + * [Dev Deps] update to `eslint` v2, `@ljharb/eslint-config`, `jscs` + +1.1.2 / 2016-01-15 +================= + * [Fix] Make sure comments don’t screw up “class” detection (#4) + * [Tests] up to `node` `v5.3` + * [Tests] Add `parallelshell`, run both `--es-staging` and stock tests at once + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Refactor] convert `isNonES6ClassFn` into `isES6ClassFn` + +1.1.1 / 2015-11-30 +================= + * [Fix] do not throw when a non-function has a function in its [[Prototype]] (#2) + * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `jscs`, `nsp`, `semver` + * [Tests] up to `node` `v5.1` + * [Tests] no longer allow node 0.8 to fail. + * [Tests] fix npm upgrades in older nodes + +1.1.0 / 2015-10-02 +================= + * [Fix] Some browsers report TypedArray constructors as `typeof object` + * [New] return false for "class" constructors, when possible. + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Dev Deps] update `eslint`, `editorconfig-tools`, `nsp`, `tape`, `semver`, `jscs`, `covert`, `make-arrow-function` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.4 / 2015-01-30 +================= + * If @@toStringTag is not present, use the old-school Object#toString test. + +1.0.3 / 2015-01-29 +================= + * Add tests to ensure arrow functions are callable. + * Refactor to aid optimization of non-try/catch code. + +1.0.2 / 2015-01-29 +================= + * Fix broken package.json + +1.0.1 / 2015-01-29 +================= + * Add early exit for typeof not "function" + +1.0.0 / 2015-01-29 +================= + * Initial release. diff --git a/node_modules/is-callable/LICENSE b/node_modules/is-callable/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/is-callable/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-callable/README.md b/node_modules/is-callable/README.md new file mode 100644 index 0000000000000..4f2b6d6f43cdf --- /dev/null +++ b/node_modules/is-callable/README.md @@ -0,0 +1,83 @@ +# is-callable [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag. + +## Supported engines +Automatically tested in every minor version of node. + +Manually tested in: + - Safari: v4 - v15 (4, 5, 5.1, 6.0.5, 6.2, 7.1, 8, 9.1.3, 10.1.2, 11.1.2, 12.1, 13.1.2, 14.1.2, 15.3, 15.6.1) + - Note: Safari 9 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable. + - Chrome: v15 - v81, v83 - v106(every integer version) + - Note: This includes Edge v80+ and Opera v15+, which matches Chrome + - Firefox: v3, v3.6, v4 - v105 (every integer version) + - Note: v45 - v54 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable. + - Note: in v42 - v63, `Function.prototype.toString` throws on HTML element constructors, or a Proxy to a function + - Note: in v20 - v35, HTML element constructors are not callable, despite having typeof `function`. + - Note: in v19, `document.all` is not callable. + - IE: v6 - v11(every integer version + - Opera: v11.1, v11.5, v11.6, v12.1, v12.14, v12.15, v12.16, v15+ v15+ matches Chrome + +## Example + +```js +var isCallable = require('is-callable'); +var assert = require('assert'); + +assert.notOk(isCallable(undefined)); +assert.notOk(isCallable(null)); +assert.notOk(isCallable(false)); +assert.notOk(isCallable(true)); +assert.notOk(isCallable([])); +assert.notOk(isCallable({})); +assert.notOk(isCallable(/a/g)); +assert.notOk(isCallable(new RegExp('a', 'g'))); +assert.notOk(isCallable(new Date())); +assert.notOk(isCallable(42)); +assert.notOk(isCallable(NaN)); +assert.notOk(isCallable(Infinity)); +assert.notOk(isCallable(new Number(42))); +assert.notOk(isCallable('foo')); +assert.notOk(isCallable(Object('foo'))); + +assert.ok(isCallable(function () {})); +assert.ok(isCallable(function* () {})); +assert.ok(isCallable(x => x * x)); +``` + +## Install + +Install with + +``` +npm install is-callable +``` + +## Tests + +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-callable +[2]: https://versionbadg.es/inspect-js/is-callable.svg +[5]: https://david-dm.org/inspect-js/is-callable.svg +[6]: https://david-dm.org/inspect-js/is-callable +[7]: https://david-dm.org/inspect-js/is-callable/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-callable#info=devDependencies +[11]: https://nodei.co/npm/is-callable.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-callable.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-callable.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-callable +[codecov-image]: https://codecov.io/gh/inspect-js/is-callable/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-callable/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-callable +[actions-url]: https://github.com/inspect-js/is-callable/actions diff --git a/node_modules/is-callable/index.js b/node_modules/is-callable/index.js new file mode 100644 index 0000000000000..f2a89f848cbcc --- /dev/null +++ b/node_modules/is-callable/index.js @@ -0,0 +1,101 @@ +'use strict'; + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var ddaClass = '[object HTMLAllCollection]'; // IE 11 +var ddaClass2 = '[object HTML document.all class]'; +var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { return false; }; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + return ( + str === ddaClass + || str === ddaClass2 + || str === ddaClass3 // opera 12.16 + || str === objectClass // IE 6-8 + ) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} + +module.exports = reflectApply + ? function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } + : function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; } + return tryFunctionObject(value); + }; diff --git a/node_modules/is-callable/package.json b/node_modules/is-callable/package.json new file mode 100644 index 0000000000000..aa3e8df044d5d --- /dev/null +++ b/node_modules/is-callable/package.json @@ -0,0 +1,106 @@ +{ + "name": "is-callable", + "version": "1.2.7", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only --", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs ." + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-callable.git" + }, + "keywords": [ + "Function", + "function", + "callable", + "generator", + "generator function", + "arrow", + "arrow function", + "ES6", + "toStringTag", + "@@toStringTag" + ], + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.5", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "make-arrow-function": "^1.2.0", + "make-async-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "rimraf": "^2.7.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "v1.2.5" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-callable/test/index.js b/node_modules/is-callable/test/index.js new file mode 100644 index 0000000000000..bfe5db5c5a360 --- /dev/null +++ b/node_modules/is-callable/test/index.js @@ -0,0 +1,244 @@ +'use strict'; + +/* eslint no-magic-numbers: 1 */ + +var test = require('tape'); +var isCallable = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); +var typedArrayNames = require('available-typed-arrays')(); +var generators = require('make-generator-function')(); +var arrows = require('make-arrow-function').list(); +var asyncs = require('make-async-function').list(); +var weirdlyCommentedArrowFn; +try { + /* eslint-disable no-new-func */ + weirdlyCommentedArrowFn = Function('return cl/*/**/=>/**/ass - 1;')(); + /* eslint-enable no-new-func */ +} catch (e) { /**/ } + +var isIE68 = !(0 in [undefined]); +var isFirefox = typeof window !== 'undefined' && ('netscape' in window) && (/ rv:/).test(navigator.userAgent); +var fnToStringCoerces; +try { + Function.prototype.toString.call(v.uncoercibleFnObject); + fnToStringCoerces = true; +} catch (e) { + fnToStringCoerces = false; +} + +var noop = function () {}; +var classFake = function classFake() { }; // eslint-disable-line func-name-matching +var returnClass = function () { return ' class '; }; +var return3 = function () { return 3; }; +/* for coverage */ +noop(); +classFake(); +returnClass(); +return3(); +/* end for coverage */ + +var proxy; +if (typeof Proxy === 'function') { + try { + proxy = new Proxy(function () {}, {}); + // for coverage + proxy(); + String(proxy); + } catch (_) { + // Older engines throw a `TypeError` when `Function.prototype.toString` is called on a Proxy object. + proxy = null; + } +} + +var invokeFunction = function invokeFunctionString(str) { + var result; + try { + /* eslint-disable no-new-func */ + var fn = Function(str); + /* eslint-enable no-new-func */ + result = fn(); + } catch (e) {} + return result; +}; + +var classConstructor = invokeFunction('"use strict"; return class Foo {}'); +var hasDetectableClasses = classConstructor && Function.prototype.toString.call(classConstructor) === 'class Foo {}'; + +var commentedClass = invokeFunction('"use strict"; return class/*kkk*/\n//blah\n Bar\n//blah\n {}'); +var commentedClassOneLine = invokeFunction('"use strict"; return class/**/A{}'); +var classAnonymous = invokeFunction('"use strict"; return class{}'); +var classAnonymousCommentedOneLine = invokeFunction('"use strict"; return class/*/*/{}'); + +test('not callables', function (t) { + t.notOk(isCallable(), 'implicit undefined is not callable'); + + forEach(v.nonFunctions.concat([ + Object(42), + Object('foo'), + NaN, + [], + /a/g, + new RegExp('a', 'g'), + new Date() + ]), function (nonFunction) { + if (fnToStringCoerces && nonFunction === v.coercibleFnObject) { + t.comment('FF 3.6 has a Function toString that coerces its receiver, so this test is skipped'); + return; + } + if (nonFunction != null) { // eslint-disable-line eqeqeq + if (isFirefox) { + // Firefox 3 throws some kind of *object* here instead of a proper error + t['throws']( + function () { Function.prototype.toString.call(nonFunction); }, + inspect(nonFunction) + ' can not be used with Function toString' + ); + } else { + t['throws']( + function () { Function.prototype.toString.call(nonFunction); }, + TypeError, + inspect(nonFunction) + ' can not be used with Function toString' + ); + } + } + t.equal(isCallable(nonFunction), false, inspect(nonFunction) + ' is not callable'); + }); + + t.test('non-function with function in its [[Prototype]] chain', function (st) { + var Foo = function Bar() {}; + Foo.prototype = noop; + st.equal(isCallable(Foo), true, 'sanity check: Foo is callable'); + st.equal(isCallable(new Foo()), false, 'instance of Foo is not callable'); + st.end(); + }); + + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var fakeFunction = { + toString: function () { return String(return3); }, + valueOf: return3 + }; + fakeFunction[Symbol.toStringTag] = 'Function'; + t.equal(String(fakeFunction), String(return3)); + t.equal(Number(fakeFunction), return3()); + t.notOk(isCallable(fakeFunction), 'fake Function with @@toStringTag "Function" is not callable'); + t.end(); +}); + +test('Functions', function (t) { + t.ok(isCallable(noop), 'function is callable'); + t.ok(isCallable(classFake), 'function with name containing "class" is callable'); + t.ok(isCallable(returnClass), 'function with string " class " is callable'); + t.ok(isCallable(isCallable), 'isCallable is callable'); + t.end(); +}); + +test('Typed Arrays', { skip: typedArrayNames.length === 0 }, function (st) { + forEach(typedArrayNames, function (typedArray) { + st.ok(isCallable(global[typedArray]), typedArray + ' is callable'); + }); + st.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.ok(isCallable(genFn), 'generator function ' + genFn + ' is callable'); + }); + t.end(); +}); + +test('Arrow functions', { skip: arrows.length === 0 }, function (t) { + forEach(arrows, function (arrowFn) { + t.ok(isCallable(arrowFn), 'arrow function ' + arrowFn + ' is callable'); + }); + t.ok(isCallable(weirdlyCommentedArrowFn), 'weirdly commented arrow functions are callable'); + t.end(); +}); + +test('"Class" constructors', { + skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous, todo: !hasDetectableClasses +}, function (t) { + if (!hasDetectableClasses) { + t.comment('WARNING: This engine does not support detectable classes'); + } + t.notOk(isCallable(classConstructor), 'class constructors are not callable'); + t.notOk(isCallable(commentedClass), 'class constructors with comments in the signature are not callable'); + t.notOk(isCallable(commentedClassOneLine), 'one-line class constructors with comments in the signature are not callable'); + t.notOk(isCallable(classAnonymous), 'anonymous class constructors are not callable'); + t.notOk(isCallable(classAnonymousCommentedOneLine), 'anonymous one-line class constructors with comments in the signature are not callable'); + t.end(); +}); + +test('`async function`s', { skip: asyncs.length === 0 }, function (t) { + forEach(asyncs, function (asyncFn) { + t.ok(isCallable(asyncFn), '`async function` ' + asyncFn + ' is callable'); + }); + t.end(); +}); + +test('proxies of functions', { skip: !proxy }, function (t) { + t.equal(isCallable(proxy), true, 'proxies of functions are callable'); + t.end(); +}); + +test('throwing functions', function (t) { + t.plan(1); + + var thrower = function (a) { return a.b; }; + t.ok(isCallable(thrower), 'a function that throws is callable'); +}); + +test('DOM', function (t) { + /* eslint-env browser */ + + t.test('document.all', { skip: typeof document !== 'object' }, function (st) { + st.notOk(isCallable(document), 'document is not callable'); + + var all = document.all; + var isFF3 = !isIE68 && Object.prototype.toString(all) === Object.prototype.toString.call(document.all); // this test is true in IE 6-8 also + var expected = false; + if (!isFF3) { + try { + expected = document.all('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + st.equal(isCallable(document.all), expected, 'document.all is ' + (isFF3 ? 'not ' : '') + 'callable'); + + st.end(); + }); + + forEach([ + 'HTMLElement', + 'HTMLAnchorElement' + ], function (name) { + var constructor = global[name]; + + t.test(name, { skip: !constructor }, function (st) { + st.match(typeof constructor, /^(?:function|object)$/, name + ' is a function or object'); + + var callable = isCallable(constructor); + st.equal(typeof callable, 'boolean'); + + if (callable) { + st.doesNotThrow( + function () { Function.prototype.toString.call(constructor); }, + 'anything this library claims is callable should be accepted by Function toString' + ); + } else { + st['throws']( + function () { Function.prototype.toString.call(constructor); }, + TypeError, + 'anything this library claims is not callable should not be accepted by Function toString' + ); + } + + st.end(); + }); + }); + + t.end(); +}); diff --git a/node_modules/is-core-module/.eslintrc b/node_modules/is-core-module/.eslintrc new file mode 100644 index 0000000000000..f2e07268154e3 --- /dev/null +++ b/node_modules/is-core-module/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "func-style": 1, + }, + "overrides": [ + { + "files": "test/**", + "rules": { + "global-require": 0, + "max-depth": 0, + "max-lines-per-function": 0, + "no-negated-condition": 0, + }, + }, + ], +} diff --git a/node_modules/is-core-module/.nycrc b/node_modules/is-core-module/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-core-module/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md new file mode 100644 index 0000000000000..c4db1aced90a8 --- /dev/null +++ b/node_modules/is-core-module/CHANGELOG.md @@ -0,0 +1,180 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.13.1](https://github.com/inspect-js/is-core-module/compare/v2.13.0...v2.13.1) - 2023-10-20 + +### Commits + +- [Refactor] use `hasown` instead of `has` [`0e52096`](https://github.com/inspect-js/is-core-module/commit/0e520968b0a725276b67420ab4b877486b243ae0) +- [Dev Deps] update `mock-property`, `tape` [`8736b35`](https://github.com/inspect-js/is-core-module/commit/8736b35464d0f297b55da2c6b30deee04b8303c5) + +## [v2.13.0](https://github.com/inspect-js/is-core-module/compare/v2.12.1...v2.13.0) - 2023-08-05 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `semver`, `tape` [`c75b263`](https://github.com/inspect-js/is-core-module/commit/c75b263d047cb53430c3970107e5eb64d6cd6c0c) +- [New] `node:test/reporters` and `wasi`/`node:wasi` are in v18.17 [`d76cbf8`](https://github.com/inspect-js/is-core-module/commit/d76cbf8e9b208acfd98913fed5a5f45cb15fe5dc) + +## [v2.12.1](https://github.com/inspect-js/is-core-module/compare/v2.12.0...v2.12.1) - 2023-05-16 + +### Commits + +- [Fix] `test/reporters` now requires the `node:` prefix as of v20.2 [`12183d0`](https://github.com/inspect-js/is-core-module/commit/12183d0d8e4edf56b6ce18a1b3be54bfce10175b) + +## [v2.12.0](https://github.com/inspect-js/is-core-module/compare/v2.11.0...v2.12.0) - 2023-04-10 + +### Commits + +- [actions] update rebase action to use reusable workflow [`c0a7251`](https://github.com/inspect-js/is-core-module/commit/c0a7251f734f3c621932c5fcdfd1bf966b42ca32) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`9ae8b7f`](https://github.com/inspect-js/is-core-module/commit/9ae8b7fac03c369861d0991b4a2ce8d4848e6a7d) +- [New] `test/reporters` added in v19.9, `wasi` added in v20 [`9d5341a`](https://github.com/inspect-js/is-core-module/commit/9d5341ab32053f25b7fa7db3c0e18461db24a79c) +- [Dev Deps] add missing `in-publish` dep [`5980245`](https://github.com/inspect-js/is-core-module/commit/59802456e9ac919fa748f53be9d8fbf304a197df) + +## [v2.11.0](https://github.com/inspect-js/is-core-module/compare/v2.10.0...v2.11.0) - 2022-10-18 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3360011`](https://github.com/inspect-js/is-core-module/commit/33600118857b46177178072fba2affcdeb009d12) +- [Dev Deps] update `aud`, `tape` [`651c6b0`](https://github.com/inspect-js/is-core-module/commit/651c6b0cc2799d4130866cf43ad333dcade3d26c) +- [New] `inspector/promises` and `node:inspector/promises` is now available in node 19 [`22d332f`](https://github.com/inspect-js/is-core-module/commit/22d332fe22ac050305444e0781ff85af819abcb0) + +## [v2.10.0](https://github.com/inspect-js/is-core-module/compare/v2.9.0...v2.10.0) - 2022-08-03 + +### Commits + +- [New] `node:test` is now available in node ^16.17 [`e8fd36e`](https://github.com/inspect-js/is-core-module/commit/e8fd36e9b86c917775a07cc473b62a3294f459f2) +- [Tests] improve skip message [`c014a4c`](https://github.com/inspect-js/is-core-module/commit/c014a4c0cd6eb15fff573ae4709191775e70cab4) + +## [v2.9.0](https://github.com/inspect-js/is-core-module/compare/v2.8.1...v2.9.0) - 2022-04-19 + +### Commits + +- [New] add `node:test`, in node 18+ [`f853eca`](https://github.com/inspect-js/is-core-module/commit/f853eca801d0a7d4e1dbb670f1b6d9837d9533c5) +- [Tests] use `mock-property` [`03b3644`](https://github.com/inspect-js/is-core-module/commit/03b3644dff4417f4ba5a7d0aa0138f5f6b3e5c46) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7c0e2d0`](https://github.com/inspect-js/is-core-module/commit/7c0e2d06ed2a89acf53abe2ab34d703ed5b03455) +- [meta] simplify "exports" [`d6ed201`](https://github.com/inspect-js/is-core-module/commit/d6ed201eba7fbba0e59814a9050fc49a6e9878c8) + +## [v2.8.1](https://github.com/inspect-js/is-core-module/compare/v2.8.0...v2.8.1) - 2022-01-05 + +### Commits + +- [actions] reuse common workflows [`cd2cf9b`](https://github.com/inspect-js/is-core-module/commit/cd2cf9b3b66c8d328f65610efe41e9325db7716d) +- [Fix] update node 0.4 results [`062195d`](https://github.com/inspect-js/is-core-module/commit/062195d89f0876a88b95d378b43f7fcc1205bc5b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0790b62`](https://github.com/inspect-js/is-core-module/commit/0790b6222848c6167132f9f73acc3520fa8d1298) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7d139a6`](https://github.com/inspect-js/is-core-module/commit/7d139a6d767709eabf0a0251e074ec1fb230c06e) +- [Tests] run `nyc` in `tests-only`, not `test` [`780e8a0`](https://github.com/inspect-js/is-core-module/commit/780e8a049951c71cf78b1707f0871c48a28bde14) + +## [v2.8.0](https://github.com/inspect-js/is-core-module/compare/v2.7.0...v2.8.0) - 2021-10-14 + +### Commits + +- [actions] update codecov uploader [`0cfe94e`](https://github.com/inspect-js/is-core-module/commit/0cfe94e106a7d005ea03e008c0a21dec13a77904) +- [New] add `readline/promises` to node v17+ [`4f78c30`](https://github.com/inspect-js/is-core-module/commit/4f78c3008b1b58b4db6dc91d99610b1bc859da7e) +- [Tests] node ^14.18 supports `node:` prefixes for CJS [`43e2f17`](https://github.com/inspect-js/is-core-module/commit/43e2f177452cea2f0eaf34f61b5407217bbdb6f4) + +## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27 + +### Commits + +- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526) +- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7) +- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c) +- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2) +- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13) + +## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17 + +### Commits + +- [Dev Deps] update `eslint`, `tape` [`6cc928f`](https://github.com/inspect-js/is-core-module/commit/6cc928f8a4bba66aeeccc4f6beeac736d4bd3081) +- [New] add `stream/consumers` to node `>= 16.7` [`a1a423e`](https://github.com/inspect-js/is-core-module/commit/a1a423e467e4cc27df180234fad5bab45943e67d) +- [Refactor] Remove duplicated `&&` operand [`86faea7`](https://github.com/inspect-js/is-core-module/commit/86faea738213a2433c62d1098488dc9314dca832) +- [Tests] include prereleases [`a4da7a6`](https://github.com/inspect-js/is-core-module/commit/a4da7a6abf7568e2aa4fd98e69452179f1850963) + +## [v2.5.0](https://github.com/inspect-js/is-core-module/compare/v2.4.0...v2.5.0) - 2021-07-12 + +### Commits + +- [Dev Deps] update `auto-changelog`, `eslint` [`6334cc9`](https://github.com/inspect-js/is-core-module/commit/6334cc94f3af7469685bd8f236740991baaf2705) +- [New] add `stream/web` to node v16.5+ [`17ac59b`](https://github.com/inspect-js/is-core-module/commit/17ac59b662d63e220a2e5728625f005c24f177b2) + +## [v2.4.0](https://github.com/inspect-js/is-core-module/compare/v2.3.0...v2.4.0) - 2021-05-09 + +### Commits + +- [readme] add actions and codecov badges [`82b7faa`](https://github.com/inspect-js/is-core-module/commit/82b7faa12b56dbe47fbea67e1a5b9e447027ba40) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8096868`](https://github.com/inspect-js/is-core-module/commit/8096868c024a161ccd4d44110b136763e92eace8) +- [Dev Deps] update `eslint` [`6726824`](https://github.com/inspect-js/is-core-module/commit/67268249b88230018c510f6532a8046d7326346f) +- [New] add `diagnostics_channel` to node `^14.17` [`86c6563`](https://github.com/inspect-js/is-core-module/commit/86c65634201b8ff9b3e48a9a782594579c7f5c3c) +- [meta] fix prepublish script [`697a01e`](https://github.com/inspect-js/is-core-module/commit/697a01e3c9c0be074066520954f30fb28532ec57) + +## [v2.3.0](https://github.com/inspect-js/is-core-module/compare/v2.2.0...v2.3.0) - 2021-04-24 + +### Commits + +- [meta] do not publish github action workflow files [`060d4bb`](https://github.com/inspect-js/is-core-module/commit/060d4bb971a29451c19ff336eb56bee27f9fa95a) +- [New] add support for `node:` prefix, in node 16+ [`7341223`](https://github.com/inspect-js/is-core-module/commit/73412230a769f6e81c05eea50b6520cebf54ed2f) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`016269a`](https://github.com/inspect-js/is-core-module/commit/016269abae9f6657a5254adfbb813f09a05067f9) +- [patch] remove unneeded `.0` in version ranges [`cb466a6`](https://github.com/inspect-js/is-core-module/commit/cb466a6d89e52b8389e5c12715efcd550c41cea3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`c9f9c39`](https://github.com/inspect-js/is-core-module/commit/c9f9c396ace60ef81906f98059c064e6452473ed) +- [actions] update workflows [`3ee4a89`](https://github.com/inspect-js/is-core-module/commit/3ee4a89fd5a02fccd43882d905448ea6a98e9a3c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`dee4fed`](https://github.com/inspect-js/is-core-module/commit/dee4fed79690c1d43a22f7fa9426abebdc6d727f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`7d046ba`](https://github.com/inspect-js/is-core-module/commit/7d046ba07ae8c9292e43652694ca808d7b309de8) +- [meta] use `prepublishOnly` script for npm 7+ [`149e677`](https://github.com/inspect-js/is-core-module/commit/149e6771a5ede6d097e71785b467a9c4b4977cc7) +- [readme] remove travis badge [`903b51d`](https://github.com/inspect-js/is-core-module/commit/903b51d6b69b98abeabfbc3695c345b02646f19c) + +## [v2.2.0](https://github.com/inspect-js/is-core-module/compare/v2.1.0...v2.2.0) - 2020-11-26 + +### Commits + +- [Tests] migrate tests to Github Actions [`c919f57`](https://github.com/inspect-js/is-core-module/commit/c919f573c0a92d10a0acad0b650b5aecb033d426) +- [patch] `core.json`: %s/ /\t/g [`db3f685`](https://github.com/inspect-js/is-core-module/commit/db3f68581f53e73cc09cd675955eb1bdd6a5a39b) +- [Tests] run `nyc` on all tests [`b2f925f`](https://github.com/inspect-js/is-core-module/commit/b2f925f8866f210ef441f39fcc8cc42692ab89b1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`; add `safe-publish-latest` [`89f02a2`](https://github.com/inspect-js/is-core-module/commit/89f02a2b4162246dea303a6ee31bb9a550b05c72) +- [New] add `path/posix`, `path/win32`, `util/types` [`77f94f1`](https://github.com/inspect-js/is-core-module/commit/77f94f1e90ffd7c0be2a3f1aa8574ebf7fd981b3) + +## [v2.1.0](https://github.com/inspect-js/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04 + +### Commits + +- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/inspect-js/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4) +- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/inspect-js/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec) + +## [v2.0.0](https://github.com/inspect-js/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29 + +### Commits + +- v2 implementation [`865aeb5`](https://github.com/inspect-js/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd) +- Only apps should have lockfiles [`5a5e660`](https://github.com/inspect-js/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b) +- Initial commit for v2 [`5a51524`](https://github.com/inspect-js/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348) +- Tests [`116eae4`](https://github.com/inspect-js/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496) +- [meta] add `auto-changelog` [`c24388b`](https://github.com/inspect-js/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63) +- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/inspect-js/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a) +- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/inspect-js/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697) +- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/inspect-js/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9) +- [meta] create FUNDING.yml [`1aabebc`](https://github.com/inspect-js/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6) +- [Fix] `domain`: domain landed sometime > v0.7.7 and <= v0.7.12 [`2df7d37`](https://github.com/inspect-js/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655) +- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/inspect-js/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65) + +## [v1.0.2](https://github.com/inspect-js/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28 + +### Commits + +- simpler [`66fe90f`](https://github.com/inspect-js/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2) + +## [v1.0.1](https://github.com/inspect-js/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28 + +### Commits + +- remove stupid [`f21f906`](https://github.com/inspect-js/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac) +- update readme [`1eff0ec`](https://github.com/inspect-js/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027) + +## v1.0.0 - 2014-09-28 + +### Commits + +- init [`48e5e76`](https://github.com/inspect-js/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96) diff --git a/node_modules/is-core-module/LICENSE b/node_modules/is-core-module/LICENSE new file mode 100644 index 0000000000000..2e502872a7423 --- /dev/null +++ b/node_modules/is-core-module/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Dave Justice + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION 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-core-module/README.md b/node_modules/is-core-module/README.md new file mode 100644 index 0000000000000..062d9068eb57e --- /dev/null +++ b/node_modules/is-core-module/README.md @@ -0,0 +1,40 @@ +# is-core-module [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version. + +## Example + +```js +var isCore = require('is-core-module'); +var assert = require('assert'); +assert(isCore('fs')); +assert(!isCore('butts')); +``` + +## Tests +Clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-core-module +[2]: https://versionbadg.es/inspect-js/is-core-module.svg +[5]: https://david-dm.org/inspect-js/is-core-module.svg +[6]: https://david-dm.org/inspect-js/is-core-module +[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies +[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-core-module.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module +[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module +[actions-url]: https://github.com/inspect-js/is-core-module/actions diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json new file mode 100644 index 0000000000000..3cda693d7d0fd --- /dev/null +++ b/node_modules/is-core-module/core.json @@ -0,0 +1,158 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "test/reporters": ">= 19.9 && < 20.2", + "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], + "node:test": [">= 16.17 && < 17", ">= 18"], + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], + "node:wasi": [">= 18.17 && < 19", ">= 20"], + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js new file mode 100644 index 0000000000000..423e20c0d99db --- /dev/null +++ b/node_modules/is-core-module/index.js @@ -0,0 +1,69 @@ +'use strict'; + +var hasOwn = require('hasown'); + +function specifierIncluded(current, specifier) { + var nodeParts = current.split('.'); + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } + if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; +} + +function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === 'boolean') { + return specifierValue; + } + + var current = typeof nodeVersion === 'undefined' + ? process.versions && process.versions.node + : nodeVersion; + + if (typeof current !== 'string') { + throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); + } + + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); +} + +var data = require('./core.json'); + +module.exports = function isCore(x, nodeVersion) { + return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]); +}; diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json new file mode 100644 index 0000000000000..1bac5851fd637 --- /dev/null +++ b/node_modules/is-core-module/package.json @@ -0,0 +1,73 @@ +{ + "name": "is-core-module", + "version": "2.13.1", + "description": "Is this specifier a node.js core module?", + "main": "index.js", + "sideEffects": false, + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-core-module.git" + }, + "keywords": [ + "core", + "modules", + "module", + "npm", + "node", + "dependencies" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-core-module/issues" + }, + "homepage": "https://github.com/inspect-js/is-core-module", + "dependencies": { + "hasown": "^2.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mock-property": "^1.0.2", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.1", + "tape": "^5.7.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github" + ] + } +} diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js new file mode 100644 index 0000000000000..912808b9d0000 --- /dev/null +++ b/node_modules/is-core-module/test/index.js @@ -0,0 +1,133 @@ +'use strict'; + +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); +var mockProperty = require('mock-property'); + +var isCore = require('../'); +var data = require('../core.json'); + +var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(isCore('fs')); + st.ok(isCore('net')); + st.ok(isCore('http')); + + st.ok(!isCore('seq')); + st.ok(!isCore('../')); + + st.ok(!isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(data); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + if (isCore(mod)) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else { + st['throws'](requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !data.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('repl._builtinLibs does not exist'); + } else { + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !data.module }, function (st) { + var libs = require('module').builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + } else { + var excludeList = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (excludeList.indexOf(mod) === -1) { + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + } + st.end(); + }); + + t.test('Object.prototype pollution', function (st) { + var nonKey = 'not a core module'; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); + + st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); + st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); + st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); + st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-data-descriptor/.editorconfig b/node_modules/is-data-descriptor/.editorconfig new file mode 100644 index 0000000000000..449f0da4c1605 --- /dev/null +++ b/node_modules/is-data-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/is-data-descriptor/.eslintrc b/node_modules/is-data-descriptor/.eslintrc new file mode 100644 index 0000000000000..a3e0df3fe5867 --- /dev/null +++ b/node_modules/is-data-descriptor/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb/eslint-config/node/0.4", + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "warn", + "max-nested-callbacks": "warn", + }, + }, + ], +} diff --git a/node_modules/is-data-descriptor/.github/FUNDING.yml b/node_modules/is-data-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000000000..156c8d7b6880e --- /dev/null +++ b/node_modules/is-data-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-data-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-data-descriptor/.nycrc b/node_modules/is-data-descriptor/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-data-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-data-descriptor/CHANGELOG.md b/node_modules/is-data-descriptor/CHANGELOG.md new file mode 100644 index 0000000000000..3e1ca8d738fb0 --- /dev/null +++ b/node_modules/is-data-descriptor/CHANGELOG.md @@ -0,0 +1,109 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.1.2](https://github.com/inspect-js/is-data-descriptor/compare/v2.1.1...v2.1.2) - 2023-10-25 + +### Commits + +- [Refactor] use `hasown` [`77ad812`](https://github.com/inspect-js/is-data-descriptor/commit/77ad8129c7543f6826e2cbcadc015cc815ef94b7) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`88f2cb7`](https://github.com/inspect-js/is-data-descriptor/commit/88f2cb744242131a98086967ea4a3c5d42c6fa77) + +## [v2.1.1](https://github.com/inspect-js/is-data-descriptor/compare/v2.1.0...v2.1.1) - 2023-04-27 + +### Commits + +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`72692d3`](https://github.com/inspect-js/is-data-descriptor/commit/72692d3c1184e4d1f11faecbc9446b21cf5610a1) +- [readme] remove empty section [`72ec85b`](https://github.com/inspect-js/is-data-descriptor/commit/72ec85b9c4d781d551f19e595cca91b5f933d90d) + +## [v2.1.0](https://github.com/inspect-js/is-data-descriptor/compare/v2.0.0...v2.1.0) - 2023-04-27 + +### Commits + +- [eslint] cleanup [`c18a236`](https://github.com/inspect-js/is-data-descriptor/commit/c18a23640c00f32fca39112381b5cabdaa6a9a55) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5758410`](https://github.com/inspect-js/is-data-descriptor/commit/5758410ec503add0727f2215633e5b1998c21293) +- [readme] clean up docs, URLs, package.json, etc [`28f61dd`](https://github.com/inspect-js/is-data-descriptor/commit/28f61dd676d8661ca7468e091ddf2e22bf4a8da2) +- [Docs] remove verb [`e20d28c`](https://github.com/inspect-js/is-data-descriptor/commit/e20d28cc86ce8a7cbc4beb0f306e5a4034b6d704) +- [Tests] convert from mocha to tape [`666c175`](https://github.com/inspect-js/is-data-descriptor/commit/666c1755f29668098dc07fbda0eb1d354a4da640) +- [New] increase support from node 6 down to node 0.4 [`aa43b69`](https://github.com/inspect-js/is-data-descriptor/commit/aa43b699b4a53b97e7af13f4d49eb7a21d253d99) +- [Tests] add coverage [`8f094f6`](https://github.com/inspect-js/is-data-descriptor/commit/8f094f6809514862f367c07bd879f2de42f4d9d0) +- [meta] switch from `files` field to npmignore; add `exports` [`2769e1d`](https://github.com/inspect-js/is-data-descriptor/commit/2769e1d408330b05331a40216e7a6bdce2322f69) +- [Deps] remove unused `kind-of` [`bc87bcd`](https://github.com/inspect-js/is-data-descriptor/commit/bc87bcd5f9abfa3ac8bcd2daf85ca9c380cb225d) + +## [v2.0.0](https://github.com/inspect-js/is-data-descriptor/compare/v1.0.1...v2.0.0) - 2018-12-13 + +### Commits + +- refactor [`8dcc492`](https://github.com/inspect-js/is-data-descriptor/commit/8dcc492bfb8e6d5b7964c1c566cdfe27ffbd8b0a) + +## [v1.0.1](https://github.com/inspect-js/is-data-descriptor/compare/v1.0.0...v1.0.1) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`65fed07`](https://github.com/inspect-js/is-data-descriptor/commit/65fed07b2dde027da64f303c21a44a4375a2e2bd) +- [readme] clean up readme, remove verb [`10ad663`](https://github.com/inspect-js/is-data-descriptor/commit/10ad663093b0ed9c9c0c13c6db4ead4351b8670e) +- [meta] clean up package.json [`7f76a01`](https://github.com/inspect-js/is-data-descriptor/commit/7f76a015050fc87e9b394440c3b5283cf55b2c82) +- [meta] update `.gitignore` [`a2ca593`](https://github.com/inspect-js/is-data-descriptor/commit/a2ca593bb1173e73f23eb401e455249c71c2eda8) +- [Tests] switch to tape [`70540e5`](https://github.com/inspect-js/is-data-descriptor/commit/70540e5449ef3239051d4e40dce8a5a1978d1634) +- [Tests] migrate from travis to github actions [`eee138d`](https://github.com/inspect-js/is-data-descriptor/commit/eee138d84d57191310acf3e7fdc83f5951570188) +- [Fix] properly return false for an accessor descriptor [`2c213cd`](https://github.com/inspect-js/is-data-descriptor/commit/2c213cd67d558c169a02892dc52592ca1d5d8f40) +- [Performance] move data object to module level [`37688a1`](https://github.com/inspect-js/is-data-descriptor/commit/37688a1653f3a2a364f14bb396803413cb435963) +- [Fix] allow any non-primitive; arrays and functions are objects too [`197c77a`](https://github.com/inspect-js/is-data-descriptor/commit/197c77a39c53d12d7a091bcc029fcf7d75ce3a26) +- Only apps should have lockfiles [`20aa6e5`](https://github.com/inspect-js/is-data-descriptor/commit/20aa6e513aeb4bb84be63e278ce073c860deeade) +- [Robustness] switch to `hasown` [`aa48e2f`](https://github.com/inspect-js/is-data-descriptor/commit/aa48e2f61b3fb29e80cf655618d1573a21e8433e) +- [Fix] properly guard for-in loop [`014971e`](https://github.com/inspect-js/is-data-descriptor/commit/014971ea90715c2675511b89d05df00d4be10ecf) +- [Robustness] use a null object just in case [`ab05aad`](https://github.com/inspect-js/is-data-descriptor/commit/ab05aad03368d202505c4acde07ebc22f8da128d) + +## [v1.0.0](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.4...v1.0.0) - 2017-11-01 + +### Merged + +- Update kind-of to version 6.0 [`#1`](https://github.com/inspect-js/is-data-descriptor/pull/1) +- Pin mocha to version 3 to support Node 0.12 [`#2`](https://github.com/inspect-js/is-data-descriptor/pull/2) + +### Commits + +- run update [`63e5992`](https://github.com/inspect-js/is-data-descriptor/commit/63e5992c6b953d652952cecb93468897ae8e5e29) +- update verb, generate readme documentation [`42dcba2`](https://github.com/inspect-js/is-data-descriptor/commit/42dcba2627fe655daa21aec843ca8de849f26cd6) +- minor edits [`23164cb`](https://github.com/inspect-js/is-data-descriptor/commit/23164cbc3496f7b13ec470781f05636ef610eecb) + +## [v0.1.4](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Fixed + +- fixes https://github.com/jonschlinkert/is-descriptor/issues/2 [`#2`](https://github.com/jonschlinkert/is-descriptor/issues/2) + +### Commits + +- lint [`6d69a34`](https://github.com/inspect-js/is-data-descriptor/commit/6d69a34001d6191d7874cd28aebcdc5441f06f70) +- lint, update lazy-cache [`58bcd4e`](https://github.com/inspect-js/is-data-descriptor/commit/58bcd4ea72f000c83fb167024cf116d4c357440e) +- generate docs with verb [`e6317db`](https://github.com/inspect-js/is-data-descriptor/commit/e6317dbcb27a95281a60120bac83f5938dda4e2c) +- update docs [`fb2e768`](https://github.com/inspect-js/is-data-descriptor/commit/fb2e7689724ad948673734865999051aec2da552) +- generate docs [`bd0ea52`](https://github.com/inspect-js/is-data-descriptor/commit/bd0ea52c7a80223bedc90aadd43e466169907c2a) +- adds verb plugin [`7657b81`](https://github.com/inspect-js/is-data-descriptor/commit/7657b8188aa6fd003586bdb4e791e02dce21bc99) + +## [v0.1.3](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.2...v0.1.3) - 2015-10-04 + +### Commits + +- files prop [`b0b7700`](https://github.com/inspect-js/is-data-descriptor/commit/b0b77004c51fec564e68bf6ff89fd4a169915d5b) + +## [v0.1.2](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- lazy-cache [`49a868c`](https://github.com/inspect-js/is-data-descriptor/commit/49a868c410a1651367315763e24c796e0b5127ce) +- update readme [`936d3f4`](https://github.com/inspect-js/is-data-descriptor/commit/936d3f4327f782c9e0d0ef120c68a81bb987ce72) + +## v0.1.1 - 2015-08-31 + +### Commits + +- first commit [`a1915ae`](https://github.com/inspect-js/is-data-descriptor/commit/a1915ae8a9a4a633d18630102264d266b6e08f08) +- 0.1.1 readme [`8fd6ad0`](https://github.com/inspect-js/is-data-descriptor/commit/8fd6ad0e1b49fa4a22293bfdd807762863afbd5e) +- 0.1.1 docs [`5e54369`](https://github.com/inspect-js/is-data-descriptor/commit/5e543699944b7ee5fe091399dc4186bcace47e3e) +- 0.1.1 docs [`8ec34af`](https://github.com/inspect-js/is-data-descriptor/commit/8ec34af8e80d0f8e386c6bff57e2e4b18d4e0afb) +- lint [`d265658`](https://github.com/inspect-js/is-data-descriptor/commit/d265658d986a688bf217461ca9c24d9c5300bdc8) diff --git a/node_modules/is-data-descriptor/LICENSE b/node_modules/is-data-descriptor/LICENSE new file mode 100644 index 0000000000000..e33d14b754e8c --- /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 0000000000000..1ca46bd9e4aa5 --- /dev/null +++ b/node_modules/is-data-descriptor/README.md @@ -0,0 +1,112 @@ +# is-data-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript data descriptor. + +## Install + +Install with [npm](https://npmjs.com/): + +```sh +$ npm install --save is-data-descriptor +``` + +## Usage + +```js +var isDataDesc = require('is-data-descriptor'); +var assert = require('assert'); +``` + +## Examples + +`true` when the descriptor has valid properties with valid values. + +```js +// `value` can be anything +assert.equal(isDataDesc({ value: 'foo' }), true); +assert.equal(isDataDesc({ value: function () {} }), true); +assert.equal(isDataDesc({ value: true }), true); +``` + +`false` when not an object + +```js +assert.equal(isDataDesc('a'), false); +assert.equal(isDataDesc(null), false); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDataDesc({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDataDesc({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDataDesc({ value: 'foo', get() {} }), false); +assert.equal(isDataDesc({ get() {}, value: 'foo' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDataDesc({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDataDesc({ value: 'foo', configurable: 'foo' }), false); +assert.equal(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() { + return 'baz'; + } +}); + +assert.equal(foo.bar, 'baz'); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://npmjs.com/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-descriptor](https://npmjs.com/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://npmjs.com/is-descriptor) + +[package-url]: https://npmjs.org/package/is-data-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-data-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-data-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-data-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-data-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-data-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-data-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-data-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-data-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-data-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-data-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-data-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-data-descriptor +[actions-url]: https://github.com/inspect-js/is-data-descriptor/actions diff --git a/node_modules/is-data-descriptor/index.js b/node_modules/is-data-descriptor/index.js new file mode 100644 index 0000000000000..6d801de9eb2e2 --- /dev/null +++ b/node_modules/is-data-descriptor/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var hasOwn = require('hasown'); + +// data descriptor properties +var data = { + __proto__: null, + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean', +}; + +module.exports = function isDataDescriptor(obj, prop) { + if (!obj || 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)) + || 'get' in obj + || 'set' in obj + ) { + return false; + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if ( + key !== 'value' + && hasOwn(obj, key) + && hasOwn(data, key) + && typeof obj[key] !== data[key] + && 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 0000000000000..dc7dd93210f7f --- /dev/null +++ b/node_modules/is-data-descriptor/package.json @@ -0,0 +1,87 @@ +{ + "name": "is-data-descriptor", + "version": "1.0.1", + "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "prelint": "evalmd README.md", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-data-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-data-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-data-descriptor", + "contributors": [ + "Jordan Harband (https://github.com/ljharb)", + "Jon Schlinkert (https://twitter.com/jonschlinkert)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "dependencies": { + "hasown": "^2.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-data-descriptor/test/index.js b/node_modules/is-data-descriptor/test/index.js new file mode 100644 index 0000000000000..0859518b7ebc9 --- /dev/null +++ b/node_modules/is-data-descriptor/test/index.js @@ -0,0 +1,67 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('value type', function (st) { + st.notOk(isDescriptor('a'), 'string is not a descriptor'); + st.notOk(isDescriptor(null), 'null is not a descriptor'); + + st.end(); + }); + + t.test('should not be false when the object has unknown properties:', function (st) { + st.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + st.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + st.end(); + }); + + t.test('should be false when the object has accessor properties', function (st) { + st.notOk(isDescriptor({ value: 'foo', get: noop })); + st.notOk(isDescriptor({ set: noop, value: noop })); + + st.end(); + }); + + t.test('should be true when the object has valid data-descriptor properties', function (st) { + st.ok(isDescriptor({ value: 'foo' })); + st.ok(isDescriptor({ value: noop })); + + st.end(); + }); + + t.test('should be false when valid properties are invalid types', function (st) { + st.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + st.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + st.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + st.end(); + }); + + t.test('should be true when a value is a valid data descriptor', function (st) { + st.ok(isDescriptor({ value: 'foo' })); + st.ok(isDescriptor({ writable: true })); + + st.end(); + }); + + t.test('should be false when the value is not a valid descriptor', function (st) { + st.notOk(isDescriptor('foo')); + st.notOk(isDescriptor({})); + st.notOk(isDescriptor({ configurable: true })); + st.notOk(isDescriptor({ enumerable: true })); + st.notOk(isDescriptor({ + get: undefined, + set: undefined, + enumerable: true, + configurable: true, + })); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-date-object/.editorconfig b/node_modules/is-date-object/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/is-date-object/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-date-object/.eslintignore b/node_modules/is-date-object/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-date-object/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-date-object/.eslintrc b/node_modules/is-date-object/.eslintrc new file mode 100644 index 0000000000000..1228f975c9973 --- /dev/null +++ b/node_modules/is-date-object/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 12] + } +} diff --git a/node_modules/is-date-object/.github/FUNDING.yml b/node_modules/is-date-object/.github/FUNDING.yml new file mode 100644 index 0000000000000..9cfa9fde08ee1 --- /dev/null +++ b/node_modules/is-date-object/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-date-object +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-date-object/.nycrc b/node_modules/is-date-object/.nycrc new file mode 100644 index 0000000000000..a69aa2d8273d8 --- /dev/null +++ b/node_modules/is-date-object/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-date-object/CHANGELOG.md b/node_modules/is-date-object/CHANGELOG.md new file mode 100644 index 0000000000000..49f624a4251f2 --- /dev/null +++ b/node_modules/is-date-object/CHANGELOG.md @@ -0,0 +1,114 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.5](https://github.com/inspect-js/is-date-object/compare/v1.0.4...v1.0.5) - 2021-08-05 + +### Commits + +- [meta] remove `.jscs.json` [`31c731c`](https://github.com/inspect-js/is-date-object/commit/31c731c5efc5b1b86e6426d904373dc6225b929f) +- [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams [`17a6df4`](https://github.com/inspect-js/is-date-object/commit/17a6df4a3ab9bcb1395a638ced14f571f9549427) +- [Dev Deps] update `eslint`, `auto-changelog`, `tape` [`79db3af`](https://github.com/inspect-js/is-date-object/commit/79db3af1a745042a0a11e03c7dd7db910b5e0d01) + +## [v1.0.4](https://github.com/inspect-js/is-date-object/compare/v1.0.3...v1.0.4) - 2021-05-07 + +### Commits + +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`8943a4a`](https://github.com/inspect-js/is-date-object/commit/8943a4a5035b3f2c8cee9a5edabb55579c16983d) +- [readme] make all URLs https [`1d4d6cd`](https://github.com/inspect-js/is-date-object/commit/1d4d6cd37365c3a36f98e3f82cfe6262227437db) +- [Dev Deps] update `eslint` [`a7abeaa`](https://github.com/inspect-js/is-date-object/commit/a7abeaa2409d3a34fccebcb5b362e0b90d0a8883) + +## [v1.0.3](https://github.com/inspect-js/is-date-object/compare/v1.0.2...v1.0.3) - 2021-05-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`023504f`](https://github.com/inspect-js/is-date-object/commit/023504f4d48fc8788ff52ee525a1d9ec74fa7df5) +- [readme] add actions and codecov badges [`e63305f`](https://github.com/inspect-js/is-date-object/commit/e63305f2fb9ff3eb0dab7e0716585507a4f95a75) +- [meta] do not publish github action workflow files [`017d906`](https://github.com/inspect-js/is-date-object/commit/017d90679b6b1c16b398c0157904f91f56160219) +- [Tests] run `nyc` on all tests [`0376b6f`](https://github.com/inspect-js/is-date-object/commit/0376b6fb7a0ffcc42107c3c579ba0b3ab635b9e4) +- [readme] fix repo URLs; remove defunct badges [`1c148c6`](https://github.com/inspect-js/is-date-object/commit/1c148c6cb6eb0892b3186e814df3367dabb9732d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`c7a3f54`](https://github.com/inspect-js/is-date-object/commit/c7a3f54a207a6056ffafaa58178889ea1b1b77f7) +- [actions] add "Allow Edits" workflow [`e79b5b2`](https://github.com/inspect-js/is-date-object/commit/e79b5b25c173c3201e8b42a614d5f12c48b74a86) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`da28980`](https://github.com/inspect-js/is-date-object/commit/da28980c5fe86528585b2a420319ca8fc35f763a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`5cabae9`](https://github.com/inspect-js/is-date-object/commit/5cabae9f00bf458a470bde68b734540b8ab78c3b) +- [readme] add actions and codecov badges [`33dfb88`](https://github.com/inspect-js/is-date-object/commit/33dfb881b7abf668cd3bf956e2947a1ece552f25) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`745eb04`](https://github.com/inspect-js/is-date-object/commit/745eb0462ef3838df65f41f4a95453cc4f0aa06e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`466c62b`](https://github.com/inspect-js/is-date-object/commit/466c62b45af5a5a83963f6ef8617da887b0ab272) +- [actions] use checkout v2; remove unneeded env [`ff87a16`](https://github.com/inspect-js/is-date-object/commit/ff87a161e36d76d081d70933bf801a357c3b25fe) +- [Dev Deps] update `auto-changelog`, `tape` [`93188f5`](https://github.com/inspect-js/is-date-object/commit/93188f58e4b2c2b5e978a61a45380101d01f9838) +- [meta] use `prepublishOnly` script for npm 7+ [`1d0e3ea`](https://github.com/inspect-js/is-date-object/commit/1d0e3ea672971f02bb48c88b49079789ab41f574) +- [actions] update workflows [`4d1a235`](https://github.com/inspect-js/is-date-object/commit/4d1a2358de35a9fbe23a1dee10735748ed276301) +- [Dev Deps] update `auto-changelog`; add `aud` [`67be59a`](https://github.com/inspect-js/is-date-object/commit/67be59aa3c0ba44b982aaefb7e42adfb14eb279b) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`a6661c2`](https://github.com/inspect-js/is-date-object/commit/a6661c26af701a7782f6e06ad1b34587ce2b09bc) +- [Tests] only audit prod deps [`dd4a47f`](https://github.com/inspect-js/is-date-object/commit/dd4a47f8bcf82c3090826d890a7766f50d6f7af9) + +## [v1.0.2](https://github.com/inspect-js/is-date-object/compare/v1.0.1...v1.0.2) - 2019-12-18 + +### Commits + +- [Tests] use shared travis-ci configs [`8a378b8`](https://github.com/inspect-js/is-date-object/commit/8a378b8fd6a4202fffc9ec193aca02efe937bc35) +- [Tests] on all node minors; use `nvm install-latest-npm`; fix scripts; improve matrix [`6e97a21`](https://github.com/inspect-js/is-date-object/commit/6e97a21276cf448ce424fb9ea13edd4587f289f1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `jscs`, `nsp`, `semver`, `tape` [`8472b90`](https://github.com/inspect-js/is-date-object/commit/8472b90f82e5153c22e7a8a7726a5cc6110e93d7) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`ae73e38`](https://github.com/inspect-js/is-date-object/commit/ae73e3890df7da0bc4449088e30340cb4df3294d) +- [meta] add `auto-changelog` [`82f8f47`](https://github.com/inspect-js/is-date-object/commit/82f8f473a6ee45e2b66810cb743e0122c18381c5) +- [meta] remove unused Makefile and associated utilities [`788a2cd`](https://github.com/inspect-js/is-date-object/commit/788a2cdfd0bc8f1903967219897f6d00c4c6a26b) +- [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15` [`b9caf7c`](https://github.com/inspect-js/is-date-object/commit/b9caf7c814e5e2549454cb444f8b739f9ce1a388) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v8.15`, `v6.17`; use `nvm install-latest-npm` [`cda0abc`](https://github.com/inspect-js/is-date-object/commit/cda0abc04a21c9b5ec72eabd010155c988032056) +- [Tests] up to `node` `v12.10`, `v10.16`, `v8.16` [`49bc482`](https://github.com/inspect-js/is-date-object/commit/49bc482fd9f71436b663c07144083a8423697299) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `semver`, `tape`; add `safe-publish-latest` [`f77fec4`](https://github.com/inspect-js/is-date-object/commit/f77fec48057e156b2276b4c14cf303306116b9f6) +- [actions] add automatic rebasing / merge commit blocking [`68605fc`](https://github.com/inspect-js/is-date-object/commit/68605fcb6bc0341ff0aae14a94bf5d18e1bc73be) +- [meta] create FUNDING.yml [`4f82d88`](https://github.com/inspect-js/is-date-object/commit/4f82d88e1e6ac1b97f0ce96aa0aa057ad758a581) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`3cbf28a`](https://github.com/inspect-js/is-date-object/commit/3cbf28a185ced940cfce8a09fa8479cc83575876) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config@`, `is`, `semver`, `tape` [`abf9fb0`](https://github.com/inspect-js/is-date-object/commit/abf9fb0d55ef0697e64e888d74f2e5fe53d7cdcb) +- [Tests] switch from `nsp` to `npm audit` [`6543c7d`](https://github.com/inspect-js/is-date-object/commit/6543c7d559d1fb79215b46c8b79e0e3e2a83f5de) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`ba5d2d7`](https://github.com/inspect-js/is-date-object/commit/ba5d2d7fc0975d7c03b8f2b7f43a09af93e365ba) +- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`c1e3525`](https://github.com/inspect-js/is-date-object/commit/c1e3525afa76a696f7cf1b58aab7f55d220b2c20) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`14e4824`](https://github.com/inspect-js/is-date-object/commit/14e4824188c85207ed3b86627b09e9f64b135db7) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`68ead64`](https://github.com/inspect-js/is-date-object/commit/68ead64a07e0de282ea3cd38e12cc8b0e0f6d3cd) +- [Dev Deps] update `eslint`, semver`, `tape`, `semver` [`f55453f`](https://github.com/inspect-js/is-date-object/commit/f55453f200903277465d7e9307a9c49120a4f419) +- Only apps should have lockfiles [`6c848eb`](https://github.com/inspect-js/is-date-object/commit/6c848eba982cc58053d4cca08c01f12a433f3695) +- [Tests] remove `jscs` [`3fd3a62`](https://github.com/inspect-js/is-date-object/commit/3fd3a62121607ad074b7fc977f3fc6575b66f755) +- [Dev Deps] update `eslint`, `tape` [`77d3130`](https://github.com/inspect-js/is-date-object/commit/77d3130a0039e5dae24c17de790dd510c265edc6) +- [meta] add `funding` field [`9ef6d58`](https://github.com/inspect-js/is-date-object/commit/9ef6d5888bf829a5812b3b091dc99839d48c355e) + +## [v1.0.1](https://github.com/inspect-js/is-date-object/compare/v1.0.0...v1.0.1) - 2015-09-27 + +### Commits + +- Update `tape`, `semver`, `eslint`; use my personal shared `eslint` config. [`731aa13`](https://github.com/inspect-js/is-date-object/commit/731aa134b0b8dc84e302d0b2264a415cb456ccab) +- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `nsp`, `eslint`, `semver` [`53e43a6`](https://github.com/inspect-js/is-date-object/commit/53e43a627dd01757cf3d469599f3dffd9d72b150) +- Update `eslint` [`d2fc304`](https://github.com/inspect-js/is-date-object/commit/d2fc3046f087b0026448ffde0cf46b1f741cbd4e) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`c9568df`](https://github.com/inspect-js/is-date-object/commit/c9568df228fa698dc6fcc9553b5d612e7ee427aa) +- Test on latest `node` and `io.js` versions. [`a21d537`](https://github.com/inspect-js/is-date-object/commit/a21d537562166ebd18bde3a262fd157dd774ae17) +- Update `nsp`, `eslint`, `semver` [`9e1d908`](https://github.com/inspect-js/is-date-object/commit/9e1d9087c0c79c34fcb2abfc701cdfa1efcb327c) +- Update `covert`, `jscs`, `eslint`, `semver` [`f198f6b`](https://github.com/inspect-js/is-date-object/commit/f198f6b997912da10a3d821a089e1581edc730a0) +- [Dev Deps] update `tape`, `jscs`, `eslint` [`ab9bdbb`](https://github.com/inspect-js/is-date-object/commit/ab9bdbbc189cef033346508db47cd1feb04a69d3) +- If `@@toStringTag` is not present, use the old-school `Object#toString` test. [`c03afce`](https://github.com/inspect-js/is-date-object/commit/c03afce001368b29eb929900075749b113a252c8) +- [Dev Deps] update `jscs`, `nsp`, `tape`, `eslint`, `@ljharb/eslint-config` [`9d94ccb`](https://github.com/inspect-js/is-date-object/commit/9d94ccbab4160d2fa649123e37951d86b69a8b15) +- [Dev Deps] update `is`, `eslint`, `@ljharb/eslint-config`, `semver` [`35cbff7`](https://github.com/inspect-js/is-date-object/commit/35cbff7f7c8216fbb79c799f74b2336eaf0d726a) +- Test up to `io.js` `v2.3` [`be5d11e`](https://github.com/inspect-js/is-date-object/commit/be5d11e7ebd9473d7ae554179b3769082485f6f4) +- [Tests] on `io.js` `v3.3`, up to `node` `v4.1` [`20221a3`](https://github.com/inspect-js/is-date-object/commit/20221a34858d2b21e23bdc2c08df23f0bc08d11e) +- [Tests] up to `io.js` `v3.2 ` [`7009b4a`](https://github.com/inspect-js/is-date-object/commit/7009b4a9999e14eacbdf6068afd82f478473f007) +- Test on `io.js` `v2.1` [`68b29b1`](https://github.com/inspect-js/is-date-object/commit/68b29b19a07e6589a7ca37ab764be28f144ac88e) +- Remove `editorconfig-tools` [`8d3972c`](https://github.com/inspect-js/is-date-object/commit/8d3972c1795fdcfd337680e11ab610e4885fb079) +- [Dev Deps] update `tape` [`204945d`](https://github.com/inspect-js/is-date-object/commit/204945d8658a3513ca6315ddf795e4034adb4545) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`7bff214`](https://github.com/inspect-js/is-date-object/commit/7bff214dcb2317b96219921476f990814afbb401) +- Test on `io.js` `v2.5` [`92f7bd6`](https://github.com/inspect-js/is-date-object/commit/92f7bd6747e3259b0ddc9c287876f46a9cd4c270) +- Test on `io.js` `v2.4` [`ebb34bf`](https://github.com/inspect-js/is-date-object/commit/ebb34bf1f58949768063f86ac012f1ca5d7cf6d9) +- Fix tests for faked @@toStringTag [`3b9c26c`](https://github.com/inspect-js/is-date-object/commit/3b9c26c15040af6a87f8d77ce6c85a7bef7a4304) +- Test on `io.js` `v3.0` [`5eedf4b`](https://github.com/inspect-js/is-date-object/commit/5eedf4bea76380a08813fd0977469c2480302a82) + +## v1.0.0 - 2015-01-28 + +### Commits + +- Dotfiles. [`5b6a929`](https://github.com/inspect-js/is-date-object/commit/5b6a9298c6f70882e78e66d64c9c019f85790f52) +- `make release` [`e8d40ce`](https://github.com/inspect-js/is-date-object/commit/e8d40ceca85acd0aa4b2753faa6e41c0c54cf6c3) +- package.json [`a107259`](https://github.com/inspect-js/is-date-object/commit/a1072591ea510a2998298be6cef827b123f4643f) +- Read me [`eb92695`](https://github.com/inspect-js/is-date-object/commit/eb92695664bdee8fc49891cd73aa2f41075f53cb) +- Initial commit [`4fc7755`](https://github.com/inspect-js/is-date-object/commit/4fc7755ff12f1d7a55cf841d486bf6b2350fe5a0) +- Tests. [`b6f432f`](https://github.com/inspect-js/is-date-object/commit/b6f432fb6801c5ff8d89cfec7601d59478e23dd1) +- Implementation. [`dd0fd96`](https://github.com/inspect-js/is-date-object/commit/dd0fd96c4016a66cec7cd59db0fde37c2ef3cdb5) diff --git a/node_modules/is-date-object/LICENSE b/node_modules/is-date-object/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/is-date-object/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-date-object/README.md b/node_modules/is-date-object/README.md new file mode 100644 index 0000000000000..1c084add99ae5 --- /dev/null +++ b/node_modules/is-date-object/README.md @@ -0,0 +1,52 @@ +# is-date-object [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isDate = require('is-date-object'); +var assert = require('assert'); + +assert.notOk(isDate(undefined)); +assert.notOk(isDate(null)); +assert.notOk(isDate(false)); +assert.notOk(isDate(true)); +assert.notOk(isDate(42)); +assert.notOk(isDate('foo')); +assert.notOk(isDate(function () {})); +assert.notOk(isDate([])); +assert.notOk(isDate({})); +assert.notOk(isDate(/a/g)); +assert.notOk(isDate(new RegExp('a', 'g'))); + +assert.ok(isDate(new Date())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-date-object +[2]: https://versionbadg.es/inspect-js/is-date-object.svg +[5]: https://david-dm.org/inspect-js/is-date-object.svg +[6]: https://david-dm.org/inspect-js/is-date-object +[7]: https://david-dm.org/inspect-js/is-date-object/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-date-object#info=devDependencies +[11]: https://nodei.co/npm/is-date-object.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-date-object.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-date-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-date-object +[codecov-image]: https://codecov.io/gh/inspect-js/is-date-object/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-date-object/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-date-object +[actions-url]: https://github.com/inspect-js/is-date-object/actions diff --git a/node_modules/is-date-object/index.js b/node_modules/is-date-object/index.js new file mode 100644 index 0000000000000..11628f3bba919 --- /dev/null +++ b/node_modules/is-date-object/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = require('has-tostringtag/shams')(); + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; diff --git a/node_modules/is-date-object/package.json b/node_modules/is-date-object/package.json new file mode 100644 index 0000000000000..7b32ed8a1cdc8 --- /dev/null +++ b/node_modules/is-date-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-date-object", + "version": "1.0.5", + "author": "Jordan Harband", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only && npm run test:corejs", + "tests-only": "nyc tape 'test/**/*.js'", + "test:corejs": "nyc tape test-corejs.js", + "posttest": "aud --production", + "lint": "eslint .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-date-object.git" + }, + "keywords": [ + "Date", + "ES6", + "toStringTag", + "@@toStringTag", + "Date object" + ], + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^3.12.0", + "eslint": "^7.32.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-date-object/test/index.js b/node_modules/is-date-object/test/index.js new file mode 100644 index 0000000000000..5279dad068a12 --- /dev/null +++ b/node_modules/is-date-object/test/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var test = require('tape'); +var isDate = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('not Dates', function (t) { + t.notOk(isDate(), 'undefined is not Date'); + t.notOk(isDate(null), 'null is not Date'); + t.notOk(isDate(false), 'false is not Date'); + t.notOk(isDate(true), 'true is not Date'); + t.notOk(isDate(42), 'number is not Date'); + t.notOk(isDate('foo'), 'string is not Date'); + t.notOk(isDate([]), 'array is not Date'); + t.notOk(isDate({}), 'object is not Date'); + t.notOk(isDate(function () {}), 'function is not Date'); + t.notOk(isDate(/a/g), 'regex literal is not Date'); + t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var realDate = new Date(); + var fakeDate = { + toString: function () { return String(realDate); }, + valueOf: function () { return realDate.getTime(); } + }; + fakeDate[Symbol.toStringTag] = 'Date'; + t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date'); + t.end(); +}); + +test('Dates', function (t) { + t.ok(isDate(new Date()), 'new Date() is Date'); + t.end(); +}); diff --git a/node_modules/is-descriptor/.editorconfig b/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000000000..449f0da4c1605 --- /dev/null +++ b/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/is-descriptor/.eslintrc b/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000000000..24e5090e5497d --- /dev/null +++ b/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/is-descriptor/.gitattributes b/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000000000..660957e70cf2a --- /dev/null +++ b/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000000000..37535da621119 --- /dev/null +++ b/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-descriptor/.nycrc b/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-descriptor/CHANGELOG.md b/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000000000..0564264f926ec --- /dev/null +++ b/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,121 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v1.0.0) - 2017-02-25 + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/node_modules/is-descriptor/LICENSE b/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000000000..c0d7f136277fb --- /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 0000000000000..fd9ddcfb7373e --- /dev/null +++ b/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), 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 +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### 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. +* [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. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/node_modules/is-descriptor/index.js b/node_modules/is-descriptor/index.js new file mode 100644 index 0000000000000..c9dd24d225e8f --- /dev/null +++ b/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' 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 0000000000000..2c35d2b4f423c --- /dev/null +++ b/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "1.0.3", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-descriptor/test/index.js b/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000000000..0b74a35fd8807 --- /dev/null +++ b/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/is-dotfile/LICENSE b/node_modules/is-dotfile/LICENSE new file mode 100644 index 0000000000000..83b56e709c3e5 --- /dev/null +++ b/node_modules/is-dotfile/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-dotfile/README.md b/node_modules/is-dotfile/README.md new file mode 100644 index 0000000000000..d69912bb173a8 --- /dev/null +++ b/node_modules/is-dotfile/README.md @@ -0,0 +1,95 @@ +# is-dotfile [![NPM version](https://img.shields.io/npm/v/is-dotfile.svg?style=flat)](https://www.npmjs.com/package/is-dotfile) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-dotfile.svg?style=flat)](https://npmjs.org/package/is-dotfile) [![NPM total downloads](https://img.shields.io/npm/dt/is-dotfile.svg?style=flat)](https://npmjs.org/package/is-dotfile) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-dotfile.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-dotfile) + +> Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-dotfile +``` + +## Usage + +To be considered a dotfile, it must be the last filename in the path, like `.gitignore`. Otherwise it's a [dot directory](https://github.com/jonschlinkert/is-dotdir), like `.git/` and `.github/`. + +```js +var isDotfile = require('is-dotfile'); +``` + +**false** + +All of the following return `false`: + +```js +isDotfile('a/b/c.js'); +isDotfile('/.git/foo'); +isDotfile('a/b/c/.git/foo'); +//=> false +``` + +**true** + +All of the following return `true`: + +```js +isDotfile('a/b/.gitignore'); +isDotfile('.gitignore'); +isDotfile('/.gitignore'); +//=> true +``` + +## About + +### Related projects + +* [dotdir-regex](https://www.npmjs.com/package/dotdir-regex): Regex for matching dot-directories, like `.git/` | [homepage](https://github.com/regexps/dotdir-regex "Regex for matching dot-directories, like `.git/`") +* [dotfile-regex](https://www.npmjs.com/package/dotfile-regex): Regular expresson for matching dotfiles. | [homepage](https://github.com/regexps/dotfile-regex "Regular expresson for matching dotfiles.") +* [is-dotdir](https://www.npmjs.com/package/is-dotdir): Returns true if a path is a dot-directory. | [homepage](https://github.com/jonschlinkert/is-dotdir "Returns true if a path is a dot-directory.") +* [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") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 13 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [Lykathia](https://github.com/Lykathia) | + +### 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 30, 2017._ \ No newline at end of file diff --git a/node_modules/is-dotfile/index.js b/node_modules/is-dotfile/index.js new file mode 100644 index 0000000000000..46cb20b141c5b --- /dev/null +++ b/node_modules/is-dotfile/index.js @@ -0,0 +1,14 @@ +/*! + * is-dotfile + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +module.exports = function(str) { + if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) { + return true; + } + var slash = str.lastIndexOf('/'); + return slash !== -1 ? str.charCodeAt(slash + 1) === 46 /* . */ : false; +}; diff --git a/node_modules/is-dotfile/package.json b/node_modules/is-dotfile/package.json new file mode 100644 index 0000000000000..09e34379f2c3e --- /dev/null +++ b/node_modules/is-dotfile/package.json @@ -0,0 +1,69 @@ +{ + "name": "is-dotfile", + "description": "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.", + "version": "1.0.3", + "homepage": "https://github.com/jonschlinkert/is-dotfile", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Evan Lowry (http://exitiumonline.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-dotfile", + "bugs": { + "url": "https://github.com/jonschlinkert/is-dotfile/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^0.1.3", + "dotfile-regex": "^0.1.2", + "gulp-format-md": "^0.1.12", + "mocha": "*" + }, + "keywords": [ + "detect", + "dot", + "dotfile", + "expression", + "file", + "filepath", + "find", + "fs", + "is", + "match", + "path", + "regex", + "regexp", + "regular" + ], + "verb": { + "related": { + "list": [ + "dotdir-regex", + "dotfile-regex", + "is-dotdir", + "is-glob" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-equal-shallow/LICENSE b/node_modules/is-equal-shallow/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/is-equal-shallow/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-equal-shallow/README.md b/node_modules/is-equal-shallow/README.md new file mode 100644 index 0000000000000..11422761f1cfc --- /dev/null +++ b/node_modules/is-equal-shallow/README.md @@ -0,0 +1,90 @@ +# is-equal-shallow [![NPM version](https://badge.fury.io/js/is-equal-shallow.svg)](http://badge.fury.io/js/is-equal-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/is-equal-shallow.svg)](https://travis-ci.org/jonschlinkert/is-equal-shallow) + +> Does a shallow comparison of two objects, returning false if the keys or values differ. + +The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives. + +* only compares objects. +* only compares the first level of each object +* values must be primitives. If a value is not a primitive, even if the values are the same, `false` is returned. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-equal-shallow --save +``` + +## Usage + +```js +var equals = require('is-equal-shallow'); +equals(object_a, object_b); +``` + +**Examples** + +```js +equals({a: true, b: true}, {a: true, b: true}); +//=> 'true' + +equals({a: true, b: false}, {c: false, b: false}); +//=> 'false' + +equals({a: true, b: false}, {a: false, b: false}); +//=> 'false' +``` + +Strict comparison for equality: + +```js +equals({a: true, b: true}, {a: true, b: 'true'}); +//=> 'false' +``` + +When values are not primitives, `false` is always returned: + +```js +equals({ b: {}}, { b: {}}); +//=> 'false' + +equals({ b: []}, { b: []}); +//=> 'false' +``` + +## Related projects + +Other object utils: + +* [clone-deep](https://github.com/jonschlinkert/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. +* [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) +* [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) +* [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. + +## 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-equal-shallow/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 June 22, 2015._ \ No newline at end of file diff --git a/node_modules/is-equal-shallow/index.js b/node_modules/is-equal-shallow/index.js new file mode 100644 index 0000000000000..1006eef10f480 --- /dev/null +++ b/node_modules/is-equal-shallow/index.js @@ -0,0 +1,27 @@ +/*! + * is-equal-shallow + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isPrimitive = require('is-primitive'); + +module.exports = function isEqual(a, b) { + if (!a && !b) { return true; } + if (!a && b || a && !b) { return false; } + + var numKeysA = 0, numKeysB = 0, key; + for (key in b) { + numKeysB++; + if (!isPrimitive(b[key]) || !a.hasOwnProperty(key) || (a[key] !== b[key])) { + return false; + } + } + for (key in a) { + numKeysA++; + } + return numKeysA === numKeysB; +}; diff --git a/node_modules/is-equal-shallow/package.json b/node_modules/is-equal-shallow/package.json new file mode 100644 index 0000000000000..e35a8f535095d --- /dev/null +++ b/node_modules/is-equal-shallow/package.json @@ -0,0 +1,54 @@ +{ + "name": "is-equal-shallow", + "description": "Does a shallow comparison of two objects, returning false if the keys or values differ.", + "version": "0.1.3", + "homepage": "https://github.com/jonschlinkert/is-equal-shallow", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/is-equal-shallow.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-equal-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-primitive": "^2.0.0" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "compare", + "comparison", + "equal", + "equals", + "is", + "is-equal", + "key", + "object", + "same", + "shallow", + "value" + ], + "verbiage": { + "related": { + "description": "Other object utils:", + "list": ["is-plain-object", "isobject", "for-in", "for-own", "clone-deep"] + } + } +} diff --git a/node_modules/is-extendable/LICENSE b/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /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 0000000000000..e4cfaebcb7997 --- /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 0000000000000..4ee71a44a3a67 --- /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 0000000000000..5dd006eade8cb --- /dev/null +++ b/node_modules/is-extendable/package.json @@ -0,0 +1,51 @@ +{ + "name": "is-extendable", + "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?\"", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verbiage": { + "related": { + "list": [ + "isobject", + "is-plain-object", + "kind-of", + "is-extendable", + "is-equal-shallow", + "extend-shallow", + "assign-deep" + ] + } + } +} diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/is-extglob/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/is-extglob/README.md b/node_modules/is-extglob/README.md new file mode 100644 index 0000000000000..80e7128d64dc8 --- /dev/null +++ b/node_modules/is-extglob/README.md @@ -0,0 +1,75 @@ +# is-extglob [![NPM version](https://badge.fury.io/js/is-extglob.svg)](http://badge.fury.io/js/is-extglob) [![Build Status](https://travis-ci.org/jonschlinkert/is-extglob.svg)](https://travis-ci.org/jonschlinkert/is-extglob) + +> Returns true if a string has an extglob. + +## Install with [npm](npmjs.org) + +```bash +npm i is-extglob --save +``` + +## Usage + +```js +var isExtglob = require('is-extglob'); +``` + +**True** + +```js +isExtglob('?(abc)'); +isExtglob('@(abc)'); +isExtglob('!(abc)'); +isExtglob('*(abc)'); +isExtglob('+(abc)'); +``` + +**False** + +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'); +``` + +## Related +* [extglob](https://github.com/jonschlinkert/extglob): Extended globs. extglobs add the expressive power of regular expressions to glob patterns. +* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. +* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. + +## Run tests +Install dev dependencies. + +```bash +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-extglob/issues) + + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 06, 2015._ \ 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 0000000000000..803047f7485ec --- /dev/null +++ b/node_modules/is-extglob/index.js @@ -0,0 +1,11 @@ +/*! + * is-extglob + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + return typeof str === 'string' + && /[@?!+*]\(/.test(str); +}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json new file mode 100644 index 0000000000000..1056eac8a3bde --- /dev/null +++ b/node_modules/is-extglob/package.json @@ -0,0 +1,48 @@ +{ + "name": "is-extglob", + "description": "Returns true if a string has an extglob.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/is-extglob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": "jonschlinkert/is-extglob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "extglob", + "expression", + "glob", + "globbing", + "globstar", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ] +} \ No newline at end of file diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/is-glob/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/is-glob/README.md b/node_modules/is-glob/README.md new file mode 100644 index 0000000000000..b162542931404 --- /dev/null +++ b/node_modules/is-glob/README.md @@ -0,0 +1,105 @@ +# is-glob [![NPM version](https://badge.fury.io/js/is-glob.svg)](http://badge.fury.io/js/is-glob) [![Build Status](https://travis-ci.org/jonschlinkert/is-glob.svg)](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. + +Also take a look at [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-glob --save +``` + +## 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** + +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 +``` + +## Related + +* [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) +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob) +* [is-posix-bracket](https://www.npmjs.com/package/is-posix-bracket): Returns true if the given string is a POSIX bracket expression (POSIX character class). | [homepage](https://github.com/jonschlinkert/is-posix-bracket) +* [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob) +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) + +## Run 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-glob/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 02, 2015._ \ 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 0000000000000..ef27bba4fd75a --- /dev/null +++ b/node_modules/is-glob/index.js @@ -0,0 +1,14 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +var isExtglob = require('is-extglob'); + +module.exports = function isGlob(str) { + return typeof str === 'string' + && (/[*!?{}(|)[\]]/.test(str) + || isExtglob(str)); +}; \ No newline at end of file diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json new file mode 100644 index 0000000000000..7cf6eef8a5ace --- /dev/null +++ b/node_modules/is-glob/package.json @@ -0,0 +1,60 @@ +{ + "name": "is-glob", + "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.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/is-glob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": "jonschlinkert/is-glob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "devDependencies": { + "mocha": "*" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "extglob", + "expression", + "glob", + "globbing", + "globstar", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "related": { + "list": [ + "has-glob", + "is-extglob", + "is-posix-bracket", + "is-valid-glob", + "micromatch" + ] + } + } +} \ No newline at end of file diff --git a/node_modules/is-negative-zero/.editorconfig b/node_modules/is-negative-zero/.editorconfig new file mode 100644 index 0000000000000..aaac3258bea46 --- /dev/null +++ b/node_modules/is-negative-zero/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/node_modules/is-negative-zero/.eslintignore b/node_modules/is-negative-zero/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-negative-zero/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-negative-zero/.eslintrc b/node_modules/is-negative-zero/.eslintrc new file mode 100644 index 0000000000000..f858c0ab1bfe1 --- /dev/null +++ b/node_modules/is-negative-zero/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "no-magic-numbers": 0 + } +} diff --git a/node_modules/is-negative-zero/.github/FUNDING.yml b/node_modules/is-negative-zero/.github/FUNDING.yml new file mode 100644 index 0000000000000..e34502b1cc247 --- /dev/null +++ b/node_modules/is-negative-zero/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: ljharb +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-negative-zero +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-negative-zero/.nycrc b/node_modules/is-negative-zero/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-negative-zero/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-negative-zero/CHANGELOG.md b/node_modules/is-negative-zero/CHANGELOG.md new file mode 100644 index 0000000000000..d00e7261ee47a --- /dev/null +++ b/node_modules/is-negative-zero/CHANGELOG.md @@ -0,0 +1,136 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.2](https://github.com/inspect-js/is-negative-zero/compare/v2.0.1...v2.0.2) - 2021-12-10 + +### Commits + +- [actions] reuse common workflows [`ece923d`](https://github.com/inspect-js/is-negative-zero/commit/ece923d6b50820b7832150957774047da43d1743) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`3a26f43`](https://github.com/inspect-js/is-negative-zero/commit/3a26f435434bbfb8a254ddd32d6079bf50263121) +- [meta] do not publish workflow files [`2cea0c2`](https://github.com/inspect-js/is-negative-zero/commit/2cea0c20c7f8b167bb6064f916f3285642bf5ab1) +- [readme] add github actions/codecov badges; update URLs [`0c0be3e`](https://github.com/inspect-js/is-negative-zero/commit/0c0be3eb148ccf9d764e8ed515ef0e1d0ffeed9d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`a93d16e`](https://github.com/inspect-js/is-negative-zero/commit/a93d16eddf46cad6bc9b71a92968ce758e6f4ea4) +- [meta] create FUNDING.yml [`b4f425e`](https://github.com/inspect-js/is-negative-zero/commit/b4f425e49edb8c4aa1efa6ba34c2d5c1150b2a26) +- [actions] update codecov uploader [`7999db3`](https://github.com/inspect-js/is-negative-zero/commit/7999db3bff3f0f9cc729529940b9077a586822e2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `safe-publish-latest`, `tape` [`140e4d9`](https://github.com/inspect-js/is-negative-zero/commit/140e4d95eda9ad821608c28a5f705d84a906096d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`23a8b6d`](https://github.com/inspect-js/is-negative-zero/commit/23a8b6d257cea0b8a608b2319739562ecbc6ba75) +- [readme] add actions and codecov badges [`fe92126`](https://github.com/inspect-js/is-negative-zero/commit/fe9212634346ced7a45905d958cb85d129e4c10b) +- [readme] fix repo URLs [`50c428e`](https://github.com/inspect-js/is-negative-zero/commit/50c428e423e5861a6c231440b8b3e746cbf6230f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`688155f`](https://github.com/inspect-js/is-negative-zero/commit/688155ff0214da72cbafa4c438c3b9629265d82b) +- [meta] use `prepublishOnly` script for npm 7+ [`83171f9`](https://github.com/inspect-js/is-negative-zero/commit/83171f9131aed266f475d7a3283d9c2fc77e1436) +- [actions] update workflows [`e9823db`](https://github.com/inspect-js/is-negative-zero/commit/e9823db3054887d8bb5b3f2c8f698b93cdce7d82) + +## [v2.0.1](https://github.com/inspect-js/is-negative-zero/compare/v2.0.0...v2.0.1) - 2020-12-04 + +### Commits + +- [Tests] use shared travis-ci configs [`5b92482`](https://github.com/inspect-js/is-negative-zero/commit/5b92482ed26e55e1aafcc6b6310d279958af8204) +- [Tests] up to `node` `v11.7`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.16`, `v5.12`, `v4.9`; use `nvm install-latest-npm`; fix test scripts [`0f5d2f8`](https://github.com/inspect-js/is-negative-zero/commit/0f5d2f85ea7fe83de47f39b6b35e489b866d88a7) +- [Tests] migrate tests to Github Actions [`b80f05a`](https://github.com/inspect-js/is-negative-zero/commit/b80f05adb11a6a3232860fb50272b101aacb504f) +- [Tests] remove `jscs` [`7ccaf41`](https://github.com/inspect-js/is-negative-zero/commit/7ccaf4100281b614d61d7c9122e6f87943a89295) +- [meta] add missing changelog [`992bdde`](https://github.com/inspect-js/is-negative-zero/commit/992bddee362cbae71f2cdfd8666f4774b252412e) +- [readme] fix repo URLs; remove defunct badges [`80fd18d`](https://github.com/inspect-js/is-negative-zero/commit/80fd18d2b0191321afe0e1b572200e4c025eb664) +- [Tests] run `nyc` on all tests [`df26f14`](https://github.com/inspect-js/is-negative-zero/commit/df26f14b0b854d82b0d3ca7b4949811c9f151357) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`d7723aa`](https://github.com/inspect-js/is-negative-zero/commit/d7723aa70e5b478adc36d98e1338abe741c1906a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`9fdaabe`](https://github.com/inspect-js/is-negative-zero/commit/9fdaabecfdb25e6e860e5007a91b60ee0f20734f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`f07eeb2`](https://github.com/inspect-js/is-negative-zero/commit/f07eeb2740037c53f270e95d2f62edc051cafc56) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`bd5c751`](https://github.com/inspect-js/is-negative-zero/commit/bd5c751fa4850ba8726dc1c197ed6c843a227b05) +- [actions] add automatic rebasing / merge commit blocking [`5666a91`](https://github.com/inspect-js/is-negative-zero/commit/5666a917db6bdcee63c0a3e28e5e281359975abc) +- [meta] add `auto-changelog` [`f70fb2b`](https://github.com/inspect-js/is-negative-zero/commit/f70fb2b5b9ea53dc52729310717553648292189e) +- [actions] add "Allow Edits" workflow [`2b040a8`](https://github.com/inspect-js/is-negative-zero/commit/2b040a87d362f17d8cab2b0d48058b80e426ad4e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`09e2e53`](https://github.com/inspect-js/is-negative-zero/commit/09e2e537390225c1d1a6912be64267eaec6ea367) +- [Tests] use `npm audit` instead of `nsp` [`7df2669`](https://github.com/inspect-js/is-negative-zero/commit/7df2669013ac9328d424e9d8c82a53a0458f0888) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`4ff97c5`](https://github.com/inspect-js/is-negative-zero/commit/4ff97c5891c7a241a91c03fb54bd83e78570ef22) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`9e8cb7b`](https://github.com/inspect-js/is-negative-zero/commit/9e8cb7bca46d325ecf202187c0fde7da8722bcab) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `nsp` [`70b9888`](https://github.com/inspect-js/is-negative-zero/commit/70b988802a99c84ab7eb8da287bb8ff0efc5c055) +- [Dev Deps] update `jscs` [`59d0c42`](https://github.com/inspect-js/is-negative-zero/commit/59d0c42131020b74e68fd444798b9a3bf247fb2d) +- Add `npm run security` [`eb418ed`](https://github.com/inspect-js/is-negative-zero/commit/eb418ed7e79216808c206388fbd360cc7a75655f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`86a758d`](https://github.com/inspect-js/is-negative-zero/commit/86a758d42eb7d17a18f7f584c337d8820b842758) +- Only apps should have lockfiles [`a0ab621`](https://github.com/inspect-js/is-negative-zero/commit/a0ab6215590bf6adb3eaf1ff9e7c036d72e807ec) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`5c51349`](https://github.com/inspect-js/is-negative-zero/commit/5c513498fc5a8b2fd06f5e0c1b38b8e93c3477ac) +- [meta] add `funding` field [`1d0b2f4`](https://github.com/inspect-js/is-negative-zero/commit/1d0b2f43bf5bf75176859a440346b3e338ee510e) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`9b12367`](https://github.com/inspect-js/is-negative-zero/commit/9b12367706f1c269a3df406c8e2c211558671a15) +- [Dev Deps] update `auto-changelog`, `tape` [`6d98b8d`](https://github.com/inspect-js/is-negative-zero/commit/6d98b8d1f512c3844d4062215c793070084d1164) +- [Dev Deps] Update `tape`, `eslint` [`a258cdb`](https://github.com/inspect-js/is-negative-zero/commit/a258cdb86691725482d1d43a1f9e7953c3c6733f) +- [Dev Deps] update `auto-changelog`; add `aud` [`2ca2afb`](https://github.com/inspect-js/is-negative-zero/commit/2ca2afb9efef4ebc8b3c19046ab1ab3ad516ea9a) +- Test up to `io.js` `v3.0` [`1254ae8`](https://github.com/inspect-js/is-negative-zero/commit/1254ae80b7706616331ac914654d7a17bff31039) +- [Dev Deps] update `auto-changelog` [`4b54722`](https://github.com/inspect-js/is-negative-zero/commit/4b547228fceaae8f9eccabc9ad8a49046492348d) +- [Tests] only audit prod deps [`86d298b`](https://github.com/inspect-js/is-negative-zero/commit/86d298b56db90f81617ee5d942476eda34afb374) +- [Dev Deps] update `tape` [`3a47e27`](https://github.com/inspect-js/is-negative-zero/commit/3a47e2730f889539f666ef0eb09a93fb9c80bfd1) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`128d9bd`](https://github.com/inspect-js/is-negative-zero/commit/128d9bd4c12385fb5e478ac3dd3138fa4360a777) + +## [v2.0.0](https://github.com/inspect-js/is-negative-zero/compare/v1.0.0...v2.0.0) - 2015-07-24 + +### Commits + +- Update `tape`, `eslint`; use my personal shared `eslint` config. [`648d002`](https://github.com/inspect-js/is-negative-zero/commit/648d0029b177886428a11b07307f233ae2d3175b) +- Add `npm run eslint` [`5a52d80`](https://github.com/inspect-js/is-negative-zero/commit/5a52d80ab052e377044b9b181991a32afaaa3090) +- Using my standard jscs.json file [`5a667d9`](https://github.com/inspect-js/is-negative-zero/commit/5a667d9f8b7402ca3bd134080cd4435b5c7f1462) +- Adding `npm run lint` [`9a85ed9`](https://github.com/inspect-js/is-negative-zero/commit/9a85ed934da65d8733a38bf6ad3c89fd62115194) +- Update `tape`, `covert`, `jscs` [`c6cd3a6`](https://github.com/inspect-js/is-negative-zero/commit/c6cd3a64ea5b98100e10537549f50a9eeadc30ec) +- Update `eslint` [`e9c9b6e`](https://github.com/inspect-js/is-negative-zero/commit/e9c9b6e9623f021b7f3ae4091bf9ea2571ab02b4) +- Test on latest `io.js` [`2f7c8a9`](https://github.com/inspect-js/is-negative-zero/commit/2f7c8a9d174066400c072841d7bcf02cf90f8ebf) +- Adding license and downloads badges [`717087a`](https://github.com/inspect-js/is-negative-zero/commit/717087a013b4cfc9dc7847d3d4a64faf19341be4) +- Remove Number type coercion. [`481295d`](https://github.com/inspect-js/is-negative-zero/commit/481295dbd09dbf81d196dc77382f1b92f534de3f) +- Test up to `io.js` `v2.1` [`139a84a`](https://github.com/inspect-js/is-negative-zero/commit/139a84a3dbdec29682044c6e7ac884a7382ae6e1) +- Update `eslint` [`2f5fbfb`](https://github.com/inspect-js/is-negative-zero/commit/2f5fbfbc436ccd8676fc36fcd9f0edcdda33a1e7) +- Update `eslint` [`53cb4c5`](https://github.com/inspect-js/is-negative-zero/commit/53cb4c5eccecdf2d874e78e5c38cca762ed76a9d) +- Test on `io.js` `v2.2` [`98a1824`](https://github.com/inspect-js/is-negative-zero/commit/98a1824c86366f8a03cf303f46acecd67409f94b) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`772d6cd`](https://github.com/inspect-js/is-negative-zero/commit/772d6cdf397e6fc1b26e5ed5f279d07a5ead6df8) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`3e6147e`](https://github.com/inspect-js/is-negative-zero/commit/3e6147ebb5ecdfda4a2bffa441572fe017c7bb73) +- Use SVG badges instead of PNG [`d986cb4`](https://github.com/inspect-js/is-negative-zero/commit/d986cb450e5bd4f373041255b69e18f47c252a1e) +- Update `tape`, `jscs` [`9f9d7e7`](https://github.com/inspect-js/is-negative-zero/commit/9f9d7e751bcf4ceeed8e36e75e31d29c76326b3f) +- Update `jscs` [`079eaf6`](https://github.com/inspect-js/is-negative-zero/commit/079eaf699d53e7e32c54e5233259a00f5f494d9a) +- Update `tape`, `jscs` [`cffe3fc`](https://github.com/inspect-js/is-negative-zero/commit/cffe3fc17c6bfaa6996bf7402446b160631a04b3) +- Update `tape`, `jscs` [`3a16616`](https://github.com/inspect-js/is-negative-zero/commit/3a166165ae8770d59c296794d28547379cebec58) +- Use consistent quotes [`9509a81`](https://github.com/inspect-js/is-negative-zero/commit/9509a8110027b12c5762ba48d03b649a921847d5) +- Test on `io.js` `v2.4` [`a9150a3`](https://github.com/inspect-js/is-negative-zero/commit/a9150a3397db339d992e9e4e6ddb52d1237fd617) +- Test on `io.js` `v2.3` [`36d7acf`](https://github.com/inspect-js/is-negative-zero/commit/36d7acf5bb9193a2b35585e2c49ae8be9f45a55e) +- Lock covert to v1.0.0. [`29d8917`](https://github.com/inspect-js/is-negative-zero/commit/29d89171c3aad69ace372edbf641ec3a5468c760) +- Updating jscs [`fe09c8a`](https://github.com/inspect-js/is-negative-zero/commit/fe09c8a6d16c637ecd83a9a8a7f6192faef0754a) +- Updating jscs [`5877bc7`](https://github.com/inspect-js/is-negative-zero/commit/5877bc7c2ed44c1ecc5d31e1c484c523450722d8) +- Running linter as part of tests [`9e77756`](https://github.com/inspect-js/is-negative-zero/commit/9e777563905f511d915ec7257e2637811b911bd6) +- Updating covert [`520a695`](https://github.com/inspect-js/is-negative-zero/commit/520a695164465b88c76860a638baafd4192bce5c) + +## [v1.0.0](https://github.com/inspect-js/is-negative-zero/compare/v0.1.1...v1.0.0) - 2014-08-08 + +### Commits + +- Updating tape [`31d1942`](https://github.com/inspect-js/is-negative-zero/commit/31d19422ecd9d453677851a9d5a8d9372a16fb39) +- Updating tape [`e7143bf`](https://github.com/inspect-js/is-negative-zero/commit/e7143bf3b67d8881b1b6ee0444637647d7bb1d2b) + +## [v0.1.1](https://github.com/inspect-js/is-negative-zero/compare/v0.1.0...v0.1.1) - 2014-05-13 + +### Merged + +- Simplify code [`#1`](https://github.com/inspect-js/is-negative-zero/pull/1) + +### Commits + +- Adding a trailing newline [`61fb37f`](https://github.com/inspect-js/is-negative-zero/commit/61fb37f677e871cca53d9309e765d808ddddfd5a) + +## [v0.1.0](https://github.com/inspect-js/is-negative-zero/compare/v0.0.0...v0.1.0) - 2014-05-13 + +### Commits + +- Make sure old and unstable nodes don't break Travis [`f627215`](https://github.com/inspect-js/is-negative-zero/commit/f627215527a95dc1ca014600650e00f15fe122c5) +- Updating deps [`b502f48`](https://github.com/inspect-js/is-negative-zero/commit/b502f48e807d7671cb07e2ca247ae2daa62e4165) +- Oops, negative numbers were negative zero! [`746cb97`](https://github.com/inspect-js/is-negative-zero/commit/746cb975d82c0fa0c5058e8e031807f9afcfd6db) +- Updating covert [`99ef4ed`](https://github.com/inspect-js/is-negative-zero/commit/99ef4ed97d2f76f2a5afbef029bf794f1b5bcffa) +- Updating tape [`ee9cfc2`](https://github.com/inspect-js/is-negative-zero/commit/ee9cfc2fd0039bdb65b6493ce0b8e47d18aa17cd) +- Testing on node 0.6 again [`6a9bf0a`](https://github.com/inspect-js/is-negative-zero/commit/6a9bf0a09e210cca09c7a8a225d08ef1e6789b5a) + +## v0.0.0 - 2014-01-19 + +### Commits + +- package.json [`8411d92`](https://github.com/inspect-js/is-negative-zero/commit/8411d92ec787fd522a1b5e65154ae88e9024a23f) +- read me [`5c8bf3c`](https://github.com/inspect-js/is-negative-zero/commit/5c8bf3ce4867dbf2997ef01ea6b712aa294ec959) +- Initial commit [`c06f7dc`](https://github.com/inspect-js/is-negative-zero/commit/c06f7dcf926f5b35ba678787a0f16cdd7b544054) +- Tests. [`5c554d4`](https://github.com/inspect-js/is-negative-zero/commit/5c554d405bfb323a7413fde395d8dc39c5316356) +- Travis CI [`334d000`](https://github.com/inspect-js/is-negative-zero/commit/334d000941fc926493cc7dbdb4e5f7ae481a311b) +- Implementation. [`4ef4491`](https://github.com/inspect-js/is-negative-zero/commit/4ef449189c36d471d283e40aa20a8ebfa4985882) diff --git a/node_modules/is-negative-zero/LICENSE b/node_modules/is-negative-zero/LICENSE new file mode 100644 index 0000000000000..47b7b5078fce3 --- /dev/null +++ b/node_modules/is-negative-zero/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION 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-negative-zero/README.md b/node_modules/is-negative-zero/README.md new file mode 100644 index 0000000000000..e8193a48873bb --- /dev/null +++ b/node_modules/is-negative-zero/README.md @@ -0,0 +1,54 @@ +# is-negative-zero [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value negative zero? === will lie to you. + +## Example + +```js +var isNegativeZero = require('is-negative-zero'); +var assert = require('assert'); + +assert.notOk(isNegativeZero(undefined)); +assert.notOk(isNegativeZero(null)); +assert.notOk(isNegativeZero(false)); +assert.notOk(isNegativeZero(true)); +assert.notOk(isNegativeZero(0)); +assert.notOk(isNegativeZero(42)); +assert.notOk(isNegativeZero(Infinity)); +assert.notOk(isNegativeZero(-Infinity)); +assert.notOk(isNegativeZero(NaN)); +assert.notOk(isNegativeZero('foo')); +assert.notOk(isNegativeZero(function () {})); +assert.notOk(isNegativeZero([])); +assert.notOk(isNegativeZero({})); + +assert.ok(isNegativeZero(-0)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-negative-zero +[npm-version-svg]: https://versionbadg.es/inspect-js/is-negative-zero.svg +[deps-svg]: https://david-dm.org/inspect-js/is-negative-zero.svg +[deps-url]: https://david-dm.org/inspect-js/is-negative-zero +[dev-deps-svg]: https://david-dm.org/inspect-js/is-negative-zero/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-negative-zero#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-negative-zero.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-negative-zero.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-negative-zero.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-negative-zero +[codecov-image]: https://codecov.io/gh/inspect-js/is-negative-zero/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-negative-zero/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-negative-zero +[actions-url]: https://github.com/inspect-js/is-negative-zero/actions diff --git a/node_modules/is-negative-zero/index.js b/node_modules/is-negative-zero/index.js new file mode 100644 index 0000000000000..400e5d1f4ab62 --- /dev/null +++ b/node_modules/is-negative-zero/index.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function isNegativeZero(number) { + return number === 0 && (1 / number) === -Infinity; +}; + diff --git a/node_modules/is-negative-zero/package.json b/node_modules/is-negative-zero/package.json new file mode 100644 index 0000000000000..d0aa3d9c15e93 --- /dev/null +++ b/node_modules/is-negative-zero/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-negative-zero", + "version": "2.0.2", + "description": "Is this value negative zero? === will lie to you", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-negative-zero.git" + }, + "bugs": { + "url": "https://github.com/inspect-js/is-negative-zero/issues" + }, + "homepage": "https://github.com/inspect-js/is-negative-zero", + "keywords": [ + "is", + "negative", + "zero", + "negative zero", + "number", + "positive", + "0", + "-0" + ], + "devDependencies": { + "@ljharb/eslint-config": "^20.0.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.4.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.3.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..12.0", + "opera/15.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-negative-zero/test/index.js b/node_modules/is-negative-zero/test/index.js new file mode 100644 index 0000000000000..8fd7d16bfafaa --- /dev/null +++ b/node_modules/is-negative-zero/test/index.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); +var isNegativeZero = require('../'); + +test('not negative zero', function (t) { + t.notOk(isNegativeZero(), 'undefined is not negative zero'); + t.notOk(isNegativeZero(null), 'null is not negative zero'); + t.notOk(isNegativeZero(false), 'false is not negative zero'); + t.notOk(isNegativeZero(true), 'true is not negative zero'); + t.notOk(isNegativeZero(0), 'positive zero is not negative zero'); + t.notOk(isNegativeZero(Infinity), 'Infinity is not negative zero'); + t.notOk(isNegativeZero(-Infinity), '-Infinity is not negative zero'); + t.notOk(isNegativeZero(NaN), 'NaN is not negative zero'); + t.notOk(isNegativeZero('foo'), 'string is not negative zero'); + t.notOk(isNegativeZero([]), 'array is not negative zero'); + t.notOk(isNegativeZero({}), 'object is not negative zero'); + t.notOk(isNegativeZero(function () {}), 'function is not negative zero'); + t.notOk(isNegativeZero(-1), '-1 is not negative zero'); + + t.end(); +}); + +test('negative zero', function (t) { + t.ok(isNegativeZero(-0), 'negative zero is negative zero'); + t.end(); +}); + diff --git a/node_modules/is-number-object/.editorconfig b/node_modules/is-number-object/.editorconfig new file mode 100644 index 0000000000000..4e36aeeec4a66 --- /dev/null +++ b/node_modules/is-number-object/.editorconfig @@ -0,0 +1,23 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off + +[CHANGELOG.md] +max_line_length = off diff --git a/node_modules/is-number-object/.eslintrc b/node_modules/is-number-object/.eslintrc new file mode 100644 index 0000000000000..c7933f4d718ed --- /dev/null +++ b/node_modules/is-number-object/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + }, + + "overrides": [ + { + "files": "test-core-js.js", + "extends": "@ljharb/eslint-config/tests", + }, + ], +} diff --git a/node_modules/is-number-object/.github/FUNDING.yml b/node_modules/is-number-object/.github/FUNDING.yml new file mode 100644 index 0000000000000..17f4dc55da78f --- /dev/null +++ b/node_modules/is-number-object/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-number-object +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-number-object/.nycrc b/node_modules/is-number-object/.nycrc new file mode 100644 index 0000000000000..a69aa2d8273d8 --- /dev/null +++ b/node_modules/is-number-object/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-number-object/CHANGELOG.md b/node_modules/is-number-object/CHANGELOG.md new file mode 100644 index 0000000000000..028b484a3648b --- /dev/null +++ b/node_modules/is-number-object/CHANGELOG.md @@ -0,0 +1,125 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.7](https://github.com/inspect-js/is-number-object/compare/v1.0.6...v1.0.7) - 2022-04-01 + +### Commits + +- [actions] reuse common workflows [`8f9a1b0`](https://github.com/inspect-js/is-number-object/commit/8f9a1b040a435a5c5d12150952d0e6f96d4f713a) +- [meta] better `eccheck` command [`9dc8dff`](https://github.com/inspect-js/is-number-object/commit/9dc8dff273e4d0b954fd4f2a2eacc849d321b646) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`c50ecbf`](https://github.com/inspect-js/is-number-object/commit/c50ecbfc7577c69324fca4d2b40dd354c5156be9) +- [actions] update codecov uploader [`f1a2560`](https://github.com/inspect-js/is-number-object/commit/f1a2560d4a996abea90f7a792069a35359869b67) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js`, `tape` [`4b06ace`](https://github.com/inspect-js/is-number-object/commit/4b06aceeba2ebf0887af020aa89caad8950e5f47) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `core-js`, `tape` [`3dc0e8b`](https://github.com/inspect-js/is-number-object/commit/3dc0e8b0fcc96a9bc9936e9a62a523fe67bafca5) +- [meta] add `bugs`/`homepage` package.json fields [`d7e0bcf`](https://github.com/inspect-js/is-number-object/commit/d7e0bcf1fe1b4a48d6500266c8b4058c854fecba) + +## [v1.0.6](https://github.com/inspect-js/is-number-object/compare/v1.0.5...v1.0.6) - 2021-08-05 + +### Commits + +- [Tests] run tests with core-js as well [`5177312`](https://github.com/inspect-js/is-number-object/commit/51773120b18e27bfe8a3bd228ef2e21f5802f338) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`ca2b31d`](https://github.com/inspect-js/is-number-object/commit/ca2b31d81c5d7d9b11e812dee58cd627a6d634e2) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`50950f9`](https://github.com/inspect-js/is-number-object/commit/50950f962a4b1188c478f6034194d7eb4314c884) + +## [v1.0.5](https://github.com/inspect-js/is-number-object/compare/v1.0.4...v1.0.5) - 2021-05-07 + +### Commits + +- [Tests] migrate tests to Github Actions [`9666737`](https://github.com/inspect-js/is-number-object/commit/96667372f8e36f70516218f86318f957f8c175ad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7815ce2`](https://github.com/inspect-js/is-number-object/commit/7815ce21cb5662c2d1651b3ec302f186aa8a016b) +- [meta] do not publish github action workflow files [`80ccb75`](https://github.com/inspect-js/is-number-object/commit/80ccb7509f91732675b018cc1a636d649a92889e) +- [Tests] run `nyc` on all tests [`c9ffb74`](https://github.com/inspect-js/is-number-object/commit/c9ffb74443690ef22f9aa7dd35855fd1e3be5184) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7e84161`](https://github.com/inspect-js/is-number-object/commit/7e84161d089c87ef42e3639ac1889642624ebd28) +- [readme] add actions and codecov badges [`0c5ec7a`](https://github.com/inspect-js/is-number-object/commit/0c5ec7aa87dac27bdcda2365124c3aa0ccf9c278) +- [actions] add Require Allow Edits workflow [`dd0fb74`](https://github.com/inspect-js/is-number-object/commit/dd0fb74b2ecb630ea7778a6f06dcc017323a3c1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `tape` [`2d36f80`](https://github.com/inspect-js/is-number-object/commit/2d36f809a7b9896958b0b0f3b69be0067caedb45) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`77d3140`](https://github.com/inspect-js/is-number-object/commit/77d3140557d483e467ce070b21bf384e9a7562d5) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`75d4abf`](https://github.com/inspect-js/is-number-object/commit/75d4abf34168e69d73f621c696a16179ddc0873c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`0c2a917`](https://github.com/inspect-js/is-number-object/commit/0c2a917e4802b102888759fad912bd9faa5587f7) +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`8b6ebc4`](https://github.com/inspect-js/is-number-object/commit/8b6ebc489db14a0c369214e081413f326fc0d598) +- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`62045fc`](https://github.com/inspect-js/is-number-object/commit/62045fcaddb9e4d3ef81068e99d07d21cd62023b) +- [actions] use checkout v2; remove unneeded env [`d48cd06`](https://github.com/inspect-js/is-number-object/commit/d48cd06720ea71f278a6d35c6f0a8ec04242a58f) +- [meta] use `prepublishOnly` script for npm 7+ [`827ab0d`](https://github.com/inspect-js/is-number-object/commit/827ab0d52d25f46d232ae7442ece270dec2de1df) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfed500`](https://github.com/inspect-js/is-number-object/commit/bfed500e6cc3cd3b9e7ffea78429c59857035791) +- [meta] remove explicit audit level config [`ce23e5e`](https://github.com/inspect-js/is-number-object/commit/ce23e5e49fbebe190267d8c99ddfd880a963b7ee) +- [meta] gitignore coverage output [`f1ad981`](https://github.com/inspect-js/is-number-object/commit/f1ad98106549c1c88322d8cb206068ea4c5bd424) + +## [v1.0.4](https://github.com/inspect-js/is-number-object/compare/v1.0.3...v1.0.4) - 2019-12-18 + +### Commits + +- [Tests] use shared travis-ci configs [`792b5aa`](https://github.com/inspect-js/is-number-object/commit/792b5aa5e7313ddf5507f7283bb7d5d5c646b11b) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`dc66db7`](https://github.com/inspect-js/is-number-object/commit/dc66db7dd1eca0263f6602597eb40601519e912e) +- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`7660fed`](https://github.com/inspect-js/is-number-object/commit/7660fed03a7060eb5c91e74b9a17303d4fac1056) +- [Tests] remove `jscs` [`f1fee97`](https://github.com/inspect-js/is-number-object/commit/f1fee97423478bcc653c844fadda55138d9b9a54) +- [meta] add `auto-changelog` [`4b1c225`](https://github.com/inspect-js/is-number-object/commit/4b1c2253770eb18761a1e8b157772028d6f742c4) +- [meta] remove unused Makefile and associated utilities [`379b979`](https://github.com/inspect-js/is-number-object/commit/379b9793d9c61d7889e53bd9de9578dca9964ebc) +- Update `covert`, `jscs`, `eslint`, `semver` [`16d2af8`](https://github.com/inspect-js/is-number-object/commit/16d2af82a6c93aee614f7a4b2c468411c743e95f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is`, `replace`, `semver`, `tape` [`21c0f04`](https://github.com/inspect-js/is-number-object/commit/21c0f0431984b87443c6acb9f003368feb7b4368) +- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `nsp`, `eslint`, `semver`. Add `replace`. Use `^` instead of `~`. [`19d6ee3`](https://github.com/inspect-js/is-number-object/commit/19d6ee3a3d4a87764d57316804fd8b882ba5197c) +- Update `eslint` [`d32754b`](https://github.com/inspect-js/is-number-object/commit/d32754bcca0033e01eba531c4353d1239e992203) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace` [`1df8165`](https://github.com/inspect-js/is-number-object/commit/1df8165dd63d9f2f78ccb78e905d0a6b3e302884) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`675372b`](https://github.com/inspect-js/is-number-object/commit/675372b115fb20b5034f40bcbb5560c6c0512746) +- [readme] clean up readme; remove testling; fix repo URLs [`80e29c4`](https://github.com/inspect-js/is-number-object/commit/80e29c4d6d0811fc361e95ee83b81280bf3ae3f5) +- [Tests] up to `node` `v12.7`, `v10.16`, `v8.16` [`287a968`](https://github.com/inspect-js/is-number-object/commit/287a9687b1fc3d091ec231c06f19a19ff7b0e8f6) +- Test on latest `iojs` and `node` versions. [`11c98a2`](https://github.com/inspect-js/is-number-object/commit/11c98a23b232cb21c7daab797fd63875c2970681) +- [actions] add automatic rebasing / merge commit blocking [`022d026`](https://github.com/inspect-js/is-number-object/commit/022d026129df445f239ba2ecd8d47a2786242d75) +- [meta] create FUNDING.yml [`7f52710`](https://github.com/inspect-js/is-number-object/commit/7f527107168aad7108b7c262d295dcf44e03214d) +- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`bc8cd50`](https://github.com/inspect-js/is-number-object/commit/bc8cd508fe4440168f9b049be3ddf93c56c06c49) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`1f9200b`](https://github.com/inspect-js/is-number-object/commit/1f9200b7c56840dc23eeeca5d0ee4f64a0446e08) +- [Tests] up to `node` `v12.11` [`706d50a`](https://github.com/inspect-js/is-number-object/commit/706d50a779b90feb3f4d2ae88d8189d19b913073) +- [Dev Deps] update `jscs` [`e3591a4`](https://github.com/inspect-js/is-number-object/commit/e3591a445b1af25d46632eafea51efa07b4eb6dc) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`baf4ee7`](https://github.com/inspect-js/is-number-object/commit/baf4ee749fb65ec12e9cab102e77aa0e14312109) +- Update `nsp`, `eslint` [`61b18d5`](https://github.com/inspect-js/is-number-object/commit/61b18d5b44542fddf4950534d506b20d8c8b1f44) +- Update `eslint`, `semver` [`52e61bd`](https://github.com/inspect-js/is-number-object/commit/52e61bd4334c0a1afacd147fd0bc1e2c1be10df5) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`; add `safe-publish-latest` [`79db7f6`](https://github.com/inspect-js/is-number-object/commit/79db7f610d2bcf5f0d6e8ca834f7402504101072) +- Only apps should have lockfiles [`677b9b4`](https://github.com/inspect-js/is-number-object/commit/677b9b4fb6ad9d7b984cb0f89c8b5a6df143b29a) +- Test on `io.js` `v2.2` [`e8a38b2`](https://github.com/inspect-js/is-number-object/commit/e8a38b2fe73b841b0ed55d9f60573d460a4f2a62) +- [meta] add `funding` field [`85315e7`](https://github.com/inspect-js/is-number-object/commit/85315e75c119a2aef70a766f2ddc1079b64d006b) +- [Dev Deps] update `eslint`, `tape` [`f3581aa`](https://github.com/inspect-js/is-number-object/commit/f3581aaea310546f6ee4612990468d39f058d320) +- [Tests] use `eclint` instead of `editorconfig-tools` [`7b53680`](https://github.com/inspect-js/is-number-object/commit/7b5368071000eb1c715aeeee5ff47ffdbee9fe5c) +- [Dev Deps] update `semver`, `tape` [`d6b524a`](https://github.com/inspect-js/is-number-object/commit/d6b524ac2e8c0240c436cbe8828671e383d51fd5) +- [Dev Deps] Update `tape`, `eslint` [`be19203`](https://github.com/inspect-js/is-number-object/commit/be19203dee0aa70ff8f09823bf880a38b824e1ed) +- Test up to `io.js` `v2.1` [`feb7ba6`](https://github.com/inspect-js/is-number-object/commit/feb7ba63a0816f1d36419ce240f96e9b4e4c90ba) +- Test up to `io.js` `v3.0` [`7be1f0a`](https://github.com/inspect-js/is-number-object/commit/7be1f0a25dc59b6606be9ee1ace38cb7039a59d2) +- [Dev Deps] update `tape` [`d9a2318`](https://github.com/inspect-js/is-number-object/commit/d9a2318bc82477e9321e961def11e28d364e5562) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a6cd411`](https://github.com/inspect-js/is-number-object/commit/a6cd411c6bd92691a48b52683afce584c2c6b21b) +- Test on `io.js` `v2.4` [`46c2e7f`](https://github.com/inspect-js/is-number-object/commit/46c2e7f2ce8ad7f8ab3c1da827d93fc2780eff06) +- Test on `io.js` `v2.3` [`9c344b0`](https://github.com/inspect-js/is-number-object/commit/9c344b0df83628908a1f776a3f2e5fc4fae1d4d2) +- Fix tests for faked @@toStringTag [`f8c446e`](https://github.com/inspect-js/is-number-object/commit/f8c446e9fc320c23807717356e259529f494b9f3) + +## [v1.0.3](https://github.com/inspect-js/is-number-object/compare/v1.0.2...v1.0.3) - 2015-01-29 + +### Commits + +- If @@toStringTag is not present, use the old-school Object#toString test. [`9b2a4df`](https://github.com/inspect-js/is-number-object/commit/9b2a4df6ccf903e89198d4244eeb7f47a7056327) + +## [v1.0.2](https://github.com/inspect-js/is-number-object/compare/v1.0.1...v1.0.2) - 2015-01-29 + +### Commits + +- Improve optimizability of the non-try/catch part. [`7e6be2f`](https://github.com/inspect-js/is-number-object/commit/7e6be2fd2346557fc81bd544ac8745021c50e266) +- Fix package.json [`4f2ebea`](https://github.com/inspect-js/is-number-object/commit/4f2ebeae09c45e1eefeb2c10a011ff2ef0aca921) + +## [v1.0.1](https://github.com/inspect-js/is-number-object/compare/v1.0.0...v1.0.1) - 2015-01-29 + +### Commits + +- Use Object() instead of new Number() [`1aaa746`](https://github.com/inspect-js/is-number-object/commit/1aaa746c26878a0f698aabea4d88215311f2a38d) +- Add early exits for typeof number, or typeof not "object". [`eae4337`](https://github.com/inspect-js/is-number-object/commit/eae43375d3f88e04bb10eabd954e5a6b66ad5305) + +## v1.0.0 - 2015-01-28 + +### Commits + +- Dotfiles. [`9c74e3e`](https://github.com/inspect-js/is-number-object/commit/9c74e3eb2b10398d4022de7c4015531e874f06c8) +- `make release` [`a99e5ae`](https://github.com/inspect-js/is-number-object/commit/a99e5aeb3995a7d543fc5833722bc02011fabad6) +- package.json [`4fed9ef`](https://github.com/inspect-js/is-number-object/commit/4fed9ef7c35ccfc45ca8acd3c92c9cb91c7daa6d) +- Read me [`c91d6ba`](https://github.com/inspect-js/is-number-object/commit/c91d6ba00de79eaaac5fec7c9d8866d61d0abb62) +- Initial commit [`629fb96`](https://github.com/inspect-js/is-number-object/commit/629fb969f076e0802c799b368c7b02556bb0750e) +- Tests. [`a39de62`](https://github.com/inspect-js/is-number-object/commit/a39de624785cc204ed7c0ea5518f1c878870ceb1) +- Implementation. [`aedd91e`](https://github.com/inspect-js/is-number-object/commit/aedd91e6fc23f00852ad1266b6c19f32b7f93a22) diff --git a/node_modules/is-number-object/LICENSE b/node_modules/is-number-object/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/is-number-object/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-object/README.md b/node_modules/is-number-object/README.md new file mode 100644 index 0000000000000..a5f1e5b1f001a --- /dev/null +++ b/node_modules/is-number-object/README.md @@ -0,0 +1,55 @@ +# is-number-object [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isNumber = require('is-number-object'); +var assert = require('assert'); + +assert.notOk(isNumber(undefined)); +assert.notOk(isNumber(null)); +assert.notOk(isNumber(false)); +assert.notOk(isNumber(true)); +assert.notOk(isNumber('foo')); +assert.notOk(isNumber(function () {})); +assert.notOk(isNumber([])); +assert.notOk(isNumber({})); +assert.notOk(isNumber(/a/g)); +assert.notOk(isNumber(new RegExp('a', 'g'))); +assert.notOk(isNumber(new Date())); + +assert.ok(isNumber(42)); +assert.ok(isNumber(NaN)); +assert.ok(isNumber(Infinity)); +assert.ok(isNumber(new Number(42))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-number-object +[2]: https://versionbadg.es/inspect-js/is-number-object.svg +[5]: https://david-dm.org/inspect-js/is-number-object.svg +[6]: https://david-dm.org/inspect-js/is-number-object +[7]: https://david-dm.org/inspect-js/is-number-object/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-number-object#info=devDependencies +[11]: https://nodei.co/npm/is-number-object.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-number-object.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-number-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-number-object +[codecov-image]: https://codecov.io/gh/inspect-js/is-number-object/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-number-object/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-number-object +[actions-url]: https://github.com/inspect-js/is-number-object/actions diff --git a/node_modules/is-number-object/index.js b/node_modules/is-number-object/index.js new file mode 100644 index 0000000000000..9107c31c0be6c --- /dev/null +++ b/node_modules/is-number-object/index.js @@ -0,0 +1,24 @@ +'use strict'; + +var numToStr = Number.prototype.toString; +var tryNumberObject = function tryNumberObject(value) { + try { + numToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var numClass = '[object Number]'; +var hasToStringTag = require('has-tostringtag/shams')(); + +module.exports = function isNumberObject(value) { + if (typeof value === 'number') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass; +}; diff --git a/node_modules/is-number-object/package.json b/node_modules/is-number-object/package.json new file mode 100644 index 0000000000000..2c8b16d6e30ce --- /dev/null +++ b/node_modules/is-number-object/package.json @@ -0,0 +1,85 @@ +{ + "name": "is-number-object", + "version": "1.0.7", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test:corejs": "nyc tape test-corejs.js", + "test": "npm run tests-only && npm run test:corejs", + "posttest": "aud --production", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-number-object.git" + }, + "keywords": [ + "Number", + "ES6", + "toStringTag", + "@@toStringTag", + "Number object" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-number-object/issues" + }, + "homepage": "https://github.com/inspect-js/is-number-object#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^3.21.1", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "has-tostringtag": "^1.0.0" + } +} diff --git a/node_modules/is-number-object/test/index.js b/node_modules/is-number-object/test/index.js new file mode 100644 index 0000000000000..bca48b28e3e0b --- /dev/null +++ b/node_modules/is-number-object/test/index.js @@ -0,0 +1,38 @@ +'use strict'; + +var test = require('tape'); +var isNumber = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('not Numbers', function (t) { + t.notOk(isNumber(), 'undefined is not Number'); + t.notOk(isNumber(null), 'null is not Number'); + t.notOk(isNumber(false), 'false is not Number'); + t.notOk(isNumber(true), 'true is not Number'); + t.notOk(isNumber('foo'), 'string is not Number'); + t.notOk(isNumber([]), 'array is not Number'); + t.notOk(isNumber({}), 'object is not Number'); + t.notOk(isNumber(function () {}), 'function is not Number'); + t.notOk(isNumber(/a/g), 'regex literal is not Number'); + t.notOk(isNumber(new RegExp('a', 'g')), 'regex object is not Number'); + t.notOk(isNumber(new Date()), 'new Date() is not Number'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var fakeNumber = { + toString: function () { return '7'; }, + valueOf: function () { return 42; } + }; + fakeNumber[Symbol.toStringTag] = 'Number'; + t.notOk(isNumber(fakeNumber), 'fake Number with @@toStringTag "Number" is not Number'); + t.end(); +}); + +test('Numbers', function (t) { + t.ok(isNumber(42), 'number is Number'); + t.ok(isNumber(Object(42)), 'number object is Number'); + t.ok(isNumber(NaN), 'NaN is Number'); + t.ok(isNumber(Infinity), 'Infinity is Number'); + t.end(); +}); diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/is-number/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/is-number/README.md b/node_modules/is-number/README.md new file mode 100644 index 0000000000000..8395f913179a7 --- /dev/null +++ b/node_modules/is-number/README.md @@ -0,0 +1,103 @@ +# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +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). + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-number --save +``` + +## Usage + +```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' +``` + +## Other projects + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even) +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/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) +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-number/issues/new). + +## Run 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 November 22, 2015._ \ 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 0000000000000..96ec66d5e2fc1 --- /dev/null +++ b/node_modules/is-number/index.js @@ -0,0 +1,19 @@ +/*! + * 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 !== 'number' && type !== 'string') { + return false; + } + var n = +num; + return (n - n + 1) >= 0 && num !== ''; +}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json new file mode 100644 index 0000000000000..8e30b13014eb4 --- /dev/null +++ b/node_modules/is-number/package.json @@ -0,0 +1,59 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "2.1.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "mocha": "*" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is number", + "is-number", + "istype", + "kind of", + "math", + "number", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "kind-of", + "is-primitive", + "even", + "odd", + "is-even", + "is-odd" + ] + } + } +} diff --git a/node_modules/is-plain-object/LICENSE b/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000000000..3f2eca18f1bc0 --- /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 0000000000000..1f9d0c82d8608 --- /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 0000000000000..74a44e976a2dc --- /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 0000000000000..c3284849e6117 --- /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/node_modules/isobject/LICENSE b/node_modules/is-plain-object/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..943e71d05511e --- /dev/null +++ b/node_modules/is-plain-object/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/is-plain-object/node_modules/isobject/README.md b/node_modules/is-plain-object/node_modules/isobject/README.md new file mode 100644 index 0000000000000..d01feaa40bc13 --- /dev/null +++ b/node_modules/is-plain-object/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/is-plain-object/node_modules/isobject/index.d.ts b/node_modules/is-plain-object/node_modules/isobject/index.d.ts new file mode 100644 index 0000000000000..55f81c275f150 --- /dev/null +++ b/node_modules/is-plain-object/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/is-plain-object/node_modules/isobject/index.js b/node_modules/is-plain-object/node_modules/isobject/index.js new file mode 100644 index 0000000000000..2d59958bf4eab --- /dev/null +++ b/node_modules/is-plain-object/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/is-plain-object/node_modules/isobject/package.json b/node_modules/is-plain-object/node_modules/isobject/package.json new file mode 100644 index 0000000000000..62aa8c1b2feea --- /dev/null +++ b/node_modules/is-plain-object/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "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" + ] + } +} diff --git a/node_modules/is-plain-object/package.json b/node_modules/is-plain-object/package.json new file mode 100644 index 0000000000000..dd6049860cd2b --- /dev/null +++ b/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "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" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "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 + } + } +} diff --git a/node_modules/is-posix-bracket/LICENSE b/node_modules/is-posix-bracket/LICENSE new file mode 100644 index 0000000000000..1e49edf81fee9 --- /dev/null +++ b/node_modules/is-posix-bracket/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/is-posix-bracket/README.md b/node_modules/is-posix-bracket/README.md new file mode 100644 index 0000000000000..1d06a4d9e0a86 --- /dev/null +++ b/node_modules/is-posix-bracket/README.md @@ -0,0 +1,88 @@ +# is-posix-bracket [![NPM version](https://img.shields.io/npm/v/is-posix-bracket.svg?style=flat)](https://www.npmjs.com/package/is-posix-bracket) [![NPM downloads](https://img.shields.io/npm/dm/is-posix-bracket.svg?style=flat)](https://npmjs.org/package/is-posix-bracket) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-posix-bracket.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-posix-bracket) + +> Returns true if the given string is a POSIX bracket expression (POSIX character class). + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install is-posix-bracket --save +``` + +## Usage + +```js +var isPosixBracket = require('is-posix-bracket'); + +isPosixBracket('[foo:]]'); +//=> false +isPosixBracket('[xdigit:]]'); +//=> false +isPosixBracket('[[:xdigit:]]'); +//=> true +isPosixBracket('[[:xdigit:]]'); +//=> true +isPosixBracket('[[:alpha:]123]'); +//=> true +isPosixBracket('[[:alpha:]123]'); +//=> true +isPosixBracket('[a-c[:digit:]x-z]'); +//=> true +isPosixBracket('[:al:]'); +//=> true +isPosixBracket('[abc[:punct:][0-9]'); +//=> true +``` + +## Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces) +* [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) +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob) +* [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://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-posix-bracket/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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-posix-bracket/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on April 05, 2016._ \ No newline at end of file diff --git a/node_modules/is-posix-bracket/index.js b/node_modules/is-posix-bracket/index.js new file mode 100644 index 0000000000000..7cf1de55b629c --- /dev/null +++ b/node_modules/is-posix-bracket/index.js @@ -0,0 +1,10 @@ +/*! + * is-posix-bracket + * + * Copyright (c) 2015-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isPosixBracket(str) { + return typeof str === 'string' && /\[([:.=+])(?:[^\[\]]|)+\1\]/.test(str); +}; diff --git a/node_modules/is-posix-bracket/package.json b/node_modules/is-posix-bracket/package.json new file mode 100644 index 0000000000000..f6374c6c65293 --- /dev/null +++ b/node_modules/is-posix-bracket/package.json @@ -0,0 +1,64 @@ +{ + "name": "is-posix-bracket", + "description": "Returns true if the given string is a POSIX bracket expression (POSIX character class).", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/is-posix-bracket", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-posix-bracket", + "bugs": { + "url": "https://github.com/jonschlinkert/is-posix-bracket/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "keywords": [ + "braces", + "brackets", + "character", + "character-class", + "class", + "expression", + "posix", + "regex", + "regexp", + "regular" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "is-extglob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-primitive/LICENSE b/node_modules/is-primitive/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/is-primitive/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/is-primitive/README.md b/node_modules/is-primitive/README.md new file mode 100644 index 0000000000000..e1c306428fda3 --- /dev/null +++ b/node_modules/is-primitive/README.md @@ -0,0 +1,57 @@ +# is-primitive [![NPM version](https://badge.fury.io/js/is-primitive.svg)](http://badge.fury.io/js/is-primitive) [![Build Status](https://travis-ci.org/jonschlinkert/is-primitive.svg)](https://travis-ci.org/jonschlinkert/is-primitive) + +> Returns `true` if the value is a primitive. + +## Install with [npm](npmjs.org) + +```bash +npm i is-primitive --save +``` + +## Running tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + +## Usage + +```js +var isPrimitive = require('is-primitive'); +isPrimitive('abc'); +//=> true + +isPrimitive(42); +//=> true + +isPrimitive(false); +//=> true + +isPrimitive(true); +//=> true + +isPrimitive({}); +//=> false + +isPrimitive([]); +//=> false + +isPrimitive(function(){}); +//=> false +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014-2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 16, 2015._ \ No newline at end of file diff --git a/node_modules/is-primitive/index.js b/node_modules/is-primitive/index.js new file mode 100644 index 0000000000000..55f11cf05b426 --- /dev/null +++ b/node_modules/is-primitive/index.js @@ -0,0 +1,13 @@ +/*! + * is-primitive + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +// see http://jsperf.com/testing-value-is-primitive/7 +module.exports = function isPrimitive(value) { + return value == null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/node_modules/is-primitive/package.json b/node_modules/is-primitive/package.json new file mode 100644 index 0000000000000..b716f4ece1b19 --- /dev/null +++ b/node_modules/is-primitive/package.json @@ -0,0 +1,46 @@ +{ + "name": "is-primitive", + "description": "Returns `true` if the value is a primitive. ", + "version": "2.0.0", + "homepage": "https://github.com/jonschlinkert/is-primitive", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/is-primitive.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-primitive/issues" + }, + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/is-primitive/blob/master/LICENSE" + }, + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^4.0.4" + }, + "keywords": [ + "boolean", + "check", + "number", + "primitive", + "string", + "symbol", + "type", + "typeof", + "util" + ] +} diff --git a/node_modules/is-regex/.editorconfig b/node_modules/is-regex/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/is-regex/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-regex/.eslintignore b/node_modules/is-regex/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-regex/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-regex/.eslintrc b/node_modules/is-regex/.eslintrc new file mode 100644 index 0000000000000..1f6f127733554 --- /dev/null +++ b/node_modules/is-regex/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [1], + "operator-linebreak": [2, "before"], + }, + + "overrides": [ + { + "files": ["test/**/*.js"], + "globals": { + "Proxy": false, + }, + }, + ], +} diff --git a/node_modules/is-regex/.nycrc b/node_modules/is-regex/.nycrc new file mode 100644 index 0000000000000..a69aa2d8273d8 --- /dev/null +++ b/node_modules/is-regex/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-regex/CHANGELOG.md b/node_modules/is-regex/CHANGELOG.md new file mode 100644 index 0000000000000..b7496b212dc0a --- /dev/null +++ b/node_modules/is-regex/CHANGELOG.md @@ -0,0 +1,197 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.4](https://github.com/inspect-js/is-regex/compare/v1.1.3...v1.1.4) - 2021-08-05 + +### Commits + +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4b17cad`](https://github.com/inspect-js/is-regex/commit/4b17cad8496b1ae621b18335fa3afe94d0c65e83) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`2dad4af`](https://github.com/inspect-js/is-regex/commit/2dad4afffa15f07cbbf7675b77d1f650c92652c4) + +## [v1.1.3](https://github.com/inspect-js/is-regex/compare/v1.1.2...v1.1.3) - 2021-05-07 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c681ab9`](https://github.com/inspect-js/is-regex/commit/c681ab99c07f8b3b7ae5f652b3105a30bce94f69) +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`ca019fd`](https://github.com/inspect-js/is-regex/commit/ca019fdb828dc7d32e323213403ac9995d8604e3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`605a66f`](https://github.com/inspect-js/is-regex/commit/605a66f278900f1c8ae9d1dfcec31e5f61b10ad3) +- [readme] add actions and codecov badges [`8d7c6f0`](https://github.com/inspect-js/is-regex/commit/8d7c6f0e007bd982f21b958e0abc98b8a84e2a24) +- [meta] use `prepublishOnly` script for npm 7+ [`8e50e91`](https://github.com/inspect-js/is-regex/commit/8e50e91f51aa5038745526710ef2e030527982a7) +- [Deps] update `has-symbols` [`4742c81`](https://github.com/inspect-js/is-regex/commit/4742c81260c3db9a8c9ef57110981fb6175f58e0) + +## [v1.1.2](https://github.com/inspect-js/is-regex/compare/v1.1.1...v1.1.2) - 2021-02-01 + +### Commits + +- [Tests] migrate tests to Github Actions [`cc1686e`](https://github.com/inspect-js/is-regex/commit/cc1686e25f446ca6948f43b3f180d6e55e31fb4e) +- [readme] fix repo URLs; remove travis badge [`d1d1da6`](https://github.com/inspect-js/is-regex/commit/d1d1da647bb4e91589606f12470cd27a47b3bb81) +- [meta] do not publish github action workflow files [`9f84b99`](https://github.com/inspect-js/is-regex/commit/9f84b993a995f057b4d2d097ef47b1ff9c84115d) +- [Tests] run `nyc` on all tests [`c37aab9`](https://github.com/inspect-js/is-regex/commit/c37aab9d332c4834b08ada94736c45ab1d39cd2f) +- [Robustness] use `call-bind` [`fbb61bf`](https://github.com/inspect-js/is-regex/commit/fbb61bf3e19ccc178e6ed1e0d7ab9cc7c7167393) +- [actions] add "Allow Edits" workflow [`9022b53`](https://github.com/inspect-js/is-regex/commit/9022b53cb05b0f105cd179800cf96e055b249f08) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`d60f28f`](https://github.com/inspect-js/is-regex/commit/d60f28f7f2fb21dade7bce302b3e0246206423d3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`2c35c43`](https://github.com/inspect-js/is-regex/commit/2c35c437edf3eeb37129eea2404d8f465d27620f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`1009e25`](https://github.com/inspect-js/is-regex/commit/1009e259d49a63753dc6e79e2b876a30c00c6de6) +- [meta] gitignore coverage output [`3b5fa9e`](https://github.com/inspect-js/is-regex/commit/3b5fa9ed2882c65ee81dff979f79f1a2751d3772) +- [actions] update workflows [`1843ef6`](https://github.com/inspect-js/is-regex/commit/1843ef65b8b8c24a44e91bc4ed5ee60dffc31c2d) + +## [v1.1.1](https://github.com/inspect-js/is-regex/compare/v1.1.0...v1.1.1) - 2020-08-03 + +### Commits + +- [Performance] Re-add lastIndex check to improve performance [`d8495cd`](https://github.com/inspect-js/is-regex/commit/d8495cd22d475ddca250818921b6088f631c1972) +- [Dev Deps] update `auto-changelog`, `eslint` [`778fa6b`](https://github.com/inspect-js/is-regex/commit/778fa6b9d2b182ee6d73993e103532855e956f85) + +## [v1.1.0](https://github.com/inspect-js/is-regex/compare/v1.0.5...v1.1.0) - 2020-06-03 + +### Commits + +- [New] use `badStringifier`‑based RegExp detection [`31eff67`](https://github.com/inspect-js/is-regex/commit/31eff673243d65c3d6c05848c0eb52f5380f1be3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`fc91458`](https://github.com/inspect-js/is-regex/commit/fc914588187b8bb00d8d792c84f06a6e15d883c1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`d43ed83`](https://github.com/inspect-js/is-regex/commit/d43ed83db54ea727bb0b1b77a50af79d1edb8a6d) +- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`56647d1`](https://github.com/inspect-js/is-regex/commit/56647d196be34ef3c118ad67726e75169fbcb875) +- [meta] only run `aud` on prod deps [`e0865b8`](https://github.com/inspect-js/is-regex/commit/e0865b8360b0ac1b9d17b7b81ae5f339e5c9036b) + +## [v1.0.5](https://github.com/inspect-js/is-regex/compare/v1.0.4...v1.0.5) - 2019-12-15 + +### Commits + +- [Tests] use shared travis-ci configs [`af728b2`](https://github.com/inspect-js/is-regex/commit/af728b21c5cc9e41234fb4015594bffdcfff597c) +- [Tests] remove `jscs` [`1b8cfe8`](https://github.com/inspect-js/is-regex/commit/1b8cfe8cfb14820c196775f19d370276e4034791) +- [meta] add `auto-changelog` [`c3131d8`](https://github.com/inspect-js/is-regex/commit/c3131d8ab5d06ea5fa05a4bb2ad28bbfb81668ad) +- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`, `v4.8`; newer npm fails on older nodes [`660b658`](https://github.com/inspect-js/is-regex/commit/660b6585d1a9607dbdae879b70ce2f6a5684616c) +- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS [`7c25218`](https://github.com/inspect-js/is-regex/commit/7c25218d540ab17c18e4ae333677c5725806a778) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`fa95547`](https://github.com/inspect-js/is-regex/commit/fa955478950a5ba0a920010d5daaa29487500b30) +- [meta] remove unused Makefile and associated utilities [`9fd2a29`](https://github.com/inspect-js/is-regex/commit/9fd2a29dc57ed125f3d61e94f6254a9dd8ee0044) +- [Tests] up to `node` `v11.3`, `v10.14`, `v8.14`, `v6.15` [`7f2ac41`](https://github.com/inspect-js/is-regex/commit/7f2ac41ef5dc4d53bfe2fb1c24486c688a2537bd) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`6fa2b0f`](https://github.com/inspect-js/is-regex/commit/6fa2b0fe171a5b02086a06679a92d989e83a8b8e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`697e1de`](https://github.com/inspect-js/is-regex/commit/697e1de1c9e69f08e591cc0040d81fdbbde6fe4e) +- [actions] add automatic rebasing / merge commit blocking [`ad86dc9`](https://github.com/inspect-js/is-regex/commit/ad86dc97a52e4f66fbfb3b8c9c78da3963588b54) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `jscs`, `nsp`, `replace`, `semver`, `tape` [`5c99c8e`](https://github.com/inspect-js/is-regex/commit/5c99c8e384d5ce2ef434be5853c301477cf35456) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape` [`bb63686`](https://github.com/inspect-js/is-regex/commit/bb63686a9d0fc586d121549cf484da95edec3b0a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config@`, `replace`, `semver`, `tape` [`ddf3670`](https://github.com/inspect-js/is-regex/commit/ddf36705e5f7bd29832721e4a23abf06195032c6) +- [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config` [`e7b5a62`](https://github.com/inspect-js/is-regex/commit/e7b5a626eef3b9648c7d52d4620ce2e2a98a9ab8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`c803db5`](https://github.com/inspect-js/is-regex/commit/c803db5cd94cf9e0a559617adbc1e4c9d22007ff) +- [Tests] switch from `nsp` to `npm audit` [`b7239be`](https://github.com/inspect-js/is-regex/commit/b7239be9da263a0f7066f79d087eaf700a9613e9) +- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`347ee6c`](https://github.com/inspect-js/is-regex/commit/347ee6c67ba0f56b03f21a5abe743658f6515963) +- Only apps should have lockfiles. [`3866575`](https://github.com/inspect-js/is-regex/commit/38665755ecf028061f15816059e26023890a0dc7) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`d099a39`](https://github.com/inspect-js/is-regex/commit/d099a3943eb7e156a3e64fb8b74e11d7c83a4bec) +- [meta] add `funding` field [`741aecd`](https://github.com/inspect-js/is-regex/commit/741aecd92cd49868b3606c8cc99ce299e5f3c7d5) +- [Tests] use `eclint` instead of `editorconfig-tools` [`bc6aa75`](https://github.com/inspect-js/is-regex/commit/bc6aa7539e506788709b96f7bf3d7549850a81c3) +- [Tests] on `node` `v10.1` [`262226f`](https://github.com/inspect-js/is-regex/commit/262226f08fa34dff9a8dffd16daabb3dc6e262eb) +- [Dev Deps] update `eslint` [`31fd719`](https://github.com/inspect-js/is-regex/commit/31fd719dd59a6111ca710cdb0d19a8adadf9b8c6) +- [Deps] update `has` [`e9e25a3`](https://github.com/inspect-js/is-regex/commit/e9e25a3de7e89faaa6aadf5010477074140e8218) +- [Dev Deps] update `replace` [`aeeb968`](https://github.com/inspect-js/is-regex/commit/aeeb968bf5a4fc07f0fa6905f2c699fc563b6c32) +- [Tests] set audit level [`2a6290e`](https://github.com/inspect-js/is-regex/commit/2a6290e78b58bf14b734d7998fe53b4a84db5e44) +- [Tests] remove `nsp` [`fc74c2b`](https://github.com/inspect-js/is-regex/commit/fc74c2bb6970a7f3280abe6eff3b492d77d89c9f) + +## [v1.0.4](https://github.com/inspect-js/is-regex/compare/v1.0.3...v1.0.4) - 2017-02-18 + +### Fixed + +- [Fix] ensure that `lastIndex` is not mutated [`#3`](https://github.com/inspect-js/is-regex/issues/3) + +### Commits + +- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`c4a41c3`](https://github.com/inspect-js/is-regex/commit/c4a41c3a8203a3919b01cd0d1b577daadf30a452) +- [Tests] on all node minors; improve test matrix [`58d7508`](https://github.com/inspect-js/is-regex/commit/58d7508a36eb92bd76717486b9e78bde502ffe3e) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`7290076`](https://github.com/inspect-js/is-regex/commit/729007606e9ed162953d1f5812c37eb06c554ec2) +- Update `covert`, `jscs`, `eslint`, `semver` [`dabc729`](https://github.com/inspect-js/is-regex/commit/dabc729cfc4458264c6f7642004d41dd5c214bfd) +- Update `eslint` [`a946b05`](https://github.com/inspect-js/is-regex/commit/a946b051159396b4311c564880f96e3d00e8b8e2) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`1744dde`](https://github.com/inspect-js/is-regex/commit/1744dde77526841f216fa2c1c866c5a82b1638c0) +- [Refactor] when try/catch is needed, bail early if the value lacks an own `lastIndex` data property. [`288ad93`](https://github.com/inspect-js/is-regex/commit/288ad93dbfed9f6828de20de67105ee6d6504425) +- Update `editorconfig-tools`, `eslint`, `semver`, `replace` [`4d895c6`](https://github.com/inspect-js/is-regex/commit/4d895c68a0cdbb5803185928963c15147aad0404) +- Update `eslint`, `tape`, `semver` [`f387f03`](https://github.com/inspect-js/is-regex/commit/f387f03b260b56372bfca301d4e79c4067633854) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`55e480f`](https://github.com/inspect-js/is-regex/commit/55e480f407cafb6c21a6c32aef04ccaa3ba4216c) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`89d9528`](https://github.com/inspect-js/is-regex/commit/89d95285b364913ebcd8ac7e0872570fe009a5d3) +- [Dev Deps] update `jscs` [`eb222a8`](https://github.com/inspect-js/is-regex/commit/eb222a8435e59909354f3700fd4880e4ce1cb13e) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`c65429c`](https://github.com/inspect-js/is-regex/commit/c65429cea0366508c10ad2ab773af7b83a34fc81) +- Update `nsp`, `eslint` [`c60fbd8`](https://github.com/inspect-js/is-regex/commit/c60fbd8680f7fb3508ec3c5be8ebb788672516c8) +- Update `eslint`, `semver` [`6a62116`](https://github.com/inspect-js/is-regex/commit/6a621168c63616bf004ca8b1f885b4eb8a58a3e5) +- [Tests] on `node` `v7.5`, `v4.7` [`e764651`](https://github.com/inspect-js/is-regex/commit/e764651336f5da5e239e9fe8869f3a3201c19d2b) +- Test up to `io.js` `v2.1` [`3bf326a`](https://github.com/inspect-js/is-regex/commit/3bf326a9bcd530fd16c9fc806e249a68e25ab7e3) +- Test on the latest `io.js` versions. [`693d047`](https://github.com/inspect-js/is-regex/commit/693d0477631c5d7671f6c99eca5594ffffa75771) +- [Refactor] use an early return instead of a ternary. [`31eaca2`](https://github.com/inspect-js/is-regex/commit/31eaca28b7d0aaac0599fe7a569b93b842f8ab16) +- Test on `io.js` `v2.2` [`c18c55a`](https://github.com/inspect-js/is-regex/commit/c18c55aee6358d70531f935e98851e42b698d93c) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`a1c237d`](https://github.com/inspect-js/is-regex/commit/a1c237d35f880fe0bcbc9275254611a6a2300aaf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`aa3ea0f`](https://github.com/inspect-js/is-regex/commit/aa3ea0f148af31d75f7ef8a800412729d82def04) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`d97831d`](https://github.com/inspect-js/is-regex/commit/d97831d0e2ccd3d00d1f7354b7f81e2575f90953) +- [Dev Deps] Update `tape`, `eslint` [`95e6def`](https://github.com/inspect-js/is-regex/commit/95e6defe3178c45dc9df16e474e558979d5f5c05) +- Update `eslint`, `nsp` [`3844c93`](https://github.com/inspect-js/is-regex/commit/3844c935cfe7c52fae0dc74d27e884c417cb4616) +- Update `tape`, `jscs` [`0d6dac8`](https://github.com/inspect-js/is-regex/commit/0d6dac818ed251910171965932f021291919e770) +- Fix tests for faked @@toStringTag [`2ebef9f`](https://github.com/inspect-js/is-regex/commit/2ebef9f0759843e9a063de7a512b46e3e7daea7e) +- Test up to `io.js` `v3.0` [`ec1d2d4`](https://github.com/inspect-js/is-regex/commit/ec1d2d44481fa0fa11448527da8030c99fe47a12) +- [Refactor] bail earlier when the value is falsy. [`a9e333e`](https://github.com/inspect-js/is-regex/commit/a9e333e2ac8912ca05b7e31d30e4eea683c0da4b) +- [Dev Deps] update `tape` [`8cdcaae`](https://github.com/inspect-js/is-regex/commit/8cdcaae07be8c790cdb99849e6076ea7702a4c84) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`281c4ef`](https://github.com/inspect-js/is-regex/commit/281c4efeb71c86dd380e741bcaee3f7dbf956151) +- Test on `io.js` `v2.4` [`4d54c68`](https://github.com/inspect-js/is-regex/commit/4d54c68a81b5332a3b76259d8aa8f514be5efd13) +- Test on `io.js` `v2.3` [`23170f5`](https://github.com/inspect-js/is-regex/commit/23170f5cae632d0377de73bd2febc53db8aebbc9) +- Test on `iojs-v1.6` [`4487ad0`](https://github.com/inspect-js/is-regex/commit/4487ad0194a5684223bfa2690da4e0a441f7132a) + +## [v1.0.3](https://github.com/inspect-js/is-regex/compare/v1.0.2...v1.0.3) - 2015-01-29 + +### Commits + +- Update npm run scripts. [`dc528dd`](https://github.com/inspect-js/is-regex/commit/dc528dd25e775089bc0a3f5a8f7ae7ffc4cdf52a) +- Add toStringTag tests. [`f48a83a`](https://github.com/inspect-js/is-regex/commit/f48a83a78720b78ab60ca586c16f6f3dbcfec825) +- If @@toStringTag is not present, use the old-school Object#toString test. [`50b0ffd`](https://github.com/inspect-js/is-regex/commit/50b0ffd9c7fdbd54aee8cde1b07e680ae84f6a0d) + +## [v1.0.2](https://github.com/inspect-js/is-regex/compare/v1.0.1...v1.0.2) - 2015-01-29 + +### Commits + +- `make release` [`a1de7ec`](https://github.com/inspect-js/is-regex/commit/a1de7eca4cecc8015fd27804669f8fc61bd16a68) +- Improve optimization by separating the try/catch, and bailing out early when not typeof "object". [`5ab7632`](https://github.com/inspect-js/is-regex/commit/5ab76322a348487fa8b16761e83f6824c3c27d11) + +## [v1.0.1](https://github.com/inspect-js/is-regex/compare/v1.0.0...v1.0.1) - 2015-01-28 + +### Commits + +- Using my standard jscs.json file [`1f1733a`](https://github.com/inspect-js/is-regex/commit/1f1733ac8433cdcceb25356f86b74136a4477cb9) +- Adding `npm run lint` [`51ea70f`](https://github.com/inspect-js/is-regex/commit/51ea70fa7e461d022f611c195f343ea8d0333d71) +- Use RegExp#exec to test if something is a regex, which works even with ES6 @@toStringTag. [`042c8c7`](https://github.com/inspect-js/is-regex/commit/042c8c734faade9015932b61f1e8ea4f3a93b1b3) +- Adding license and downloads badges [`366d619`](https://github.com/inspect-js/is-regex/commit/366d61965d3a4119126e78e09b2166bbcddd0c5a) +- Use SVG badges instead of PNG [`6a32e4f`](https://github.com/inspect-js/is-regex/commit/6a32e4fc87d7d3a3787b800dd033c9293aead6df) +- Update `tape`, `jscs` [`f1b9462`](https://github.com/inspect-js/is-regex/commit/f1b9462f86d1b69de07176e7f277f668757ba964) +- Update `jscs` [`1bff23f`](https://github.com/inspect-js/is-regex/commit/1bff23ff0fe88c8263e8bf04cf99e290af96d5b0) +- Update `tape`, `jscs` [`c22ea2e`](https://github.com/inspect-js/is-regex/commit/c22ea2e7967f45618deed01ff5ea483f918be216) +- Update `tape`, `jscs` [`b0479db`](https://github.com/inspect-js/is-regex/commit/b0479db99a1b1b872d1618fb0a71f0c74a78b29b) +- Use consistent quotes [`1a6e347`](https://github.com/inspect-js/is-regex/commit/1a6e34730d9270f3f20519139faa4c4e6ec2e1f5) +- Make travis builds faster. [`090a4ea`](https://github.com/inspect-js/is-regex/commit/090a4ea7c5fa709d108d596e3bc304e6ce973dec) +- Update `tape` [`7d76129`](https://github.com/inspect-js/is-regex/commit/7d7612928bdd43230fbd835db71797249ca24f35) +- Lock covert to v1.0.0. [`9a90b03`](https://github.com/inspect-js/is-regex/commit/9a90b03fb390e66f874223a34c58ba2bb109edd3) +- Updating tape [`bfbc7f5`](https://github.com/inspect-js/is-regex/commit/bfbc7f593a007acd0411152bbb55f724dc4ca935) +- Updating jscs [`13ad511`](https://github.com/inspect-js/is-regex/commit/13ad511d80cd67300c2c0c5387fc4b3b423e2768) +- Updating jscs [`cda1945`](https://github.com/inspect-js/is-regex/commit/cda1945d603dfe99e24d5a909a931d366451bc4d) +- Updating jscs [`de96c99`](https://github.com/inspect-js/is-regex/commit/de96c99d4bf5787df671de6df9138b6547a6545b) +- Running linter as part of tests [`2cb6567`](https://github.com/inspect-js/is-regex/commit/2cb656733b1ed0af14ad11fb584006d22de0c69d) +- Updating covert [`a56ae74`](https://github.com/inspect-js/is-regex/commit/a56ae74ec8d5f0473295a8b10519a18580f16624) +- Updating tape [`ffe47f7`](https://github.com/inspect-js/is-regex/commit/ffe47f7fe9cf6d16896b4bdc286bd1d0805d5c49) + +## [v1.0.0](https://github.com/inspect-js/is-regex/compare/v0.0.0...v1.0.0) - 2014-05-19 + +### Commits + +- Make sure old and unstable nodes don't break Travis [`05da747`](https://github.com/inspect-js/is-regex/commit/05da7478f960dc131ec3ad864e27e8c6b7d74a80) +- toString is a reserved var name in old Opera [`885c48c`](https://github.com/inspect-js/is-regex/commit/885c48c120f921a55f1842b0607d3e7875379821) +- Updating deps [`2ca0e79`](https://github.com/inspect-js/is-regex/commit/2ca0e79a2443ca34d85e8b2ea2e26f55855b74a7) +- Updating tape. [`9678435`](https://github.com/inspect-js/is-regex/commit/96784355611deb0c23b9064be774216d76e3e457) +- Updating covert [`c3bb898`](https://github.com/inspect-js/is-regex/commit/c3bb8985a422e3e0c81f9c43899b6c19a72c755f) +- Updating tape [`7811708`](https://github.com/inspect-js/is-regex/commit/78117089688258b8f939b397b37897b5b3e30f74) +- Testing on node 0.6 again [`dec36ae`](https://github.com/inspect-js/is-regex/commit/dec36ae58a39a3f80e832b702c3e19406363c160) +- Run code coverage as part of tests [`e6f4ebe`](https://github.com/inspect-js/is-regex/commit/e6f4ebec26894543747603f2cb360e839f2ca290) + +## v0.0.0 - 2014-01-15 + +### Commits + +- package.json [`aa60d43`](https://github.com/inspect-js/is-regex/commit/aa60d43d2c8adb9fdd47f5898e5e1e570bd238d8) +- read me [`861e944`](https://github.com/inspect-js/is-regex/commit/861e944de88e84010eaa662ea9ea9f17c90cff8c) +- Initial commit [`d0cdd71`](https://github.com/inspect-js/is-regex/commit/d0cdd71a637d8490b7ee3eaaf75c7e31d0f9242f) +- Tests. [`b533f74`](https://github.com/inspect-js/is-regex/commit/b533f741a88dff002790fb7af054b2a74e72d4da) +- Implementation. [`3c9a8c0`](https://github.com/inspect-js/is-regex/commit/3c9a8c06994003cdfffeb3620f251f4c4cae7755) +- Travis CI [`742c440`](https://github.com/inspect-js/is-regex/commit/742c4407015f9108875fd108fde137f5245e9e7a) diff --git a/node_modules/is-regex/LICENSE b/node_modules/is-regex/LICENSE new file mode 100644 index 0000000000000..47b7b5078fce3 --- /dev/null +++ b/node_modules/is-regex/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION 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-regex/README.md b/node_modules/is-regex/README.md new file mode 100644 index 0000000000000..d61332bd290fe --- /dev/null +++ b/node_modules/is-regex/README.md @@ -0,0 +1,52 @@ +# is-regex [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS regex? +This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isRegex = require('is-regex'); +var assert = require('assert'); + +assert.notOk(isRegex(undefined)); +assert.notOk(isRegex(null)); +assert.notOk(isRegex(false)); +assert.notOk(isRegex(true)); +assert.notOk(isRegex(42)); +assert.notOk(isRegex('foo')); +assert.notOk(isRegex(function () {})); +assert.notOk(isRegex([])); +assert.notOk(isRegex({})); + +assert.ok(isRegex(/a/g)); +assert.ok(isRegex(new RegExp('a', 'g'))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-regex +[2]: https://versionbadg.es/inspect-js/is-regex.svg +[5]: https://david-dm.org/inspect-js/is-regex.svg +[6]: https://david-dm.org/inspect-js/is-regex +[7]: https://david-dm.org/inspect-js/is-regex/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-regex#info=devDependencies +[11]: https://nodei.co/npm/is-regex.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-regex.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-regex.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-regex +[codecov-image]: https://codecov.io/gh/inspect-js/is-regex/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-regex/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-regex +[actions-url]: https://github.com/inspect-js/is-regex/actions diff --git a/node_modules/is-regex/index.js b/node_modules/is-regex/index.js new file mode 100644 index 0000000000000..19780f4b50a57 --- /dev/null +++ b/node_modules/is-regex/index.js @@ -0,0 +1,58 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var hasToStringTag = require('has-tostringtag/shams')(); +var has; +var $exec; +var isRegexMarker; +var badStringifier; + +if (hasToStringTag) { + has = callBound('Object.prototype.hasOwnProperty'); + $exec = callBound('RegExp.prototype.exec'); + isRegexMarker = {}; + + var throwRegexMarker = function () { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + + if (typeof Symbol.toPrimitive === 'symbol') { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } +} + +var $toString = callBound('Object.prototype.toString'); +var gOPD = Object.getOwnPropertyDescriptor; +var regexClass = '[object RegExp]'; + +module.exports = hasToStringTag + // eslint-disable-next-line consistent-return + ? function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + try { + $exec(value, badStringifier); + } catch (e) { + return e === isRegexMarker; + } + } + : function isRegex(value) { + // In older browsers, typeof regex incorrectly returns 'function' + if (!value || (typeof value !== 'object' && typeof value !== 'function')) { + return false; + } + + return $toString(value) === regexClass; + }; diff --git a/node_modules/is-regex/package.json b/node_modules/is-regex/package.json new file mode 100644 index 0000000000000..094fd419b3eb4 --- /dev/null +++ b/node_modules/is-regex/package.json @@ -0,0 +1,86 @@ +{ + "name": "is-regex", + "version": "1.1.4", + "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc node test", + "test:harmony": "nyc node --harmony --es-staging test", + "test:corejs": "nyc tape test-corejs.js", + "posttest": "npx aud --production", + "lint": "eslint .", + "eccheck": "eclint check *.js **/*.js > /dev/null", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-regex.git" + }, + "bugs": { + "url": "https://github.com/inspect-js/is-regex/issues" + }, + "homepage": "https://github.com/inspect-js/is-regex", + "keywords": [ + "regex", + "regexp", + "is", + "regular expression", + "regular", + "expression" + ], + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", + "eclint": "^2.8.1", + "eslint": "^7.32.0", + "foreach": "^2.0.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-regex/test/index.js b/node_modules/is-regex/test/index.js new file mode 100644 index 0000000000000..f6c08023a8df7 --- /dev/null +++ b/node_modules/is-regex/test/index.js @@ -0,0 +1,104 @@ +'use strict'; + +var hasToStringTag = require('has-tostringtag/shams')(); +var forEach = require('foreach'); +var test = require('tape'); +var isRegex = require('..'); + +test('not regexes', function (t) { + t.notOk(isRegex(), 'undefined is not regex'); + t.notOk(isRegex(null), 'null is not regex'); + t.notOk(isRegex(false), 'false is not regex'); + t.notOk(isRegex(true), 'true is not regex'); + t.notOk(isRegex(42), 'number is not regex'); + t.notOk(isRegex('foo'), 'string is not regex'); + t.notOk(isRegex([]), 'array is not regex'); + t.notOk(isRegex({}), 'object is not regex'); + t.notOk(isRegex(function () {}), 'function is not regex'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var regex = /a/g; + var fakeRegex = { + toString: function () { return String(regex); }, + valueOf: function () { return regex; } + }; + fakeRegex[Symbol.toStringTag] = 'RegExp'; + t.notOk(isRegex(fakeRegex), 'fake RegExp with @@toStringTag "RegExp" is not regex'); + t.end(); +}); + +test('regexes', function (t) { + t.ok(isRegex(/a/g), 'regex literal is regex'); + t.ok(isRegex(new RegExp('a', 'g')), 'regex object is regex'); + t.end(); +}); + +test('does not mutate regexes', function (t) { + t.test('lastIndex is a marker object', function (st) { + var regex = /a/; + var marker = {}; + regex.lastIndex = marker; + st.equal(regex.lastIndex, marker, 'lastIndex is the marker object'); + st.ok(isRegex(regex), 'is regex'); + st.equal(regex.lastIndex, marker, 'lastIndex is the marker object after isRegex'); + st.end(); + }); + + t.test('lastIndex is nonzero', function (st) { + var regex = /a/; + regex.lastIndex = 3; + st.equal(regex.lastIndex, 3, 'lastIndex is 3'); + st.ok(isRegex(regex), 'is regex'); + st.equal(regex.lastIndex, 3, 'lastIndex is 3 after isRegex'); + st.end(); + }); + + t.end(); +}); + +test('does not perform operations observable to Proxies', { skip: typeof Proxy !== 'function' }, function (t) { + var Handler = function () { + this.trapCalls = []; + }; + + forEach([ + 'defineProperty', + 'deleteProperty', + 'get', + 'getOwnPropertyDescriptor', + 'getPrototypeOf', + 'has', + 'isExtensible', + 'ownKeys', + 'preventExtensions', + 'set', + 'setPrototypeOf' + ], function (trapName) { + Handler.prototype[trapName] = function () { + this.trapCalls.push(trapName); + return Reflect[trapName].apply(Reflect, arguments); + }; + }); + + t.test('proxy of object', function (st) { + var handler = new Handler(); + var proxy = new Proxy({ lastIndex: 0 }, handler); + + st.equal(isRegex(proxy), false, 'proxy of plain object is not regex'); + st.deepEqual(handler.trapCalls, ['getOwnPropertyDescriptor'], 'no unexpected proxy traps were triggered'); + st.end(); + }); + + t.test('proxy of RegExp instance', function (st) { + var handler = new Handler(); + var proxy = new Proxy(/a/, handler); + + st.equal(isRegex(proxy), false, 'proxy of RegExp instance is not regex'); + st.deepEqual(handler.trapCalls, ['getOwnPropertyDescriptor'], 'no unexpected proxy traps were triggered'); + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-shared-array-buffer/.eslintignore b/node_modules/is-shared-array-buffer/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-shared-array-buffer/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-shared-array-buffer/.eslintrc b/node_modules/is-shared-array-buffer/.eslintrc new file mode 100644 index 0000000000000..3b5d9e90ec405 --- /dev/null +++ b/node_modules/is-shared-array-buffer/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/is-shared-array-buffer/.github/FUNDING.yml b/node_modules/is-shared-array-buffer/.github/FUNDING.yml new file mode 100644 index 0000000000000..61db3c4f9ccdd --- /dev/null +++ b/node_modules/is-shared-array-buffer/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-shared-array-buffer +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-shared-array-buffer/.nycrc b/node_modules/is-shared-array-buffer/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-shared-array-buffer/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-shared-array-buffer/CHANGELOG.md b/node_modules/is-shared-array-buffer/CHANGELOG.md new file mode 100644 index 0000000000000..6536f8fbc9360 --- /dev/null +++ b/node_modules/is-shared-array-buffer/CHANGELOG.md @@ -0,0 +1,44 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.1...v1.0.2) - 2022-04-01 + +### Commits + +- [actions] reuse common workflows [`48d01e6`](https://github.com/inspect-js/is-shared-array-buffer/commit/48d01e690f76c92f5c9072fbcb9b6215402db8a7) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7b0e12a`](https://github.com/inspect-js/is-shared-array-buffer/commit/7b0e12a4e8f5db8eac586be68c879119a4a12e7a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`8d57a8e`](https://github.com/inspect-js/is-shared-array-buffer/commit/8d57a8e1d9ce093f04f83e196ca7c80a02617939) +- [readme] update URLs [`dca4d27`](https://github.com/inspect-js/is-shared-array-buffer/commit/dca4d27d35352309da5abb4feb584158004008cf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`2a7bb99`](https://github.com/inspect-js/is-shared-array-buffer/commit/2a7bb990610d7f6c058bdae7f21c49cc7276848f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`389c6db`](https://github.com/inspect-js/is-shared-array-buffer/commit/389c6db4311a85a84fd4cb75646f26023b0c1685) +- [actions] update codecov uploader [`b9661f9`](https://github.com/inspect-js/is-shared-array-buffer/commit/b9661f9ac2e1e002372b9b1e136faca837a6647f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect` [`f99cd48`](https://github.com/inspect-js/is-shared-array-buffer/commit/f99cd4827e23bc893ed711cbffe28f3e51a4d401) +- [readme] add actions and codecov badges [`9515ed2`](https://github.com/inspect-js/is-shared-array-buffer/commit/9515ed2184a3ed1ce913b92b5092884dad5ac794) +- [Fix] add missing `call-bind` dependency [`cff5358`](https://github.com/inspect-js/is-shared-array-buffer/commit/cff53582740f9f053ec67e1acbf2bafc83bdb7b5) +- [meta] add `safe-publish-latest`; use `prepublishOnly` script for npm 7+ [`ba0b719`](https://github.com/inspect-js/is-shared-array-buffer/commit/ba0b7190a42d4290d31a5fce215e874da573dd77) + +## [v1.0.1](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.0...v1.0.1) - 2021-03-04 + +### Commits + +- [readme] fix repo URLs [`37c38f3`](https://github.com/inspect-js/is-shared-array-buffer/commit/37c38f347392da177197dd2fd518b61240a56203) + +## v1.0.0 - 2021-03-04 + +### Commits + +- [Tests] add tests [`9c7b806`](https://github.com/inspect-js/is-shared-array-buffer/commit/9c7b806ab1528814308a7420f8198644f55c916f) +- Initial commit [`4e65c5e`](https://github.com/inspect-js/is-shared-array-buffer/commit/4e65c5ecdaa255162bc6507de4ff98cea2472e3b) +- [meta] do not publish github action workflow files [`ac3693d`](https://github.com/inspect-js/is-shared-array-buffer/commit/ac3693db8ec26db5444ef4b46aa38a81e8841d30) +- readme [`7a984d0`](https://github.com/inspect-js/is-shared-array-buffer/commit/7a984d0db73b77943f6731098134e3351a36793b) +- npm init [`a586c99`](https://github.com/inspect-js/is-shared-array-buffer/commit/a586c99316f3c8ae4fd5125621ea933e97a1bf1b) +- [actions] add automatic rebasing / merge commit blocking [`184fe62`](https://github.com/inspect-js/is-shared-array-buffer/commit/184fe622680d523e89ac322fa1a52dbba46a8fc0) +- Implementation [`207e26d`](https://github.com/inspect-js/is-shared-array-buffer/commit/207e26d1128930f28384cb213b38d69fd52bbd7c) +- [meta] create `FUNDING.yml`; add "funding" field [`3cad3fc`](https://github.com/inspect-js/is-shared-array-buffer/commit/3cad3fc9509f91fbc71e84565529f53a94d538d4) +- [meta] add auto-changelog [`31f1f2c`](https://github.com/inspect-js/is-shared-array-buffer/commit/31f1f2cbcd616d6c09089d62198d5cc775053324) +- [Tests] add `npm run lint` [`2e5146e`](https://github.com/inspect-js/is-shared-array-buffer/commit/2e5146e18f44533382a781fa09a50d4f47caa0e5) +- Only apps should have lockfiles [`7b2adfa`](https://github.com/inspect-js/is-shared-array-buffer/commit/7b2adfad6dcd95271ab6ba34658a9a1a21dbeacf) diff --git a/node_modules/is-shared-array-buffer/LICENSE b/node_modules/is-shared-array-buffer/LICENSE new file mode 100644 index 0000000000000..7948bc02a7937 --- /dev/null +++ b/node_modules/is-shared-array-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-shared-array-buffer/README.md b/node_modules/is-shared-array-buffer/README.md new file mode 100644 index 0000000000000..c2b6710625992 --- /dev/null +++ b/node_modules/is-shared-array-buffer/README.md @@ -0,0 +1,58 @@ +# is-shared-array-buffer [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS SharedArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var assert = require('assert'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +assert(!isSharedArrayBuffer(function () {})); +assert(!isSharedArrayBuffer(null)); +assert(!isSharedArrayBuffer(function* () { yield 42; return Infinity; }); +assert(!isSharedArrayBuffer(Symbol('foo'))); +assert(!isSharedArrayBuffer(1n)); +assert(!isSharedArrayBuffer(Object(1n))); + +assert(!isSharedArrayBuffer(new Set())); +assert(!isSharedArrayBuffer(new WeakSet())); +assert(!isSharedArrayBuffer(new Map())); +assert(!isSharedArrayBuffer(new WeakMap())); +assert(!isSharedArrayBuffer(new WeakRef({}))); +assert(!isSharedArrayBuffer(new FinalizationRegistry(() => {}))); +assert(!isSharedArrayBuffer(new ArrayBuffer())); + +assert(isSharedArrayBuffer(new SharedArrayBuffer())); + +class MySharedArrayBuffer extends SharedArrayBuffer {} +assert(isSharedArrayBuffer(new MySharedArrayBuffer())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-shared-array-buffer +[npm-version-svg]: https://versionbadg.es/inspect-js/is-shared-array-buffer.svg +[deps-svg]: https://david-dm.org/inspect-js/is-shared-array-buffer.svg +[deps-url]: https://david-dm.org/inspect-js/is-shared-array-buffer +[dev-deps-svg]: https://david-dm.org/inspect-js/is-shared-array-buffer/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-shared-array-buffer#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-shared-array-buffer.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-shared-array-buffer.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-shared-array-buffer.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-shared-array-buffer +[codecov-image]: https://codecov.io/gh/inspect-js/is-shared-array-buffer/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-shared-array-buffer/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-shared-array-buffer +[actions-url]: https://github.com/inspect-js/is-shared-array-buffer/actions diff --git a/node_modules/is-shared-array-buffer/index.js b/node_modules/is-shared-array-buffer/index.js new file mode 100644 index 0000000000000..87043047030c6 --- /dev/null +++ b/node_modules/is-shared-array-buffer/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +module.exports = $byteLength + ? function isSharedArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + $byteLength(obj); + return true; + } catch (e) { + return false; + } + } + : function isSharedArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; diff --git a/node_modules/is-shared-array-buffer/package.json b/node_modules/is-shared-array-buffer/package.json new file mode 100644 index 0000000000000..511a9f6a22d17 --- /dev/null +++ b/node_modules/is-shared-array-buffer/package.json @@ -0,0 +1,70 @@ +{ + "name": "is-shared-array-buffer", + "version": "1.0.2", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS SharedArrayBuffer?", + "license": "MIT", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only --", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-shared-array-buffer.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "is", + "sharedarraybuffer", + "shared", + "array", + "buffer" + ], + "bugs": { + "url": "https://github.com/inspect-js/is-shared-array-buffer/issues" + }, + "homepage": "https://github.com/inspect-js/is-shared-array-buffer#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.2.1", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "nyc": "^10.3.2", + "object-inspect": "^1.12.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.2" + } +} diff --git a/node_modules/is-shared-array-buffer/test/index.js b/node_modules/is-shared-array-buffer/test/index.js new file mode 100644 index 0000000000000..9bc2c562158de --- /dev/null +++ b/node_modules/is-shared-array-buffer/test/index.js @@ -0,0 +1,27 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); + +var isSharedArrayBuffer = require('..'); + +test('isSharedArrayBuffer', function (t) { + t.equal(typeof isSharedArrayBuffer, 'function', 'is a function'); + + var nonSABs = v.primitives.concat(v.objects); + forEach(nonSABs, function (nonSAB) { + t.equal(isSharedArrayBuffer(nonSAB), false, inspect(nonSAB) + ' is not a SharedArrayBuffer'); + }); + + t.test('actual SharedArrayBuffer instances', { skip: typeof SharedArrayBuffer === 'undefined' }, function (st) { + var sab = new SharedArrayBuffer(); + + st.equal(isSharedArrayBuffer(sab), true, inspect(sab) + ' is a SharedArrayBuffer'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-string/.eslintignore b/node_modules/is-string/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-string/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-string/.eslintrc b/node_modules/is-string/.eslintrc new file mode 100644 index 0000000000000..5bf1191f89873 --- /dev/null +++ b/node_modules/is-string/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "max-statements": [2, 15] + }, + + "overrides": [ + { + "files": ["test.js"], + "rules": { + "no-magic-numbers": 0, + }, + }, + ], +} diff --git a/node_modules/is-string/.github/FUNDING.yml b/node_modules/is-string/.github/FUNDING.yml new file mode 100644 index 0000000000000..519746be3f0d0 --- /dev/null +++ b/node_modules/is-string/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-string +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-string/.nycrc b/node_modules/is-string/.nycrc new file mode 100644 index 0000000000000..a69aa2d8273d8 --- /dev/null +++ b/node_modules/is-string/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-string/CHANGELOG.md b/node_modules/is-string/CHANGELOG.md new file mode 100644 index 0000000000000..6f62043836500 --- /dev/null +++ b/node_modules/is-string/CHANGELOG.md @@ -0,0 +1,114 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +## [v1.0.7](https://github.com/inspect-js/is-string/compare/v1.0.6...v1.0.7) - 2021-08-05 + +### Commits + +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`d973ffd`](https://github.com/inspect-js/is-string/commit/d973ffd2268e10c0e2cd4f0c57ecf8ce0a8d8578) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4bfaabf`](https://github.com/inspect-js/is-string/commit/4bfaabf877e874ca21d2c44be26f13add8ee2761) + +## [v1.0.6](https://github.com/inspect-js/is-string/compare/v1.0.5...v1.0.6) - 2021-05-07 + +### Commits + +- [Tests] migrate tests to Github Actions [`c7790c8`](https://github.com/inspect-js/is-string/commit/c7790c89e5077251fe7ca32ac29eeee02f1b2751) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`1e52bbd`](https://github.com/inspect-js/is-string/commit/1e52bbd19b1608f6932c0335d9981824584c3186) +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`83337eb`](https://github.com/inspect-js/is-string/commit/83337ebf55308b7bb9c1befae420760e0f8d8016) +- [meta] do not publish github action workflow files [`b25aea2`](https://github.com/inspect-js/is-string/commit/b25aea2e8a53ed9e9090cf96481590cdc00a0957) +- [readme] update badges [`759ccd9`](https://github.com/inspect-js/is-string/commit/759ccd94de4a2000231a179f91af6b5c12c11e00) +- [Tests] run `nyc` on all tests [`dc02f70`](https://github.com/inspect-js/is-string/commit/dc02f7080c355f0d24368c1622db09f7cc30cdbd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape`; add `aud` [`a0f76fa`](https://github.com/inspect-js/is-string/commit/a0f76fa1990bb580948f9e2daa89bdcda3fae7f0) +- [actions] add "Allow Edits" workflow [`9ec3902`](https://github.com/inspect-js/is-string/commit/9ec390295b4faef7744d2b579c1050be66168cb7) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`57fbe21`](https://github.com/inspect-js/is-string/commit/57fbe215da83a3b601855a9c6543ad1a96de5702) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`191e55f`](https://github.com/inspect-js/is-string/commit/191e55ff1fa782654ffcce2df922e23345b56690) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`1ea2b81`](https://github.com/inspect-js/is-string/commit/1ea2b81e866775a7890e75c44c742204124aa354) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`105d1b9`](https://github.com/inspect-js/is-string/commit/105d1b9851e366ef23c2a27d4064e0d36da25939) +- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`114cfad`](https://github.com/inspect-js/is-string/commit/114cfad854d8860421f847cd99a3bdb8ef1353dc) +- [meta] use `prepublishOnly` script for npm 7+ [`fc38f26`](https://github.com/inspect-js/is-string/commit/fc38f26adb486f50880c5771d145ab2bffb6247a) +- [meta] gitignore coverage output [`3419127`](https://github.com/inspect-js/is-string/commit/34191278f1fa09ba4da801a6fd7a32e31050e759) +- [actions] update rebase action to use checkout v2 [`334eca0`](https://github.com/inspect-js/is-string/commit/334eca02d40f4cf7dc15a8e7d5ff06852028abb5) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`7a332e9`](https://github.com/inspect-js/is-string/commit/7a332e963f1ab717fafa671e0fa8a1b20c53d861) +- [meta] remove explicit audit level config [`04630b1`](https://github.com/inspect-js/is-string/commit/04630b1b535084322ddeae8efb79a8810d7cf325) + +## [v1.0.5](https://github.com/inspect-js/is-string/compare/v1.0.4...v1.0.5) - 2019-12-18 + +### Commits + +- [Tests] use shared travis-ci configs [`4121d6b`](https://github.com/inspect-js/is-string/commit/4121d6b168ae1d54a81791ee6877f9813cab6253) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`e7a3e89`](https://github.com/inspect-js/is-string/commit/e7a3e89ccb9638d73f45dbcb2a42e509bd3153c4) +- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`6c380a7`](https://github.com/inspect-js/is-string/commit/6c380a70011714370e754fa0df95f56cdcaa3e60) +- [Tests] remove `jscs` [`3d49592`](https://github.com/inspect-js/is-string/commit/3d49592b9880fcb1a23b67286445281131a553e3) +- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `eslint`, `nsp`, `semver`. [`cc6983d`](https://github.com/inspect-js/is-string/commit/cc6983d06bc98f4ae9b7c9439d5d73c7318d8acd) +- [meta] add `auto-changelog` [`b857897`](https://github.com/inspect-js/is-string/commit/b85789723ce3a7064536598e0fcdd495257c6134) +- [meta] remove unused Makefile and associated utilities [`3f0f51c`](https://github.com/inspect-js/is-string/commit/3f0f51cbae1f97dbe1466eee88d105b3df0d2f0a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `covert`, `tape`, `semver` [`9d4a95e`](https://github.com/inspect-js/is-string/commit/9d4a95e4473fe8195501878525b5af5948aa45c9) +- Update `eslint` [`e861b4b`](https://github.com/inspect-js/is-string/commit/e861b4bc71f5390670aebdff91119a1f8aeeb88a) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`172e2dd`](https://github.com/inspect-js/is-string/commit/172e2dd1a0b9eb042bcb9a80ff5e774a90ff0695) +- Test on `node` and `io.js` latest. [`fd426cd`](https://github.com/inspect-js/is-string/commit/fd426cd18b22b0d0e1731598125393dcfe0c5704) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`23bdf83`](https://github.com/inspect-js/is-string/commit/23bdf83cf42138eba09f45bd0b040b069f9839d4) +- [actions] add automatic rebasing / merge commit blocking [`96153c0`](https://github.com/inspect-js/is-string/commit/96153c0d687a7fda2261f4c02add5d0b41e8aed7) +- [meta] create FUNDING.yml [`66ae246`](https://github.com/inspect-js/is-string/commit/66ae246d6cdaa4ccbc21f7c144b672139b8ccef6) +- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`817361a`](https://github.com/inspect-js/is-string/commit/817361a9673cd1ec9854b52578a980159f7d8701) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `tape` [`fc35d3f`](https://github.com/inspect-js/is-string/commit/fc35d3feb40921bb22e1639903cb7f2fab77814b) +- [Dev Deps] update `jscs` [`886767e`](https://github.com/inspect-js/is-string/commit/886767e04e5ad59ac0bc926a87233cc8546c8b4f) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`3410922`](https://github.com/inspect-js/is-string/commit/341092203c11a3b92eee55a7ecb7b8265e8fcecd) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`4d6c73b`](https://github.com/inspect-js/is-string/commit/4d6c73b507bcd39050ef71e554069f72fc5b222a) +- Update `nsp`, `eslint` [`b11de49`](https://github.com/inspect-js/is-string/commit/b11de4910beee1ffe1e67fbe25ec6707ca796b27) +- Update `eslint`, `semver` [`0777977`](https://github.com/inspect-js/is-string/commit/0777977757a85a1db75831d03a14b4b1fde05d7e) +- Only apps should have lockfiles [`78b49ff`](https://github.com/inspect-js/is-string/commit/78b49ffd04d4cd8c57d9e7b485421fbf3641b41b) +- [meta] add `funding` field [`81328a6`](https://github.com/inspect-js/is-string/commit/81328a6ef3eee989164127e4c0c82f1da73d3567) +- [Dev Deps] update `eslint`, `tape` [`fc9a225`](https://github.com/inspect-js/is-string/commit/fc9a225b27935f7c9c2704281d7fddd3614d3cb8) +- [Tests] use `eclint` instead of `editorconfig-tools` [`59c2c61`](https://github.com/inspect-js/is-string/commit/59c2c610dbd8e8ca1e4aa3fa9c9f93205cab9b07) +- [Dev Deps] Update `tape`, `eslint` [`a429816`](https://github.com/inspect-js/is-string/commit/a429816688e23c81948b4ae72324c26c27849b7c) +- Test on `io.js` `v2.2` [`08b476e`](https://github.com/inspect-js/is-string/commit/08b476ed0734a70e3091c04ddd2f173a2df21eb2) +- Test up to `io.js` `v3.0` [`22637ef`](https://github.com/inspect-js/is-string/commit/22637ef9e0030533df85cf1992fc099a88b1924c) +- [meta] add `safe-publish-latest` [`20ccb48`](https://github.com/inspect-js/is-string/commit/20ccb48fd85f0245eb893507d00003090da020d0) +- [Dev Deps] update `tape` [`06b58a0`](https://github.com/inspect-js/is-string/commit/06b58a048c2a820e5611ad2bd9ddfbe893295a57) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`ea7cf84`](https://github.com/inspect-js/is-string/commit/ea7cf849b952c924d1687a302098251a7b827c80) +- Test on `io.js` `v2.4` [`66ec3ea`](https://github.com/inspect-js/is-string/commit/66ec3ea390b364583a792799b53857fd186ccc88) +- Test on `io.js` `v2.3` [`ca6e796`](https://github.com/inspect-js/is-string/commit/ca6e796f16ec433b88962162fde8012f28e18f1e) +- Fix tests for faked @@toStringTag [`3cce832`](https://github.com/inspect-js/is-string/commit/3cce8329133dfd233987359df151018b3b136be1) + +## [v1.0.4](https://github.com/inspect-js/is-string/compare/v1.0.3...v1.0.4) - 2015-01-29 + +### Commits + +- If @@toStringTag is not present, use the old-school Object#toString test. [`30675ec`](https://github.com/inspect-js/is-string/commit/30675ecb5c5cc43873918661a414a1d0f8b77325) + +## [v1.0.3](https://github.com/inspect-js/is-string/compare/v1.0.2...v1.0.3) - 2015-01-29 + +### Commits + +- Refactor to aid optimization of non-try/catch code. [`9b2772a`](https://github.com/inspect-js/is-string/commit/9b2772abe09ba8cbaa631322cc226ee906d2db22) + +## [v1.0.2](https://github.com/inspect-js/is-string/compare/v1.0.1...v1.0.2) - 2015-01-29 + +### Commits + +- Fix broken package.json [`dc921d3`](https://github.com/inspect-js/is-string/commit/dc921d332b64e4041162f04e4712b0dc687863a5) + +## [v1.0.1](https://github.com/inspect-js/is-string/compare/v1.0.0...v1.0.1) - 2015-01-29 + +### Commits + +- Fix eslint config. [`c4e05bd`](https://github.com/inspect-js/is-string/commit/c4e05bd171da6002d432e451fd48912db8b048e0) +- Add early exits for typeof "string", or typeof not "object". [`82f41d3`](https://github.com/inspect-js/is-string/commit/82f41d36a599bc6a06152792c84c7683e412c513) + +## v1.0.0 - 2015-01-29 + +### Commits + +- Dotfiles. [`45bc9dd`](https://github.com/inspect-js/is-string/commit/45bc9dd60201722344986a6c7536be9ea9ccefbf) +- `make release` [`23707f5`](https://github.com/inspect-js/is-string/commit/23707f5ecfdf00afb0e57c06ac07f7f49cdeb606) +- package.json [`575ad81`](https://github.com/inspect-js/is-string/commit/575ad811c61b156cfbcc60ff61947183c6ebe6a2) +- Read me [`3f67c9a`](https://github.com/inspect-js/is-string/commit/3f67c9a0725f811845d38646a19322895cd03981) +- Initial commit [`2c26a7a`](https://github.com/inspect-js/is-string/commit/2c26a7a2e41dec77be2c59d5847f29a6ab7c0b29) +- Tests. [`38c987b`](https://github.com/inspect-js/is-string/commit/38c987b8513b0ac03b0897e0fce7de8135d4ee0f) +- Implementation. [`0471d59`](https://github.com/inspect-js/is-string/commit/0471d59078d7f3f77619913ec21c57c0af27114c) diff --git a/node_modules/is-string/LICENSE b/node_modules/is-string/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/is-string/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-string/README.md b/node_modules/is-string/README.md new file mode 100644 index 0000000000000..d9d7edf8a515c --- /dev/null +++ b/node_modules/is-string/README.md @@ -0,0 +1,56 @@ +# is-string [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isString = require('is-string'); +var assert = require('assert'); + +assert.notOk(isString(undefined)); +assert.notOk(isString(null)); +assert.notOk(isString(false)); +assert.notOk(isString(true)); +assert.notOk(isString(function () {})); +assert.notOk(isString([])); +assert.notOk(isString({})); +assert.notOk(isString(/a/g)); +assert.notOk(isString(new RegExp('a', 'g'))); +assert.notOk(isString(new Date())); +assert.notOk(isString(42)); +assert.notOk(isString(NaN)); +assert.notOk(isString(Infinity)); +assert.notOk(isString(new Number(42))); + +assert.ok(isString('foo')); +assert.ok(isString(Object('foo'))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-string +[2]: https://versionbadg.es/inspect-js/is-string.svg +[5]: https://david-dm.org/inspect-js/is-string.svg +[6]: https://david-dm.org/inspect-js/is-string +[7]: https://david-dm.org/inspect-js/is-string/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-string#info=devDependencies +[11]: https://nodei.co/npm/is-string.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-string.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-string.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-string +[codecov-image]: https://codecov.io/gh/inspect-js/is-string/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-string/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-string +[actions-url]: https://github.com/inspect-js/is-string/actions diff --git a/node_modules/is-string/index.js b/node_modules/is-string/index.js new file mode 100644 index 0000000000000..f44f7bbbabdba --- /dev/null +++ b/node_modules/is-string/index.js @@ -0,0 +1,24 @@ +'use strict'; + +var strValue = String.prototype.valueOf; +var tryStringObject = function tryStringObject(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var strClass = '[object String]'; +var hasToStringTag = require('has-tostringtag/shams')(); + +module.exports = function isString(value) { + if (typeof value === 'string') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; +}; diff --git a/node_modules/is-string/package.json b/node_modules/is-string/package.json new file mode 100644 index 0000000000000..9b36548d5f2de --- /dev/null +++ b/node_modules/is-string/package.json @@ -0,0 +1,81 @@ +{ + "name": "is-string", + "version": "1.0.7", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test:corejs": "nyc tape test-corejs.js", + "test": "npm run tests-only && npm run test:corejs", + "posttest": "npx aud --production", + "lint": "eslint .", + "eccheck": "eclint check *.js **/*.js > /dev/null", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-string.git" + }, + "keywords": [ + "String", + "string", + "ES6", + "toStringTag", + "@@toStringTag", + "String object" + ], + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", + "eclint": "^2.8.1", + "eslint": "^7.32.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false + } +} diff --git a/node_modules/is-string/test/index.js b/node_modules/is-string/test/index.js new file mode 100644 index 0000000000000..5239dfa4cedca --- /dev/null +++ b/node_modules/is-string/test/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var test = require('tape'); +var isString = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('not Strings', function (t) { + t.notOk(isString(), 'undefined is not String'); + t.notOk(isString(null), 'null is not String'); + t.notOk(isString(false), 'false is not String'); + t.notOk(isString(true), 'true is not String'); + t.notOk(isString([]), 'array is not String'); + t.notOk(isString({}), 'object is not String'); + t.notOk(isString(function () {}), 'function is not String'); + t.notOk(isString(/a/g), 'regex literal is not String'); + t.notOk(isString(new RegExp('a', 'g')), 'regex object is not String'); + t.notOk(isString(new Date()), 'new Date() is not String'); + t.notOk(isString(42), 'number is not String'); + t.notOk(isString(Object(42)), 'number object is not String'); + t.notOk(isString(NaN), 'NaN is not String'); + t.notOk(isString(Infinity), 'Infinity is not String'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var fakeString = { + toString: function () { return '7'; }, + valueOf: function () { return '42'; } + }; + fakeString[Symbol.toStringTag] = 'String'; + t.notOk(isString(fakeString), 'fake String with @@toStringTag "String" is not String'); + t.end(); +}); + +test('Strings', function (t) { + t.ok(isString('foo'), 'string primitive is String'); + t.ok(isString(Object('foo')), 'string object is String'); + t.end(); +}); diff --git a/node_modules/is-symbol/.editorconfig b/node_modules/is-symbol/.editorconfig new file mode 100644 index 0000000000000..eaa214161f5cd --- /dev/null +++ b/node_modules/is-symbol/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/is-symbol/.eslintignore b/node_modules/is-symbol/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-symbol/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-symbol/.eslintrc b/node_modules/is-symbol/.eslintrc new file mode 100644 index 0000000000000..046dd071413e7 --- /dev/null +++ b/node_modules/is-symbol/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "overrides": [ + { + "files": "test/**", + "rules": { + "no-restricted-properties": 0, + }, + }, + ], +} diff --git a/node_modules/is-symbol/.github/FUNDING.yml b/node_modules/is-symbol/.github/FUNDING.yml new file mode 100644 index 0000000000000..a65600e7f6b73 --- /dev/null +++ b/node_modules/is-symbol/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-symbol +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-symbol/.nycrc b/node_modules/is-symbol/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-symbol/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-symbol/CHANGELOG.md b/node_modules/is-symbol/CHANGELOG.md new file mode 100644 index 0000000000000..ce8dd991259cb --- /dev/null +++ b/node_modules/is-symbol/CHANGELOG.md @@ -0,0 +1,113 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/inspect-js/is-symbol/compare/v1.0.3...v1.0.4) - 2021-05-08 + +### Commits + +- [Tests] migrate tests to Github Actions [`997d43c`](https://github.com/inspect-js/is-symbol/commit/997d43c091d1f8d3a2b3d7dfb17a73cdc5a75dde) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`fe0ccb7`](https://github.com/inspect-js/is-symbol/commit/fe0ccb7b7b64e74e095ef782dcc1d24d6c4b0be4) +- [meta] remove unused Makefile and associated utilities [`3ab2748`](https://github.com/inspect-js/is-symbol/commit/3ab2748ab6c2de21fc24f131bb880c68ba0b7b34) +- [meta] do not publish github action workflow files [`f20fafe`](https://github.com/inspect-js/is-symbol/commit/f20fafeb21585c7b4871ea19f104fd7696734fe8) +- [Tests] run `nyc` on all tests [`5c332fc`](https://github.com/inspect-js/is-symbol/commit/5c332fc92cecbed4a2041bc0c52b991b4a593f34) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c5a58a8`](https://github.com/inspect-js/is-symbol/commit/c5a58a8bea390a9b02e1c8c4aac30c223370297b) +- [readme] fix repo URLs; remove travis badge [`bcd9258`](https://github.com/inspect-js/is-symbol/commit/bcd9258d161fe709148fcc47962df3372c544727) +- [actions] add "Allow Edits" workflow [`33ae2d3`](https://github.com/inspect-js/is-symbol/commit/33ae2d3940e9daa6003a84c232874ee558b2fb44) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`e53def0`](https://github.com/inspect-js/is-symbol/commit/e53def0b77c38cbfae87fd8bbfd78953b845ea94) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect` [`ae36504`](https://github.com/inspect-js/is-symbol/commit/ae365048c0c1b13457faa78658b80561f5a0bcd0) +- [readme] add actions and codecov badges [`aae7f09`](https://github.com/inspect-js/is-symbol/commit/aae7f09bd59d36df69d3b66d9b351c39fe072330) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`d993fae`](https://github.com/inspect-js/is-symbol/commit/d993fae6d89856d4ab7818874be597249cb8a8cc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`51808a5`](https://github.com/inspect-js/is-symbol/commit/51808a55f272023201f40a59b2459ec6305bf73a) +- [Dev Deps] update `auto-changelog`, `tape` [`c90040f`](https://github.com/inspect-js/is-symbol/commit/c90040f0aeded8d0071a78d5cd593b385f8828ee) +- [Dev Deps] update `eslint`, `tape` [`9fee159`](https://github.com/inspect-js/is-symbol/commit/9fee159403d499a5ed2f5cb5db03747d09ab1766) +- [meta] use `prepublishOnly` script for npm 7+ [`b166afc`](https://github.com/inspect-js/is-symbol/commit/b166afc3ae3c6d11721a9558ddb112a28261688d) +- [meta] gitignore coverage output [`4a0fe3a`](https://github.com/inspect-js/is-symbol/commit/4a0fe3aa074b933074fcc231ce739005e1fec195) +- [actions] update workflows [`fbcbc9e`](https://github.com/inspect-js/is-symbol/commit/fbcbc9eb5bfe2cf9a77d5bd86bb1dece8e5f81d0) +- [Dev Deps] update `auto-changelog`; add `aud` [`e66ab98`](https://github.com/inspect-js/is-symbol/commit/e66ab989e48b81b48bd443d35dba0071950c5d7a) +- [Deps] update `has-symbols` [`6ce7de5`](https://github.com/inspect-js/is-symbol/commit/6ce7de53c866c068de2c28d97b3a64cf6d5f6a76) +- [actions] update rebase action to use checkout v2 [`1173c79`](https://github.com/inspect-js/is-symbol/commit/1173c79914076d73aec9aebc22dce4122e7bd3ae) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`94a6348`](https://github.com/inspect-js/is-symbol/commit/94a6348f6274eac9bf4c5a6057b4f6120fc7d1d1) +- [Tests] only audit prod deps [`0692681`](https://github.com/inspect-js/is-symbol/commit/06926811fa029fe0fded5d0af4553a7808c143d1) +- [meta] do not publish .nvmrc file [`ed47833`](https://github.com/inspect-js/is-symbol/commit/ed478333c72384f8dbeb51e5fd501238f52a4972) + +## [v1.0.3](https://github.com/inspect-js/is-symbol/compare/v1.0.2...v1.0.3) - 2019-11-20 + +### Commits + +- [Tests] use shared travis-ci configs [`034afdd`](https://github.com/inspect-js/is-symbol/commit/034afdd677c1b72b76751f3e5131acc927a32916) +- [Tests] remove `jscs` [`0c026a0`](https://github.com/inspect-js/is-symbol/commit/0c026a06815e46a33a8a5b4b1be8965d32d38e5c) +- [meta] add `auto-changelog` [`9a1776b`](https://github.com/inspect-js/is-symbol/commit/9a1776bb49f3e6ac12a5b3a447edcc651216891b) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`23a6db4`](https://github.com/inspect-js/is-symbol/commit/23a6db49a338d19eab19d876745513820bb6a9dc) +- [Tests] up to `node` `v11.7`, `v10.15`, `v8.15`, `v6.16` [`892d92e`](https://github.com/inspect-js/is-symbol/commit/892d92e7c40f3c0577583a98134106181c38bb7e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `tape` [`c2e6d6a`](https://github.com/inspect-js/is-symbol/commit/c2e6d6a71f839522bbd124b7419f5fc42ffff6d3) +- [readme] fix repo URLs [`655c288`](https://github.com/inspect-js/is-symbol/commit/655c288a815856e647dba4b6049b1743cec3533c) +- [actions] add automatic rebasing / merge commit blocking [`97b1229`](https://github.com/inspect-js/is-symbol/commit/97b12296bf8fa1ce0c6121bf3de56c413da10aae) +- [meta] add FUNDING.yml [`94c64a3`](https://github.com/inspect-js/is-symbol/commit/94c64a367a1c34f960cf6007fc65cfbbcba34ba3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape`, `semver` [`71ab543`](https://github.com/inspect-js/is-symbol/commit/71ab543e09b820378362f4f66248addd410c6388) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `semver`, `tape` [`c6212f9`](https://github.com/inspect-js/is-symbol/commit/c6212f94e28622c94bb37189ffc241ee88b5b1dd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `object-inspect` [`91bc802`](https://github.com/inspect-js/is-symbol/commit/91bc802e18e63f4e8230ee0148302ce849e2f733) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`8cbe69c`](https://github.com/inspect-js/is-symbol/commit/8cbe69c3fafe9cfbe7d27f710c88d02d2d2c6a00) +- [Tests] use `npm audit` instead of `nsp` [`741b51d`](https://github.com/inspect-js/is-symbol/commit/741b51dac868f6b22736c204910d257bcf4d5044) +- [meta] add `funding` field [`65b58d1`](https://github.com/inspect-js/is-symbol/commit/65b58d1e9fc572712d462d615e6b2418627d8fb9) +- [Deps] update `has-symbols` [`9cb5b2a`](https://github.com/inspect-js/is-symbol/commit/9cb5b2a9a3b89e8e0246be8df4fff3f5ceac7309) + +## [v1.0.2](https://github.com/inspect-js/is-symbol/compare/v1.0.1...v1.0.2) - 2018-09-20 + +### Commits + +- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`e86aaea`](https://github.com/inspect-js/is-symbol/commit/e86aaea8d81356801ecfc60540523e9b809a55f4) +- [Tests] on all node minors; improve test matrix [`50bc07f`](https://github.com/inspect-js/is-symbol/commit/50bc07f2ff73e5499b02a61f0a00ea48a84ae213) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `semver`, `eslint`, `@ljharb/eslint-config` [`45e17bd`](https://github.com/inspect-js/is-symbol/commit/45e17bdf145846f30122348a94c5e506b90836ba) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`44402cb`](https://github.com/inspect-js/is-symbol/commit/44402cb82d4499e947b48b31b14667d1ebe7e2b4) +- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`, `v4.8`; improve matrix; old npm breaks on newer nodes [`9047c23`](https://github.com/inspect-js/is-symbol/commit/9047c232857ecb80551a21cc0b1cc4c91d28da1f) +- Update `tape`, `covert`, `jscs`, `semver` [`d57d1ce`](https://github.com/inspect-js/is-symbol/commit/d57d1ce3fc0b740885a1ed5c0738d4a27b29ab07) +- Add `npm run eslint` [`0d75a66`](https://github.com/inspect-js/is-symbol/commit/0d75a6638ad6f7ff7d5bc958531a6328fb13e3fe) +- Update `eslint` [`042fb3a`](https://github.com/inspect-js/is-symbol/commit/042fb3aec590f0c0d205b15812b285ad95cfff6b) +- [Refactor] use `has-symbols` and `object-inspect` [`129bc68`](https://github.com/inspect-js/is-symbol/commit/129bc68dd619b789b9956ac9b63b46257ee1060c) +- [Tests] up to `node` `v10.11`, `v8.12` [`c1822e8`](https://github.com/inspect-js/is-symbol/commit/c1822e84d6cc0cee9f1c2893e91b1aa999ad41db) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`089d2cf`](https://github.com/inspect-js/is-symbol/commit/089d2cf7cad87b75aa534769af11524ad2e79080) +- [Tests] up to `node` `v8.4`; newer npm breaks on older node [`05ce701`](https://github.com/inspect-js/is-symbol/commit/05ce701e3c1be8b3266ffac49806832e410491c1) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`241e6a6`](https://github.com/inspect-js/is-symbol/commit/241e6a655c0e19e9dcf0ae88e7fddd4cde394c5c) +- Test on latest `node` and `io.js` versions. [`5c8d5de`](https://github.com/inspect-js/is-symbol/commit/5c8d5deb9b7c01a8cdf959082a3d619c19751b0a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape` [`06047bf`](https://github.com/inspect-js/is-symbol/commit/06047bf72b20a66c0b455e80856b2d00b1910391) +- [Dev Deps] update `jscs`, `nsp`, `semver`, `eslint`, `@ljharb/eslint-config` [`9d25dd7`](https://github.com/inspect-js/is-symbol/commit/9d25dd79347c89f98207a3bad39f667f1f8a410e) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`ce173bd`](https://github.com/inspect-js/is-symbol/commit/ce173bda6e146907e3061a0e70463107d955de35) +- Update `nsp`, `eslint` [`29e5214`](https://github.com/inspect-js/is-symbol/commit/29e52140fac2049b4a32e175787bb3b184a1dd72) +- Update `semver`, `eslint` [`53be884`](https://github.com/inspect-js/is-symbol/commit/53be884c2811f7a4452581003d9cdaf6f9bddd3c) +- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`3bd149c`](https://github.com/inspect-js/is-symbol/commit/3bd149c869c099b07104b06c0692755a01f8298c) +- [Dev Deps] update `jscs` [`69b4231`](https://github.com/inspect-js/is-symbol/commit/69b4231632b170e5ddb350db2f0c59e6cad6f548) +- Test up to `io.js` `v2.1` [`0b61ac7`](https://github.com/inspect-js/is-symbol/commit/0b61ac7ac4de390296aeefb9395549592ea87da4) +- [Dev Deps] update `tape` [`5e1b200`](https://github.com/inspect-js/is-symbol/commit/5e1b2008c910bcdabee299a1ac599143ea07c3f9) +- Only apps should have lockfiles. [`a191ff5`](https://github.com/inspect-js/is-symbol/commit/a191ff5f0320fc16db42fdaa40f0c21d4326255e) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`97c87ef`](https://github.com/inspect-js/is-symbol/commit/97c87ef52b966f211e231092a54ef6ed05c99a26) +- Test on `io.js` `v2.2` [`42560e4`](https://github.com/inspect-js/is-symbol/commit/42560e466e17cbbb9fa71c0121f4bbbcf266c887) +- [Dev Deps] Update `tape`, `eslint` [`149b2f2`](https://github.com/inspect-js/is-symbol/commit/149b2f20bde92b2da12ccfeb8988beb2dc95c37c) +- [Tests] fix test messages [`28bd1ed`](https://github.com/inspect-js/is-symbol/commit/28bd1eda310590e13ada19cbd718c85c25d8a0c5) +- Test up to `io.js` `v3.0` [`c0dcc98`](https://github.com/inspect-js/is-symbol/commit/c0dcc98313d17151ec043e5452df306618be865e) +- `node` now supports Symbols now. [`d1853ad`](https://github.com/inspect-js/is-symbol/commit/d1853adf6369ab9d4c4516bdb032c2e42f52f90a) +- [Dev Deps] update `tape` [`f7a6575`](https://github.com/inspect-js/is-symbol/commit/f7a6575fbdef13abcc412c63d22b56943ed85969) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`aae9c6a`](https://github.com/inspect-js/is-symbol/commit/aae9c6a724578659976ea74e11ec9fe35608607b) +- Test on `io.js` `v2.4` [`ab8f449`](https://github.com/inspect-js/is-symbol/commit/ab8f4492115270cc00a479915b02ac1bac75dfed) +- Test on `io.js` `v2.3` [`58ce871`](https://github.com/inspect-js/is-symbol/commit/58ce871674e857955b333aa057eeecd68b40e988) + +## [v1.0.1](https://github.com/inspect-js/is-symbol/compare/v1.0.0...v1.0.1) - 2015-01-26 + +### Commits + +- Correct package description. [`f4d15b9`](https://github.com/inspect-js/is-symbol/commit/f4d15b928b4b754b097a84f7c3ceac73c486aceb) + +## v1.0.0 - 2015-01-24 + +### Commits + +- Dotfiles. [`5d9a744`](https://github.com/inspect-js/is-symbol/commit/5d9a7441f724630070e9bd74a995191cafa1064b) +- Tests. [`8af5663`](https://github.com/inspect-js/is-symbol/commit/8af56631950dcee48b36f517837273193a6ba119) +- `make release` [`6293446`](https://github.com/inspect-js/is-symbol/commit/629344654a72e7fc8059607d6a86c64b002c3e5d) +- package.json [`7d4082c`](https://github.com/inspect-js/is-symbol/commit/7d4082ca9502118e70d24f526704d45a1a7f2067) +- Initial commit [`cbb179f`](https://github.com/inspect-js/is-symbol/commit/cbb179f677bd3dcb56ac5e3f0a7a9af503fd8952) +- Read me. [`099a775`](https://github.com/inspect-js/is-symbol/commit/099a775e7e751706283ae1cab7a8635c094773a9) +- Implementation. [`cb51248`](https://github.com/inspect-js/is-symbol/commit/cb51248eedaf55e0b8ad7dacdab179db2d76e96e) diff --git a/node_modules/is-symbol/LICENSE b/node_modules/is-symbol/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/is-symbol/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-symbol/README.md b/node_modules/is-symbol/README.md new file mode 100644 index 0000000000000..5432594c7b46b --- /dev/null +++ b/node_modules/is-symbol/README.md @@ -0,0 +1,45 @@ +# is-symbol [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this an ES6 Symbol value? + +## Example + +```js +var isSymbol = require('is-symbol'); +assert(!isSymbol(function () {})); +assert(!isSymbol(null)); +assert(!isSymbol(function* () { yield 42; return Infinity; }); + +assert(isSymbol(Symbol.iterator)); +assert(isSymbol(Symbol('foo'))); +assert(isSymbol(Symbol.for('foo'))); +assert(isSymbol(Object(Symbol('foo')))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-symbol +[2]: https://versionbadg.es/inspect-js/is-symbol.svg +[5]: https://david-dm.org/inspect-js/is-symbol.svg +[6]: https://david-dm.org/inspect-js/is-symbol +[7]: https://david-dm.org/inspect-js/is-symbol/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-symbol#info=devDependencies +[11]: https://nodei.co/npm/is-symbol.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-symbol.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-symbol.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-symbol +[codecov-image]: https://codecov.io/gh/inspect-js/is-symbol/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-symbol/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-symbol +[actions-url]: https://github.com/inspect-js/is-symbol/actions diff --git a/node_modules/is-symbol/index.js b/node_modules/is-symbol/index.js new file mode 100644 index 0000000000000..3d653e27f5fc6 --- /dev/null +++ b/node_modules/is-symbol/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var toStr = Object.prototype.toString; +var hasSymbols = require('has-symbols')(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && value; + }; +} diff --git a/node_modules/is-symbol/package.json b/node_modules/is-symbol/package.json new file mode 100644 index 0000000000000..4472b176f50b8 --- /dev/null +++ b/node_modules/is-symbol/package.json @@ -0,0 +1,77 @@ +{ + "name": "is-symbol", + "version": "1.0.4", + "description": "Determine if a value is an ES6 Symbol or not.", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx aud --production", + "lint": "eslint .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-symbol.git" + }, + "keywords": [ + "symbol", + "es6", + "is", + "Symbol" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-symbol/issues" + }, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.2.1", + "eslint": "^7.26.0", + "nyc": "^10.3.2", + "object-inspect": "^1.10.3", + "safe-publish-latest": "^1.1.4", + "tape": "^5.2.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-symbol/test/index.js b/node_modules/is-symbol/test/index.js new file mode 100644 index 0000000000000..e01f035c8ca3a --- /dev/null +++ b/node_modules/is-symbol/test/index.js @@ -0,0 +1,92 @@ +'use strict'; + +var test = require('tape'); +var isSymbol = require('../index'); + +var forEach = function (arr, func) { + var i; + for (i = 0; i < arr.length; ++i) { + func(arr[i], i, arr); + } +}; + +var hasSymbols = require('has-symbols')(); +var inspect = require('object-inspect'); +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +test('non-symbol values', function (t) { + var nonSymbols = [ + true, + false, + Object(true), + Object(false), + null, + undefined, + {}, + [], + /a/g, + 'string', + 42, + new Date(), + function () {}, + NaN + ]; + t.plan(nonSymbols.length); + forEach(nonSymbols, function (nonSymbol) { + t.equal(false, isSymbol(nonSymbol), debug(nonSymbol, 'is not a symbol')); + }); + t.end(); +}); + +test('faked symbol values', function (t) { + t.test('real symbol valueOf', { skip: !hasSymbols }, function (st) { + var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; + st.equal(false, isSymbol(fakeSymbol), 'object with valueOf returning a symbol is not a symbol'); + st.end(); + }); + + t.test('faked @@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (st) { + var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; + fakeSymbol[Symbol.toStringTag] = 'Symbol'; + st.equal(false, isSymbol(fakeSymbol), 'object with fake Symbol @@toStringTag and valueOf returning a symbol is not a symbol'); + var notSoFakeSymbol = { valueOf: function () { return 42; } }; + notSoFakeSymbol[Symbol.toStringTag] = 'Symbol'; + st.equal(false, isSymbol(notSoFakeSymbol), 'object with fake Symbol @@toStringTag and valueOf not returning a symbol is not a symbol'); + st.end(); + }); + + var fakeSymbolString = { toString: function () { return 'Symbol(foo)'; } }; + t.equal(false, isSymbol(fakeSymbolString), 'object with toString returning Symbol(foo) is not a symbol'); + + t.end(); +}); + +test('Symbol support', { skip: !hasSymbols }, function (t) { + t.test('well-known Symbols', function (st) { + var isWellKnown = function filterer(name) { + return name !== 'for' && name !== 'keyFor' && !(name in filterer); + }; + var wellKnownSymbols = Object.getOwnPropertyNames(Symbol).filter(isWellKnown); + wellKnownSymbols.forEach(function (name) { + var sym = Symbol[name]; + st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); + }); + st.end(); + }); + + t.test('user-created symbols', function (st) { + var symbols = [ + Symbol(), + Symbol('foo'), + Symbol['for']('foo'), + Object(Symbol('object')) + ]; + symbols.forEach(function (sym) { + st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); + }); + st.end(); + }); + + t.end(); +}); + diff --git a/node_modules/is-typed-array/.editorconfig b/node_modules/is-typed-array/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/is-typed-array/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-typed-array/.eslintrc b/node_modules/is-typed-array/.eslintrc new file mode 100644 index 0000000000000..34a62620e3d28 --- /dev/null +++ b/node_modules/is-typed-array/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "globals": { + "globalThis": false + }, + + "rules": { + "max-statements-per-line": [2, { "max": 2 }] + }, +} diff --git a/node_modules/is-typed-array/.github/FUNDING.yml b/node_modules/is-typed-array/.github/FUNDING.yml new file mode 100644 index 0000000000000..7dd24b969689c --- /dev/null +++ b/node_modules/is-typed-array/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-typed-array +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-typed-array/.nycrc b/node_modules/is-typed-array/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-typed-array/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-typed-array/CHANGELOG.md b/node_modules/is-typed-array/CHANGELOG.md new file mode 100644 index 0000000000000..b139d2db46249 --- /dev/null +++ b/node_modules/is-typed-array/CHANGELOG.md @@ -0,0 +1,134 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.12](https://github.com/inspect-js/is-typed-array/compare/v1.1.11...v1.1.12) - 2023-07-17 + +### Commits + +- [Refactor] use `which-typed-array` for all internals [`7619405`](https://github.com/inspect-js/is-typed-array/commit/761940532de595f6721fed101b02814dcfa7fe4e) + +## [v1.1.11](https://github.com/inspect-js/is-typed-array/compare/v1.1.10...v1.1.11) - 2023-07-17 + +### Commits + +- [Fix] `node < v0.6` lacks proper Object toString behavior [`c94b90d`](https://github.com/inspect-js/is-typed-array/commit/c94b90dc6bc457783d6f8cc208415a49da0933b7) +- [Robustness] use `call-bind` [`573b00b`](https://github.com/inspect-js/is-typed-array/commit/573b00b8deec42ac1ac262415e442ea0b7e1c96b) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`c88c2d4`](https://github.com/inspect-js/is-typed-array/commit/c88c2d479976110478fa4038fe8921251c06a163) + +## [v1.1.10](https://github.com/inspect-js/is-typed-array/compare/v1.1.9...v1.1.10) - 2022-11-02 + +### Commits + +- [meta] add `auto-changelog` [`cf6d86b`](https://github.com/inspect-js/is-typed-array/commit/cf6d86bf2f693eca357439d4d12e76d641f91f92) +- [actions] update rebase action to use reusable workflow [`8da51a5`](https://github.com/inspect-js/is-typed-array/commit/8da51a5dce6d2442ae31ccbc2be136f2e04d6bef) +- [Dev Deps] update `aud`, `is-callable`, `object-inspect`, `tape` [`554e3de`](https://github.com/inspect-js/is-typed-array/commit/554e3deec59dec926d0badc628e589ab363e465b) +- [Refactor] use `gopd` instead of an `es-abstract` helper` [`cdaa465`](https://github.com/inspect-js/is-typed-array/commit/cdaa465d5f94bfc9e32475e31209e1c2458a9603) +- [Deps] update `es-abstract` [`677ae4b`](https://github.com/inspect-js/is-typed-array/commit/677ae4b3c8323b59d6650a9254ab945045c33f79) + + + +1.1.9 / 2022-05-13 +================= + * [Refactor] use `foreach` instead of `for-each` + * [readme] markdown URL cleanup + * [Deps] update `es-abstract` + * [meta] use `npmignore` to autogenerate an npmignore file + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` + * [actions] reuse common workflows + * [actions] update codecov uploader + +1.1.8 / 2021-08-30 +================= + * [Refactor] use `globalThis` if available (#53) + * [Deps] update `available-typed-arrays` + * [Dev Deps] update `@ljharb/eslint-config` + +1.1.7 / 2021-08-07 +================= + * [Fix] if Symbol.toStringTag exists but is not present, use Object.prototype.toString + * [Dev Deps] update `is-callable`, `tape` + +1.1.6 / 2021-08-05 +================= + * [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams + * [readme] add actions and codecov badges + * [meta] use `prepublishOnly` script for npm 7+ + * [Deps] update `available-typed-arrays`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` + * [actions] use `node/install` instead of `node/run`; use `codecov` action + +1.1.5 / 2021-02-14 +================= + * [meta] do not publish github action workflow files or nyc output + * [Deps] update `call-bind`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `is-callable`, `tape` + +1.1.4 / 2020-12-05 +================= + * [readme] fix repo URLs, remove defunct badges + * [Deps] update `available-typed-arrays`, `es-abstract`; use `call-bind` where applicable + * [meta] gitignore nyc output + * [meta] only audit prod deps + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `make-arrow-function`, `make-generator-function`, `object-inspect`, `tape`; add `aud` + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests + +1.1.3 / 2020-01-24 +================= + * [Refactor] use `es-abstract`’s `callBound`, `available-typed-arrays`, `has-symbols` + +1.1.2 / 2020-01-20 +================= + * [Fix] in envs without Symbol.toStringTag, dc8a8cc made arrays return `true` + * [Tests] add `evalmd` to `prelint` + +1.1.1 / 2020-01-18 +================= + * [Robustness] don’t rely on Array.prototype.indexOf existing + * [meta] remove unused Makefile and associated utilities + * [meta] add `funding` field; create FUNDING.yml + * [actions] add automatic rebasing / merge commit blocking + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `replace`, `semver`, `tape`; add `safe-publish-latest` + * [Tests] use shared travis-ci configs + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + +1.1.0 / 2019-02-16 +================= + * [New] add `BigInt64Array` and `BigUint64Array` + * [Refactor] use an array instead of an object for storing Typed Array names + * [meta] ignore `test.html` + * [Tests] up to `node` `v11.10`, `v10.15`, `v8.15`, `v7.10`, `v6.16`, `v5.10`, `v4.9` + * [Tests] remove `jscs` + * [Tests] use `npm audit` instead of `nsp` + * [Dev Deps] update `eslint`,` @ljharb/eslint-config`, `is-callable`, `tape`, `replace`, `semver` + * [Dev Deps] remove unused eccheck script + dep + +1.0.4 / 2016-03-19 +================= + * [Fix] `Symbol.toStringTag` is on the super-`[[Prototype]]` of Float32Array, not the `[[Prototype]]` (#3) + * [Tests] up to `node` `v5.9`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `is-callable` + +1.0.3 / 2015-10-13 +================= + * [Deps] Add missing `foreach` dependency (#1) + +1.0.2 / 2015-10-05 +================= + * [Deps] Remove unneeded "isarray" dependency + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + +1.0.1 / 2015-10-02 +================= + * Rerelease: avoid instanceof and the constructor property; work cross-realm; work with Symbol.toStringTag. + +1.0.0 / 2015-05-06 +================= + * Initial release. diff --git a/node_modules/is-typed-array/LICENSE b/node_modules/is-typed-array/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/is-typed-array/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-typed-array/README.md b/node_modules/is-typed-array/README.md new file mode 100644 index 0000000000000..5075257207e22 --- /dev/null +++ b/node_modules/is-typed-array/README.md @@ -0,0 +1,70 @@ +# is-typed-array [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var isTypedArray = require('is-typed-array'); +var assert = require('assert'); + +assert.equal(false, isTypedArray(undefined)); +assert.equal(false, isTypedArray(null)); +assert.equal(false, isTypedArray(false)); +assert.equal(false, isTypedArray(true)); +assert.equal(false, isTypedArray([])); +assert.equal(false, isTypedArray({})); +assert.equal(false, isTypedArray(/a/g)); +assert.equal(false, isTypedArray(new RegExp('a', 'g'))); +assert.equal(false, isTypedArray(new Date())); +assert.equal(false, isTypedArray(42)); +assert.equal(false, isTypedArray(NaN)); +assert.equal(false, isTypedArray(Infinity)); +assert.equal(false, isTypedArray(new Number(42))); +assert.equal(false, isTypedArray('foo')); +assert.equal(false, isTypedArray(Object('foo'))); +assert.equal(false, isTypedArray(function () {})); +assert.equal(false, isTypedArray(function* () {})); +assert.equal(false, isTypedArray(x => x * x)); +assert.equal(false, isTypedArray([])); + +assert.ok(isTypedArray(new Int8Array())); +assert.ok(isTypedArray(new Uint8Array())); +assert.ok(isTypedArray(new Uint8ClampedArray())); +assert.ok(isTypedArray(new Int16Array())); +assert.ok(isTypedArray(new Uint16Array())); +assert.ok(isTypedArray(new Int32Array())); +assert.ok(isTypedArray(new Uint32Array())); +assert.ok(isTypedArray(new Float32Array())); +assert.ok(isTypedArray(new Float64Array())); +assert.ok(isTypedArray(new BigInt64Array())); +assert.ok(isTypedArray(new BigUint64Array())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-typed-array +[npm-version-svg]: https://versionbadg.es/inspect-js/is-typed-array.svg +[deps-svg]: https://david-dm.org/inspect-js/is-typed-array.svg +[deps-url]: https://david-dm.org/inspect-js/is-typed-array +[dev-deps-svg]: https://david-dm.org/inspect-js/is-typed-array/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-typed-array#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-typed-array.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-typed-array.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-typed-array.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-typed-array +[codecov-image]: https://codecov.io/gh/inspect-js/is-typed-array/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-typed-array/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-typed-array +[actions-url]: https://github.com/inspect-js/is-typed-array/actions diff --git a/node_modules/is-typed-array/index.js b/node_modules/is-typed-array/index.js new file mode 100644 index 0000000000000..08c316314ad04 --- /dev/null +++ b/node_modules/is-typed-array/index.js @@ -0,0 +1,7 @@ +'use strict'; + +var whichTypedArray = require('which-typed-array'); + +module.exports = function isTypedArray(value) { + return !!whichTypedArray(value); +}; diff --git a/node_modules/is-typed-array/package.json b/node_modules/is-typed-array/package.json new file mode 100644 index 0000000000000..e2fc30213a1a4 --- /dev/null +++ b/node_modules/is-typed-array/package.json @@ -0,0 +1,116 @@ +{ + "name": "is-typed-array", + "version": "1.1.12", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run --silent lint", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc tape test", + "test:harmony": "nyc node --harmony --es-staging test", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-typed-array.git" + }, + "keywords": [ + "array", + "TypedArray", + "typed array", + "is", + "typed", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "ES6", + "toStringTag", + "Symbol.toStringTag", + "@@toStringTag" + ], + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.5" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "1.1.10" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-typed-array/test/index.js b/node_modules/is-typed-array/test/index.js new file mode 100644 index 0000000000000..8e7a16b08d80b --- /dev/null +++ b/node_modules/is-typed-array/test/index.js @@ -0,0 +1,103 @@ +'use strict'; + +var test = require('tape'); +var isTypedArray = require('../'); +var isCallable = require('is-callable'); +var hasToStringTag = require('has-tostringtag/shams')(); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + st.notOk(isTypedArray(), 'undefined is not typed array'); + st.notOk(isTypedArray(null), 'null is not typed array'); + st.notOk(isTypedArray(false), 'false is not typed array'); + st.notOk(isTypedArray(true), 'true is not typed array'); + st.end(); + }); + + t.notOk(isTypedArray({}), 'object is not typed array'); + t.notOk(isTypedArray(/a/g), 'regex literal is not typed array'); + t.notOk(isTypedArray(new RegExp('a', 'g')), 'regex object is not typed array'); + t.notOk(isTypedArray(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.notOk(isTypedArray(42), 'number is not typed array'); + st.notOk(isTypedArray(Object(42)), 'number object is not typed array'); + st.notOk(isTypedArray(NaN), 'NaN is not typed array'); + st.notOk(isTypedArray(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.notOk(isTypedArray('foo'), 'string primitive is not typed array'); + st.notOk(isTypedArray(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.notOk(isTypedArray(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.notOk(isTypedArray(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.notOk(isTypedArray(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + forEach(typedArrayNames, function (typedArray) { + if (typeof global[typedArray] === 'function') { + var fakeTypedArray = []; + fakeTypedArray[Symbol.toStringTag] = typedArray; + t.notOk(isTypedArray(fakeTypedArray), 'faked ' + typedArray + ' is not typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); + +test('non-Typed Arrays', function (t) { + t.notOk(isTypedArray([]), '[] is not typed array'); + t.end(); +}); + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(10); + t.ok(isTypedArray(arr), 'new ' + typedArray + '(10) is typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/is-utf8/LICENSE b/node_modules/is-utf8/LICENSE new file mode 100644 index 0000000000000..2c8d4b9990f16 --- /dev/null +++ b/node_modules/is-utf8/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (C) 2014 Wei Fanzhe + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +   +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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-utf8/README.md b/node_modules/is-utf8/README.md new file mode 100644 index 0000000000000..b62ddde1c42fe --- /dev/null +++ b/node_modules/is-utf8/README.md @@ -0,0 +1,16 @@ +#utf8 detector + +Detect if a Buffer is utf8 encoded. +It need The minimum amount of bytes is 4. + + +```javascript + var fs = require('fs'); + var isUtf8 = require('is-utf8'); + var ansi = fs.readFileSync('ansi.txt'); + var utf8 = fs.readFileSync('utf8.txt'); + + console.log('ansi.txt is utf8: '+isUtf8(ansi)); //false + console.log('utf8.txt is utf8: '+isUtf8(utf8)); //true +``` + diff --git a/node_modules/is-utf8/is-utf8.js b/node_modules/is-utf8/is-utf8.js new file mode 100644 index 0000000000000..8a5f15d13602b --- /dev/null +++ b/node_modules/is-utf8/is-utf8.js @@ -0,0 +1,76 @@ + +exports = module.exports = function(bytes) +{ + var i = 0; + while(i < bytes.length) + { + if( (// ASCII + bytes[i] == 0x09 || + bytes[i] == 0x0A || + bytes[i] == 0x0D || + (0x20 <= bytes[i] && bytes[i] <= 0x7E) + ) + ) { + i += 1; + continue; + } + + if( (// non-overlong 2-byte + (0xC2 <= bytes[i] && bytes[i] <= 0xDF) && + (0x80 <= bytes[i+1] && bytes[i+1] <= 0xBF) + ) + ) { + i += 2; + continue; + } + + if( (// excluding overlongs + bytes[i] == 0xE0 && + (0xA0 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && + (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) + ) || + (// straight 3-byte + ((0xE1 <= bytes[i] && bytes[i] <= 0xEC) || + bytes[i] == 0xEE || + bytes[i] == 0xEF) && + (0x80 <= bytes[i + 1] && bytes[i+1] <= 0xBF) && + (0x80 <= bytes[i+2] && bytes[i+2] <= 0xBF) + ) || + (// excluding surrogates + bytes[i] == 0xED && + (0x80 <= bytes[i+1] && bytes[i+1] <= 0x9F) && + (0x80 <= bytes[i+2] && bytes[i+2] <= 0xBF) + ) + ) { + i += 3; + continue; + } + + if( (// planes 1-3 + bytes[i] == 0xF0 && + (0x90 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && + (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && + (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) + ) || + (// planes 4-15 + (0xF1 <= bytes[i] && bytes[i] <= 0xF3) && + (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && + (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && + (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) + ) || + (// plane 16 + bytes[i] == 0xF4 && + (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0x8F) && + (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && + (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) + ) + ) { + i += 4; + continue; + } + + return false; + } + + return true; +} diff --git a/node_modules/is-utf8/package.json b/node_modules/is-utf8/package.json new file mode 100644 index 0000000000000..dab1234c715fd --- /dev/null +++ b/node_modules/is-utf8/package.json @@ -0,0 +1,19 @@ +{ + "name": "is-utf8", + "version": "0.2.1", + "description": "Detect if a buffer is utf8 encoded.", + "main": "is-utf8.js", + "scripts": { + "test": "node test.js" + }, + "repository": "https://github.com/wayfind/is-utf8.git", + "keywords": [ + "utf8", + "charset" + ], + "files": [ + "is-utf8.js" + ], + "author": "wayfind", + "license": "MIT" +} diff --git a/node_modules/is-weakref/.eslintignore b/node_modules/is-weakref/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-weakref/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-weakref/.eslintrc b/node_modules/is-weakref/.eslintrc new file mode 100644 index 0000000000000..3b5d9e90ec405 --- /dev/null +++ b/node_modules/is-weakref/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/is-weakref/.github/FUNDING.yml b/node_modules/is-weakref/.github/FUNDING.yml new file mode 100644 index 0000000000000..a9ccddf2a7550 --- /dev/null +++ b/node_modules/is-weakref/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-weakref +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-weakref/.nycrc b/node_modules/is-weakref/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-weakref/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-weakref/CHANGELOG.md b/node_modules/is-weakref/CHANGELOG.md new file mode 100644 index 0000000000000..573938d10ee3b --- /dev/null +++ b/node_modules/is-weakref/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/is-weakref/compare/v1.0.1...v1.0.2) - 2021-12-10 + +### Commits + +- [actions] reuse common workflows [`2375b1f`](https://github.com/inspect-js/is-weakref/commit/2375b1f9798b08c7af98481bbb38b4105835dacf) +- [meta] do not publish workflow files [`4c1be42`](https://github.com/inspect-js/is-weakref/commit/4c1be423afacabf2f3aa9e8bf02f668bdeaf3a20) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7ec78ce`](https://github.com/inspect-js/is-weakref/commit/7ec78ce58c7553469eee97ae82fe147dfccde611) +- [readme] update URLs [`6306f09`](https://github.com/inspect-js/is-weakref/commit/6306f09a7df388150fb1d0b855b6f9e60165a457) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`7a1601e`](https://github.com/inspect-js/is-weakref/commit/7a1601e93ae50a791751a96d33073f5e65f3d3c9) +- [readme] add actions and codecov badges [`67ecd14`](https://github.com/inspect-js/is-weakref/commit/67ecd14b8b0192456932d1d54838accbf90ff5c0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`1a5013b`](https://github.com/inspect-js/is-weakref/commit/1a5013bddcb9edc23025571810f9a2eebda53683) +- [actions] update codecov uploader [`b57b037`](https://github.com/inspect-js/is-weakref/commit/b57b037a547f3ecfa3d3f079a8015ec005c7181b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`da49017`](https://github.com/inspect-js/is-weakref/commit/da49017800d628c9bcd2f094d49783d6ee649c50) +- [meta] simplify "exports" [`9b88835`](https://github.com/inspect-js/is-weakref/commit/9b8883585506c135a3fcb9f55d0944a13b4eb3e6) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`c7e77f4`](https://github.com/inspect-js/is-weakref/commit/c7e77f495308f3385adfaa1f4ac78a2632e0bcde) +- [Dev Deps] update `eslint` [`417b29e`](https://github.com/inspect-js/is-weakref/commit/417b29e7ceacebe24aef15422544443f4b59e181) +- [meta] add `safe-publish-latest`; use `prepublishOnly` script for npm 7+ [`b1b99f4`](https://github.com/inspect-js/is-weakref/commit/b1b99f45e0977d10f8472e9272e48a696145c2b1) +- [Deps] update `call-bind` [`aea342e`](https://github.com/inspect-js/is-weakref/commit/aea342e9e301deeb938e62b92a37cf991c5f7dbc) +- [actions] update workflows [`786c2d3`](https://github.com/inspect-js/is-weakref/commit/786c2d3dd4486acec09786220d3dd9fd48e70e93) + +## [v1.0.1](https://github.com/inspect-js/is-weakref/compare/v1.0.0...v1.0.1) - 2020-12-04 + +### Commits + +- [Tests] migrate tests to Github Actions [`05b4faa`](https://github.com/inspect-js/is-weakref/commit/05b4faa167c67f42c792e35c07adcb6b87e7dea0) +- [Tests] run `nyc` on all tests [`8df2e4b`](https://github.com/inspect-js/is-weakref/commit/8df2e4bd66bb6b7d55f389f28e6bb167fe1deb5a) +- [actions] add "Allow Edits" workflow [`4a716b8`](https://github.com/inspect-js/is-weakref/commit/4a716b8fcc025fe889a0f09ccaee7a9f748b1c66) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect` [`be23cf3`](https://github.com/inspect-js/is-weakref/commit/be23cf305f46db8b1c8a26d1c74b096fdba00056) +- [Refactor] use `call-bind` instead of `es-abstract` [`a933a96`](https://github.com/inspect-js/is-weakref/commit/a933a9643ddf7cddfd9f9f3cf44d675cc4c86ce5) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4473ed2`](https://github.com/inspect-js/is-weakref/commit/4473ed2e73fed47cd2fa42b8d9cac17e941d2c08) +- [readme] remove travis badge [`bd3bfcd`](https://github.com/inspect-js/is-weakref/commit/bd3bfcd2c187099d2215232a7621fb960e1e2807) + +## v1.0.0 - 2020-08-01 + +### Commits + +- Initial commit [`dd86394`](https://github.com/inspect-js/is-weakref/commit/dd86394d7da000724c6e17c79077879c381e9ea3) +- readme [`f4defca`](https://github.com/inspect-js/is-weakref/commit/f4defcac48d1d99b019b596ab26bd868de1adfe9) +- Tests [`13d8139`](https://github.com/inspect-js/is-weakref/commit/13d8139dedf424239daf357261c39d3f8c33d662) +- npm init [`55a2bb7`](https://github.com/inspect-js/is-weakref/commit/55a2bb7c53b893396a51da969e352702cafe9a0e) +- Implementation [`1ec84e3`](https://github.com/inspect-js/is-weakref/commit/1ec84e36de4315d44c8da540faa27836832bb0f3) +- [meta] add auto-changelog [`ab9ce44`](https://github.com/inspect-js/is-weakref/commit/ab9ce44be717312c5221bf3d2f3f6d2dd8c6ac88) +- [actions] add automatic rebasing / merge commit blocking [`3d3f4d5`](https://github.com/inspect-js/is-weakref/commit/3d3f4d54bed6e455b2a0d0f20c87d454bf78af26) +- [meta] add "funding"; create `FUNDING.yml` [`f35ef3d`](https://github.com/inspect-js/is-weakref/commit/f35ef3de16eb06447acf3c39bdc164ba0e7bdf45) +- [Tests] add `npm run lint` [`af2123d`](https://github.com/inspect-js/is-weakref/commit/af2123d4754c14f7befa66ba01e1d72858723651) +- [Tests] use shared travis-ci configs [`042b4de`](https://github.com/inspect-js/is-weakref/commit/042b4dec08d882ae9137f4ad05ae24a1457da0f8) +- Only apps should have lockfiles [`fcae604`](https://github.com/inspect-js/is-weakref/commit/fcae604cb1422faae9311dd4219032895c0a9a2e) diff --git a/node_modules/is-weakref/LICENSE b/node_modules/is-weakref/LICENSE new file mode 100644 index 0000000000000..707437b5750a2 --- /dev/null +++ b/node_modules/is-weakref/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-weakref/README.md b/node_modules/is-weakref/README.md new file mode 100644 index 0000000000000..abbb978bf32cf --- /dev/null +++ b/node_modules/is-weakref/README.md @@ -0,0 +1,52 @@ +# is-weakref [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isWeakRef = require('is-weakref'); +assert(!isWeakRef(function () {})); +assert(!isWeakRef(null)); +assert(!isWeakRef(function* () { yield 42; return Infinity; }); +assert(!isWeakRef(Symbol('foo'))); +assert(!isWeakRef(1n)); +assert(!isWeakRef(Object(1n))); + +assert(!isWeakRef(new Set())); +assert(!isWeakRef(new WeakSet())); +assert(!isWeakRef(new Map())); +assert(!isWeakRef(new WeakMap())); + +assert(isWeakRef(new WeakRef({}))); + +class MyWeakRef extends WeakRef {} +assert(isWeakRef(new MyWeakRef({}))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-weakref +[npm-version-svg]: https://versionbadg.es/inspect-js/is-weakref.svg +[deps-svg]: https://david-dm.org/inspect-js/is-weakref.svg +[deps-url]: https://david-dm.org/inspect-js/is-weakref +[dev-deps-svg]: https://david-dm.org/inspect-js/is-weakref/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-weakref#info=devDependencies +[license-image]: https://img.shields.io/npm/l/is-weakref.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-weakref.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-weakref +[codecov-image]: https://codecov.io/gh/inspect-js/is-weakref/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-weakref/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-weakref +[actions-url]: https://github.com/inspect-js/is-weakref/actions diff --git a/node_modules/is-weakref/index.js b/node_modules/is-weakref/index.js new file mode 100644 index 0000000000000..90769f8ac425e --- /dev/null +++ b/node_modules/is-weakref/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $deref = callBound('WeakRef.prototype.deref', true); + +module.exports = typeof WeakRef === 'undefined' + ? function isWeakRef(value) { // eslint-disable-line no-unused-vars + return false; + } + : function isWeakRef(value) { + if (!value || typeof value !== 'object') { + return false; + } + try { + $deref(value); + return true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/is-weakref/package.json b/node_modules/is-weakref/package.json new file mode 100644 index 0000000000000..2d2a6e2a16a33 --- /dev/null +++ b/node_modules/is-weakref/package.json @@ -0,0 +1,63 @@ +{ + "name": "is-weakref", + "version": "1.0.2", + "description": "Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-weakref.git" + }, + "keywords": [ + "weakref", + "weak", + "ref", + "finalization", + "finalization registry" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-weakref/issues" + }, + "homepage": "https://github.com/inspect-js/is-weakref#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.0.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.4.1", + "for-each": "^0.3.3", + "nyc": "^10.3.2", + "object-inspect": "^1.11.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.3.2" + }, + "dependencies": { + "call-bind": "^1.0.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-weakref/test/index.js b/node_modules/is-weakref/test/index.js new file mode 100644 index 0000000000000..c1c5b6f966a20 --- /dev/null +++ b/node_modules/is-weakref/test/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); + +var isWeakRef = require('..'); + +test('isWeakRef', function (t) { + t.equal(typeof isWeakRef, 'function', 'is a function'); + + var nonWeakRefs = [undefined, null, true, false, 42, 0, Infinity, NaN, /a/g, function () {}, {}, []]; + forEach(nonWeakRefs, function (nonWeakRef) { + t.equal(isWeakRef(nonWeakRef), false, inspect(nonWeakRef) + ' is not a WeakRef'); + }); + + t.test('actual WeakRefs', { skip: typeof WeakRef === 'undefined' }, function (st) { + var ref = new WeakRef({}); + + st.equal(isWeakRef(ref), true, inspect(ref) + ' is a WeakRef'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-windows/LICENSE b/node_modules/is-windows/LICENSE new file mode 100644 index 0000000000000..f8de0630598b1 --- /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 0000000000000..485bfdecb37c5 --- /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 0000000000000..55d43e0920b51 --- /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 0000000000000..fca09f9c0d197 --- /dev/null +++ b/node_modules/is-windows/package.json @@ -0,0 +1,71 @@ +{ + "name": "is-windows", + "description": "Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/is-windows", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Simen Bekkhus (https://github.com/SimenB)", + "刘祺 (gucong.co.cc)" + ], + "repository": "jonschlinkert/is-windows", + "bugs": { + "url": "https://github.com/jonschlinkert/is-windows/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "check", + "cywin", + "is", + "is-windows", + "nix", + "operating system", + "os", + "platform", + "process", + "unix", + "win", + "win32", + "windows" + ], + "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" + ] + } +} diff --git a/node_modules/isarray/.npmignore b/node_modules/isarray/.npmignore new file mode 100644 index 0000000000000..3c3629e647f5d --- /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 0000000000000..cc4dba29d959a --- /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 0000000000000..787d56e1e982e --- /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 0000000000000..16d2c59c6195f --- /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 0000000000000..9e31b68388901 --- /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 0000000000000..a57f63495943a --- /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 0000000000000..1a4317a9c41c7 --- /dev/null +++ b/node_modules/isarray/package.json @@ -0,0 +1,45 @@ +{ + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "1.0.0", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tape": "~2.13.4" + }, + "keywords": [ + "browser", + "isarray", + "array" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "scripts": { + "test": "tape test.js" + } +} diff --git a/node_modules/isarray/test.js b/node_modules/isarray/test.js new file mode 100644 index 0000000000000..e0c3444d85d5c --- /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 0000000000000..c1cb757acf58a --- /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 0000000000000..19129e315fe59 --- /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 0000000000000..35769e84408ce --- /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 0000000000000..553fb32b119bd --- /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 0000000000000..1995ea4a06aec --- /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 0000000000000..e452689442f20 --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,31 @@ +{ + "name": "isexe", + "version": "2.0.0", + "description": "Minimal module to check if a file is executable.", + "main": "index.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "keywords": [], + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "homepage": "https://github.com/isaacs/isexe#readme" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 0000000000000..d926df64b9024 --- /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 0000000000000..34996734d8ef3 --- /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 0000000000000..39245ac1c6061 --- /dev/null +++ b/node_modules/isobject/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/isobject/README.md b/node_modules/isobject/README.md new file mode 100644 index 0000000000000..9dd897aa05806 --- /dev/null +++ b/node_modules/isobject/README.md @@ -0,0 +1,112 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat)](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 isobject --save +``` + +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](http://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); +``` + +## Related projects + +You might also be interested in these projects: + +[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-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) +* [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) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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/isobject/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._ \ No newline at end of file diff --git a/node_modules/isobject/index.js b/node_modules/isobject/index.js new file mode 100644 index 0000000000000..aa0dce0bbad19 --- /dev/null +++ b/node_modules/isobject/index.js @@ -0,0 +1,14 @@ +/*! + * isobject + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isArray = require('isarray'); + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && isArray(val) === false; +}; diff --git a/node_modules/isobject/package.json b/node_modules/isobject/package.json new file mode 100644 index 0000000000000..954f4113ff4be --- /dev/null +++ b/node_modules/isobject/package.json @@ -0,0 +1,67 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "2.1.0", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isarray": "1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "merge-deep", + "extend-shallow", + "is-plain-object", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/kind-of/LICENSE b/node_modules/kind-of/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /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 0000000000000..6a9df36d3bd2f --- /dev/null +++ b/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/kind-of/index.js b/node_modules/kind-of/index.js new file mode 100644 index 0000000000000..b52c2917feb11 --- /dev/null +++ b/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/kind-of/package.json b/node_modules/kind-of/package.json new file mode 100644 index 0000000000000..5de879e1162d0 --- /dev/null +++ b/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "3.2.2", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "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" + }, + "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" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/lazy-cache/LICENSE b/node_modules/lazy-cache/LICENSE new file mode 100644 index 0000000000000..1e49edf81fee9 --- /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 0000000000000..33b5a4dde8ffc --- /dev/null +++ b/node_modules/lazy-cache/README.md @@ -0,0 +1,147 @@ +# lazy-cache [![NPM version](https://img.shields.io/npm/v/lazy-cache.svg?style=flat)](https://www.npmjs.com/package/lazy-cache) [![NPM downloads](https://img.shields.io/npm/dm/lazy-cache.svg?style=flat)](https://npmjs.org/package/lazy-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/lazy-cache.svg?style=flat)](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 lazy-cache --save +``` + +If you use webpack and are experiencing issues, try using [unlazy-loader](https://github.com/doowb/unlazy-loader), a webpack loader that fixes the bug that prevents webpack from working with native javascript getters. + +## 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')); +``` + +## 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 + +In certain rare edge cases it may be necessary to unlazy all lazy-cached dependencies (5 reported cases after ~30 million downloads). + +To force lazy-cache to immediately invoke all dependencies, do: + +```js +process.env.UNLAZY = true; +``` + +## Related projects + +You might also be interested in these 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://www.npmjs.com/package/lint-deps) | [homepage](https://github.com/jonschlinkert/lint-deps) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/lazy-cache/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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](https://github.com/verbose/verb), v0.9.0, on April 22, 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 0000000000000..da7897d0c2cf4 --- /dev/null +++ b/node_modules/lazy-cache/index.js @@ -0,0 +1,67 @@ +'use strict'; + +/** + * 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(fn) { + var cache = {}; + var proxy = function(mod, name) { + name = name || camelcase(mod); + + // check both boolean and string in case `process.env` cases to string + if (process.env.UNLAZY === 'true' || process.env.UNLAZY === true || process.env.TRAVIS) { + cache[name] = fn(mod); + } + + Object.defineProperty(proxy, name, { + enumerable: true, + configurable: true, + get: getter + }); + + function getter() { + if (cache.hasOwnProperty(name)) { + return cache[name]; + } + return (cache[name] = fn(mod)); + } + return getter; + }; + return proxy; +} + +/** + * Used to camelcase the name to be stored on the `lazy` object. + * + * @param {String} `str` String containing `_`, `.`, `-` or whitespace that will be camelcased. + * @return {String} camelcased string. + */ + +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 0000000000000..e635e982de63e --- /dev/null +++ b/node_modules/lazy-cache/package.json @@ -0,0 +1,58 @@ +{ + "name": "lazy-cache", + "description": "Cache requires to be lazy-loaded when needed.", + "version": "1.0.4", + "homepage": "https://github.com/jonschlinkert/lazy-cache", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/lazy-cache", + "bugs": { + "url": "https://github.com/jonschlinkert/lazy-cache/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-yellow": "^0.1.1", + "glob": "^7.0.3", + "gulp-format-md": "^0.1.8", + "mocha": "^2.4.5" + }, + "keywords": [ + "cache", + "caching", + "dependencies", + "dependency", + "lazy", + "require", + "requires" + ], + "verb": { + "related": { + "list": [ + "lint-deps" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/load-json-file/index.js b/node_modules/load-json-file/index.js new file mode 100644 index 0000000000000..96d4d9f6f8877 --- /dev/null +++ b/node_modules/load-json-file/index.js @@ -0,0 +1,21 @@ +'use strict'; +var path = require('path'); +var fs = require('graceful-fs'); +var stripBom = require('strip-bom'); +var parseJson = require('parse-json'); +var Promise = require('pinkie-promise'); +var pify = require('pify'); + +function parse(x, fp) { + return parseJson(stripBom(x), path.relative(process.cwd(), fp)); +} + +module.exports = function (fp) { + return pify(fs.readFile, Promise)(fp, 'utf8').then(function (data) { + return parse(data, fp); + }); +}; + +module.exports.sync = function (fp) { + return 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 0000000000000..654d0bfe94343 --- /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/package.json b/node_modules/load-json-file/package.json new file mode 100644 index 0000000000000..b44c8a128df2d --- /dev/null +++ b/node_modules/load-json-file/package.json @@ -0,0 +1,46 @@ +{ + "name": "load-json-file", + "version": "1.1.0", + "description": "Read and parse a JSON file", + "license": "MIT", + "repository": "sindresorhus/load-json-file", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load" + ], + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/load-json-file/readme.md b/node_modules/load-json-file/readme.md new file mode 100644 index 0000000000000..fa982b5493cb1 --- /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 that resolves to 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](http://sindresorhus.com) diff --git a/node_modules/longest/LICENSE b/node_modules/longest/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/longest/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/longest/README.md b/node_modules/longest/README.md new file mode 100644 index 0000000000000..cdffe652bf281 --- /dev/null +++ b/node_modules/longest/README.md @@ -0,0 +1,65 @@ +# longest [![NPM version](https://badge.fury.io/js/longest.svg)](http://badge.fury.io/js/longest) [![Build Status](https://travis-ci.org/jonschlinkert/longest.svg)](https://travis-ci.org/jonschlinkert/longest) + +> Get the longest item in an array. + +## Install with [npm](npmjs.org) + +```bash +npm i longest --save +``` +### Install with [bower](https://github.com/bower/bower) + +```bash +bower install longest --save +``` + +## Running tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + +## Usage + +```js +var longest = require('longest'); +longest(['a', 'abcde', 'abc']); +//=> 'abcde' + +longest(['a', 'abcde', 'abc']).length; +//=> 5 +``` + +## Related projects +* [longest-value](https://github.com/jonschlinkert/longest-value): Get the longest value for the given property from an array of objects. Useful for aligning values. +* [right-align-values](https://github.com/jonschlinkert/right-align-values): Right align the values of a given property for each object in an array. Useful for creating text columns or tables. +* [right-pad-values](https://github.com/jonschlinkert/right-pad-values): Right pad the values of a given property for each object in an array. Useful for creating text columns or tables. +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [pad-right](https://github.com/jonschlinkert/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. +* [pad-left](https://github.com/jonschlinkert/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. + +## Running tests +Install dev dependencies. + +```bash +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/longest/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 31, 2015._ \ No newline at end of file diff --git a/node_modules/longest/index.js b/node_modules/longest/index.js new file mode 100644 index 0000000000000..9892e52a14d50 --- /dev/null +++ b/node_modules/longest/index.js @@ -0,0 +1,37 @@ +/*! + * longest + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function(arr) { + if (!arr) { + return null; + } + + var len = arr.length; + if (!len) { + return null; + } + + var c = 0; + var i = 0; + var ele; + var elen; + var res; + + for (; i < len; i++) { + ele = arr[i].toString(); + elen = ele.length; + + if (elen > c) { + res = ele; + c = elen; + } + } + + return res; +}; diff --git a/node_modules/longest/package.json b/node_modules/longest/package.json new file mode 100644 index 0000000000000..76e7afd72dba9 --- /dev/null +++ b/node_modules/longest/package.json @@ -0,0 +1,43 @@ +{ + "name": "longest", + "description": "Get the longest item in an array.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/longest", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "https://github.com/jonschlinkert/longest.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/longest/issues" + }, + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/longest/blob/master/LICENSE" + }, + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "fill-range": "^2.1.0", + "mocha": "*" + }, + "keywords": [ + "array", + "element", + "item", + "long", + "length", + "longest" + ] +} diff --git a/node_modules/lru-cache/LICENSE b/node_modules/lru-cache/LICENSE new file mode 100644 index 0000000000000..19129e315fe59 --- /dev/null +++ b/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/lru-cache/README.md b/node_modules/lru-cache/README.md new file mode 100644 index 0000000000000..d660dd5747abe --- /dev/null +++ b/node_modules/lru-cache/README.md @@ -0,0 +1,158 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) + +## Installation: + +```javascript +npm install lru-cache --save +``` + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +// but note that it must be THE SAME object, not +// just a JSON-equivalent object. +var someObject = { a: 1 } +cache.set(someObject, 'a value') +// Object keys are not toString()-ed +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') +// A similar object with same keys/values won't work, +// because it's a different object identity +assert.equal(cache.get({ a: 1 }), undefined) + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. The item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. +* `noDisposeOnSet` By default, if you set a `dispose()` method, then + it'll be called whenever a `set()` operation overwrites an existing + key. If you set this option, `dispose()` will only be called when a + key falls out of the cache, not when it is overwritten. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `maxAge` is optional and overrides the + cache `maxAge` option if provided. + + If the key is not found, `get()` will return `undefined`. + + The key and val can be any value. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries + +* `prune()` + + Manually iterates over the entire cache proactively pruning old entries diff --git a/node_modules/lru-cache/index.js b/node_modules/lru-cache/index.js new file mode 100644 index 0000000000000..bd35b53589381 --- /dev/null +++ b/node_modules/lru-cache/index.js @@ -0,0 +1,468 @@ +'use strict' + +module.exports = LRUCache + +// This will be a proper iterable 'Map' in engines that support it, +// or a fakey-fake PseudoMap in older versions. +var Map = require('pseudomap') +var util = require('util') + +// A linked list to keep track of recently-used-ness +var Yallist = require('yallist') + +// use symbols if possible, otherwise just _props +var hasSymbol = typeof Symbol === 'function' && process.env._nodeLRUCacheForceNoSymbol !== '1' +var makeSymbol +if (hasSymbol) { + makeSymbol = function (key) { + return Symbol(key) + } +} else { + makeSymbol = function (key) { + return '_' + key + } +} + +var MAX = makeSymbol('max') +var LENGTH = makeSymbol('length') +var LENGTH_CALCULATOR = makeSymbol('lengthCalculator') +var ALLOW_STALE = makeSymbol('allowStale') +var MAX_AGE = makeSymbol('maxAge') +var DISPOSE = makeSymbol('dispose') +var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet') +var LRU_LIST = makeSymbol('lruList') +var CACHE = makeSymbol('cache') + +function naiveLength () { return 1 } + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +function LRUCache (options) { + if (!(this instanceof LRUCache)) { + return new LRUCache(options) + } + + if (typeof options === 'number') { + options = { max: options } + } + + if (!options) { + options = {} + } + + var max = this[MAX] = options.max + // Kind of weird to have a default max of Infinity, but oh well. + if (!max || + !(typeof max === 'number') || + max <= 0) { + this[MAX] = Infinity + } + + var lc = options.length || naiveLength + if (typeof lc !== 'function') { + lc = naiveLength + } + this[LENGTH_CALCULATOR] = lc + + this[ALLOW_STALE] = options.stale || false + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this.reset() +} + +// resize the cache when the max changes. +Object.defineProperty(LRUCache.prototype, 'max', { + set: function (mL) { + if (!mL || !(typeof mL === 'number') || mL <= 0) { + mL = Infinity + } + this[MAX] = mL + trim(this) + }, + get: function () { + return this[MAX] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function (allowStale) { + this[ALLOW_STALE] = !!allowStale + }, + get: function () { + return this[ALLOW_STALE] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function (mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0 + } + this[MAX_AGE] = mA + trim(this) + }, + get: function () { + return this[MAX_AGE] + }, + enumerable: true +}) + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function (lC) { + if (typeof lC !== 'function') { + lC = naiveLength + } + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(function (hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }, this) + } + trim(this) + }, + get: function () { return this[LENGTH_CALCULATOR] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'length', { + get: function () { return this[LENGTH] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function () { return this[LRU_LIST].length }, + enumerable: true +}) + +LRUCache.prototype.rforEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].tail; walker !== null;) { + var prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } +} + +function forEachStep (self, fn, node, thisp) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) { + hit = undefined + } + } + if (hit) { + fn.call(thisp, hit.value, hit.key, self) + } +} + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].head; walker !== null;) { + var next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } +} + +LRUCache.prototype.keys = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.key + }, this) +} + +LRUCache.prototype.values = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.value + }, this) +} + +LRUCache.prototype.reset = function () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(function (hit) { + this[DISPOSE](hit.key, hit.value) + }, this) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list +} + +LRUCache.prototype.dump = function () { + return this[LRU_LIST].map(function (hit) { + if (!isStale(this, hit)) { + return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + } + } + }, this).toArray().filter(function (h) { + return h + }) +} + +LRUCache.prototype.dumpLru = function () { + return this[LRU_LIST] +} + +/* istanbul ignore next */ +LRUCache.prototype.inspect = function (n, opts) { + var str = 'LRUCache {' + var extras = false + + var as = this[ALLOW_STALE] + if (as) { + str += '\n allowStale: true' + extras = true + } + + var max = this[MAX] + if (max && max !== Infinity) { + if (extras) { + str += ',' + } + str += '\n max: ' + util.inspect(max, opts) + extras = true + } + + var maxAge = this[MAX_AGE] + if (maxAge) { + if (extras) { + str += ',' + } + str += '\n maxAge: ' + util.inspect(maxAge, opts) + extras = true + } + + var lc = this[LENGTH_CALCULATOR] + if (lc && lc !== naiveLength) { + if (extras) { + str += ',' + } + str += '\n length: ' + util.inspect(this[LENGTH], opts) + extras = true + } + + var didFirst = false + this[LRU_LIST].forEach(function (item) { + if (didFirst) { + str += ',\n ' + } else { + if (extras) { + str += ',\n' + } + didFirst = true + str += '\n ' + } + var key = util.inspect(item.key).split('\n').join('\n ') + var val = { value: item.value } + if (item.maxAge !== maxAge) { + val.maxAge = item.maxAge + } + if (lc !== naiveLength) { + val.length = item.length + } + if (isStale(this, item)) { + val.stale = true + } + + val = util.inspect(val, opts).split('\n').join('\n ') + str += key + ' => ' + val + }) + + if (didFirst || extras) { + str += '\n' + } + str += '}' + + return str +} + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + var now = maxAge ? Date.now() : 0 + var len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + var node = this[CACHE].get(key) + var item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key, item.value) + } + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + var hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) { + this[DISPOSE](key, value) + } + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true +} + +LRUCache.prototype.has = function (key) { + if (!this[CACHE].has(key)) return false + var hit = this[CACHE].get(key).value + if (isStale(this, hit)) { + return false + } + return true +} + +LRUCache.prototype.get = function (key) { + return get(this, key, true) +} + +LRUCache.prototype.peek = function (key) { + return get(this, key, false) +} + +LRUCache.prototype.pop = function () { + var node = this[LRU_LIST].tail + if (!node) return null + del(this, node) + return node.value +} + +LRUCache.prototype.del = function (key) { + del(this, this[CACHE].get(key)) +} + +LRUCache.prototype.load = function (arr) { + // reset the cache + this.reset() + + var now = Date.now() + // A previous serialized cache has the most recent items first + for (var l = arr.length - 1; l >= 0; l--) { + var hit = arr[l] + var expiresAt = hit.e || 0 + if (expiresAt === 0) { + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + } else { + var maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } +} + +LRUCache.prototype.prune = function () { + var self = this + this[CACHE].forEach(function (value, key) { + get(self, key, false) + }) +} + +function get (self, key, doUse) { + var node = self[CACHE].get(key) + if (node) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) hit = undefined + } else { + if (doUse) { + self[LRU_LIST].unshiftNode(node) + } + } + if (hit) hit = hit.value + } + return hit +} + +function isStale (self, hit) { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) { + return false + } + var stale = false + var diff = Date.now() - hit.now + if (hit.maxAge) { + stale = diff > hit.maxAge + } else { + stale = self[MAX_AGE] && (diff > self[MAX_AGE]) + } + return stale +} + +function trim (self) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + var prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +function del (self, node) { + if (node) { + var hit = node.value + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value) + } + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +// classy, since V8 prefers predictable objects. +function Entry (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 +} diff --git a/node_modules/lru-cache/package.json b/node_modules/lru-cache/package.json new file mode 100644 index 0000000000000..bf7a06dc621fc --- /dev/null +++ b/node_modules/lru-cache/package.json @@ -0,0 +1,36 @@ +{ + "name": "lru-cache", + "description": "A cache object that deletes the least-recently-used items.", + "version": "4.1.5", + "author": "Isaac Z. Schlueter ", + "keywords": [ + "mru", + "lru", + "cache" + ], + "scripts": { + "test": "tap test/*.js --100 -J", + "snap": "TAP_SNAPSHOT=1 tap test/*.js -J", + "posttest": "standard test/*.js index.js", + "coveragerport": "tap --coverage-report=html", + "lintfix": "standard --fix test/*.js index.js", + "preversion": "npm test", + "postversion": "npm publish --tag=legacy", + "postpublish": "git push origin --all; git push origin --tags" + }, + "main": "index.js", + "repository": "git://github.com/isaacs/node-lru-cache.git", + "devDependencies": { + "benchmark": "^2.1.4", + "standard": "^12.0.1", + "tap": "^12.1.0" + }, + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "files": [ + "index.js" + ] +} diff --git a/node_modules/map-cache/LICENSE b/node_modules/map-cache/LICENSE new file mode 100644 index 0000000000000..1e49edf81fee9 --- /dev/null +++ b/node_modules/map-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/map-cache/README.md b/node_modules/map-cache/README.md new file mode 100644 index 0000000000000..6260b29fc6d74 --- /dev/null +++ b/node_modules/map-cache/README.md @@ -0,0 +1,145 @@ +# map-cache [![NPM version](https://img.shields.io/npm/v/map-cache.svg?style=flat)](https://www.npmjs.com/package/map-cache) [![NPM downloads](https://img.shields.io/npm/dm/map-cache.svg?style=flat)](https://npmjs.org/package/map-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/map-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/map-cache) + +Basic cache object for storing key-value pairs. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install map-cache --save +``` + +Based on MapCache in Lo-dash v3.0. [MIT License](https://github.com/lodash/lodash/blob/master/LICENSE.txt) + +## Usage + +```js +var MapCache = require('map-cache'); +var mapCache = new MapCache(); +``` + +## API + +### [MapCache](index.js#L28) + +Creates a cache object to store key/value pairs. + +**Example** + +```js +var cache = new MapCache(); +``` + +### [.set](index.js#L45) + +Adds `value` to `key` on the cache. + +**Params** + +* `key` **{String}**: The key of the value to cache. +* `value` **{any}**: The value to cache. +* `returns` **{Object}**: Returns the `Cache` object for chaining. + +**Example** + +```js +cache.set('foo', 'bar'); +``` + +### [.get](index.js#L65) + +Gets the cached value for `key`. + +**Params** + +* `key` **{String}**: The key of the value to get. +* `returns` **{any}**: Returns the cached value. + +**Example** + +```js +cache.get('foo'); +//=> 'bar' +``` + +### [.has](index.js#L82) + +Checks if a cached value for `key` exists. + +**Params** + +* `key` **{String}**: The key of the entry to check. +* `returns` **{Boolean}**: Returns `true` if an entry for `key` exists, else `false`. + +**Example** + +```js +cache.has('foo'); +//=> true +``` + +### [.del](index.js#L98) + +Removes `key` and its value from the cache. + +**Params** + +* `key` **{String}**: The key of the value to remove. +* `returns` **{Boolean}**: Returns `true` if the entry was removed successfully, else `false`. + +**Example** + +```js +cache.del('foo'); +``` + +## Related projects + +You might also be interested in these projects: + +* [cache-base](https://www.npmjs.com/package/cache-base): Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects. | [homepage](https://github.com/jonschlinkert/cache-base) +* [config-cache](https://www.npmjs.com/package/config-cache): General purpose JavaScript object storage methods. | [homepage](https://github.com/jonschlinkert/config-cache) +* [option-cache](https://www.npmjs.com/package/option-cache): Simple API for managing options in JavaScript applications. | [homepage](https://github.com/jonschlinkert/option-cache) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-cache/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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/map-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 10, 2016._ \ No newline at end of file diff --git a/node_modules/map-cache/index.js b/node_modules/map-cache/index.js new file mode 100644 index 0000000000000..f86842f297934 --- /dev/null +++ b/node_modules/map-cache/index.js @@ -0,0 +1,100 @@ +/*! + * map-cache + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var hasOwn = Object.prototype.hasOwnProperty; + +/** + * Expose `MapCache` + */ + +module.exports = MapCache; + +/** + * Creates a cache object to store key/value pairs. + * + * ```js + * var cache = new MapCache(); + * ``` + * + * @api public + */ + +function MapCache(data) { + this.__data__ = data || {}; +} + +/** + * Adds `value` to `key` on the cache. + * + * ```js + * cache.set('foo', 'bar'); + * ``` + * + * @param {String} `key` The key of the value to cache. + * @param {*} `value` The value to cache. + * @returns {Object} Returns the `Cache` object for chaining. + * @api public + */ + +MapCache.prototype.set = function mapSet(key, value) { + if (key !== '__proto__') { + this.__data__[key] = value; + } + return this; +}; + +/** + * Gets the cached value for `key`. + * + * ```js + * cache.get('foo'); + * //=> 'bar' + * ``` + * + * @param {String} `key` The key of the value to get. + * @returns {*} Returns the cached value. + * @api public + */ + +MapCache.prototype.get = function mapGet(key) { + return key === '__proto__' ? undefined : this.__data__[key]; +}; + +/** + * Checks if a cached value for `key` exists. + * + * ```js + * cache.has('foo'); + * //=> true + * ``` + * + * @param {String} `key` The key of the entry to check. + * @returns {Boolean} Returns `true` if an entry for `key` exists, else `false`. + * @api public + */ + +MapCache.prototype.has = function mapHas(key) { + return key !== '__proto__' && hasOwn.call(this.__data__, key); +}; + +/** + * Removes `key` and its value from the cache. + * + * ```js + * cache.del('foo'); + * ``` + * @title .del + * @param {String} `key` The key of the value to remove. + * @returns {Boolean} Returns `true` if the entry was removed successfully, else `false`. + * @api public + */ + +MapCache.prototype.del = function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; +}; diff --git a/node_modules/map-cache/package.json b/node_modules/map-cache/package.json new file mode 100644 index 0000000000000..8bf0af2ce2ebe --- /dev/null +++ b/node_modules/map-cache/package.json @@ -0,0 +1,59 @@ +{ + "name": "map-cache", + "description": "Basic cache object for storing key-value pairs.", + "version": "0.2.2", + "homepage": "https://github.com/jonschlinkert/map-cache", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/map-cache", + "bugs": { + "url": "https://github.com/jonschlinkert/map-cache/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "should": "^8.3.1" + }, + "keywords": [ + "cache", + "get", + "has", + "object", + "set", + "storage", + "store" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "config-cache", + "option-cache", + "cache-base" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/map-stream/.npmignore b/node_modules/map-stream/.npmignore new file mode 100644 index 0000000000000..13abef4f58898 --- /dev/null +++ b/node_modules/map-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/map-stream/.travis.yml b/node_modules/map-stream/.travis.yml new file mode 100644 index 0000000000000..895dbd3623421 --- /dev/null +++ b/node_modules/map-stream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/node_modules/map-stream/LICENCE b/node_modules/map-stream/LICENCE new file mode 100644 index 0000000000000..171dd970053ce --- /dev/null +++ b/node_modules/map-stream/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/map-stream/examples/pretty.js b/node_modules/map-stream/examples/pretty.js new file mode 100644 index 0000000000000..ab073987aa9f1 --- /dev/null +++ b/node_modules/map-stream/examples/pretty.js @@ -0,0 +1,26 @@ + +var inspect = require('util').inspect + +if(!module.parent) { + var map = require('..') //load map-stream + var es = require('event-stream') //load event-stream + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + 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/map-stream/index.js b/node_modules/map-stream/index.js new file mode 100644 index 0000000000000..09ae829debdd5 --- /dev/null +++ b/node_modules/map-stream/index.js @@ -0,0 +1,145 @@ +//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 + + +//create an event stream and apply function to each .write +//emitting each response as data +//unless it's an empty callback + +module.exports = function (mapper, opts) { + + var stream = new Stream() + , self = this + , inputs = 0 + , outputs = 0 + , ended = false + , paused = false + , destroyed = false + , lastWritten = 0 + , inNext = false + + this.opts = opts || {}; + var errorEventName = this.opts.failures ? 'failure' : 'error'; + + // Items that are not ready to be written yet (because they would come out of + // order) get stuck in a queue for later. + var writeQueue = {} + + stream.writable = true + stream.readable = true + + function queueData (data, number) { + var nextToWrite = lastWritten + 1 + + if (number === nextToWrite) { + // If it's next, and its not undefined write it + if (data !== undefined) { + stream.emit.apply(stream, ['data', data]) + } + lastWritten ++ + nextToWrite ++ + } else { + // Otherwise queue it for later. + writeQueue[number] = data + } + + // If the next value is in the queue, write it + if (writeQueue.hasOwnProperty(nextToWrite)) { + var dataToWrite = writeQueue[nextToWrite] + delete writeQueue[nextToWrite] + return queueData(dataToWrite, nextToWrite) + } + + outputs ++ + if(inputs === outputs) { + if(paused) paused = false, stream.emit('drain') //written all the incoming events + if(ended) end() + } + } + + function next (err, data, number) { + if(destroyed) return + inNext = true + + if (!err || self.opts.failures) { + queueData(data, number) + } + + if (err) { + stream.emit.apply(stream, [ errorEventName, err ]); + } + + inNext = false; + } + + // Wrap the mapper function by calling its callback with the order number of + // the item in the stream. + function wrappedMapper (input, number, callback) { + return mapper.call(null, input, function(err, data){ + callback(err, data, number) + }) + } + + stream.write = function (data) { + if(ended) throw new Error('map stream is not writable') + inNext = false + inputs ++ + + try { + //catch sync errors and handle them like async errors + var written = wrappedMapper(data, inputs, next) + paused = (written === false) + return !paused + } catch (err) { + //if the callback has been called syncronously, and the error + //has occured in an listener, throw it again. + if(inNext) + throw err + next(err) + return !paused + } + } + + function end (data) { + //if end was called with args, write it, + ended = true //write will emit 'end' if ended is true + stream.writable = false + if(data !== undefined) { + return queueData(data, inputs) + } else if (inputs == outputs) { //wait for processing + stream.readable = false, stream.emit('end'), stream.destroy() + } + } + + stream.end = function (data) { + if(ended) return + end() + } + + stream.destroy = function () { + ended = destroyed = true + stream.writable = stream.readable = paused = false + process.nextTick(function () { + stream.emit('close') + }) + } + stream.pause = function () { + paused = true + } + + stream.resume = function () { + paused = false + } + + return stream +} + + + + diff --git a/node_modules/map-stream/package.json b/node_modules/map-stream/package.json new file mode 100644 index 0000000000000..cb6b7f3aa5298 --- /dev/null +++ b/node_modules/map-stream/package.json @@ -0,0 +1,24 @@ +{ + "name": "map-stream", + "version": "0.1.0", + "description": "construct pipes of streams of events", + "homepage": "http://github.com/dominictarr/map-stream", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/map-stream.git" + }, + "dependencies": { + }, + "devDependencies": { + "asynct": "*", + "it-is": "1", + "ubelt": "~2.9", + "stream-spec": "~0.2", + "event-stream": "~2.1", + "from": "0.0.2" + }, + "scripts": { + "test": "asynct test/" + }, + "author": "Dominic Tarr (http://dominictarr.com)" +} diff --git a/node_modules/map-stream/readme.markdown b/node_modules/map-stream/readme.markdown new file mode 100644 index 0000000000000..18971588d8309 --- /dev/null +++ b/node_modules/map-stream/readme.markdown @@ -0,0 +1,37 @@ +# MapStream + +Refactored out of [event-stream](https://github.com/dominictarr/event-stream) + +##map (asyncFunction[, options]) + +Create a through stream from an asyncronous function. + +``` js +var map = require('map-stream') + +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. + +##Options + + * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`) diff --git a/node_modules/map-stream/test/simple-map.asynct.js b/node_modules/map-stream/test/simple-map.asynct.js new file mode 100644 index 0000000000000..2b9a29223e18a --- /dev/null +++ b/node_modules/map-stream/test/simple-map.asynct.js @@ -0,0 +1,318 @@ +'use strict'; + +var map = require('../') + , it = require('it-is') + , u = require('ubelt') + , spec = require('stream-spec') + , from = require('from') + , Stream = require('stream') + , es = require('event-stream') + +//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 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 = 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 ['stream comes back in the correct order'] = function (test) { + var input = [3, 2, 1] + + var delayer = map(function(data, cb){ + setTimeout(function () { + cb(null, data) + }, 100 * data) + }) + + readStream(delayer, function (err, output) { + it(output).deepEqual(input) + test.done() + }) + + writeArray(input, delayer) +} + +exports ['continues on error event with failures `true`'] = function (test) { + var input = [1, 2, 3] + + var delayer = map(function(data, cb){ + cb(new Error('Something gone wrong'), data) + }, { failures: true }) + + readStream(delayer, function (err, output) { + it(output).deepEqual(input) + test.done() + }) + + writeArray(input, delayer) +} + +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 = map(dd), doubler2 = 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 = 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 failures with opts.failures === `ture`'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + map(function () { + throw err + }, { failures: true }) + + mapper.on('failure', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['emit error thrown'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + map(function () { + throw err + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['emit error calledback'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + 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 maps = map(function (data, callback) { + u.delay(callback)(null, 1) + return true + }) + + spec(maps).through().pausable().validateOnExit() + + maps.on('drain', function () { + it(false).ok('should not emit drain unless the stream is paused') + }) + + it(maps.write('hello')).equal(true) + it(maps.write('hello')).equal(true) + it(maps.write('hello')).equal(true) + setTimeout(function () {maps.end()},10) + maps.on('end', test.done) +} + +exports ['emits drain if paused, when all '] = function (test) { + var active = 0 + var drained = false + var maps = map(function (data, callback) { + active ++ + u.delay(function () { + active -- + callback(null, 1) + })() + console.log('WRITE', false) + return false + }) + + spec(maps).through().validateOnExit() + + maps.on('drain', function () { + drained = true + it(active).equal(0, 'should emit drain when all maps are done') + }) + + it(maps.write('hello')).equal(false) + it(maps.write('hello')).equal(false) + it(maps.write('hello')).equal(false) + + process.nextTick(function () {maps.end()},10) + + maps.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 = 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) + +} + + diff --git a/node_modules/map-visit/LICENSE b/node_modules/map-visit/LICENSE new file mode 100644 index 0000000000000..83b56e709c3e5 --- /dev/null +++ b/node_modules/map-visit/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/map-visit/README.md b/node_modules/map-visit/README.md new file mode 100644 index 0000000000000..5ab02d45071ae --- /dev/null +++ b/node_modules/map-visit/README.md @@ -0,0 +1,155 @@ +# map-visit [![NPM version](https://img.shields.io/npm/v/map-visit.svg?style=flat)](https://www.npmjs.com/package/map-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/map-visit.svg?style=flat)](https://npmjs.org/package/map-visit) [![NPM total downloads](https://img.shields.io/npm/dt/map-visit.svg?style=flat)](https://npmjs.org/package/map-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/map-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/map-visit) + +> Map `visit` over an array of objects. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save map-visit +``` + +## Usage + +```js +var mapVisit = require('map-visit'); +``` + +## What does this do? + +**Assign/Merge/Extend vs. Visit** + +Let's say you want to add a `set` method to your application that will: + +* set key-value pairs on a `data` object +* extend objects onto the `data` object +* extend arrays of objects onto the data object + +**Example using `extend`** + +Here is one way to accomplish this using Lo-Dash's `extend` (comparable to `Object.assign`): + +```js +var _ = require('lodash'); + +var obj = { + data: {}, + set: function (key, value) { + if (Array.isArray(key)) { + _.extend.apply(_, [obj.data].concat(key)); + } else if (typeof key === 'object') { + _.extend(obj.data, key); + } else { + obj.data[key] = value; + } + } +}; + +obj.set('a', 'a'); +obj.set([{b: 'b'}, {c: 'c'}]); +obj.set({d: {e: 'f'}}); + +console.log(obj.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }} +``` + +The above approach works fine for most use cases. However, **if you also want to emit an event** each time a property is added to the `data` object, or you want more control over what happens as the object is extended, a better approach would be to use `visit`. + +**Example using `visit`** + +In this approach: + +* when an array is passed to `set`, the `mapVisit` library calls the `set` method on each object in the array. +* when an object is passed, `visit` calls `set` on each property in the object. + +As a result, the `data` event will be emitted every time a property is added to `data` (events are just an example, you can use this approach to perform any necessary logic every time the method is called). + +```js +var mapVisit = require('map-visit'); +var visit = require('object-visit'); + +var obj = { + data: {}, + set: function (key, value) { + if (Array.isArray(key)) { + mapVisit(obj, 'set', key); + } else if (typeof key === 'object') { + visit(obj, 'set', key); + } else { + // simulate an event-emitter + console.log('emit', key, value); + obj.data[key] = value; + } + } +}; + +obj.set('a', 'a'); +obj.set([{b: 'b'}, {c: 'c'}]); +obj.set({d: {e: 'f'}}); +obj.set({g: 'h', i: 'j', k: 'l'}); + +console.log(obj.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }, g: 'h', i: 'j', k: 'l'} + +// events would look something like: +// emit a a +// emit b b +// emit c c +// emit d { e: 'f' } +// emit g h +// emit i j +// emit k l +``` + +## About + +### Related projects + +* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [object-visit](https://www.npmjs.com/package/object-visit): Call a specified method on each value in the given object. | [homepage](https://github.com/jonschlinkert/object-visit "Call a specified method on each value in the given object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 15 | [jonschlinkert](https://github.com/jonschlinkert) | +| 7 | [doowb](https://github.com/doowb) | + +### 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 09, 2017._ \ No newline at end of file diff --git a/node_modules/map-visit/index.js b/node_modules/map-visit/index.js new file mode 100644 index 0000000000000..bc54ccc4e631c --- /dev/null +++ b/node_modules/map-visit/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var util = require('util'); +var visit = require('object-visit'); + +/** + * Map `visit` over an array of objects. + * + * @param {Object} `collection` The context in which to invoke `method` + * @param {String} `method` Name of the method to call on `collection` + * @param {Object} `arr` Array of objects. + */ + +module.exports = function mapVisit(collection, method, val) { + if (isObject(val)) { + return visit.apply(null, arguments); + } + + if (!Array.isArray(val)) { + throw new TypeError('expected an array: ' + util.inspect(val)); + } + + var args = [].slice.call(arguments, 3); + + for (var i = 0; i < val.length; i++) { + var ele = val[i]; + if (isObject(ele)) { + visit.apply(null, [collection, method, ele].concat(args)); + } else { + collection[method].apply(collection, [ele].concat(args)); + } + } +}; + +function isObject(val) { + return val && (typeof val === 'function' || (!Array.isArray(val) && typeof val === 'object')); +} diff --git a/node_modules/map-visit/package.json b/node_modules/map-visit/package.json new file mode 100644 index 0000000000000..e8d0f41c65692 --- /dev/null +++ b/node_modules/map-visit/package.json @@ -0,0 +1,74 @@ +{ + "name": "map-visit", + "description": "Map `visit` over an array of objects.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/map-visit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/map-visit", + "bugs": { + "url": "https://github.com/jonschlinkert/map-visit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "object-visit": "^1.0.0" + }, + "devDependencies": { + "clone-deep": "^0.2.4", + "extend-shallow": "^2.0.1", + "gulp-format-md": "^0.1.12", + "lodash": "^4.17.4", + "mocha": "^3.2.0" + }, + "keywords": [ + "array", + "arrays", + "function", + "helper", + "invoke", + "key", + "map", + "method", + "object", + "objects", + "value", + "visit", + "visitor" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "collection-visit", + "object-visit" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/node_modules/math-random/.travis.yml b/node_modules/math-random/.travis.yml new file mode 100644 index 0000000000000..054c803eba7a9 --- /dev/null +++ b/node_modules/math-random/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "6" + - "4" + - "0.12" + - "0.10" diff --git a/node_modules/math-random/browser.js b/node_modules/math-random/browser.js new file mode 100644 index 0000000000000..479a5f6e23b72 --- /dev/null +++ b/node_modules/math-random/browser.js @@ -0,0 +1,17 @@ +module.exports = (function (global) { + var uint32 = 'Uint32Array' in global + var crypto = global.crypto || global.msCrypto + var rando = crypto && typeof crypto.getRandomValues === 'function' + var good = uint32 && rando + if (!good) return Math.random + + var arr = new Uint32Array(1) + var max = Math.pow(2, 32) + function random () { + crypto.getRandomValues(arr) + return arr[0] / max + } + + random.cryptographic = true + return random +})(typeof self !== 'undefined' ? self : window) diff --git a/node_modules/math-random/node.js b/node_modules/math-random/node.js new file mode 100644 index 0000000000000..0edf239c8b1f5 --- /dev/null +++ b/node_modules/math-random/node.js @@ -0,0 +1,13 @@ +var crypto = require('crypto') +var max = Math.pow(2, 32) + +module.exports = random +module.exports.cryptographic = true + +function random () { + var buf = crypto + .randomBytes(4) + .readUInt32BE(0) + + return buf / max +} diff --git a/node_modules/math-random/package.json b/node_modules/math-random/package.json new file mode 100644 index 0000000000000..09203a76d8530 --- /dev/null +++ b/node_modules/math-random/package.json @@ -0,0 +1,16 @@ +{ + "name": "math-random", + "author": "Michael Rhodes", + "version": "1.0.4", + "main": "node.js", + "browser": "browser.js", + "repository": "github:michaelrhodes/math-random", + "license": "MIT", + "scripts": { + "test": "dexy test.js" + }, + "devDependencies": { + "array-unique": "~0.2.1", + "dexy": "github:michaelrhodes/dexy#1.0.1" + } +} diff --git a/node_modules/math-random/readme.md b/node_modules/math-random/readme.md new file mode 100644 index 0000000000000..17beb70681964 --- /dev/null +++ b/node_modules/math-random/readme.md @@ -0,0 +1,26 @@ +# math-random + +math-random is an drop-in replacement for Math.random that uses cryptographically secure random number generation, where available. It works in both browser and node environments. + +[![Build status](https://travis-ci.org/michaelrhodes/math-random.svg?branch=master)](https://travis-ci.org/michaelrhodes/math-random) + +## Install + +```sh +npm install math-random +``` + +### Usage + +```js +var random = require('math-random') + +console.log(random()) +=> 0.584293719381094 + +console.log(random.cryptographic) +=> true || undefined +``` + +### License +[MIT](http://opensource.org/licenses/MIT) diff --git a/node_modules/math-random/test.js b/node_modules/math-random/test.js new file mode 100644 index 0000000000000..aaea5149708ca --- /dev/null +++ b/node_modules/math-random/test.js @@ -0,0 +1,21 @@ +var assert = console.assert +var unique = require('array-unique') +var random = require('./') + +var iterations = 10000 +var number, cache = [] + +for (var i = 0; i < iterations; i++) { + number = random() + if (number < 0) { + assert(false, 'Random numbers should be greater than or equal to zero') + break + } + if (number >= 1) { + assert(false, 'Random numbers should be less than one') + break + } + cache.push(number) +} + +assert(unique(cache).length === iterations, 'Random numbers should be unique') diff --git a/node_modules/micromatch/LICENSE b/node_modules/micromatch/LICENSE new file mode 100755 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/micromatch/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/micromatch/README.md b/node_modules/micromatch/README.md new file mode 100644 index 0000000000000..8fb391910c524 --- /dev/null +++ b/node_modules/micromatch/README.md @@ -0,0 +1,689 @@ +# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Build Status](https://img.shields.io/travis/jonschlinkert/micromatch.svg?style=flat)](https://travis-ci.org/jonschlinkert/micromatch) + +> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. + +Micromatch supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch). + +* [mm()](#usage) is the same as [multimatch()](https://github.com/sindresorhus/multimatch) +* [mm.match()](#match) is the same as [minimatch.match()](https://github.com/isaacs/minimatch) +* use [mm.isMatch()](#ismatch) instead of [minimatch()](https://github.com/isaacs/minimatch) + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save micromatch +``` + +## Start matching! + +```js +var mm = require('micromatch'); +console.log(mm([''])) +``` + +*** + +### Features + +* [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) +* Built-in support for multiple glob patterns, like `['foo/*.js', '!bar.js']` +* [Brace Expansion](https://github.com/jonschlinkert/braces) (`foo/bar-{1..5}.md`, `one/{two,three}/four.md`) +* Typical glob patterns, like `**/*`, `a/b/*.js`, or `['foo/*.js', '!bar.js']` +* Methods like `.isMatch()`, `.contains()` and `.any()` + +**Extended globbing features:** + +* Logical `OR` (`foo/bar/(abc|xyz).js`) +* Regex character classes (`foo/bar/baz-[1-5].js`) +* POSIX [bracket expressions](https://github.com/jonschlinkert/expand-brackets) (`**/[[:alpha:][:digit:]]/`) +* [extglobs](https://github.com/jonschlinkert/extglob) (`**/+(x|y)`, `!(a|b)`, etc). + +You can combine these to create whatever matching patterns you need. + +**Example** + +```js +// double-negation! +mm(['fa', 'fb', 'f', 'fo'], '!(f!(o))'); +//=> ['fo'] +``` + +## Why switch to micromatch? + +* Native support for multiple glob patterns, no need for wrappers like [multimatch](https://github.com/sindresorhus/multimatch) +* [10-55x faster](#benchmarks) and more performant than [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch). This is achieved through a combination of caching and regex optimization strategies, a fundamentally different approach than minimatch. +* More extensive support for the Bash 4.3 specification +* More complete extglob support +* Extensive [unit tests](./test) (approx. 1,300 tests). Minimatch fails many of the tests. + +### Switch from minimatch + +Use `mm.isMatch()` instead of `minimatch()`: + +```js +mm.isMatch('foo', 'b*'); +//=> false +``` + +Use `mm.match()` instead of `minimatch.match()`: + +```js +mm.match(['foo', 'bar'], 'b*'); +//=> 'bar' +``` + +### Switch from multimatch + +Same signature: + +```js +mm(['foo', 'bar', 'baz'], ['f*', '*z']); +//=> ['foo', 'baz'] +``` + +*** + +## Usage + +Add micromatch to your node.js project: + +```js +var mm = require('micromatch'); +``` + +**Signature** + +```js +mm(array_of_strings, glob_patterns[, options]); +``` + +**Example** + +```js +mm(['foo', 'bar', 'baz'], 'b*'); +//=> ['bar', 'baz'] +``` + +### Usage examples + +**Brace expansion** + +Match files with `.js` or `.txt` extensions. + +```js +mm(['a.js', 'b.md', 'c.txt'], '*.{js,txt}'); +//=> ['a.js', 'c.txt'] +``` + +**Extglobs** + +Match anything except for files with the `.md` extension. + +```js +mm(files, '**/*.!(md)'); + +//=> ['a.js', 'c.txt'] +``` + +**Multiple patterns** + +Match using an array of patterns. + +```js +mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.md', '*.txt']); +//=> ['a.md', 'c.txt'] +``` + +**Negation patterns:** + +Behavior is designed to be what users would expect, based on conventions that are already well-established. + +* [minimatch](https://github.com/isaacs/minimatch) behavior is used when the pattern is a string, so patterns are **inclusive by default**. +* [multimatch](https://github.com/sindresorhus/multimatch) behavior is used when an array of patterns is passed, so patterns are **exclusive by default**. + +```js +mm(['a.js', 'b.md', 'c.txt'], '!*.{js,txt}'); +//=> ['b.md'] + +mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.*', '!*.{js,txt}']); +//=> ['a.md', 'd.json'] +``` + +*** + +## API methods + +```js +var mm = require('micromatch'); +``` + +### .match + +```js +mm.match(array, globString); +``` + +Return an array of files that match the given glob pattern. Useful if you only need to use a single glob pattern. + +**Example** + +```js +mm.match(['ab', 'a/b', 'bb', 'b/c'], '?b'); +//=> ['ab', 'bb'] + +mm.match(['ab', 'a/b', 'bb', 'b/c'], '*/b'); +//=> ['a/b'] +``` + +### .isMatch + +```js +mm.isMatch(filepath, globString); +``` + +Returns true if a file path matches the given glob pattern. + +**Example** + +```js +mm.isMatch('.verb.md', '*.md'); +//=> false + +mm.isMatch('.verb.md', '*.md', {dot: true}); +//=> true +``` + +### .contains + +Returns true if any part of a file path matches the given glob pattern. Think of this is "has path" versus "is path". + +**Example** + +`.isMatch()` would return false for both of the following: + +```js +mm.contains('a/b/c', 'a/b'); +//=> true + +mm.contains('a/b/c', 'a/*'); +//=> true +``` + +### .matcher + +Returns a function for matching using the supplied pattern. e.g. create your own "matcher". The advantage of this method is that the pattern can be compiled outside of a loop. + +**Pattern** + +Can be any of the following: + +* `glob/string` +* `regex` +* `function` + +**Example** + +```js +var isMatch = mm.matcher('*.md'); +var files = []; + +['a.md', 'b.txt', 'c.md'].forEach(function(fp) { + if (isMatch(fp)) { + files.push(fp); + } +}); +``` + +### .filter + +Returns a function that can be passed to `Array#filter()`. + +**Params** + +* `patterns` **{String|Array}**: + +**Examples** + +Single glob: + +```js +var fn = mm.filter('*.md'); +['a.js', 'b.txt', 'c.md'].filter(fn); +//=> ['c.md'] + +var fn = mm.filter('[a-c]'); +['a', 'b', 'c', 'd', 'e'].filter(fn); +//=> ['a', 'b', 'c'] +``` + +Array of glob patterns: + +```js +var arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; + +var fn = mm.filter(['{1..10}', '![7-9]', '!{3..4}']); +arr.filter(fn); +//=> [1, 2, 5, 6, 10] +``` + +_(Internally this function generates the matching function by using the [matcher](#matcher) method. You can use the [matcher](#matcher) method directly to create your own filter function)_ + +### .any + +Returns true if a file path matches any of the given patterns. + +```js +mm.any(filepath, patterns, options); +``` + +**Params** + +* filepath `{String}`: The file path to test. +* patterns `{String|Array}`: One or more glob patterns +* options: `{Object}`: options to pass to the `.matcher()` method. + +**Example** + +```js +mm.any('abc', ['!*z']); +//=> true +mm.any('abc', ['a*', 'z*']); +//=> true +mm.any('abc', 'a*'); +//=> true +mm.any('abc', ['z*']); +//=> false +``` + +### .expand + +Returns an object with a regex-compatible string and tokens. + +```js +mm.expand('*.js'); + +// when `track` is enabled (for debugging), the `history` array is used +// to record each mutation to the glob pattern as it's converted to regex +{ options: { track: false, dot: undefined, makeRe: true, negated: false }, + pattern: '(.*\\/|^)bar\\/(?:(?!(?:^|\\/)\\.).)*?', + history: [], + tokens: + { path: + { whole: '**/bar/**', + dirname: '**/bar/', + filename: '**', + basename: '**', + extname: '', + ext: '' }, + is: + { glob: true, + negated: false, + globstar: true, + dotfile: false, + dotdir: false }, + match: {}, + original: '**/bar/**', + pattern: '**/bar/**', + base: '' } } +``` + +### .makeRe + +Create a regular expression for matching file paths based on the given pattern: + +```js +mm.makeRe('*.js'); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +## Options + +### options.unixify + +Normalize slashes in file paths and glob patterns to forward slashes. + +Type: `{Boolean}` + +Default: `undefined` on non-windows, `true` on windows. + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.unescape + +Unescape slashes in glob patterns. Use cautiously, especially on windows. + +Type: `{Boolean}` + +Default: `undefined` + +**Example** + +```js +mm.isMatch('abc', '\\a\\b\\c', {unescape: true}); +//=> true +``` + +### options.nodupes + +Remove duplicate elements from the result array. + +Type: `{Boolean}` + +Default: `undefined` + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true}); +//=> ['abc', 'abc'] + +mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true, nodupes: true}); +//=> ['abc'] +``` + +### options.matchBase + +Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +**Example** + +```js +mm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +### options.nobraces + +Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) `nobrace`. + +Type: `{Boolean}` + +Default: `undefined` + +See [braces](https://github.com/jonschlinkert/braces) for more information about extended brace expansion. + +### options.nobrackets + +Don't expand POSIX bracket expressions. + +Type: `{Boolean}` + +Default: `undefined` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions. + +### options.noextglob + +Don't expand extended globs. + +Type: `{Boolean}` + +Default: `undefined` + +See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs. + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.nonegate + +Disallow negation (`!`) patterns. + +Type: `{Boolean}` + +Default: `false` + +### options.nonull + +If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.cache + +Cache the platform (e.g. `win32`) to prevent this from being looked up for every filepath. + +Type: `{Boolean}` + +Default: `true` + +*** + +## Other features + +Micromatch also supports the following. + +### Extended globbing + +#### extglobs + +Extended globbing, as described by the bash man page: + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern-list)` | `(... | ...)?` | Matches zero or one occurrence of the given patterns | +| `*(pattern-list)` | `(... | ...)*` | Matches zero or more occurrences of the given patterns | +| `+(pattern-list)` | `(... | ...)+` | Matches one or more occurrences of the given patterns | +| `@(pattern-list)` | `(... | ...)` * | Matches one of the given patterns | +| `!(pattern-list)` | N/A | Matches anything except one of the given patterns | + +* `@` isn't a RegEx character. + +Powered by [extglob](https://github.com/jonschlinkert/extglob). Visit that library for the full range of options or to report extglob related issues. + +See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs. + +#### brace expansion + +In simple cases, brace expansion appears to work the same way as the logical `OR` operator. For example, `(a|b)` will achieve the same result as `{a,b}`. + +Here are some powerful features unique to brace expansion (versus character classes): + +* range expansion: `a{1..3}b/*.js` expands to: `['a1b/*.js', 'a2b/*.js', 'a3b/*.js']` +* nesting: `a{c,{d,e}}b/*.js` expands to: `['acb/*.js', 'adb/*.js', 'aeb/*.js']` + +Visit [braces](https://github.com/jonschlinkert/braces) to ask questions and create an issue related to brace-expansion, or to see the full range of features and options related to brace expansion. + +#### regex character classes + +With the exception of brace expansion (`{a,b}`, `{1..5}`, etc), most of the special characters convert directly to regex, so you can expect them to follow the same rules and produce the same results as regex. + +For example, given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` + +Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). + +#### regex groups + +Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` +* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` +* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` + +As with regex, parenthese can be nested, so patterns like `((a|b)|c)/b` will work. But it might be easier to achieve your goal using brace expansion. + +#### POSIX bracket expressions + +**Example** + +```js +mm.isMatch('a1', '[[:alpha:][:digit:]]'); +//=> true +``` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions. + +*** + +## Notes + +Whenever possible parsing behavior for patterns is based on globbing specifications in Bash 4.3. Patterns that aren't described by Bash follow wildmatch spec (used by git). + +## Benchmarks + +Run the [benchmarks](./benchmark): + +```bash +node benchmark +``` + +As of July 15, 2016: + +```bash +#1: basename-braces + micromatch x 26,420 ops/sec ±0.89% (91 runs sampled) + minimatch x 3,507 ops/sec ±0.64% (97 runs sampled) + +#2: basename + micromatch x 25,315 ops/sec ±0.82% (93 runs sampled) + minimatch x 4,398 ops/sec ±0.86% (94 runs sampled) + +#3: braces-no-glob + micromatch x 341,254 ops/sec ±0.78% (93 runs sampled) + minimatch x 30,197 ops/sec ±1.12% (91 runs sampled) + +#4: braces + micromatch x 54,649 ops/sec ±0.74% (94 runs sampled) + minimatch x 3,095 ops/sec ±0.82% (95 runs sampled) + +#5: immediate + micromatch x 16,719 ops/sec ±0.79% (95 runs sampled) + minimatch x 4,348 ops/sec ±0.86% (96 runs sampled) + +#6: large + micromatch x 721 ops/sec ±0.77% (94 runs sampled) + minimatch x 17.73 ops/sec ±1.08% (50 runs sampled) + +#7: long + micromatch x 5,051 ops/sec ±0.87% (97 runs sampled) + minimatch x 628 ops/sec ±0.83% (94 runs sampled) + +#8: mid + micromatch x 51,280 ops/sec ±0.80% (95 runs sampled) + minimatch x 1,923 ops/sec ±0.84% (95 runs sampled) + +#9: multi-patterns + micromatch x 22,440 ops/sec ±0.97% (94 runs sampled) + minimatch x 2,481 ops/sec ±1.10% (94 runs sampled) + +#10: no-glob + micromatch x 722,823 ops/sec ±1.30% (87 runs sampled) + minimatch x 52,967 ops/sec ±1.09% (94 runs sampled) + +#11: range + micromatch x 243,471 ops/sec ±0.79% (94 runs sampled) + minimatch x 11,736 ops/sec ±0.82% (96 runs sampled) + +#12: shallow + micromatch x 190,874 ops/sec ±0.98% (95 runs sampled) + minimatch x 21,699 ops/sec ±0.81% (97 runs sampled) + +#13: short + micromatch x 496,393 ops/sec ±3.86% (90 runs sampled) + minimatch x 53,765 ops/sec ±0.75% (95 runs sampled) +``` + +## Tests + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Coverage + +As of July 15, 2016: + +```sh +Statements : 100% (441/441) +Branches : 100% (270/270) +Functions : 100% (54/54) +Lines : 100% (429/429) +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please be sure to run the benchmarks before/after any code changes to judge the impact before you do a PR. thanks! + +## Related + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.") +* [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. 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.") +* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier 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 multiplier to use.") +* [gulp-micromatch](https://www.npmjs.com/package/gulp-micromatch): Filter vinyl files with glob patterns, string, regexp, array, object or matcher function. micromatch stream. | [homepage](https://github.com/tunnckocore/gulp-micromatch#readme "Filter vinyl files with glob patterns, string, regexp, array, object or matcher function. micromatch stream.") +* [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") +* [parse-glob](https://www.npmjs.com/package/parse-glob): Parse a glob pattern into an object of tokens. | [homepage](https://github.com/jonschlinkert/parse-glob "Parse a glob pattern into an object of tokens.") + +## 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/micromatch/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 15, 2016._ \ No newline at end of file diff --git a/node_modules/micromatch/index.js b/node_modules/micromatch/index.js new file mode 100755 index 0000000000000..f898ec176ba47 --- /dev/null +++ b/node_modules/micromatch/index.js @@ -0,0 +1,431 @@ +/*! + * micromatch + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var expand = require('./lib/expand'); +var utils = require('./lib/utils'); + +/** + * The main function. Pass an array of filepaths, + * and a string or array of glob patterns + * + * @param {Array|String} `files` + * @param {Array|String} `patterns` + * @param {Object} `opts` + * @return {Array} Array of matches + */ + +function micromatch(files, patterns, opts) { + if (!files || !patterns) return []; + opts = opts || {}; + + if (typeof opts.cache === 'undefined') { + opts.cache = true; + } + + if (!Array.isArray(patterns)) { + return match(files, patterns, opts); + } + + var len = patterns.length, i = 0; + var omit = [], keep = []; + + while (len--) { + var glob = patterns[i++]; + if (typeof glob === 'string' && glob.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, match(files, glob.slice(1), opts)); + } else { + keep.push.apply(keep, match(files, glob, opts)); + } + } + return utils.diff(keep, omit); +} + +/** + * Return an array of files that match the given glob pattern. + * + * This function is called by the main `micromatch` function If you only + * need to pass a single pattern you might get very minor speed improvements + * using this function. + * + * @param {Array} `files` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Array} + */ + +function match(files, pattern, opts) { + if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) { + throw new Error(msg('match', 'files', 'a string or array')); + } + + files = utils.arrayify(files); + opts = opts || {}; + + var negate = opts.negate || false; + var orig = pattern; + + if (typeof pattern === 'string') { + negate = pattern.charAt(0) === '!'; + if (negate) { + pattern = pattern.slice(1); + } + + // we need to remove the character regardless, + // so the above logic is still needed + if (opts.nonegate === true) { + negate = false; + } + } + + var _isMatch = matcher(pattern, opts); + var len = files.length, i = 0; + var res = []; + + while (i < len) { + var file = files[i++]; + var fp = utils.unixify(file, opts); + + if (!_isMatch(fp)) { continue; } + res.push(fp); + } + + if (res.length === 0) { + if (opts.failglob === true) { + throw new Error('micromatch.match() found no matches for: "' + orig + '".'); + } + + if (opts.nonull || opts.nullglob) { + res.push(utils.unescapeGlob(orig)); + } + } + + // if `negate` was defined, diff negated files + if (negate) { res = utils.diff(files, res); } + + // if `ignore` was defined, diff ignored filed + if (opts.ignore && opts.ignore.length) { + pattern = opts.ignore; + opts = utils.omit(opts, ['ignore']); + res = utils.diff(res, micromatch(res, pattern, opts)); + } + + if (opts.nodupes) { + return utils.unique(res); + } + return res; +} + +/** + * Returns a function that takes a glob pattern or array of glob patterns + * to be used with `Array#filter()`. (Internally this function generates + * the matching function using the [matcher] method). + * + * ```js + * var fn = mm.filter('[a-c]'); + * ['a', 'b', 'c', 'd', 'e'].filter(fn); + * //=> ['a', 'b', 'c'] + * ``` + * @param {String|Array} `patterns` Can be a glob or array of globs. + * @param {Options} `opts` Options to pass to the [matcher] method. + * @return {Function} Filter function to be passed to `Array#filter()`. + */ + +function filter(patterns, opts) { + if (!Array.isArray(patterns) && typeof patterns !== 'string') { + throw new TypeError(msg('filter', 'patterns', 'a string or array')); + } + + patterns = utils.arrayify(patterns); + var len = patterns.length, i = 0; + var patternMatchers = Array(len); + while (i < len) { + patternMatchers[i] = matcher(patterns[i++], opts); + } + + return function(fp) { + if (fp == null) return []; + var len = patternMatchers.length, i = 0; + var res = true; + + fp = utils.unixify(fp, opts); + while (i < len) { + var fn = patternMatchers[i++]; + if (!fn(fp)) { + res = false; + break; + } + } + return res; + }; +} + +/** + * Returns true if the filepath contains the given + * pattern. Can also return a function for matching. + * + * ```js + * isMatch('foo.md', '*.md', {}); + * //=> true + * + * isMatch('*.md', {})('foo.md') + * //=> true + * ``` + * @param {String} `fp` + * @param {String} `pattern` + * @param {Object} `opts` + * @return {Boolean} + */ + +function isMatch(fp, pattern, opts) { + if (typeof fp !== 'string') { + throw new TypeError(msg('isMatch', 'filepath', 'a string')); + } + + fp = utils.unixify(fp, opts); + if (utils.typeOf(pattern) === 'object') { + return matcher(fp, pattern); + } + return matcher(pattern, opts)(fp); +} + +/** + * Returns true if the filepath matches the + * given pattern. + */ + +function contains(fp, pattern, opts) { + if (typeof fp !== 'string') { + throw new TypeError(msg('contains', 'pattern', 'a string')); + } + + opts = opts || {}; + opts.contains = (pattern !== ''); + fp = utils.unixify(fp, opts); + + if (opts.contains && !utils.isGlob(pattern)) { + return fp.indexOf(pattern) !== -1; + } + return matcher(pattern, opts)(fp); +} + +/** + * Returns true if a file path matches any of the + * given patterns. + * + * @param {String} `fp` The filepath to test. + * @param {String|Array} `patterns` Glob patterns to use. + * @param {Object} `opts` Options to pass to the `matcher()` function. + * @return {String} + */ + +function any(fp, patterns, opts) { + if (!Array.isArray(patterns) && typeof patterns !== 'string') { + throw new TypeError(msg('any', 'patterns', 'a string or array')); + } + + patterns = utils.arrayify(patterns); + var len = patterns.length; + + fp = utils.unixify(fp, opts); + while (len--) { + var isMatch = matcher(patterns[len], opts); + if (isMatch(fp)) { + return true; + } + } + return false; +} + +/** + * Filter the keys of an object with the given `glob` pattern + * and `options` + * + * @param {Object} `object` + * @param {Pattern} `object` + * @return {Array} + */ + +function matchKeys(obj, glob, options) { + if (utils.typeOf(obj) !== 'object') { + throw new TypeError(msg('matchKeys', 'first argument', 'an object')); + } + + var fn = matcher(glob, options); + var res = {}; + + for (var key in obj) { + if (obj.hasOwnProperty(key) && fn(key)) { + res[key] = obj[key]; + } + } + return res; +} + +/** + * Return a function for matching based on the + * given `pattern` and `options`. + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {Function} + */ + +function matcher(pattern, opts) { + // pattern is a function + if (typeof pattern === 'function') { + return pattern; + } + // pattern is a regex + if (pattern instanceof RegExp) { + return function(fp) { + return pattern.test(fp); + }; + } + + if (typeof pattern !== 'string') { + throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function')); + } + + // strings, all the way down... + pattern = utils.unixify(pattern, opts); + + // pattern is a non-glob string + if (!utils.isGlob(pattern)) { + return utils.matchPath(pattern, opts); + } + // pattern is a glob string + var re = makeRe(pattern, opts); + + // `matchBase` is defined + if (opts && opts.matchBase) { + return utils.hasFilename(re, opts); + } + // `matchBase` is not defined + return function(fp) { + fp = utils.unixify(fp, opts); + return re.test(fp); + }; +} + +/** + * Create and cache a regular expression for matching + * file paths. + * + * If the leading character in the `glob` is `!`, a negation + * regex is returned. + * + * @param {String} `glob` + * @param {Object} `options` + * @return {RegExp} + */ + +function toRegex(glob, options) { + // clone options to prevent mutating the original object + var opts = Object.create(options || {}); + var flags = opts.flags || ''; + if (opts.nocase && flags.indexOf('i') === -1) { + flags += 'i'; + } + + var parsed = expand(glob, opts); + + // pass in tokens to avoid parsing more than once + opts.negated = opts.negated || parsed.negated; + opts.negate = opts.negated; + glob = wrapGlob(parsed.pattern, opts); + var re; + + try { + re = new RegExp(glob, flags); + return re; + } catch (err) { + err.reason = 'micromatch invalid regex: (' + re + ')'; + if (opts.strict) throw new SyntaxError(err); + } + + // we're only here if a bad pattern was used and the user + // passed `options.silent`, so match nothing + return /$^/; +} + +/** + * Create the regex to do the matching. If the leading + * character in the `glob` is `!` a negation regex is returned. + * + * @param {String} `glob` + * @param {Boolean} `negate` + */ + +function wrapGlob(glob, opts) { + var prefix = (opts && !opts.contains) ? '^' : ''; + var after = (opts && !opts.contains) ? '$' : ''; + glob = ('(?:' + glob + ')' + after); + if (opts && opts.negate) { + return prefix + ('(?!^' + glob + ').*$'); + } + return prefix + glob; +} + +/** + * Create and cache a regular expression for matching file paths. + * If the leading character in the `glob` is `!`, a negation + * regex is returned. + * + * @param {String} `glob` + * @param {Object} `options` + * @return {RegExp} + */ + +function makeRe(glob, opts) { + if (utils.typeOf(glob) !== 'string') { + throw new Error(msg('makeRe', 'glob', 'a string')); + } + return utils.cache(toRegex, glob, opts); +} + +/** + * Make error messages consistent. Follows this format: + * + * ```js + * msg(methodName, argNumber, nativeType); + * // example: + * msg('matchKeys', 'first', 'an object'); + * ``` + * + * @param {String} `method` + * @param {String} `num` + * @param {String} `type` + * @return {String} + */ + +function msg(method, what, type) { + return 'micromatch.' + method + '(): ' + what + ' should be ' + type + '.'; +} + +/** + * Public methods + */ + +/* eslint no-multi-spaces: 0 */ +micromatch.any = any; +micromatch.braces = micromatch.braceExpand = utils.braces; +micromatch.contains = contains; +micromatch.expand = expand; +micromatch.filter = filter; +micromatch.isMatch = isMatch; +micromatch.makeRe = makeRe; +micromatch.match = match; +micromatch.matcher = matcher; +micromatch.matchKeys = matchKeys; + +/** + * Expose `micromatch` + */ + +module.exports = micromatch; diff --git a/node_modules/micromatch/lib/chars.js b/node_modules/micromatch/lib/chars.js new file mode 100644 index 0000000000000..a1ffe371418ab --- /dev/null +++ b/node_modules/micromatch/lib/chars.js @@ -0,0 +1,67 @@ +'use strict'; + +var chars = {}, unesc, temp; + +function reverse(object, prepender) { + return Object.keys(object).reduce(function(reversed, key) { + var newKey = prepender ? prepender + key : key; // Optionally prepend a string to key. + reversed[object[key]] = newKey; // Swap key and value. + return reversed; // Return the result. + }, {}); +} + +/** + * Regex for common characters + */ + +chars.escapeRegex = { + '?': /\?/g, + '@': /\@/g, + '!': /\!/g, + '+': /\+/g, + '*': /\*/g, + '(': /\(/g, + ')': /\)/g, + '[': /\[/g, + ']': /\]/g +}; + +/** + * Escape characters + */ + +chars.ESC = { + '?': '__UNESC_QMRK__', + '@': '__UNESC_AMPE__', + '!': '__UNESC_EXCL__', + '+': '__UNESC_PLUS__', + '*': '__UNESC_STAR__', + ',': '__UNESC_COMMA__', + '(': '__UNESC_LTPAREN__', + ')': '__UNESC_RTPAREN__', + '[': '__UNESC_LTBRACK__', + ']': '__UNESC_RTBRACK__' +}; + +/** + * Unescape characters + */ + +chars.UNESC = unesc || (unesc = reverse(chars.ESC, '\\')); + +chars.ESC_TEMP = { + '?': '__TEMP_QMRK__', + '@': '__TEMP_AMPE__', + '!': '__TEMP_EXCL__', + '*': '__TEMP_STAR__', + '+': '__TEMP_PLUS__', + ',': '__TEMP_COMMA__', + '(': '__TEMP_LTPAREN__', + ')': '__TEMP_RTPAREN__', + '[': '__TEMP_LTBRACK__', + ']': '__TEMP_RTBRACK__' +}; + +chars.TEMP = temp || (temp = reverse(chars.ESC_TEMP)); + +module.exports = chars; diff --git a/node_modules/micromatch/lib/expand.js b/node_modules/micromatch/lib/expand.js new file mode 100644 index 0000000000000..e99b081eb5630 --- /dev/null +++ b/node_modules/micromatch/lib/expand.js @@ -0,0 +1,304 @@ +/*! + * micromatch + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var utils = require('./utils'); +var Glob = require('./glob'); + +/** + * Expose `expand` + */ + +module.exports = expand; + +/** + * Expand a glob pattern to resolve braces and + * similar patterns before converting to regex. + * + * @param {String|Array} `pattern` + * @param {Array} `files` + * @param {Options} `opts` + * @return {Array} + */ + +function expand(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('micromatch.expand(): argument should be a string.'); + } + + var glob = new Glob(pattern, options || {}); + var opts = glob.options; + + if (!utils.isGlob(pattern)) { + glob.pattern = glob.pattern.replace(/([\/.])/g, '\\$1'); + return glob; + } + + glob.pattern = glob.pattern.replace(/(\+)(?!\()/g, '\\$1'); + glob.pattern = glob.pattern.split('$').join('\\$'); + + if (typeof opts.braces !== 'boolean' && typeof opts.nobraces !== 'boolean') { + opts.braces = true; + } + + if (glob.pattern === '.*') { + return { + pattern: '\\.' + star, + tokens: tok, + options: opts + }; + } + + if (glob.pattern === '*') { + return { + pattern: oneStar(opts.dot), + tokens: tok, + options: opts + }; + } + + // parse the glob pattern into tokens + glob.parse(); + var tok = glob.tokens; + tok.is.negated = opts.negated; + + // dotfile handling + if ((opts.dotfiles === true || tok.is.dotfile) && opts.dot !== false) { + opts.dotfiles = true; + opts.dot = true; + } + + if ((opts.dotdirs === true || tok.is.dotdir) && opts.dot !== false) { + opts.dotdirs = true; + opts.dot = true; + } + + // check for braces with a dotfile pattern + if (/[{,]\./.test(glob.pattern)) { + opts.makeRe = false; + opts.dot = true; + } + + if (opts.nonegate !== true) { + opts.negated = glob.negated; + } + + // if the leading character is a dot or a slash, escape it + if (glob.pattern.charAt(0) === '.' && glob.pattern.charAt(1) !== '/') { + glob.pattern = '\\' + glob.pattern; + } + + /** + * Extended globs + */ + + // expand braces, e.g `{1..5}` + glob.track('before braces'); + if (tok.is.braces) { + glob.braces(); + } + glob.track('after braces'); + + // expand extglobs, e.g `foo/!(a|b)` + glob.track('before extglob'); + if (tok.is.extglob) { + glob.extglob(); + } + glob.track('after extglob'); + + // expand brackets, e.g `[[:alpha:]]` + glob.track('before brackets'); + if (tok.is.brackets) { + glob.brackets(); + } + glob.track('after brackets'); + + // special patterns + glob._replace('[!', '[^'); + glob._replace('(?', '(%~'); + glob._replace(/\[\]/, '\\[\\]'); + glob._replace('/[', '/' + (opts.dot ? dotfiles : nodot) + '[', true); + glob._replace('/?', '/' + (opts.dot ? dotfiles : nodot) + '[^/]', true); + glob._replace('/.', '/(?=.)\\.', true); + + // windows drives + glob._replace(/^(\w):([\\\/]+?)/gi, '(?=.)$1:$2', true); + + // negate slashes in exclusion ranges + if (glob.pattern.indexOf('[^') !== -1) { + glob.pattern = negateSlash(glob.pattern); + } + + if (opts.globstar !== false && glob.pattern === '**') { + glob.pattern = globstar(opts.dot); + + } else { + glob.pattern = balance(glob.pattern, '[', ']'); + glob.escape(glob.pattern); + + // if the pattern has `**` + if (tok.is.globstar) { + glob.pattern = collapse(glob.pattern, '/**'); + glob.pattern = collapse(glob.pattern, '**/'); + glob._replace('/**/', '(?:/' + globstar(opts.dot) + '/|/)', true); + glob._replace(/\*{2,}/g, '**'); + + // 'foo/*' + glob._replace(/(\w+)\*(?!\/)/g, '$1[^/]*?', true); + glob._replace(/\*\*\/\*(\w)/g, globstar(opts.dot) + '\\/' + (opts.dot ? dotfiles : nodot) + '[^/]*?$1', true); + + if (opts.dot !== true) { + glob._replace(/\*\*\/(.)/g, '(?:**\\/|)$1'); + } + + // 'foo/**' or '{**,*}', but not 'foo**' + if (tok.path.dirname !== '' || /,\*\*|\*\*,/.test(glob.orig)) { + glob._replace('**', globstar(opts.dot), true); + } + } + + // ends with /* + glob._replace(/\/\*$/, '\\/' + oneStar(opts.dot), true); + // ends with *, no slashes + glob._replace(/(?!\/)\*$/, star, true); + // has 'n*.' (partial wildcard w/ file extension) + glob._replace(/([^\/]+)\*/, '$1' + oneStar(true), true); + // has '*' + glob._replace('*', oneStar(opts.dot), true); + glob._replace('?.', '?\\.', true); + glob._replace('?:', '?:', true); + + glob._replace(/\?+/g, function(match) { + var len = match.length; + if (len === 1) { + return qmark; + } + return qmark + '{' + len + '}'; + }); + + // escape '.abc' => '\\.abc' + glob._replace(/\.([*\w]+)/g, '\\.$1'); + // fix '[^\\\\/]' + glob._replace(/\[\^[\\\/]+\]/g, qmark); + // '///' => '\/' + glob._replace(/\/+/g, '\\/'); + // '\\\\\\' => '\\' + glob._replace(/\\{2,}/g, '\\'); + } + + // unescape previously escaped patterns + glob.unescape(glob.pattern); + glob._replace('__UNESC_STAR__', '*'); + + // escape dots that follow qmarks + glob._replace('?.', '?\\.'); + + // remove unnecessary slashes in character classes + glob._replace('[^\\/]', qmark); + + if (glob.pattern.length > 1) { + if (/^[\[?*]/.test(glob.pattern)) { + // only prepend the string if we don't want to match dotfiles + glob.pattern = (opts.dot ? dotfiles : nodot) + glob.pattern; + } + } + + return glob; +} + +/** + * Collapse repeated character sequences. + * + * ```js + * collapse('a/../../../b', '../'); + * //=> 'a/../b' + * ``` + * + * @param {String} `str` + * @param {String} `ch` Character sequence to collapse + * @return {String} + */ + +function collapse(str, ch) { + var res = str.split(ch); + var isFirst = res[0] === ''; + var isLast = res[res.length - 1] === ''; + res = res.filter(Boolean); + if (isFirst) res.unshift(''); + if (isLast) res.push(''); + return res.join(ch); +} + +/** + * Negate slashes in exclusion ranges, per glob spec: + * + * ```js + * negateSlash('[^foo]'); + * //=> '[^\\/foo]' + * ``` + * + * @param {String} `str` glob pattern + * @return {String} + */ + +function negateSlash(str) { + return str.replace(/\[\^([^\]]*?)\]/g, function(match, inner) { + if (inner.indexOf('/') === -1) { + inner = '\\/' + inner; + } + return '[^' + inner + ']'; + }); +} + +/** + * Escape imbalanced braces/bracket. This is a very + * basic, naive implementation that only does enough + * to serve the purpose. + */ + +function balance(str, a, b) { + var aarr = str.split(a); + var alen = aarr.join('').length; + var blen = str.split(b).join('').length; + + if (alen !== blen) { + str = aarr.join('\\' + a); + return str.split(b).join('\\' + b); + } + return str; +} + +/** + * Special patterns to be converted to regex. + * Heuristics are used to simplify patterns + * and speed up processing. + */ + +/* eslint no-multi-spaces: 0 */ +var qmark = '[^/]'; +var star = qmark + '*?'; +var nodot = '(?!\\.)(?=.)'; +var dotfileGlob = '(?:\\/|^)\\.{1,2}($|\\/)'; +var dotfiles = '(?!' + dotfileGlob + ')(?=.)'; +var twoStarDot = '(?:(?!' + dotfileGlob + ').)*?'; + +/** + * Create a regex for `*`. + * + * If `dot` is true, or the pattern does not begin with + * a leading star, then return the simpler regex. + */ + +function oneStar(dotfile) { + return dotfile ? '(?!' + dotfileGlob + ')(?=.)' + star : (nodot + star); +} + +function globstar(dotfile) { + if (dotfile) { return twoStarDot; } + return '(?:(?!(?:\\/|^)\\.).)*?'; +} diff --git a/node_modules/micromatch/lib/glob.js b/node_modules/micromatch/lib/glob.js new file mode 100644 index 0000000000000..c613326736c1d --- /dev/null +++ b/node_modules/micromatch/lib/glob.js @@ -0,0 +1,193 @@ +'use strict'; + +var chars = require('./chars'); +var utils = require('./utils'); + +/** + * Expose `Glob` + */ + +var Glob = module.exports = function Glob(pattern, options) { + if (!(this instanceof Glob)) { + return new Glob(pattern, options); + } + this.options = options || {}; + this.pattern = pattern; + this.history = []; + this.tokens = {}; + this.init(pattern); +}; + +/** + * Initialize defaults + */ + +Glob.prototype.init = function(pattern) { + this.orig = pattern; + this.negated = this.isNegated(); + this.options.track = this.options.track || false; + this.options.makeRe = true; +}; + +/** + * Push a change into `glob.history`. Useful + * for debugging. + */ + +Glob.prototype.track = function(msg) { + if (this.options.track) { + this.history.push({msg: msg, pattern: this.pattern}); + } +}; + +/** + * Return true if `glob.pattern` was negated + * with `!`, also remove the `!` from the pattern. + * + * @return {Boolean} + */ + +Glob.prototype.isNegated = function() { + if (this.pattern.charCodeAt(0) === 33 /* '!' */) { + this.pattern = this.pattern.slice(1); + return true; + } + return false; +}; + +/** + * Expand braces in the given glob pattern. + * + * We only need to use the [braces] lib when + * patterns are nested. + */ + +Glob.prototype.braces = function() { + if (this.options.nobraces !== true && this.options.nobrace !== true) { + // naive/fast check for imbalanced characters + var a = this.pattern.match(/[\{\(\[]/g); + var b = this.pattern.match(/[\}\)\]]/g); + + // if imbalanced, don't optimize the pattern + if (a && b && (a.length !== b.length)) { + this.options.makeRe = false; + } + + // expand brace patterns and join the resulting array + var expanded = utils.braces(this.pattern, this.options); + this.pattern = expanded.join('|'); + } +}; + +/** + * Expand bracket expressions in `glob.pattern` + */ + +Glob.prototype.brackets = function() { + if (this.options.nobrackets !== true) { + this.pattern = utils.brackets(this.pattern); + } +}; + +/** + * Expand bracket expressions in `glob.pattern` + */ + +Glob.prototype.extglob = function() { + if (this.options.noextglob === true) return; + + if (utils.isExtglob(this.pattern)) { + this.pattern = utils.extglob(this.pattern, {escape: true}); + } +}; + +/** + * Parse the given pattern + */ + +Glob.prototype.parse = function(pattern) { + this.tokens = utils.parseGlob(pattern || this.pattern, true); + return this.tokens; +}; + +/** + * Replace `a` with `b`. Also tracks the change before and + * after each replacement. This is disabled by default, but + * can be enabled by setting `options.track` to true. + * + * Also, when the pattern is a string, `.split()` is used, + * because it's much faster than replace. + * + * @param {RegExp|String} `a` + * @param {String} `b` + * @param {Boolean} `escape` When `true`, escapes `*` and `?` in the replacement. + * @return {String} + */ + +Glob.prototype._replace = function(a, b, escape) { + this.track('before (find): "' + a + '" (replace with): "' + b + '"'); + if (escape) b = esc(b); + if (a && b && typeof a === 'string') { + this.pattern = this.pattern.split(a).join(b); + } else { + this.pattern = this.pattern.replace(a, b); + } + this.track('after'); +}; + +/** + * Escape special characters in the given string. + * + * @param {String} `str` Glob pattern + * @return {String} + */ + +Glob.prototype.escape = function(str) { + this.track('before escape: '); + var re = /["\\](['"]?[^"'\\]['"]?)/g; + + this.pattern = str.replace(re, function($0, $1) { + var o = chars.ESC; + var ch = o && o[$1]; + if (ch) { + return ch; + } + if (/[a-z]/i.test($0)) { + return $0.split('\\').join(''); + } + return $0; + }); + + this.track('after escape: '); +}; + +/** + * Unescape special characters in the given string. + * + * @param {String} `str` + * @return {String} + */ + +Glob.prototype.unescape = function(str) { + var re = /__([A-Z]+)_([A-Z]+)__/g; + this.pattern = str.replace(re, function($0, $1) { + return chars[$1][$0]; + }); + this.pattern = unesc(this.pattern); +}; + +/** + * Escape/unescape utils + */ + +function esc(str) { + str = str.split('?').join('%~'); + str = str.split('*').join('%%'); + return str; +} + +function unesc(str) { + str = str.split('%~').join('?'); + str = str.split('%%').join('*'); + return str; +} diff --git a/node_modules/micromatch/lib/utils.js b/node_modules/micromatch/lib/utils.js new file mode 100644 index 0000000000000..7c24a51064384 --- /dev/null +++ b/node_modules/micromatch/lib/utils.js @@ -0,0 +1,149 @@ +'use strict'; + +var win32 = process && process.platform === 'win32'; +var path = require('path'); +var fileRe = require('filename-regex'); +var utils = module.exports; + +/** + * Module dependencies + */ + +utils.diff = require('arr-diff'); +utils.unique = require('array-unique'); +utils.braces = require('braces'); +utils.brackets = require('expand-brackets'); +utils.extglob = require('extglob'); +utils.isExtglob = require('is-extglob'); +utils.isGlob = require('is-glob'); +utils.typeOf = require('kind-of'); +utils.normalize = require('normalize-path'); +utils.omit = require('object.omit'); +utils.parseGlob = require('parse-glob'); +utils.cache = require('regex-cache'); + +/** + * Get the filename of a filepath + * + * @param {String} `string` + * @return {String} + */ + +utils.filename = function filename(fp) { + var seg = fp.match(fileRe()); + return seg && seg[0]; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.isPath = function isPath(pattern, opts) { + opts = opts || {}; + return function(fp) { + var unixified = utils.unixify(fp, opts); + if(opts.nocase){ + return pattern.toLowerCase() === unixified.toLowerCase(); + } + return pattern === unixified; + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.hasPath = function hasPath(pattern, opts) { + return function(fp) { + return utils.unixify(pattern, opts).indexOf(fp) !== -1; + }; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function matchPath(pattern, opts) { + var fn = (opts && opts.contains) + ? utils.hasPath(pattern, opts) + : utils.isPath(pattern, opts); + return fn; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` + * @return {Boolean} + */ + +utils.hasFilename = function hasFilename(re) { + return function(fp) { + var name = utils.filename(fp); + return name && re.test(name); + }; +}; + +/** + * Coerce `val` to an array + * + * @param {*} val + * @return {Array} + */ + +utils.arrayify = function arrayify(val) { + return !Array.isArray(val) + ? [val] + : val; +}; + +/** + * Normalize all slashes in a file path or glob pattern to + * forward slashes. + */ + +utils.unixify = function unixify(fp, opts) { + if (opts && opts.unixify === false) return fp; + if (opts && opts.unixify === true || win32 || path.sep === '\\') { + return utils.normalize(fp, false); + } + if (opts && opts.unescape === true) { + return fp ? fp.toString().replace(/\\(\w)/g, '$1') : ''; + } + return fp; +}; + +/** + * Escape/unescape utils + */ + +utils.escapePath = function escapePath(fp) { + return fp.replace(/[\\.]/g, '\\$&'); +}; + +utils.unescapeGlob = function unescapeGlob(fp) { + return fp.replace(/[\\"']/g, ''); +}; + +utils.escapeRe = function escapeRe(str) { + return str.replace(/[-[\\$*+?.#^\s{}(|)\]]/g, '\\$&'); +}; + +/** + * Expose `utils` + */ + +module.exports = utils; diff --git a/node_modules/micromatch/package.json b/node_modules/micromatch/package.json new file mode 100644 index 0000000000000..f2aef5b14dde6 --- /dev/null +++ b/node_modules/micromatch/package.json @@ -0,0 +1,114 @@ +{ + "name": "micromatch", + "description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.", + "version": "2.3.11", + "homepage": "https://github.com/jonschlinkert/micromatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/micromatch", + "bugs": { + "url": "https://github.com/jonschlinkert/micromatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "devDependencies": { + "benchmarked": "^0.1.4", + "chalk": "^1.1.1", + "gulp": "^3.9.0", + "gulp-eslint": "^1.1.1", + "gulp-format-md": "^0.1.8", + "gulp-istanbul": "^0.10.1", + "gulp-mocha": "^2.1.3", + "minimatch": "^3.0.0", + "minimist": "^1.2.0", + "mocha": "^2", + "multimatch": "^2.0.0", + "should": "^8", + "write": "^0.2.1" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "minimatch", + "multimatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "verb": { + "related": { + "list": [ + "braces", + "expand-brackets", + "expand-range", + "extglob", + "fill-range", + "gulp-micromatch", + "is-glob", + "parse-glob" + ] + }, + "reflinks": [ + "braces", + "expand-brackets", + "extglob", + "minimatch", + "multimatch", + "verb" + ], + "toc": false, + "layout": false, + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE new file mode 100644 index 0000000000000..19129e315fe59 --- /dev/null +++ b/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md new file mode 100644 index 0000000000000..33ede1d6eef25 --- /dev/null +++ b/node_modules/minimatch/README.md @@ -0,0 +1,230 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + +### partial + +Compare a partial path to a pattern. As long as the parts of the path that +are present are not contradicted by the pattern, it will be treated as a +match. This is useful in applications where you're walking through a +folder structure, and don't yet have the full path, but want to ensure that +you do not walk down paths that can never be a match. + +For example, + +```js +minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d +minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d +minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a +``` + +### allowWindowsEscape + +Windows path separator `\` is by default converted to `/`, which +prohibits the usage of `\` as a escape character. This flag skips that +behavior and allows using the escape character. + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000000000..fda45ade7cfc3 --- /dev/null +++ b/node_modules/minimatch/minimatch.js @@ -0,0 +1,947 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = (function () { try { return require('path') } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + b = b || {} + var t = {} + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + assertValidPattern(pattern) + + if (!options) options = {} + + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (!options.allowWindowsEscape && path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + assertValidPattern(pattern) + + var options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + /* istanbul ignore next */ + case '/': { + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '[': case '.': case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json new file mode 100644 index 0000000000000..566efdfe45cb8 --- /dev/null +++ b/node_modules/minimatch/package.json @@ -0,0 +1,33 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.1.2", + "publishConfig": { + "tag": "v3-legacy" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "devDependencies": { + "tap": "^15.1.6" + }, + "license": "ISC", + "files": [ + "minimatch.js" + ] +} diff --git a/node_modules/minimist/.eslintrc b/node_modules/minimist/.eslintrc new file mode 100644 index 0000000000000..bd1a5e046b414 --- /dev/null +++ b/node_modules/minimist/.eslintrc @@ -0,0 +1,29 @@ +{ + "root": true, + + "extends": "@ljharb/eslint-config/node/0.4", + + "rules": { + "array-element-newline": 0, + "complexity": 0, + "func-style": [2, "declaration"], + "max-lines-per-function": 0, + "max-nested-callbacks": 1, + "max-statements-per-line": 1, + "max-statements": 0, + "multiline-comment-style": 0, + "no-continue": 1, + "no-param-reassign": 1, + "no-restricted-syntax": 1, + "object-curly-newline": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "camelcase": 0, + }, + }, + ] +} diff --git a/node_modules/minimist/.github/FUNDING.yml b/node_modules/minimist/.github/FUNDING.yml new file mode 100644 index 0000000000000..a9366222e92a9 --- /dev/null +++ b/node_modules/minimist/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/minimist +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/minimist/.nycrc b/node_modules/minimist/.nycrc new file mode 100644 index 0000000000000..55c3d29367a42 --- /dev/null +++ b/node_modules/minimist/.nycrc @@ -0,0 +1,14 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "example", + "test" + ] +} diff --git a/node_modules/minimist/CHANGELOG.md b/node_modules/minimist/CHANGELOG.md new file mode 100644 index 0000000000000..c9a1e15e6c2fe --- /dev/null +++ b/node_modules/minimist/CHANGELOG.md @@ -0,0 +1,298 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.8](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8) - 2023-02-09 + +### Merged + +- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) +- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) +- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) + +### Fixed + +- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) +- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) +- [Fix] Fix long option followed by single dash [`#15`](https://github.com/minimistjs/minimist/issues/15) +- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) +- [Fix] Fix handling of short option with non-trivial equals [`#5`](https://github.com/minimistjs/minimist/issues/5) +- [Tests] Remove duplicate test [`#8`](https://github.com/minimistjs/minimist/issues/8) +- [Fix] opt.string works with multiple aliases [`#9`](https://github.com/minimistjs/minimist/issues/9) + +### Commits + +- Merge tag 'v0.2.3' [`a026794`](https://github.com/minimistjs/minimist/commit/a0267947c7870fc5847cf2d437fbe33f392767da) +- [eslint] fix indentation and whitespace [`5368ca4`](https://github.com/minimistjs/minimist/commit/5368ca4147e974138a54cc0dc4cea8f756546b70) +- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) +- [eslint] more cleanup [`62fde7d`](https://github.com/minimistjs/minimist/commit/62fde7d935f83417fb046741531a9e2346a36976) +- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) +- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) +- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) +- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) +- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) +- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) +- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) +- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) +- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) +- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) +- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) +- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`3124ed3`](https://github.com/minimistjs/minimist/commit/3124ed3e46306301ebb3c834874ce0241555c2c4) +- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) +- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) +- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) +- [actions] Avoid 0.6 tests due to build failures [`ba92fe6`](https://github.com/minimistjs/minimist/commit/ba92fe6ebbdc0431cca9a2ea8f27beb492f5e4ec) +- [Dev Deps] update `tape` [`950eaa7`](https://github.com/minimistjs/minimist/commit/950eaa74f112e04d23e9c606c67472c46739b473) +- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) +- Merge tag 'v0.2.2' [`980d7ac`](https://github.com/minimistjs/minimist/commit/980d7ac61a0b4bd552711251ac107d506b23e41f) + +## [v1.2.7](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7) - 2022-10-10 + +### Commits + +- [meta] add `auto-changelog` [`0ebf4eb`](https://github.com/minimistjs/minimist/commit/0ebf4ebcd5f7787a5524d31a849ef41316b83c3c) +- [actions] add reusable workflows [`e115b63`](https://github.com/minimistjs/minimist/commit/e115b63fa9d3909f33b00a2db647ff79068388de) +- [eslint] add eslint; rules to enable later are warnings [`f58745b`](https://github.com/minimistjs/minimist/commit/f58745b9bb84348e1be72af7dbba5840c7c13013) +- [Dev Deps] switch from `covert` to `nyc` [`ab03356`](https://github.com/minimistjs/minimist/commit/ab033567b9c8b31117cb026dc7f1e592ce455c65) +- [readme] rename and add badges [`236f4a0`](https://github.com/minimistjs/minimist/commit/236f4a07e4ebe5ee44f1496ec6974991ab293ffd) +- [meta] create FUNDING.yml; add `funding` in package.json [`783a49b`](https://github.com/minimistjs/minimist/commit/783a49bfd47e8335d3098a8cac75662cf71eb32a) +- [meta] use `npmignore` to autogenerate an npmignore file [`f81ece6`](https://github.com/minimistjs/minimist/commit/f81ece6aaec2fa14e69ff4f1e0407a8c4e2635a2) +- Only apps should have lockfiles [`56cad44`](https://github.com/minimistjs/minimist/commit/56cad44c7f879b9bb5ec18fcc349308024a89bfc) +- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`49c5f9f`](https://github.com/minimistjs/minimist/commit/49c5f9fb7e6a92db9eb340cc679de92fb3aacded) +- [Tests] add `aud` in `posttest` [`228ae93`](https://github.com/minimistjs/minimist/commit/228ae938f3cd9db9dfd8bd7458b076a7b2aef280) +- [meta] add `safe-publish-latest` [`01fc23f`](https://github.com/minimistjs/minimist/commit/01fc23f5104f85c75059972e01dd33796ab529ff) +- [meta] update repo URLs [`6b164c7`](https://github.com/minimistjs/minimist/commit/6b164c7d68e0b6bf32f894699effdfb7c63041dd) + +## [v1.2.6](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.6) - 2022-03-21 + +### Commits + +- test from prototype pollution PR [`bc8ecee`](https://github.com/minimistjs/minimist/commit/bc8ecee43875261f4f17eb20b1243d3ed15e70eb) +- isConstructorOrProto adapted from PR [`c2b9819`](https://github.com/minimistjs/minimist/commit/c2b981977fa834b223b408cfb860f933c9811e4d) +- security notice for additional prototype pollution issue [`ef88b93`](https://github.com/minimistjs/minimist/commit/ef88b9325f77b5ee643ccfc97e2ebda577e4c4e2) + +## [v1.2.5](https://github.com/minimistjs/minimist/compare/v1.2.4...v1.2.5) - 2020-03-12 + +## [v1.2.4](https://github.com/minimistjs/minimist/compare/v1.2.3...v1.2.4) - 2020-03-11 + +### Commits + +- security notice [`4cf1354`](https://github.com/minimistjs/minimist/commit/4cf1354839cb972e38496d35e12f806eea92c11f) +- additional test for constructor prototype pollution [`1043d21`](https://github.com/minimistjs/minimist/commit/1043d212c3caaf871966e710f52cfdf02f9eea4b) + +## [v1.2.3](https://github.com/minimistjs/minimist/compare/v1.2.2...v1.2.3) - 2020-03-10 + +### Commits + +- more failing proto pollution tests [`13c01a5`](https://github.com/minimistjs/minimist/commit/13c01a5327736903704984b7f65616b8476850cc) +- even more aggressive checks for protocol pollution [`38a4d1c`](https://github.com/minimistjs/minimist/commit/38a4d1caead72ef99e824bb420a2528eec03d9ab) + +## [v1.2.2](https://github.com/minimistjs/minimist/compare/v1.2.1...v1.2.2) - 2020-03-10 + +### Commits + +- failing test for protocol pollution [`0efed03`](https://github.com/minimistjs/minimist/commit/0efed0340ec8433638758f7ca0c77cb20a0bfbab) +- cleanup [`67d3722`](https://github.com/minimistjs/minimist/commit/67d3722413448d00a62963d2d30c34656a92d7e2) +- console.dir -> console.log [`47acf72`](https://github.com/minimistjs/minimist/commit/47acf72c715a630bf9ea013867f47f1dd69dfc54) +- don't assign onto __proto__ [`63e7ed0`](https://github.com/minimistjs/minimist/commit/63e7ed05aa4b1889ec2f3b196426db4500cbda94) + +## [v1.2.1](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.1) - 2020-03-10 + +### Merged + +- move the `opts['--']` example back where it belongs [`#63`](https://github.com/minimistjs/minimist/pull/63) + +### Commits + +- add test [`6be5dae`](https://github.com/minimistjs/minimist/commit/6be5dae35a32a987bcf4137fcd6c19c5200ee909) +- fix bad boolean regexp [`ac3fc79`](https://github.com/minimistjs/minimist/commit/ac3fc796e63b95128fdbdf67ea7fad71bd59aa76) + +## [v1.2.0](https://github.com/minimistjs/minimist/compare/v1.1.3...v1.2.0) - 2015-08-24 + +### Commits + +- failing -k=v short test [`63416b8`](https://github.com/minimistjs/minimist/commit/63416b8cd1d0d70e4714564cce465a36e4dd26d7) +- kv short fix [`6bbe145`](https://github.com/minimistjs/minimist/commit/6bbe14529166245e86424f220a2321442fe88dc3) +- failing kv short test [`f72ab7f`](https://github.com/minimistjs/minimist/commit/f72ab7f4572adc52902c9b6873cc969192f01b10) +- fixed kv test [`f5a48c3`](https://github.com/minimistjs/minimist/commit/f5a48c3e50e40ca54f00c8e84de4b4d6e9897fa8) +- enforce space between arg key and value [`86b321a`](https://github.com/minimistjs/minimist/commit/86b321affe648a8e016c095a4f0efa9d9074f502) + +## [v1.1.3](https://github.com/minimistjs/minimist/compare/v1.1.2...v1.1.3) - 2015-08-06 + +### Commits + +- add failing test - boolean alias array [`0fa3c5b`](https://github.com/minimistjs/minimist/commit/0fa3c5b3dd98551ddecf5392831b4c21211743fc) +- fix boolean values with multiple aliases [`9c0a6e7`](https://github.com/minimistjs/minimist/commit/9c0a6e7de25a273b11bbf9a7464f0bd833779795) + +## [v1.1.2](https://github.com/minimistjs/minimist/compare/v1.1.1...v1.1.2) - 2015-07-22 + +### Commits + +- Convert boolean arguments to boolean values [`8f3dc27`](https://github.com/minimistjs/minimist/commit/8f3dc27cf833f1d54671b6d0bcb55c2fe19672a9) +- use non-ancient npm, node 0.12 and iojs [`61ed1d0`](https://github.com/minimistjs/minimist/commit/61ed1d034b9ec7282764ce76f3992b1a0b4906ae) +- an older npm for 0.8 [`25cf778`](https://github.com/minimistjs/minimist/commit/25cf778b1220e7838a526832ad6972f75244054f) + +## [v1.1.1](https://github.com/minimistjs/minimist/compare/v1.1.0...v1.1.1) - 2015-03-10 + +### Commits + +- check that they type of a value is a boolean, not just that it is currently set to a boolean [`6863198`](https://github.com/minimistjs/minimist/commit/6863198e36139830ff1f20ffdceaddd93f2c1db9) +- upgrade tape, fix type issues from old tape version [`806712d`](https://github.com/minimistjs/minimist/commit/806712df91604ed02b8e39aa372b84aea659ee34) +- test for setting a boolean to a null default [`8c444fe`](https://github.com/minimistjs/minimist/commit/8c444fe89384ded7d441c120915ea60620b01dd3) +- if the previous value was a boolean, without an default (or with an alias) don't make an array either [`e5f419a`](https://github.com/minimistjs/minimist/commit/e5f419a3b5b3bc3f9e5ac71b7040621af70ed2dd) + +## [v1.1.0](https://github.com/minimistjs/minimist/compare/v1.0.0...v1.1.0) - 2014-08-10 + +### Commits + +- add support for handling "unknown" options not registered with the parser. [`6f3cc5d`](https://github.com/minimistjs/minimist/commit/6f3cc5d4e84524932a6ef2ce3592acc67cdd4383) +- reformat package.json [`02ed371`](https://github.com/minimistjs/minimist/commit/02ed37115194d3697ff358e8e25e5e66bab1d9f8) +- coverage script [`e5531ba`](https://github.com/minimistjs/minimist/commit/e5531ba0479da3b8138d3d8cac545d84ccb1c8df) +- extra fn to get 100% coverage again [`a6972da`](https://github.com/minimistjs/minimist/commit/a6972da89e56bf77642f8ec05a13b6558db93498) + +## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.3...v1.0.0) - 2014-08-10 + +### Commits + +- added stopEarly option [`471c7e4`](https://github.com/minimistjs/minimist/commit/471c7e4a7e910fc7ad8f9df850a186daf32c64e9) +- fix list [`fef6ae7`](https://github.com/minimistjs/minimist/commit/fef6ae79c38b9dc1c49569abb7cd04eb965eac5e) + +## [v0.2.3](https://github.com/minimistjs/minimist/compare/v0.2.2...v0.2.3) - 2023-02-09 + +### Merged + +- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) +- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) +- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) + +### Fixed + +- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) +- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) +- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) + +### Commits + +- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) +- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) +- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) +- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) +- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) + +## [v0.2.2](https://github.com/minimistjs/minimist/compare/v0.2.1...v0.2.2) - 2022-10-10 + +### Commits + +- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) +- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) +- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) +- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) +- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) +- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) +- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) +- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) +- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) +- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) +- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) +- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) + +## [v0.2.1](https://github.com/minimistjs/minimist/compare/v0.2.0...v0.2.1) - 2020-03-12 + +## [v0.2.0](https://github.com/minimistjs/minimist/compare/v0.1.0...v0.2.0) - 2014-06-19 + +### Commits + +- support all-boolean mode [`450a97f`](https://github.com/minimistjs/minimist/commit/450a97f6e2bc85c7a4a13185c19a818d9a5ebe69) + +## [v0.1.0](https://github.com/minimistjs/minimist/compare/v0.0.10...v0.1.0) - 2014-05-12 + +### Commits + +- Provide a mechanism to segregate -- arguments [`ce4a1e6`](https://github.com/minimistjs/minimist/commit/ce4a1e63a7e8d5ab88d2a3768adefa6af98a445a) +- documented argv['--'] [`14db0e6`](https://github.com/minimistjs/minimist/commit/14db0e6dbc6d2b9e472adaa54dad7004b364634f) +- Adding a test-case for notFlags segregation [`715c1e3`](https://github.com/minimistjs/minimist/commit/715c1e3714be223f998f6c537af6b505f0236c16) + +## [v0.0.10](https://github.com/minimistjs/minimist/compare/v0.0.9...v0.0.10) - 2014-05-11 + +### Commits + +- dedicated boolean test [`46e448f`](https://github.com/minimistjs/minimist/commit/46e448f9f513cfeb2bcc8b688b9b47ba1e515c2b) +- dedicated num test [`9bf2d36`](https://github.com/minimistjs/minimist/commit/9bf2d36f1d3b8795be90b8f7de0a937f098aa394) +- aliased values treated as strings [`1ab743b`](https://github.com/minimistjs/minimist/commit/1ab743bad4484d69f1259bed42f9531de01119de) +- cover the case of already numbers, at 100% coverage [`b2bb044`](https://github.com/minimistjs/minimist/commit/b2bb04436599d77a2ce029e8e555e25b3aa55d13) +- another test for higher coverage [`3662624`](https://github.com/minimistjs/minimist/commit/3662624be976d5489d486a856849c048d13be903) + +## [v0.0.9](https://github.com/minimistjs/minimist/compare/v0.0.8...v0.0.9) - 2014-05-08 + +### Commits + +- Eliminate `longest` fn. [`824f642`](https://github.com/minimistjs/minimist/commit/824f642038d1b02ede68b6261d1d65163390929a) + +## [v0.0.8](https://github.com/minimistjs/minimist/compare/v0.0.7...v0.0.8) - 2014-02-20 + +### Commits + +- return '' if flag is string and empty [`fa63ed4`](https://github.com/minimistjs/minimist/commit/fa63ed4651a4ef4eefddce34188e0d98d745a263) +- handle joined single letters [`66c248f`](https://github.com/minimistjs/minimist/commit/66c248f0241d4d421d193b022e9e365f11178534) + +## [v0.0.7](https://github.com/minimistjs/minimist/compare/v0.0.6...v0.0.7) - 2014-02-08 + +### Commits + +- another swap of .test for .match [`d1da408`](https://github.com/minimistjs/minimist/commit/d1da40819acbe846d89a5c02721211e3c1260dde) + +## [v0.0.6](https://github.com/minimistjs/minimist/compare/v0.0.5...v0.0.6) - 2014-02-08 + +### Commits + +- use .test() instead of .match() to not crash on non-string values in the arguments array [`7e0d1ad`](https://github.com/minimistjs/minimist/commit/7e0d1add8c9e5b9b20a4d3d0f9a94d824c578da1) + +## [v0.0.5](https://github.com/minimistjs/minimist/compare/v0.0.4...v0.0.5) - 2013-09-18 + +### Commits + +- Improve '--' handling. [`b11822c`](https://github.com/minimistjs/minimist/commit/b11822c09cc9d2460f30384d12afc0b953c037a4) + +## [v0.0.4](https://github.com/minimistjs/minimist/compare/v0.0.3...v0.0.4) - 2013-09-17 + +## [v0.0.3](https://github.com/minimistjs/minimist/compare/v0.0.2...v0.0.3) - 2013-09-12 + +### Commits + +- failing test for single dash preceeding a double dash [`b465514`](https://github.com/minimistjs/minimist/commit/b465514b82c9ae28972d714facd951deb2ad762b) +- fix for the dot test [`6a095f1`](https://github.com/minimistjs/minimist/commit/6a095f1d364c8fab2d6753d2291a0649315d297a) + +## [v0.0.2](https://github.com/minimistjs/minimist/compare/v0.0.1...v0.0.2) - 2013-08-28 + +### Commits + +- allow dotted aliases & defaults [`321c33e`](https://github.com/minimistjs/minimist/commit/321c33e755485faaeb44eeb1c05d33b2e0a5a7c4) +- use a better version of ff [`e40f611`](https://github.com/minimistjs/minimist/commit/e40f61114cf7be6f7947f7b3eed345853a67dbbb) + +## [v0.0.1](https://github.com/minimistjs/minimist/compare/v0.0.0...v0.0.1) - 2013-06-25 + +### Commits + +- remove trailing commas [`6ff0fa0`](https://github.com/minimistjs/minimist/commit/6ff0fa055064f15dbe06d50b89d5173a6796e1db) + +## v0.0.0 - 2013-06-25 + +### Commits + +- half of the parse test ported [`3079326`](https://github.com/minimistjs/minimist/commit/307932601325087de6cf94188eb798ffc4f3088a) +- stripped down code and a passing test from optimist [`7cced88`](https://github.com/minimistjs/minimist/commit/7cced88d82e399d1a03ed23eb667f04d3f320d10) +- ported parse tests completely over [`9448754`](https://github.com/minimistjs/minimist/commit/944875452e0820df6830b1408c26a0f7d3e1db04) +- docs, package.json [`a5bf46a`](https://github.com/minimistjs/minimist/commit/a5bf46ac9bb3bd114a9c340276c62c1091e538d5) +- move more short tests into short.js [`503edb5`](https://github.com/minimistjs/minimist/commit/503edb5c41d89c0d40831ee517154fc13b0f18b9) +- default bool test was wrong, not the code [`1b9f5db`](https://github.com/minimistjs/minimist/commit/1b9f5db4741b49962846081b68518de824992097) +- passing long tests ripped out of parse.js [`7972c4a`](https://github.com/minimistjs/minimist/commit/7972c4aff1f4803079e1668006658e2a761a0428) +- badges [`84c0370`](https://github.com/minimistjs/minimist/commit/84c037063664d42878aace715fe6572ce01b6f3b) +- all the tests now ported, some failures [`64239ed`](https://github.com/minimistjs/minimist/commit/64239edfe92c711c4eb0da254fcdfad2a5fdb605) +- failing short test [`f8a5341`](https://github.com/minimistjs/minimist/commit/f8a534112dd1138d2fad722def56a848480c446f) +- fixed the numeric test [`6b034f3`](https://github.com/minimistjs/minimist/commit/6b034f37c79342c60083ed97fd222e16928aac51) diff --git a/node_modules/minimist/LICENSE b/node_modules/minimist/LICENSE new file mode 100644 index 0000000000000..ee27ba4b4412b --- /dev/null +++ b/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/minimist/README.md b/node_modules/minimist/README.md new file mode 100644 index 0000000000000..74da3234b4844 --- /dev/null +++ b/node_modules/minimist/README.md @@ -0,0 +1,121 @@ +# minimist [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.log(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ + _: ['foo', 'bar', 'baz'], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' +} +``` + +# security + +Previous versions had a prototype pollution bug that could cause privilege +escalation in some circumstances when handling untrusted user input. + +Please use version 1.2.6 or later: + +* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5) +* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3) + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a boolean, string or array of strings to always treat as +booleans. if `true` will treat all double hyphenated arguments without equal signs +as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option +* `opts['--']` - when true, populate `argv._` with everything before the `--` +and `argv['--']` with everything after the `--`. Here's an example: + + ``` + > require('./')('one two three -- four five --six'.split(' '), { '--': true }) + { + _: ['one', 'two', 'three'], + '--': ['four', 'five', '--six'] + } + ``` + + Note that with `opts['--']` set, parsing for arguments still stops after the + `--`. + +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT + +[package-url]: https://npmjs.org/package/minimist +[npm-version-svg]: https://versionbadg.es/minimistjs/minimist.svg +[npm-badge-png]: https://nodei.co/npm/minimist.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/minimist.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/minimist.svg +[downloads-url]: https://npm-stat.com/charts.html?package=minimist +[codecov-image]: https://codecov.io/gh/minimistjs/minimist/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/minimistjs/minimist/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/minimistjs/minimist +[actions-url]: https://github.com/minimistjs/minimist/actions diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js new file mode 100644 index 0000000000000..9d90ffb2642b4 --- /dev/null +++ b/node_modules/minimist/example/parse.js @@ -0,0 +1,4 @@ +'use strict'; + +var argv = require('../')(process.argv.slice(2)); +console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js new file mode 100644 index 0000000000000..f020f3940e129 --- /dev/null +++ b/node_modules/minimist/index.js @@ -0,0 +1,263 @@ +'use strict'; + +function hasKey(obj, keys) { + var o = obj; + keys.slice(0, -1).forEach(function (key) { + o = o[key] || {}; + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function isNumber(x) { + if (typeof x === 'number') { return true; } + if ((/^0x[0-9a-f]+$/i).test(x)) { return true; } + return (/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/).test(x); +} + +function isConstructorOrProto(obj, key) { + return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__'; +} + +module.exports = function (args, opts) { + if (!opts) { opts = {}; } + + var flags = { + bools: {}, + strings: {}, + unknownFn: null, + }; + + if (typeof opts.unknown === 'function') { + flags.unknownFn = opts.unknown; + } + + if (typeof opts.boolean === 'boolean' && opts.boolean) { + flags.allBools = true; + } else { + [].concat(opts.boolean).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + [].concat(aliases[key]).forEach(function (k) { + flags.strings[k] = true; + }); + } + }); + + var defaults = opts.default || {}; + + var argv = { _: [] }; + + function argDefined(key, arg) { + return (flags.allBools && (/^--[^=]+$/).test(arg)) + || flags.strings[key] + || flags.bools[key] + || aliases[key]; + } + + function setKey(obj, keys, value) { + var o = obj; + for (var i = 0; i < keys.length - 1; i++) { + var key = keys[i]; + if (isConstructorOrProto(o, key)) { return; } + if (o[key] === undefined) { o[key] = {}; } + if ( + o[key] === Object.prototype + || o[key] === Number.prototype + || o[key] === String.prototype + ) { + o[key] = {}; + } + if (o[key] === Array.prototype) { o[key] = []; } + o = o[key]; + } + + var lastKey = keys[keys.length - 1]; + if (isConstructorOrProto(o, lastKey)) { return; } + if ( + o === Object.prototype + || o === Number.prototype + || o === String.prototype + ) { + o = {}; + } + if (o === Array.prototype) { o = []; } + if (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') { + o[lastKey] = value; + } else if (Array.isArray(o[lastKey])) { + o[lastKey].push(value); + } else { + o[lastKey] = [o[lastKey], value]; + } + } + + function setArg(key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) { return; } + } + + var value = !flags.strings[key] && isNumber(val) + ? Number(val) + : val; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--') + 1); + args = args.slice(0, args.indexOf('--')); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + var key; + var next; + + if ((/^--.+=/).test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); + } else if ((/^--no-.+/).test(arg)) { + key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } else if ((/^--.+/).test(arg)) { + key = arg.match(/^--(.+)/)[1]; + next = args[i + 1]; + if ( + next !== undefined + && !(/^(-|--)[^-]/).test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true) + ) { + setArg(key, next, arg); + i += 1; + } else if ((/^(true|false)$/).test(next)) { + setArg(key, next === 'true', arg); + i += 1; + } else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } else if ((/^-[^-]+/).test(arg)) { + var letters = arg.slice(1, -1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + next = arg.slice(j + 2); + + if (next === '-') { + setArg(letters[j], next, arg); + continue; + } + + if ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') { + setArg(letters[j], next.slice(1), arg); + broken = true; + break; + } + + if ( + (/[A-Za-z]/).test(letters[j]) + && (/-?\d+(\.\d*)?(e-?\d+)?$/).test(next) + ) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], arg.slice(j + 2), arg); + broken = true; + break; + } else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if ( + args[i + 1] + && !(/^(-|--)[^-]/).test(args[i + 1]) + && !flags.bools[key] + && (aliases[key] ? !aliasIsBoolean(key) : true) + ) { + setArg(key, args[i + 1], arg); + i += 1; + } else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) { + setArg(key, args[i + 1] === 'true', arg); + i += 1; + } else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + Object.keys(defaults).forEach(function (k) { + if (!hasKey(argv, k.split('.'))) { + setKey(argv, k.split('.'), defaults[k]); + + (aliases[k] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[k]); + }); + } + }); + + if (opts['--']) { + argv['--'] = notFlags.slice(); + } else { + notFlags.forEach(function (k) { + argv._.push(k); + }); + } + + return argv; +}; diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json new file mode 100644 index 0000000000000..c10a334441119 --- /dev/null +++ b/node_modules/minimist/package.json @@ -0,0 +1,75 @@ +{ + "name": "minimist", + "version": "1.2.8", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.1", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=auto", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/minimistjs/minimist.git" + }, + "homepage": "https://github.com/minimistjs/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js new file mode 100644 index 0000000000000..befa0c9976908 --- /dev/null +++ b/node_modules/minimist/test/all_bool.js @@ -0,0 +1,34 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('flag boolean true (default all --args to boolean)', function (t) { + var argv = parse(['moo', '--honk', 'cow'], { + boolean: true, + }); + + t.deepEqual(argv, { + honk: true, + _: ['moo', 'cow'], + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); + +test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { + var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { + boolean: true, + }); + + t.deepEqual(argv, { + honk: true, + tacos: 'good', + p: 55, + _: ['moo', 'cow'], + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js new file mode 100644 index 0000000000000..e58d47e442ce1 --- /dev/null +++ b/node_modules/minimist/test/bool.js @@ -0,0 +1,177 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false }, + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'], + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse(['-x', '-z', 'one', 'two', 'three'], { + boolean: ['x', 'y', 'z'], + }); + + t.deepEqual(argv, { + x: true, + y: false, + z: true, + _: ['one', 'two', 'three'], + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); +test('boolean and alias with chainable api', function (t) { + var aliased = ['-h', 'derp']; + var regular = ['--herp', 'derp']; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' }, + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' }, + }); + var expected = { + herp: true, + h: true, + _: ['derp'], + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = ['-h', 'derp']; + var regular = ['--herp', 'derp']; + var opts = { + alias: { h: 'herp' }, + boolean: 'herp', + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + _: ['derp'], + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias array with options hash', function (t) { + var aliased = ['-h', 'derp']; + var regular = ['--herp', 'derp']; + var alt = ['--harp', 'derp']; + var opts = { + alias: { h: ['herp', 'harp'] }, + boolean: 'h', + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var altPropertyArgv = parse(alt, opts); + var expected = { + harp: true, + herp: true, + h: true, + _: ['derp'], + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.same(altPropertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = ['-h', 'true']; + var regular = ['--herp', 'true']; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + _: [], + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function (t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool', + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool', + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); + +test('boolean --boool=true', function (t) { + var parsed = parse(['--boool=true'], { + default: { + boool: false, + }, + boolean: ['boool'], + }); + + t.same(parsed.boool, true); + t.end(); +}); + +test('boolean --boool=false', function (t) { + var parsed = parse(['--boool=false'], { + default: { + boool: true, + }, + boolean: ['boool'], + }); + + t.same(parsed.boool, false); + t.end(); +}); + +test('boolean using something similar to true', function (t) { + var opts = { boolean: 'h' }; + var result = parse(['-h', 'true.txt'], opts); + var expected = { + h: true, + _: ['true.txt'], + }; + + t.same(result, expected); + t.end(); +}); diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js new file mode 100644 index 0000000000000..707881771e275 --- /dev/null +++ b/node_modules/minimist/test/dash.js @@ -0,0 +1,43 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(6); + t.deepEqual(parse(['-n', '-']), { n: '-', _: [] }); + t.deepEqual(parse(['--nnn', '-']), { nnn: '-', _: [] }); + t.deepEqual(parse(['-']), { _: ['-'] }); + t.deepEqual(parse(['-f-']), { f: '-', _: [] }); + t.deepEqual( + parse(['-b', '-'], { boolean: 'b' }), + { b: true, _: ['-'] } + ); + t.deepEqual( + parse(['-s', '-'], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(2); + t.deepEqual(parse(['-a', '--', 'b']), { a: true, _: ['b'] }); + t.deepEqual(parse(['--a', '--', 'b']), { a: true, _: ['b'] }); +}); + +test('move arguments after the -- into their own `--` array', function (t) { + t.plan(1); + t.deepEqual( + parse(['--name', 'John', 'before', '--', 'after'], { '--': true }), + { name: 'John', _: ['before'], '--': ['after'] } + ); +}); + +test('--- option value', function (t) { + // A multi-dash value is largely an edge case, but check the behaviour is as expected, + // and in particular the same for short option and long option (as made consistent in Jan 2023). + t.plan(2); + t.deepEqual(parse(['-n', '---']), { n: '---', _: [] }); + t.deepEqual(parse(['--nnn', '---']), { nnn: '---', _: [] }); +}); + diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js new file mode 100644 index 0000000000000..4e9f6250f08ea --- /dev/null +++ b/node_modules/minimist/test/default_bool.js @@ -0,0 +1,37 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true }, + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false }, + }); + t.equal(argv.somefalse, false); + t.end(); +}); + +test('boolean default to null', function (t) { + var argv = parse([], { + boolean: 'maybe', + default: { maybe: null }, + }); + t.equal(argv.maybe, null); + + var argvLong = parse(['--maybe'], { + boolean: 'maybe', + default: { maybe: null }, + }); + t.equal(argvLong.maybe, true); + t.end(); +}); diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js new file mode 100644 index 0000000000000..126ff033b4237 --- /dev/null +++ b/node_modules/minimist/test/dotted.js @@ -0,0 +1,24 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); + +test('dotted default with no alias', function (t) { + var argv = parse('', { default: { 'a.b': 11 } }); + t.equal(argv.a.b, 11); + t.end(); +}); diff --git a/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js new file mode 100644 index 0000000000000..6d1b53a7a7ee1 --- /dev/null +++ b/node_modules/minimist/test/kv_short.js @@ -0,0 +1,32 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('short -k=v', function (t) { + t.plan(1); + + var argv = parse(['-b=123']); + t.deepEqual(argv, { b: 123, _: [] }); +}); + +test('multi short -k=v', function (t) { + t.plan(1); + + var argv = parse(['-a=whatever', '-b=robots']); + t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); +}); + +test('short with embedded equals -k=a=b', function (t) { + t.plan(1); + + var argv = parse(['-k=a=b']); + t.deepEqual(argv, { k: 'a=b', _: [] }); +}); + +test('short with later equals like -ab=c', function (t) { + t.plan(1); + + var argv = parse(['-ab=c']); + t.deepEqual(argv, { a: true, b: 'c', _: [] }); +}); diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js new file mode 100644 index 0000000000000..9fef51f1fa8d9 --- /dev/null +++ b/node_modules/minimist/test/long.js @@ -0,0 +1,33 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse(['--bool']), + { bool: true, _: [] }, + 'long boolean' + ); + t.deepEqual( + parse(['--pow', 'xixxle']), + { pow: 'xixxle', _: [] }, + 'long capture sp' + ); + t.deepEqual( + parse(['--pow=xixxle']), + { pow: 'xixxle', _: [] }, + 'long capture eq' + ); + t.deepEqual( + parse(['--host', 'localhost', '--port', '555']), + { host: 'localhost', port: 555, _: [] }, + 'long captures sp' + ); + t.deepEqual( + parse(['--host=localhost', '--port=555']), + { host: 'localhost', port: 555, _: [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js new file mode 100644 index 0000000000000..074393ecaf170 --- /dev/null +++ b/node_modules/minimist/test/num.js @@ -0,0 +1,38 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789', + ]); + t.deepEqual(argv, { + x: 1234, + y: 5.67, + z: 1e7, + w: '10f', + hex: 0xdeadbeef, + _: [789], + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('already a number', function (t) { + var argv = parse(['-x', 1234, 789]); + t.deepEqual(argv, { x: 1234, _: [789] }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js new file mode 100644 index 0000000000000..65d9d90927b91 --- /dev/null +++ b/node_modules/minimist/test/parse.js @@ -0,0 +1,209 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse(['--no-moo']), + { moo: false, _: [] }, + 'no' + ); + t.deepEqual( + parse(['-v', 'a', '-v', 'b', '-v', 'c']), + { v: ['a', 'b', 'c'], _: [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek', + ]), + { + c: true, + a: true, + t: true, + s: 'woo', + h: 'awesome', + b: true, + bool: true, + key: 'value', + multi: ['quux', 'baz'], + meep: false, + name: 'meowmers', + _: ['bare', '--not-a-flag', 'eek'], + } + ); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse(['-t', 'moo'], { boolean: 't' }); + t.deepEqual(argv, { t: true, _: ['moo'] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: ['t', 'verbose'], + default: { verbose: true }, + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'], + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('newlines in params', function (t) { + var args = parse(['-s', 'X\nX']); + t.deepEqual(args, { _: [], s: 'X\nX' }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse(['--s=X\nX']); + t.deepEqual(args, { _: [], s: 'X\nX' }); + t.end(); +}); + +test('strings', function (t) { + var s = parse(['-s', '0001234'], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse(['-x', '56'], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([' ', ' '], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function (t) { + var s = parse(['-s'], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse(['--str'], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse(['-art'], { + string: ['a', 't'], + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + +test('string and alias', function (t) { + var x = parse(['--str', '000123'], { + string: 's', + alias: { s: 'str' }, + }); + + t.equal(x.str, '000123'); + t.equal(typeof x.str, 'string'); + t.equal(x.s, '000123'); + t.equal(typeof x.s, 'string'); + + var y = parse(['-s', '000123'], { + string: 'str', + alias: { str: 's' }, + }); + + t.equal(y.str, '000123'); + t.equal(typeof y.str, 'string'); + t.equal(y.s, '000123'); + t.equal(typeof y.s, 'string'); + + var z = parse(['-s123'], { + alias: { str: ['s', 'S'] }, + string: ['str'], + }); + + t.deepEqual( + z, + { _: [], s: '123', S: '123', str: '123' }, + 'opt.string works with multiple aliases' + ); + t.end(); +}); + +test('slashBreak', function (t) { + t.same( + parse(['-I/foo/bar/baz']), + { I: '/foo/bar/baz', _: [] } + ); + t.same( + parse(['-xyz/foo/bar/baz']), + { x: true, y: true, z: '/foo/bar/baz', _: [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse(['-f', '11', '--zoom', '55'], { + alias: { z: 'zoom' }, + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse(['-f', '11', '--zoom', '55'], { + alias: { z: ['zm', 'zoom'] }, + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop', + ]); + + t.same(argv.foo, { + bar: 3, + baz: 4, + quux: { + quibble: 5, + o_O: true, + }, + }); + t.same(argv.beep, { boop: true }); + t.end(); +}); diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js new file mode 100644 index 0000000000000..32965d130fbd4 --- /dev/null +++ b/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,11 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions', function (t) { + t.plan(1); + + var argv = parse(['-b', '123'], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: [123] }); +}); diff --git a/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js new file mode 100644 index 0000000000000..6e629dd34ef09 --- /dev/null +++ b/node_modules/minimist/test/proto.js @@ -0,0 +1,64 @@ +'use strict'; + +/* eslint no-proto: 0 */ + +var parse = require('../'); +var test = require('tape'); + +test('proto pollution', function (t) { + var argv = parse(['--__proto__.x', '123']); + t.equal({}.x, undefined); + t.equal(argv.__proto__.x, undefined); + t.equal(argv.x, undefined); + t.end(); +}); + +test('proto pollution (array)', function (t) { + var argv = parse(['--x', '4', '--x', '5', '--x.__proto__.z', '789']); + t.equal({}.z, undefined); + t.deepEqual(argv.x, [4, 5]); + t.equal(argv.x.z, undefined); + t.equal(argv.x.__proto__.z, undefined); + t.end(); +}); + +test('proto pollution (number)', function (t) { + var argv = parse(['--x', '5', '--x.__proto__.z', '100']); + t.equal({}.z, undefined); + t.equal((4).z, undefined); + t.equal(argv.x, 5); + t.equal(argv.x.z, undefined); + t.end(); +}); + +test('proto pollution (string)', function (t) { + var argv = parse(['--x', 'abc', '--x.__proto__.z', 'def']); + t.equal({}.z, undefined); + t.equal('...'.z, undefined); + t.equal(argv.x, 'abc'); + t.equal(argv.x.z, undefined); + t.end(); +}); + +test('proto pollution (constructor)', function (t) { + var argv = parse(['--constructor.prototype.y', '123']); + t.equal({}.y, undefined); + t.equal(argv.y, undefined); + t.end(); +}); + +test('proto pollution (constructor function)', function (t) { + var argv = parse(['--_.concat.constructor.prototype.y', '123']); + function fnToBeTested() {} + t.equal(fnToBeTested.y, undefined); + t.equal(argv.y, undefined); + t.end(); +}); + +// powered by snyk - https://github.com/backstage/backstage/issues/10343 +test('proto pollution (constructor function) snyk', function (t) { + var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' ')); + t.equal(function () {}.foo, undefined); + t.equal(argv.y, undefined); + t.end(); +}); diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js new file mode 100644 index 0000000000000..4a7b84385bbfd --- /dev/null +++ b/node_modules/minimist/test/short.js @@ -0,0 +1,69 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse(['-n123']), { n: 123, _: [] }); + t.deepEqual( + parse(['-123', '456']), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse(['-b']), + { b: true, _: [] }, + 'short boolean' + ); + t.deepEqual( + parse(['foo', 'bar', 'baz']), + { _: ['foo', 'bar', 'baz'] }, + 'bare' + ); + t.deepEqual( + parse(['-cats']), + { c: true, a: true, t: true, s: true, _: [] }, + 'group' + ); + t.deepEqual( + parse(['-cats', 'meow']), + { c: true, a: true, t: true, s: 'meow', _: [] }, + 'short group next' + ); + t.deepEqual( + parse(['-h', 'localhost']), + { h: 'localhost', _: [] }, + 'short capture' + ); + t.deepEqual( + parse(['-h', 'localhost', '-p', '555']), + { h: 'localhost', p: 555, _: [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse(['-h', 'localhost', '-fp', '555', 'script.js']), + { + f: true, p: 555, h: 'localhost', + _: ['script.js'], + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse(['-h', 'localhost', '-fp', '555', 'script.js']), + { + f: true, p: 555, h: 'localhost', + _: ['script.js'], + } + ); + t.end(); +}); diff --git a/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js new file mode 100644 index 0000000000000..52a6a91903028 --- /dev/null +++ b/node_modules/minimist/test/stop_early.js @@ -0,0 +1,17 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('stops parsing on the first non-option when stopEarly is set', function (t) { + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true, + }); + + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'], + }); + + t.end(); +}); diff --git a/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js new file mode 100644 index 0000000000000..4f2e0ca447f4c --- /dev/null +++ b/node_modules/minimist/test/unknown.js @@ -0,0 +1,104 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('boolean and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = ['-h', 'true', '--derp', 'true']; + var regular = ['--herp', 'true', '-d', 'true']; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn, + }; + parse(aliased, opts); + parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('flag boolean true any double hyphen argument is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn, + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [], + }); + t.end(); +}); + +test('string and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = ['-h', 'hello', '--derp', 'goodbye']; + var regular = ['--herp', 'hello', '-d', 'moon']; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn, + }; + parse(aliased, opts); + parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('default and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = ['-h', 'hello']; + var regular = ['--herp', 'hello']; + var opts = { + default: { h: 'bar' }, + alias: { h: 'herp' }, + unknown: unknownFn, + }; + parse(aliased, opts); + parse(regular, opts); + + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage +}); + +test('value following -- is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = ['--bad', '--', 'good', 'arg']; + var opts = { + '--': true, + unknown: unknownFn, + }; + var argv = parse(aliased, opts); + + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + _: [], + }); + t.end(); +}); diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js new file mode 100644 index 0000000000000..4fdaf1d3943f5 --- /dev/null +++ b/node_modules/minimist/test/whitespace.js @@ -0,0 +1,10 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace', function (t) { + t.plan(1); + var x = parse(['-x', '\t']).x; + t.equal(x, '\t'); +}); diff --git a/node_modules/mixin-deep/LICENSE b/node_modules/mixin-deep/LICENSE new file mode 100644 index 0000000000000..99c936915d5d0 --- /dev/null +++ b/node_modules/mixin-deep/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/mixin-deep/README.md b/node_modules/mixin-deep/README.md new file mode 100644 index 0000000000000..111bde00b8d06 --- /dev/null +++ b/node_modules/mixin-deep/README.md @@ -0,0 +1,80 @@ +# mixin-deep [![NPM version](https://img.shields.io/npm/v/mixin-deep.svg?style=flat)](https://www.npmjs.com/package/mixin-deep) [![NPM monthly downloads](https://img.shields.io/npm/dm/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![NPM total downloads](https://img.shields.io/npm/dt/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/mixin-deep.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/mixin-deep) + +> Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. + +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 mixin-deep +``` + +## Usage + +```js +var mixinDeep = require('mixin-deep'); + +mixinDeep({a: {aa: 'aa'}}, {a: {bb: 'bb'}}, {a: {cc: 'cc'}}); +//=> { a: { aa: 'aa', bb: 'bb', cc: 'cc' } } +``` + +## 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: + +* [defaults-deep](https://www.npmjs.com/package/defaults-deep): Like `extend` but recursively copies only the missing properties/values to the target object. | [homepage](https://github.com/jonschlinkert/defaults-deep "Like `extend` but recursively copies only the missing properties/values to the target 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-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://github.com/jonschlinkert/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object "Mixin the own and inherited properties of other objects onto the first object. Pass an empty object as the first arg to shallow clone.") + +### 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 09, 2017._ \ No newline at end of file diff --git a/node_modules/mixin-deep/index.js b/node_modules/mixin-deep/index.js new file mode 100644 index 0000000000000..47face2a0994c --- /dev/null +++ b/node_modules/mixin-deep/index.js @@ -0,0 +1,64 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var forIn = require('for-in'); + +function mixinDeep(target, objects) { + var len = arguments.length, i = 0; + while (++i < len) { + var obj = arguments[i]; + if (isObject(obj)) { + forIn(obj, copy, target); + } + } + return target; +} + +/** + * Copy properties from the source object to the + * target object. + * + * @param {*} `val` + * @param {String} `key` + */ + +function copy(val, key) { + if (!isValidKey(key)) { + return; + } + + var obj = this[key]; + if (isObject(val) && isObject(obj)) { + mixinDeep(obj, val); + } else { + this[key] = val; + } +} + +/** + * Returns true if `val` is an object or function. + * + * @param {any} val + * @return {Boolean} + */ + +function isObject(val) { + return isExtendable(val) && !Array.isArray(val); +} + +/** + * Returns true if `key` is a valid key to use when extending objects. + * + * @param {String} `key` + * @return {Boolean} + */ + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +}; + +/** + * Expose `mixinDeep` + */ + +module.exports = mixinDeep; diff --git a/node_modules/mixin-deep/node_modules/is-extendable/LICENSE b/node_modules/mixin-deep/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000000000..c0d7f136277fb --- /dev/null +++ b/node_modules/mixin-deep/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/mixin-deep/node_modules/is-extendable/README.md b/node_modules/mixin-deep/node_modules/is-extendable/README.md new file mode 100644 index 0000000000000..875b56a739ba7 --- /dev/null +++ b/node_modules/mixin-deep/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/mixin-deep/node_modules/is-extendable/index.d.ts b/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000000000..b96d507544e4a --- /dev/null +++ b/node_modules/mixin-deep/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/mixin-deep/node_modules/is-extendable/index.js b/node_modules/mixin-deep/node_modules/is-extendable/index.js new file mode 100644 index 0000000000000..a8b26ad08ece8 --- /dev/null +++ b/node_modules/mixin-deep/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/mixin-deep/node_modules/is-extendable/package.json b/node_modules/mixin-deep/node_modules/is-extendable/package.json new file mode 100644 index 0000000000000..2aaab65a8c50a --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "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 + } + } +} diff --git a/node_modules/mixin-deep/package.json b/node_modules/mixin-deep/package.json new file mode 100644 index 0000000000000..0581c46af00e0 --- /dev/null +++ b/node_modules/mixin-deep/package.json @@ -0,0 +1,65 @@ +{ + "name": "mixin-deep", + "description": "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.", + "version": "1.3.2", + "homepage": "https://github.com/jonschlinkert/mixin-deep", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/mixin-deep", + "bugs": { + "url": "https://github.com/jonschlinkert/mixin-deep/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3", + "should": "^13.1.3" + }, + "keywords": [ + "deep", + "extend", + "key", + "keys", + "merge", + "mixin", + "object", + "prop", + "properties", + "util", + "values" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "defaults-deep", + "extend-shallow", + "merge-deep", + "mixin-object" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js new file mode 100644 index 0000000000000..6a522b16b3a3b --- /dev/null +++ b/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md new file mode 100644 index 0000000000000..69b61253a3892 --- /dev/null +++ b/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, 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/ms/package.json b/node_modules/ms/package.json new file mode 100644 index 0000000000000..6a31c81fac435 --- /dev/null +++ b/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.0.0", + "description": "Tiny milisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + } +} diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md new file mode 100644 index 0000000000000..84a9974cccd81 --- /dev/null +++ b/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](https://nodejs.org) and in the browser. +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/node_modules/nanomatch/CHANGELOG.md b/node_modules/nanomatch/CHANGELOG.md new file mode 100644 index 0000000000000..8c3aead9aecc7 --- /dev/null +++ b/node_modules/nanomatch/CHANGELOG.md @@ -0,0 +1,57 @@ +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog][]_): + +- `added`: for new features +- `changed`: for changes in existing functionality +- `deprecated`: for once-stable features removed in upcoming releases +- `removed`: for deprecated features removed in this release +- `fixed`: for any bug fixes +- `bumped`: updated dependencies, only minor or higher will be listed. + +### [1.1.0] - 2017-04-11 + +**Fixed** + +- adds support for unclosed quotes + +**Added** + +- adds support for `options.noglobstar` + +### [1.0.4] - 2017-04-06 + +Housekeeping updates. Adds documentation section about escaping, cleans up utils. + +### [1.0.3] - 2017-04-06 + +This release includes fixes for windows path edge cases and other improvements for stricter adherence to bash spec. + +**Fixed** + +- More windows path edge cases + +**Added** + +- Support for bash-like quoted strings for escaping sequences of characters, such as `foo/"**"/bar` where `**` should be matched literally and not evaluated as special characters. + +### [1.0.1] - 2016-12-12 + +**Added** + +- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0] - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + +[Unreleased]: https://github.com/jonschlinkert/nanomatch/compare/0.1.0...HEAD +[0.2.0]: https://github.com/jonschlinkert/nanomatch/compare/0.1.0...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/nanomatch/LICENSE b/node_modules/nanomatch/LICENSE new file mode 100644 index 0000000000000..7c9987bc6cdd2 --- /dev/null +++ b/node_modules/nanomatch/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/nanomatch/README.md b/node_modules/nanomatch/README.md new file mode 100644 index 0000000000000..bdd35a94aef02 --- /dev/null +++ b/node_modules/nanomatch/README.md @@ -0,0 +1,1148 @@ +# nanomatch [![NPM version](https://img.shields.io/npm/v/nanomatch.svg?style=flat)](https://www.npmjs.com/package/nanomatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/nanomatch.svg?style=flat)](https://npmjs.org/package/nanomatch) [![NPM total downloads](https://img.shields.io/npm/dt/nanomatch.svg?style=flat)](https://npmjs.org/package/nanomatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/nanomatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/nanomatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/nanomatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/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) + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
+Details + +- [Install](#install) +- [What is nanomatch?](#what-is-nanomatch) +- [Getting started](#getting-started) + * [Installing nanomatch](#installing-nanomatch) + * [Usage](#usage) +- [Documentation](#documentation) + * [Escaping](#escaping) +- [API](#api) +- [Options](#options) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.cache](#optionscache) + * [options.dot](#optionsdot) + * [options.failglob](#optionsfailglob) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.nocase](#optionsnocase) + * [options.nodupes](#optionsnodupes) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonegate](#optionsnonegate) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.slash](#optionsslash) + * [options.star](#optionsstar) + * [options.snapdragon](#optionssnapdragon) + * [options.sourcemap](#optionssourcemap) + * [options.unescape](#optionsunescape) + * [options.unixify](#optionsunixify) +- [Features](#features) +- [Bash expansion libs](#bash-expansion-libs) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Nanomatch vs. Minimatch vs. Multimatch](#nanomatch-vs-minimatch-vs-multimatch) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save nanomatch +``` + +
+Release history + +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog)_): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes +* `bumped`: updated dependencies, only minor or higher will be listed. + +### [1.1.0](https://github.com/micromatch/nanomatch/compare/1.0.4...1.1.0) - 2017-04-11 + +**Fixed** + +* adds support for unclosed quotes + +**Added** + +* adds support for `options.noglobstar` + +### [1.0.4](https://github.com/micromatch/nanomatch/compare/1.0.3...1.0.4) - 2017-04-06 + +Housekeeping updates. Adds documentation section about escaping, cleans up utils. + +### [1.0.3](https://github.com/micromatch/nanomatch/compare/1.0.1...1.0.3) - 2017-04-06 + +This release includes fixes for windows path edge cases and other improvements for stricter adherence to bash spec. + +**Fixed** + +* More windows path edge cases + +**Added** + +* Support for bash-like quoted strings for escaping sequences of characters, such as `foo/"**"/bar` where `**` should be matched literally and not evaluated as special characters. + +### [1.0.1](https://github.com/micromatch/nanomatch/compare/1.0.0...1.0.1) - 2016-12-12 + +**Added** + +* Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0](https://github.com/micromatch/nanomatch/compare/0.1.0...1.0.0) - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + +
+ +## What is nanomatch? + +Nanomatch is a fast and accurate glob matcher with full support for standard Bash glob features, including the following "metacharacters": `*`, `**`, `?` and `[...]`. + +**Learn more** + +* [Getting started](#getting-started): learn how to install and begin using nanomatch +* [Features](#features): jump to info about supported patterns, and a glob matching reference +* [API documentation](#api): jump to available options and methods +* [Unit tests](test): visit unit tests. there is no better way to learn a code library than spending time the unit tests. Nanomatch has 36,000 unit tests - go become a glob matching ninja! + +
+How is this different? + +**Speed and accuracy** + +Nanomatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which results in: + +* Granular control over the entire conversion process in a way that is easy to understand, reason about, and customize. +* Faster matching, from a combination of optimized glob patterns and (optional) caching. +* Much greater accuracy than minimatch. In fact, nanomatch passes _all of the spec tests_ from bash, including some that bash still fails. However, since there is no real specification for globs, if you encounter a pattern that yields unexpected match results [after researching previous issues](../../issues), [please let us know](../../issues/new). + +**Basic globbing only** + +Nanomatch supports [basic globbing only](#features), which is limited to `*`, `**`, `?` and regex-like brackets. + +If you need support for the other [bash "expansion" types](#bash-expansion-libs) (in addition to the wildcard matching provided by nanomatch), consider using [micromatch](https://github.com/micromatch/micromatch) instead. _(micromatch >=3.0.0 uses the nanomatch parser and compiler for basic glob matching)_ + +
+ +## Getting started + +### Installing nanomatch + +**Install with [yarn](https://yarnpkg.com/)** + +```sh +$ yarn add nanomatch +``` + +**Install with [npm](https://npmjs.com)** + +```sh +$ npm install nanomatch +``` + +### Usage + +Add nanomatch to your project using node's `require()` system: + +```js +var nanomatch = require('nanomatch'); + +// the main export is a function that takes an array of strings to match +// and a string or array of patterns to use for matching +nanomatch(list, patterns[, options]); +``` + +**Params** + +* `list` **{String|Array}**: List of strings to perform matches against. This is often a list of file paths. +* `patterns` **{String|Array}**: One or more [glob paterns](#features) to use for matching. +* `options` **{Object}**: Any [supported options](#options) may be passed + +**Examples** + +```js +var nm = require('nanomatch'); +console.log(nm(['a', 'b/b', 'c/c/c'], '*')); +//=> ['a'] + +console.log(nm(['a', 'b/b', 'c/c/c'], '*/*')); +//=> ['b/b'] + +console.log(nm(['a', 'b/b', 'c/c/c'], '**')); +//=> ['a', 'b/b', 'c/c/c'] +``` + +See the [API documentation](#api) for available methods and [options](https://github.com/einaros/options.js). + +## Documentation + +### Escaping + +_Backslashes and quotes_ can be used to escape characters, forcing nanomatch to regard those characters as a literal characters. + +**Backslashes** + +Use backslashes to escape single characters. For example, the following pattern would match `foo/*/bar` exactly: + +```js +'foo/\*/bar' +``` + +The following pattern would match `foo/` followed by a literal `*`, followed by zero or more of any characters besides `/`, followed by `/bar`. + +```js +'foo/\**/bar' +``` + +**Quoted strings** + +Use single or double quotes to escape sequences of characters. For example, the following patterns would match `foo/**/bar` exactly: + +```js +'foo/"**"/bar' +'foo/\'**\'/bar' +"foo/'**'/bar" +``` + +**Matching literal quotes** + +If you need to match quotes literally, you can escape them as well. For example, the following will match `foo/"*"/bar`, `foo/"a"/bar`, `foo/"b"/bar`, or `foo/"c"/bar`: + +```js +'foo/\\"*\\"/bar' +``` + +And the following will match `foo/'*'/bar`, `foo/'a'/bar`, `foo/'b'/bar`, or `foo/'c'/bar`: + +```js +'foo/\\\'*\\\'/bar' +``` + +## API + +### [nanomatch](index.js#L40) + +The main function takes a list of strings and one or more glob patterns to use for matching. + +**Params** + +* `list` **{Array}**: A list of strings to match +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var nm = require('nanomatch'); +nm(list, patterns[, options]); + +console.log(nm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.match](index.js#L106) + +Similar to the main function, but `pattern` must be a string. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var nm = require('nanomatch'); +nm.match(list, pattern[, options]); + +console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); +//=> ['a.a', 'a.aa'] +``` + +### [.isMatch](index.js#L167) + +Returns true if the specified `string` matches the given glob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the string matches the glob pattern. + +**Example** + +```js +var nm = require('nanomatch'); +nm.isMatch(string, pattern[, options]); + +console.log(nm.isMatch('a.a', '*.a')); +//=> true +console.log(nm.isMatch('a.b', '*.a')); +//=> false +``` + +### [.some](index.js#L205) + +Returns true if some of the elements in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.some(list, patterns[, options]); + +console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L243) + +Returns true if every element in the given `list` matches at least one of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.every(list, patterns[, options]); + +console.log(nm.every('foo.js', ['foo.js'])); +// true +console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.any](index.js#L277) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.any(string, patterns[, options]); + +console.log(nm.any('a.a', ['b.*', '*.a'])); +//=> true +console.log(nm.any('a.a', 'b.*')); +//=> false +``` + +### [.all](index.js#L325) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.all(string, patterns[, options]); + +console.log(nm.all('foo.js', ['foo.js'])); +// true + +console.log(nm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(nm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.not](index.js#L359) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +var nm = require('nanomatch'); +nm.not(list, patterns[, options]); + +console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L394) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var nm = require('nanomatch'); +nm.contains(string, pattern[, options]); + +console.log(nm.contains('aa/bb/cc', '*b')); +//=> true +console.log(nm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L450) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +var nm = require('nanomatch'); +nm.matchKeys(object, patterns[, options]); + +var obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(nm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.matcher](index.js#L479) + +Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +var nm = require('nanomatch'); +nm.matcher(pattern[, options]); + +var isMatch = nm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.capture](index.js#L560) + +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 nm = require('nanomatch'); +nm.capture(pattern, string[, options]); + +console.log(nm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(nm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L595) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +var nm = require('nanomatch'); +nm.makeRe(pattern[, options]); + +console.log(nm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.create](index.js#L658) + +Parses the given glob `pattern` and returns an object with the compiled `output` and optional source `map`. + +**Params** + +* `pattern` **{String}**: Glob pattern to parse and compile. +* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed. +* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map. + +**Example** + +```js +var nm = require('nanomatch'); +nm.create(pattern[, options]); + +console.log(nm.create('abc/*.js')); +// { options: { source: 'string', sourcemap: true }, +// state: {}, +// compilers: +// { ... }, +// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', +// ast: +// { type: 'root', +// errors: [], +// nodes: +// [ ... ], +// dot: false, +// input: 'abc/*.js' }, +// parsingErrors: [], +// map: +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] }, +// position: { line: 1, column: 28 }, +// content: {}, +// files: {}, +// idx: 6 } +``` + +### [.parse](index.js#L697) + +Parse the given `str` with the given `options`. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an AST + +**Example** + +```js +var nm = require('nanomatch'); +nm.parse(pattern[, options]); + +var ast = nm.parse('a/{b,c}/d'); +console.log(ast); +// { type: 'root', +// errors: [], +// input: 'a/{b,c}/d', +// nodes: +// [ { type: 'bos', val: '' }, +// { type: 'text', val: 'a/' }, +// { type: 'brace', +// nodes: +// [ { type: 'brace.open', val: '{' }, +// { type: 'text', val: 'b,c' }, +// { type: 'brace.close', val: '}' } ] }, +// { type: 'text', val: '/d' }, +// { type: 'eos', val: '' } ] } +``` + +### [.compile](index.js#L745) + +Compile the given `ast` or string with the given `options`. + +**Params** + +* `ast` **{Object|String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object that has an `output` property with the compiled string. + +**Example** + +```js +var nm = require('nanomatch'); +nm.compile(ast[, options]); + +var ast = nm.parse('a/{b,c}/d'); +console.log(nm.compile(ast)); +// { options: { source: 'string' }, +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// brace: [Function], +// 'brace.open': [Function], +// text: [Function], +// 'brace.close': [Function] }, +// output: [ 'a/(b|c)/d' ], +// ast: +// { ... }, +// parsingErrors: [] } +``` + +### [.clearCache](index.js#L768) + +Clear the regex cache. + +**Example** + +```js +nm.clearCache(); +``` + +## Options + +
+basename + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +Type: `boolean` + +Default: `false` + +**Example** + +```js +nm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +nm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +
+ +
+bash + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as an other star. + +Type: `boolean` + +Default: `true` + +**Example** + +```js +var files = ['abc', 'ajz']; +console.log(nm(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(nm(files, '[a-c]*', {bash: false})); +``` + +
+ +
+cache + +### options.cache + +Disable regex and function memoization. + +Type: `boolean` + +Default: `undefined` + +
+ +
+dot + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + +Type: `boolean` + +Default: `false` + +
+ +
+failglob + +### options.failglob + +Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + +Type: `boolean` + +Default: `undefined` + +
+ +
+ignore + +### options.ignore + +String or array of glob patterns to match files to ignore. + +Type: `String|Array` + +Default: `undefined` + +
+ +
+matchBase + +### options.matchBase + +Alias for [options.basename](#options-basename). + +
+ +
+nocase + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `boolean` + +Default: `undefined` + +
+ +
+nodupes + +### options.nodupes + +Remove duplicate elements from the result array. + +Type: `boolean` + +Default: `true` (enabled by default) + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +nm.match(['a/b/c', 'a/b/c'], '**'); +//=> ['abc'] + +nm.match(['a/b/c', 'a/b/c'], '**', {nodupes: false}); +//=> ['a/b/c', 'a/b/c'] +``` + +
+ +
+nonegate + +### options.noglobstar + +Disable matching with globstars (`**`). + +Type: `boolean` + +Default: `undefined` + +```js +nm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +nm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +
+ +
+nonegate + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +Type: `boolean` + +Default: `undefined` + +
+ +
+nonull + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +
+ +
+nullglob + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +Type: `boolean` + +Default: `undefined` + +
+ +
+slash + +### options.slash + +Customize the slash character(s) to use for matching. + +Type: `string|function` + +Default: `[/\\]` (forward slash and backslash) + +
+ +
+star + +### options.star + +Customize the star character(s) to use for matching. It's not recommended that you modify this unless you have advanced knowledge of the compiler and matching rules. + +Type: `string|function` + +Default: `[^/\\]*?` + +
+ +
+snapdragon + +### options.snapdragon + +Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon) to customize parsers or compilers. + +Type: `object` + +Default: `undefined` + +
+ +
+snapdragon + +### options.sourcemap + +Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + +**Examples** + +```js +var nm = require('nanomatch'); + +var res = nm.create('abc/*.js', {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] } + +var ast = nm.parse('abc/**/*.js'); +var res = nm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/**/*.js' ] } +``` + +
+ +
+unescape + +### options.unescape + +Remove backslashes from returned matches. + +Type: `boolean` + +Default: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +nm.match(['abc', 'a\\*c'], 'a\\*c'); +//=> ['a\\*c'] + +nm.match(['abc', 'a\\*c'], 'a\\*c', {unescape: true}); +//=> ['a*c'] +``` + +
+ +
+unixify + +### options.unixify + +Convert path separators on returned files to posix/unix-style forward slashes. + +Type: `boolean` + +Default: `true` + +**Example** + +```js +nm.match(['a\\b\\c'], 'a/**'); +//=> ['a/b/c'] + +nm.match(['a\\b\\c'], {unixify: false}); +//=> ['a\\b\\c'] +``` + +
+ +## Features + +Nanomatch has full support for standard Bash glob features, including the following "metacharacters": `*`, `**`, `?` and `[...]`. + +Here are some examples of how they work: + +| **Pattern** | **Description** | +| --- | --- | +| `*` | Matches any string except for `/`, leading `.`, or `/.` inside a path | +| `**` | Matches any string including `/`, but not a leading `.` or `/.` inside a path. More than two stars (e.g. `***` is treated the same as one star, and `**` loses its special meaning | when it's not the only thing in a path segment, per Bash specifications) | +| `foo*` | Matches any string beginning with `foo` | +| `*bar*` | Matches any string containing `bar` (beginning, middle or end) | +| `*.min.js` | Matches any string ending with `.min.js` | +| `[abc]*.js` | Matches any string beginning with `a`, `b`, or `c` and ending with `.js` | +| `abc?` | Matches `abcd` or `abcz` but not `abcde` | + +The exceptions noted for `*` apply to all patterns that contain a `*`. + +**Not supported** + +The following extended-globbing features are not supported: + +* [brace expansion](https://github.com/jonschlinkert/braces) (e.g. `{a,b,c}`) +* [extglobs](https://github.com/jonschlinkert/extglob) (e.g. `@(a|!(c|d))`) +* [POSIX brackets](https://github.com/jonschlinkert/expand-brackets) (e.g. `[[:alpha:][:digit:]]`) + +If you need any of these features consider using [micromatch](https://github.com/micromatch/micromatch) instead. + +## Bash expansion libs + +Nanomatch is part of a suite of libraries aimed at bringing the power and expressiveness of [Bash's](https://www.gnu.org/software/bash/) matching and expansion capabilities to JavaScript, _and - as you can see by the [benchmarks](#benchmarks) - without sacrificing speed_. + +| **Related library** | **Matching Type** | **Example** | **Description** | +| --- | --- | --- | --- | +| `nanomatch` (you are here) | Wildcards | `*` | [Filename expansion](https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html#Filename-Expansion), also referred to as globbing and pathname expansion, allows the use of [wildcards](#features) for matching. | +| [expand-tilde](https://github.com/jonschlinkert/expand-tilde) | Tildes | `~` | [Tilde expansion](https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html#Tilde-Expansion) converts the leading tilde in a file path to the user home directory. | +| [braces](https://github.com/jonschlinkert/braces) | Braces | `{a,b,c}` | [Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) | +| [expand-brackets](https://github.com/jonschlinkert/expand-brackets) | Brackets | `[[:alpha:]]` | [POSIX character classes](https://www.gnu.org/software/grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html) (also referred to as POSIX brackets, or POSIX character classes) | +| [extglob](https://github.com/jonschlinkert/extglob) | Parens | `!(a\ | b)` | [Extglobs](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html#Pattern-Matching) | +| [micromatch](https://github.com/micromatch/micromatch) | All | all | Micromatch is built on top of the other libraries. | + +There are many resources available on the web if you want to dive deeper into how these features work in Bash. + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && node benchmark +``` + +### Nanomatch vs. Minimatch vs. Multimatch + +```bash +# globstar-basic (182 bytes) + minimatch x 69,512 ops/sec ±1.92% (88 runs sampled) + multimatch x 63,376 ops/sec ±1.41% (89 runs sampled) + nanomatch x 432,451 ops/sec ±0.92% (88 runs sampled) + + fastest is nanomatch (by 651% avg) + +# large-list-globstar (485686 bytes) + minimatch x 34.02 ops/sec ±1.42% (59 runs sampled) + multimatch x 33.58 ops/sec ±1.97% (58 runs sampled) + nanomatch x 483 ops/sec ±1.06% (86 runs sampled) + + fastest is nanomatch (by 1429% avg) + +# long-list-globstar (194085 bytes) + minimatch x 383 ops/sec ±0.74% (90 runs sampled) + multimatch x 378 ops/sec ±0.59% (89 runs sampled) + nanomatch x 990 ops/sec ±1.14% (85 runs sampled) + + fastest is nanomatch (by 260% avg) + +# negation-basic (132 bytes) + minimatch x 242,145 ops/sec ±1.17% (89 runs sampled) + multimatch x 76,403 ops/sec ±0.78% (92 runs sampled) + nanomatch x 537,253 ops/sec ±1.44% (86 runs sampled) + + fastest is nanomatch (by 337% avg) + +# not-glob-basic (93 bytes) + minimatch x 252,402 ops/sec ±1.33% (89 runs sampled) + multimatch x 209,954 ops/sec ±1.30% (90 runs sampled) + nanomatch x 1,716,468 ops/sec ±1.13% (86 runs sampled) + + fastest is nanomatch (by 742% avg) + +# star-basic (93 bytes) + minimatch x 182,780 ops/sec ±1.41% (91 runs sampled) + multimatch x 153,210 ops/sec ±0.72% (89 runs sampled) + nanomatch x 599,621 ops/sec ±1.22% (90 runs sampled) + + fastest is nanomatch (by 357% avg) + +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+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: + +* [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/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob "Returns true if a string has an extglob.") +* [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/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 164 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [devongovett](https://github.com/devongovett) | + +### 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 18, 2018._ \ No newline at end of file diff --git a/node_modules/nanomatch/index.js b/node_modules/nanomatch/index.js new file mode 100644 index 0000000000000..dddc6128e10ba --- /dev/null +++ b/node_modules/nanomatch/index.js @@ -0,0 +1,838 @@ +'use strict'; + +/** + * Module dependencies + */ + +var util = require('util'); +var toRegex = require('to-regex'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var cache = require('./lib/cache'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var nm = require('nanomatch'); + * nm(list, patterns[, options]); + * + * console.log(nm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function nanomatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return nanomatch.match(list, patterns[0], options); + } + + var negated = false; + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, nanomatch.match(list, pattern.slice(1), options)); + negated = true; + } else { + keep.push.apply(keep, nanomatch.match(list, pattern, options)); + } + } + + // minimatch.match parity + if (negated && keep.length === 0) { + if (options && options.unixify === false) { + keep = list.slice(); + } else { + var unixify = utils.unixify(options); + for (var i = 0; i < list.length; i++) { + keep.push(unixify(list[i])); + } + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var nm = require('nanomatch'); + * nm.match(list, pattern[, options]); + * + * console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +nanomatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, nanomatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.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 [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = nanomatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.isMatch(string, pattern[, options]); + * + * console.log(nm.isMatch('a.a', '*.a')); + * //=> true + * console.log(nm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +nanomatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, nanomatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the elements in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.some(list, patterns[, options]); + * + * console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length === 1) { + return true; + } + } + + return false; +}; + +/** + * Returns true if every element in the given `list` matches + * at least one of the given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.every(list, patterns[, options]); + * + * console.log(nm.every('foo.js', ['foo.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length !== 1) { + return false; + } + } + + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var nm = require('nanomatch'); + * nm.any(string, patterns[, options]); + * + * console.log(nm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(nm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (nanomatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` + * match the specified string. + * + * ```js + * var nm = require('nanomatch'); + * nm.all(string, patterns[, options]); + * + * console.log(nm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(nm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (!nanomatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.not(list, patterns[, options]); + * + * console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +nanomatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + list = utils.arrayify(list); + + var matches = utils.diff(list, nanomatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, nanomatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var nm = require('nanomatch'); + * nm.contains(string, pattern[, options]); + * + * console.log(nm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(nm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +nanomatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return nanomatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +nanomatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var nm = require('nanomatch'); + * nm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(nm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +nanomatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = nanomatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var nm = require('nanomatch'); + * nm.matcher(pattern[, options]); + * + * var isMatch = nm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +nanomatch.matcher = function matcher(pattern, options) { + if (utils.isEmptyString(pattern)) { + return function() { + return false; + }; + } + + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = nanomatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (nanomatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + // create matcher function + var matcherFn = test(re); + // set result object from compiler on matcher function, + // as a non-enumerable property. useful for debugging + utils.define(matcherFn, 'result', re.result); + return matcherFn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or + * `null` if the pattern did not match. + * + * ```js + * var nm = require('nanomatch'); + * nm.capture(pattern, string[, options]); + * + * console.log(nm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(nm.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 + */ + +nanomatch.capture = function(pattern, str, options) { + var re = nanomatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.makeRe(pattern[, options]); + * + * console.log(nm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +nanomatch.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 = utils.extend({wrap: false}, options); + var result = nanomatch.create(pattern, opts); + var regex = toRegex(result.output, opts); + utils.define(regex, 'result', result); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Parses the given glob `pattern` and returns an object with the compiled `output` + * and optional source `map`. + * + * ```js + * var nm = require('nanomatch'); + * nm.create(pattern[, options]); + * + * console.log(nm.create('abc/*.js')); + * // { options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 } + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +nanomatch.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + function create() { + return nanomatch.compile(nanomatch.parse(pattern, options), options); + } + return memoize('create', pattern, options, create); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.parse(pattern[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +nanomatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.compile(ast[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(nm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +nanomatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = nanomatch.parse(ast, options); + } + + function compile() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + } + + return memoize('compile', ast.input, options, compile); +}; + +/** + * Clear the regex cache. + * + * ```js + * nm.clearCache(); + * ``` + * @api public + */ + +nanomatch.clearCache = function() { + nanomatch.cache.__data__ = {}; +}; + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `nanomatch` + */ + +nanomatch.compilers = compilers; +nanomatch.parsers = parsers; +nanomatch.cache = cache; + +/** + * Expose `nanomatch` + * @type {Function} + */ + +module.exports = nanomatch; diff --git a/node_modules/nanomatch/lib/cache.js b/node_modules/nanomatch/lib/cache.js new file mode 100644 index 0000000000000..fffc4c17a6da3 --- /dev/null +++ b/node_modules/nanomatch/lib/cache.js @@ -0,0 +1 @@ +module.exports = new (require('fragment-cache'))(); diff --git a/node_modules/nanomatch/lib/compilers.js b/node_modules/nanomatch/lib/compilers.js new file mode 100644 index 0000000000000..d7a786e7aad7c --- /dev/null +++ b/node_modules/nanomatch/lib/compilers.js @@ -0,0 +1,339 @@ +'use strict'; + +/** +* Nanomatch compilers +*/ + +module.exports = function(nanomatch, options) { + function slash() { + if (options && typeof options.slash === 'string') { + return options.slash; + } + if (options && typeof options.slash === 'function') { + return options.slash.call(nanomatch); + } + return '\\\\/'; + } + + function star() { + if (options && typeof options.star === 'string') { + return options.star; + } + if (options && typeof options.star === 'function') { + return options.star.call(nanomatch); + } + return '[^' + slash() + ']*?'; + } + + var ast = nanomatch.ast = nanomatch.parser.ast; + ast.state = nanomatch.parser.state; + nanomatch.compiler.state = ast.state; + nanomatch.compiler + + /** + * Negation / escaping + */ + + .set('not', function(node) { + var prev = this.prev(); + if (this.options.nonegate === true || prev.type !== 'bos') { + return this.emit('\\' + node.val, node); + } + return this.emit(node.val, node); + }) + .set('escape', function(node) { + if (this.options.unescape && /^[-\w_.]/.test(node.val)) { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + .set('quoted', function(node) { + return this.emit(node.val, node); + }) + + /** + * Regex + */ + + .set('dollar', function(node) { + if (node.parent.type === 'bracket') { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + + /** + * Dot: "." + */ + + .set('dot', function(node) { + if (node.dotfiles === true) this.dotfiles = true; + return this.emit('\\' + node.val, node); + }) + + /** + * Slashes: "/" and "\" + */ + + .set('backslash', function(node) { + return this.emit(node.val, node); + }) + .set('slash', function(node, nodes, i) { + var val = '[' + slash() + ']'; + var parent = node.parent; + var prev = this.prev(); + + // set "node.hasSlash" to true on all ancestor parens nodes + while (parent.type === 'paren' && !parent.hasSlash) { + parent.hasSlash = true; + parent = parent.parent; + } + + if (prev.addQmark) { + val += '?'; + } + + // word boundary + if (node.rest.slice(0, 2) === '\\b') { + return this.emit(val, node); + } + + // globstars + if (node.parsed === '**' || node.parsed === './**') { + this.output = '(?:' + this.output; + return this.emit(val + ')?', node); + } + + // negation + if (node.parsed === '!**' && this.options.nonegate !== true) { + return this.emit(val + '?\\b', node); + } + return this.emit(val, node); + }) + + /** + * Square brackets + */ + + .set('bracket', function(node) { + var close = node.close; + var open = !node.escaped ? '[' : '\\['; + var negated = node.negated; + var inner = node.inner; + var val = node.val; + + if (node.escaped === true) { + inner = inner.replace(/\\?(\W)/g, '\\$1'); + negated = ''; + } + + if (inner === ']-') { + inner = '\\]\\-'; + } + + if (negated && inner.indexOf('.') === -1) { + inner += '.'; + } + if (negated && inner.indexOf('/') === -1) { + inner += '/'; + } + + val = open + negated + inner + close; + return this.emit(val, node); + }) + + /** + * Square: "[.]" (only matches a single character in brackets) + */ + + .set('square', function(node) { + var val = (/^\W/.test(node.val) ? '\\' : '') + node.val; + return this.emit(val, node); + }) + + /** + * Question mark: "?" + */ + + .set('qmark', function(node) { + var prev = this.prev(); + // don't use "slash" variable so that we always avoid + // matching backslashes and slashes with a qmark + var val = '[^.\\\\/]'; + if (this.options.dot || (prev.type !== 'bos' && prev.type !== 'slash')) { + val = '[^\\\\/]'; + } + + if (node.parsed.slice(-1) === '(') { + var ch = node.rest.charAt(0); + if (ch === '!' || ch === '=' || ch === ':') { + return this.emit(node.val, node); + } + } + + if (node.val.length > 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); + } + if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) { + return this.emit('\\+', node); + } + var ch = this.output.slice(-1); + if (/\w/.test(ch) && !node.inside) { + return this.emit('+\\+?', node); + } + return this.emit('+', node); + }) + + /** + * globstar: '**' + */ + + .set('globstar', function(node, nodes, i) { + if (!this.output) { + this.state.leadingGlobstar = true; + } + + var prev = this.prev(); + var before = this.prev(2); + var next = this.next(); + var after = this.next(2); + var type = prev.type; + var val = node.val; + + if (prev.type === 'slash' && next.type === 'slash') { + if (before.type === 'text') { + this.output += '?'; + + if (after.type !== 'text') { + this.output += '\\b'; + } + } + } + + var parsed = node.parsed; + if (parsed.charAt(0) === '!') { + parsed = parsed.slice(1); + } + + var isInside = node.isInside.paren || node.isInside.brace; + if (parsed && type !== 'slash' && type !== 'bos' && !isInside) { + val = star(); + } else { + val = this.options.dot !== true + ? '(?:(?!(?:[' + slash() + ']|^)\\.).)*?' + : '(?:(?!(?:[' + slash() + ']|^)(?:\\.{1,2})($|[' + slash() + ']))(?!\\.{2}).)*?'; + } + + if ((type === 'slash' || type === 'bos') && this.options.dot !== true) { + val = '(?!\\.)' + val; + } + + if (prev.type === 'slash' && next.type === 'slash' && before.type !== 'text') { + if (after.type === 'text' || after.type === 'star') { + node.addQmark = true; + } + } + + if (this.options.capture) { + val = '(' + val + ')'; + } + + return this.emit(val, node); + }) + + /** + * Star: "*" + */ + + .set('star', function(node, nodes, i) { + var prior = nodes[i - 2] || {}; + var prev = this.prev(); + var next = this.next(); + var type = prev.type; + + function isStart(n) { + return n.type === 'bos' || n.type === 'slash'; + } + + if (this.output === '' && this.options.contains !== true) { + this.output = '(?![' + slash() + '])'; + } + + if (type === 'bracket' && this.options.bash === false) { + var str = next && next.type === 'bracket' ? star() : '*?'; + if (!prev.nodes || prev.nodes[1].type !== 'posix') { + return this.emit(str, node); + } + } + + var prefix = !this.dotfiles && type !== 'text' && type !== 'escape' + ? (this.options.dot ? '(?!(?:^|[' + slash() + '])\\.{1,2}(?:$|[' + slash() + ']))' : '(?!\\.)') + : ''; + + if (isStart(prev) || (isStart(prior) && type === 'not')) { + if (prefix !== '(?!\\.)') { + prefix += '(?!(\\.{2}|\\.[' + slash() + ']))(?=.)'; + } else { + prefix += '(?=.)'; + } + } else if (prefix === '(?!\\.)') { + prefix = ''; + } + + if (prev.type === 'not' && prior.type === 'bos' && this.options.dot === true) { + this.output = '(?!\\.)' + this.output; + } + + var output = prefix + star(); + if (this.options.capture) { + output = '(' + output + ')'; + } + + return this.emit(output, node); + }) + + /** + * Text + */ + + .set('text', function(node) { + return this.emit(node.val, node); + }) + + /** + * End-of-string + */ + + .set('eos', function(node) { + var prev = this.prev(); + var val = node.val; + + this.output = '(?:\\.[' + slash() + '](?=.))?' + this.output; + if (this.state.metachar && prev.type !== 'qmark' && prev.type !== 'slash') { + val += (this.options.contains ? '[' + slash() + ']?' : '(?:[' + slash() + ']|$)'); + } + + return this.emit(val, node); + }); + + /** + * Allow custom compilers to be passed on options + */ + + if (options && typeof options.compilers === 'function') { + options.compilers(nanomatch.compiler); + } +}; + diff --git a/node_modules/nanomatch/lib/parsers.js b/node_modules/nanomatch/lib/parsers.js new file mode 100644 index 0000000000000..f87df8f34807a --- /dev/null +++ b/node_modules/nanomatch/lib/parsers.js @@ -0,0 +1,386 @@ +'use strict'; + +var regexNot = require('regex-not'); +var toRegex = require('to-regex'); + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var cached; +var NOT_REGEX = '[\\[!*+?$^"\'.\\\\/]+'; +var not = createTextRegex(NOT_REGEX); + +/** + * Nanomatch parsers + */ + +module.exports = function(nanomatch, options) { + var parser = nanomatch.parser; + var opts = parser.options; + + parser.state = { + slashes: 0, + paths: [] + }; + + parser.ast.state = parser.state; + parser + + /** + * Beginning-of-string + */ + + .capture('prefix', function() { + if (this.parsed) return; + var m = this.match(/^\.[\\/]/); + if (!m) return; + this.state.strictOpen = !!this.options.strictOpen; + this.state.addPrefix = true; + }) + + /** + * Escape: "\\." + */ + + .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[2] || m[1] + }); + }) + + /** + * Quoted strings + */ + + .capture('quoted', function() { + var pos = this.position(); + var m = this.match(/^["']/); + if (!m) return; + + var quote = m[0]; + if (this.input.indexOf(quote) === -1) { + return pos({ + type: 'escape', + val: quote + }); + } + + var tok = advanceTo(this.input, quote); + this.consume(tok.len); + + return pos({ + type: 'quoted', + val: tok.esc + }); + }) + + /** + * Negations: "!" + */ + + .capture('not', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(this.notRegex || /^!+/); + if (!m) return; + var val = m[0]; + + var isNegated = (val.length % 2) === 1; + if (parsed === '' && !isNegated) { + val = ''; + } + + // if nothing has been parsed, we know `!` is at the start, + // so we need to wrap the result in a negation regex + if (parsed === '' && isNegated && this.options.nonegate !== true) { + this.bos.val = '(?!^(?:'; + this.append = ')$).*'; + val = ''; + } + return pos({ + type: 'not', + val: val + }); + }) + + /** + * Dot: "." + */ + + .capture('dot', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\.+/); + if (!m) return; + + var val = m[0]; + this.state.dot = val === '.' && (parsed === '' || parsed.slice(-1) === '/'); + + return pos({ + type: 'dot', + dotfiles: this.state.dot, + val: val + }); + }) + + /** + * Plus: "+" + */ + + .capture('plus', /^\+(?!\()/) + + /** + * Question mark: "?" + */ + + .capture('qmark', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\?+(?!\()/); + if (!m) return; + + this.state.metachar = true; + this.state.qmark = true; + + return pos({ + type: 'qmark', + parsed: parsed, + val: m[0] + }); + }) + + /** + * Globstar: "**" + */ + + .capture('globstar', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\*{2}(?![*(])(?=[,)/]|$)/); + if (!m) return; + + var type = opts.noglobstar !== true ? 'globstar' : 'star'; + var node = pos({type: type, parsed: parsed}); + this.state.metachar = true; + + while (this.input.slice(0, 4) === '/**/') { + this.input = this.input.slice(3); + } + + node.isInside = { + brace: this.isInside('brace'), + paren: this.isInside('paren') + }; + + if (type === 'globstar') { + this.state.globstar = true; + node.val = '**'; + + } else { + this.state.star = true; + node.val = '*'; + } + + return node; + }) + + /** + * Star: "*" + */ + + .capture('star', function() { + var pos = this.position(); + var starRe = /^(?:\*(?![*(])|[*]{3,}(?!\()|[*]{2}(?![(/]|$)|\*(?=\*\())/; + var m = this.match(starRe); + if (!m) return; + + this.state.metachar = true; + this.state.star = true; + return pos({ + type: 'star', + val: m[0] + }); + }) + + /** + * Slash: "/" + */ + + .capture('slash', function() { + var pos = this.position(); + var m = this.match(/^\//); + if (!m) return; + + this.state.slashes++; + return pos({ + type: 'slash', + val: m[0] + }); + }) + + /** + * Backslash: "\\" + */ + + .capture('backslash', function() { + var pos = this.position(); + var m = this.match(/^\\(?![*+?(){}[\]'"])/); + if (!m) return; + + var val = m[0]; + + if (this.isInside('bracket')) { + val = '\\'; + } else if (val.length > 1) { + val = '\\\\'; + } + + return pos({ + type: 'backslash', + val: val + }); + }) + + /** + * Square: "[.]" + */ + + .capture('square', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\[([^!^\\])\]/); + if (!m) return; + + return pos({ + type: 'square', + val: m[1] + }); + }) + + /** + * Brackets: "[...]" (basic, this can be overridden by other parsers) + */ + + .capture('bracket', function() { + var pos = this.position(); + var m = this.match(/^(?:\[([!^]?)([^\]]+|\]-)(\]|[^*+?]+)|\[)/); + if (!m) return; + + var val = m[0]; + var negated = m[1] ? '^' : ''; + var inner = (m[2] || '').replace(/\\\\+/, '\\\\'); + var close = m[3] || ''; + + if (m[2] && inner.length < m[2].length) { + val = val.replace(/\\\\+/, '\\\\'); + } + + var esc = this.input.slice(0, 2); + if (inner === '' && esc === '\\]') { + inner += esc; + this.consume(2); + + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + if (ch === ']') { + close = ch; + break; + } + inner += ch; + } + } + + return pos({ + type: 'bracket', + val: val, + escaped: close !== ']', + negated: negated, + inner: inner, + close: close + }); + }) + + /** + * Text + */ + + .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] + }); + }); + + /** + * Allow custom parsers to be passed on options + */ + + if (options && typeof options.parsers === 'function') { + options.parsers(nanomatch.parser); + } +}; + +/** + * Advance to the next non-escaped character + */ + +function advanceTo(input, endChar) { + var ch = input.charAt(0); + var tok = { len: 1, val: '', esc: '' }; + var idx = 0; + + function advance() { + if (ch !== '\\') { + tok.esc += '\\' + ch; + tok.val += ch; + } + + ch = input.charAt(++idx); + tok.len++; + + if (ch === '\\') { + advance(); + advance(); + } + } + + while (ch && ch !== endChar) { + advance(); + } + return tok; +} + +/** + * Create text regex + */ + +function createTextRegex(pattern) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re = toRegex('^(?:[*]\\((?=.)|' + not + ')', opts); + return (cached = re); +} + +/** + * Expose negation string + */ + +module.exports.not = NOT_REGEX; diff --git a/node_modules/nanomatch/lib/utils.js b/node_modules/nanomatch/lib/utils.js new file mode 100644 index 0000000000000..0cf1501d275ff --- /dev/null +++ b/node_modules/nanomatch/lib/utils.js @@ -0,0 +1,379 @@ +'use strict'; + +var utils = module.exports; +var path = require('path'); + +/** + * Module dependencies + */ + +var isWindows = require('is-windows')(); +var Snapdragon = require('snapdragon'); +utils.define = require('define-property'); +utils.diff = require('arr-diff'); +utils.extend = require('extend-shallow'); +utils.pick = require('object.pick'); +utils.typeOf = require('kind-of'); +utils.unique = require('array-unique'); + +/** + * Returns true if the given value is effectively an empty string + */ + +utils.isEmptyString = function(val) { + return String(val) === '' || String(val) === './'; +}; + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || isWindows === true; +}; + +/** + * Return the last element from an array + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.call(this, str, options); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * 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) { + if (typeof options === 'undefined') { + return pattern; + } + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isRegex = function(val) { + return utils.typeOf(val) === 'regexp'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\/\s]/g, '\\$&'); +}; + +/** + * Combines duplicate characters in the provided `input` string. + * @param {String} `input` + * @returns {String} + */ + +utils.combineDupes = function(input, patterns) { + patterns = utils.arrayify(patterns).join('|').split('|'); + patterns = patterns.map(function(s) { + return s.replace(/\\?([+*\\/])/g, '\\$1'); + }); + var substr = patterns.join('|'); + var regex = new RegExp('(' + substr + ')(?=\\1)', 'g'); + return input.replace(regex, ''); +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|[\]{}]|[+@]\()/.test(str); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the drive letter from a windows filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripDrive = function(fp) { + return utils.isWindows() ? fp.replace(/^[a-z]:[\\/]+?/i, '/') : fp; +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) === '.' && (str.charAt(1) === '/' || str.charAt(1) === '\\')) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if `str` is a common character that doesn't need + * to be processed to be used for matching. + * @param {String} `str` + * @return {Boolean} + */ + +utils.isSimpleChar = function(str) { + return str.trim() === '' || str === '.'; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(filepath) || re.test(path.basename(filepath)); + }; +}; + +/** + * Returns the given value unchanced. + * @return {any} + */ + +utils.identity = function(val) { + return val; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + if (options && typeof options.unixify === 'function') { + return options.unixify(str); + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + var opts = options || {}; + return function(filepath) { + if (opts.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (opts.unescape === true) { + filepath = utils.unescape(filepath); + } + if (opts.unixify === true || utils.isWindows()) { + filepath = utils.toPosixPath(filepath); + } + return filepath; + }; +}; diff --git a/node_modules/nanomatch/node_modules/arr-diff/LICENSE b/node_modules/nanomatch/node_modules/arr-diff/LICENSE new file mode 100755 index 0000000000000..d734237bdedc6 --- /dev/null +++ b/node_modules/nanomatch/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/nanomatch/node_modules/arr-diff/README.md b/node_modules/nanomatch/node_modules/arr-diff/README.md new file mode 100644 index 0000000000000..961f5c3f1bf20 --- /dev/null +++ b/node_modules/nanomatch/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/nanomatch/node_modules/arr-diff/index.js b/node_modules/nanomatch/node_modules/arr-diff/index.js new file mode 100644 index 0000000000000..90f280772a86e --- /dev/null +++ b/node_modules/nanomatch/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/nanomatch/node_modules/arr-diff/package.json b/node_modules/nanomatch/node_modules/arr-diff/package.json new file mode 100644 index 0000000000000..c106813becc29 --- /dev/null +++ b/node_modules/nanomatch/node_modules/arr-diff/package.json @@ -0,0 +1,69 @@ +{ + "name": "arr-diff", + "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.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/arr-diff", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)" + ], + "repository": "jonschlinkert/arr-diff", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "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" + }, + "keywords": [ + "arr", + "array", + "array differ", + "array-differ", + "diff", + "differ", + "difference" + ], + "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 + } + } +} diff --git a/node_modules/nanomatch/node_modules/array-unique/LICENSE b/node_modules/nanomatch/node_modules/array-unique/LICENSE new file mode 100755 index 0000000000000..842218cf09a20 --- /dev/null +++ b/node_modules/nanomatch/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/nanomatch/node_modules/array-unique/README.md b/node_modules/nanomatch/node_modules/array-unique/README.md new file mode 100755 index 0000000000000..41c8c904efa99 --- /dev/null +++ b/node_modules/nanomatch/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/nanomatch/node_modules/array-unique/index.js b/node_modules/nanomatch/node_modules/array-unique/index.js new file mode 100644 index 0000000000000..7e481e0724df9 --- /dev/null +++ b/node_modules/nanomatch/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/nanomatch/node_modules/array-unique/package.json b/node_modules/nanomatch/node_modules/array-unique/package.json new file mode 100644 index 0000000000000..d87640abe6823 --- /dev/null +++ b/node_modules/nanomatch/node_modules/array-unique/package.json @@ -0,0 +1,62 @@ +{ + "name": "array-unique", + "description": "Remove duplicate values from an array. Fastest ES5 implementation.", + "version": "0.3.2", + "homepage": "https://github.com/jonschlinkert/array-unique", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/array-unique", + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3", + "should": "^10.0.0" + }, + "keywords": [ + "array", + "unique" + ], + "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 + } + } +} diff --git a/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md b/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000000000..01687d5cbb930 --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# 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.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [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 \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/kind-of/LICENSE b/node_modules/nanomatch/node_modules/kind-of/LICENSE new file mode 100644 index 0000000000000..3f2eca18f1bc0 --- /dev/null +++ b/node_modules/nanomatch/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/nanomatch/node_modules/kind-of/README.md b/node_modules/nanomatch/node_modules/kind-of/README.md new file mode 100644 index 0000000000000..0411dc58a2ffd --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# 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/micromatch/is-glob) | [homepage](https://github.com/micromatch/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 a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [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** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 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 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [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.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/kind-of/index.js b/node_modules/nanomatch/node_modules/kind-of/index.js new file mode 100644 index 0000000000000..dfa799b784975 --- /dev/null +++ b/node_modules/nanomatch/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 typeof val.constructor === 'function' ? 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/nanomatch/node_modules/kind-of/package.json b/node_modules/nanomatch/node_modules/kind-of/package.json new file mode 100644 index 0000000000000..5820cad2390f7 --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "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" + ], + "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" + ] + } +} diff --git a/node_modules/nanomatch/package.json b/node_modules/nanomatch/package.json new file mode 100644 index 0000000000000..0a85f0aaac341 --- /dev/null +++ b/node_modules/nanomatch/package.json @@ -0,0 +1,134 @@ +{ + "name": "nanomatch", + "description": "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)", + "version": "1.2.13", + "homepage": "https://github.com/micromatch/nanomatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Devon Govett (http://badassjs.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/nanomatch", + "bugs": { + "url": "https://github.com/micromatch/nanomatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^5.0.0", + "helper-changelog": "^0.3.0", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "nanomatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "lintDeps": { + "dependencies": { + "options": { + "lock": { + "snapdragon": "^0.8.1" + } + } + }, + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**" + ] + } + } + } + }, + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "helpers": [ + "helper-changelog" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "extglob", + "is-extglob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "expand-brackets", + "expand-tilde", + "glob-object", + "micromatch", + "minimatch", + "options", + "snapdragon" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/normalize-package-data/AUTHORS b/node_modules/normalize-package-data/AUTHORS new file mode 100644 index 0000000000000..66282ba1d1197 --- /dev/null +++ b/node_modules/normalize-package-data/AUTHORS @@ -0,0 +1,4 @@ +# Names sorted by how much code was originally theirs. +Isaac Z. Schlueter +Meryn Stol +Robert Kowalski diff --git a/node_modules/normalize-package-data/LICENSE b/node_modules/normalize-package-data/LICENSE new file mode 100644 index 0000000000000..6ed662cd5d14d --- /dev/null +++ b/node_modules/normalize-package-data/LICENSE @@ -0,0 +1,30 @@ +This package contains code originally written by Isaac Z. Schlueter. +Used with permission. + +Copyright (c) Meryn Stol ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/normalize-package-data/README.md b/node_modules/normalize-package-data/README.md new file mode 100644 index 0000000000000..d2bd7bc7ff606 --- /dev/null +++ b/node_modules/normalize-package-data/README.md @@ -0,0 +1,106 @@ +# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data) + +normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. + +normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools. + +## Installation + +``` +npm install normalize-package-data +``` + +## Usage + +Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +normalizeData(packageData) +// packageData is now normalized +``` + +#### Strict mode + +You may activate strict validation by passing true as the second argument. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +normalizeData(packageData, true) +// packageData is now normalized +``` + +If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace. + +#### Warnings + +Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +warnFn = function(msg) { console.error(msg) } +normalizeData(packageData, warnFn) +// packageData is now normalized. Any number of warnings may have been logged. +``` + +You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third. + +When `private` field is set to `true`, warnings will be suppressed. + +### Potential exceptions + +If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback. + +## What normalization (currently) entails + +* The value of `name` field gets trimmed (unless in strict mode). +* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver). +* If `name` and/or `version` fields are missing, they are set to empty strings. +* If `files` field is not an array, it will be removed. +* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value. +* If `man` field is a string, it will become an array with the original string as its sole member. +* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`. +* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties. +* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. +* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. +* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. +* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved. +* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL. +* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. +* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. +* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git +* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. +* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. +* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed. +* If `homepage` field is not a string, it will be removed. +* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`. +* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. + +### Rules for name field + +If `name` field is given, the value of the name field must be a string. The string may not: + +* start with a period. +* contain the following characters: `/@\s+%` +* contain any characters that would need to be encoded for use in urls. +* resemble the word `node_modules` or `favicon.ico` (case doesn't matter). + +### Rules for version field + +If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver). + +### Rules for license field + +The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/package/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license). + +## Credits + +This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson. + +## License + +normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). +Copyright (c) 2013 Meryn Stol diff --git a/node_modules/normalize-package-data/lib/extract_description.js b/node_modules/normalize-package-data/lib/extract_description.js new file mode 100644 index 0000000000000..83f10aa0a7906 --- /dev/null +++ b/node_modules/normalize-package-data/lib/extract_description.js @@ -0,0 +1,14 @@ +module.exports = extractDescription + +// Extracts description from contents of a readme file in markdown format +function extractDescription (d) { + if (!d) return; + if (d === "ERROR: No README data found!") return; + // the first block of text before the first heading + // that isn't the first line heading + d = d.trim().split('\n') + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); + var l = d.length + for (var e = s + 1; e < l && d[e].trim(); e ++); + return d.slice(s, e).join(' ').trim() +} diff --git a/node_modules/normalize-package-data/lib/fixer.js b/node_modules/normalize-package-data/lib/fixer.js new file mode 100644 index 0000000000000..27682e9611afd --- /dev/null +++ b/node_modules/normalize-package-data/lib/fixer.js @@ -0,0 +1,418 @@ +var semver = require("semver") +var validateLicense = require('validate-npm-package-license'); +var hostedGitInfo = require("hosted-git-info") +var isBuiltinModule = require("resolve").isCore +var depTypes = ["dependencies","devDependencies","optionalDependencies"] +var extractDescription = require("./extract_description") +var url = require("url") +var typos = require("./typos.json") + +var fixer = module.exports = { + // default warning function + warn: function() {}, + + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0] + } + if (!data.repository) return this.warn("missingRepository") + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + } + } + var r = data.repository.url || "" + if (r) { + var hosted = hostedGitInfo.fromUrl(r) + if (hosted) { + r = data.repository.url + = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString() + } + } + + if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r) + } + } + +, fixTypos: function(data) { + Object.keys(typos.topLevel).forEach(function (d) { + if (data.hasOwnProperty(d)) { + this.warn("typo", d, typos.topLevel[d]) + } + }, this) + } + +, fixScriptsField: function(data) { + if (!data.scripts) return + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts") + delete data.scripts + return + } + Object.keys(data.scripts).forEach(function (k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript") + delete data.scripts[k] + } else if (typos.script[k] && !data.scripts[typos.script[k]]) { + this.warn("typo", k, typos.script[k], "scripts") + } + }, this) + } + +, fixFilesField: function(data) { + var files = data.files + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles") + delete data.files + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file) + return false + } else { + return true + } + }, this) + } + } + +, fixBinField: function(data) { + if (!data.bin) return; + if (typeof data.bin === "string") { + var b = {} + var match + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin + } else { + b[data.name] = data.bin + } + data.bin = b + } + } + +, fixManField: function(data) { + if (!data.man) return; + if (typeof data.man === "string") { + data.man = [ data.man ] + } + } +, fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies" + var bd = "bundleDependencies" + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd] + delete data[bdd] + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies") + delete data[bd] + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd) { + if (!bd || typeof bd !== 'string') { + this.warn("nonStringBundleDependency", bd) + return false + } else { + if (!data.dependencies) { + data.dependencies = {} + } + if (!data.dependencies.hasOwnProperty(bd)) { + this.warn("nonDependencyBundleDependency", bd) + data.dependencies[bd] = "*" + } + return true + } + }, this) + } + } + +, fixDependencies: function(data, strict) { + var loose = !strict + objectifyDeps(data, this.warn) + addOptionalDepsToDeps(data, this.warn) + this.fixBundleDependenciesField(data) + + ;['dependencies','devDependencies'].forEach(function(deps) { + if (!(deps in data)) return + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps) + delete data[deps] + return + } + Object.keys(data[deps]).forEach(function (d) { + var r = data[deps][d] + if (typeof r !== 'string') { + this.warn("nonStringDependency", d, JSON.stringify(r)) + delete data[deps][d] + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]) + if (hosted) data[deps][d] = hosted.toString() + }, this) + }, this) + } + +, fixModulesField: function (data) { + if (data.modules) { + this.warn("deprecatedModules") + delete data.modules + } + } + +, fixKeywordsField: function (data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/) + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords + this.warn("nonArrayKeywords") + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false + } else { + return true + } + }, this) + } + } + +, fixVersionField: function(data, strict) { + // allow "loose" semver 1.0 versions in non-strict mode + // enforce strict semver 2.0 compliance in strict mode + var loose = !strict + if (!data.version) { + data.version = "" + return true + } + if (!semver.valid(data.version, loose)) { + throw new Error('Invalid version: "'+ data.version + '"') + } + data.version = semver.clean(data.version, loose) + return true + } + +, fixPeople: function(data) { + modifyPeople(data, unParsePerson) + modifyPeople(data, parsePerson) + } + +, fixNameField: function(data, options) { + if (typeof options === "boolean") options = {strict: options} + else if (typeof options === "undefined") options = {} + var strict = options.strict + if (!data.name && !strict) { + data.name = "" + return + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string.") + } + if (!strict) + data.name = data.name.trim() + ensureValidName(data.name, strict, options.allowLegacyCase) + if (isBuiltinModule(data.name)) + this.warn("conflictingName", data.name) + } + + +, fixDescriptionField: function (data) { + if (data.description && typeof data.description !== 'string') { + this.warn("nonStringDescription") + delete data.description + } + if (data.readme && !data.description) + data.description = extractDescription(data.readme) + if(data.description === undefined) delete data.description; + if (!data.description) this.warn("missingDescription") + } + +, fixReadmeField: function (data) { + if (!data.readme) { + this.warn("missingReadme") + data.readme = "ERROR: No README data found!" + } + } + +, fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if(hosted && hosted.bugs()) { + data.bugs = {url: hosted.bugs()} + } + } + else if(data.bugs) { + var emailRe = /^.+@.*\..+$/ + if(typeof data.bugs == "string") { + if(emailRe.test(data.bugs)) + data.bugs = {email:data.bugs} + else if(url.parse(data.bugs).protocol) + data.bugs = {url: data.bugs} + else + this.warn("nonEmailUrlBugsString") + } + else { + bugsTypos(data.bugs, this.warn) + var oldBugs = data.bugs + data.bugs = {} + if(oldBugs.url) { + if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) + data.bugs.url = oldBugs.url + else + this.warn("nonUrlBugsUrlField") + } + if(oldBugs.email) { + if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) + data.bugs.email = oldBugs.email + else + this.warn("nonEmailBugsEmailField") + } + } + if(!data.bugs.email && !data.bugs.url) { + delete data.bugs + this.warn("emptyNormalizedBugs") + } + } + } + +, fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted && hosted.docs()) data.homepage = hosted.docs() + } + if (!data.homepage) return + + if(typeof data.homepage !== "string") { + this.warn("nonUrlHomepage") + return delete data.homepage + } + if(!url.parse(data.homepage).protocol) { + data.homepage = "http://" + data.homepage + } + } + +, fixLicenseField: function(data) { + if (!data.license) { + return this.warn("missingLicense") + } else{ + if ( + typeof(data.license) !== 'string' || + data.license.length < 1 || + data.license.trim() === '' + ) { + this.warn("invalidLicense") + } else { + if (!validateLicense(data.license).validForNewPackages) + this.warn("invalidLicense") + } + } + } +} + +function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== '@') return false + + var rest = spec.slice(1).split('/') + if (rest.length !== 2) return false + + return rest[0] && rest[1] && + rest[0] === encodeURIComponent(rest[0]) && + rest[1] === encodeURIComponent(rest[1]) +} + +function isCorrectlyEncodedName(spec) { + return !spec.match(/[\/@\s\+%:]/) && + spec === encodeURIComponent(spec) +} + +function ensureValidName (name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || + !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || + (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || + name.toLowerCase() === "node_modules" || + name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)) + } +} + +function modifyPeople (data, fn) { + if (data.author) data.author = fn(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(fn) + }) + return data +} + +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || "" + var u = person.url || person.web + var url = u ? (" ("+u+")") : "" + var e = person.email || person.mail + var email = e ? (" <"+e+">") : "" + return name+email+url +} + +function parsePerson (person) { + if (typeof person !== "string") return person + var name = person.match(/^([^\(<]+)/) + var url = person.match(/\(([^\)]+)\)/) + var email = person.match(/<([^>]+)>/) + var obj = {} + if (name && name[0].trim()) obj.name = name[0].trim() + if (email) obj.email = email[1]; + if (url) obj.url = url[1]; + return obj +} + +function addOptionalDepsToDeps (data, warn) { + var o = data.optionalDependencies + if (!o) return; + var d = data.dependencies || {} + Object.keys(o).forEach(function (k) { + d[k] = o[k] + }) + data.dependencies = d +} + +function depObjectify (deps, type, warn) { + if (!deps) return {} + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/) + } + if (!Array.isArray(deps)) return deps + warn("deprecatedArrayDependencies", type) + var o = {} + deps.filter(function (d) { + return typeof d === "string" + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/) + var dn = d.shift() + var dv = d.join("") + dv = dv.trim() + dv = dv.replace(/^@/, "") + o[dn] = dv + }) + return o +} + +function objectifyDeps (data, warn) { + depTypes.forEach(function (type) { + if (!data[type]) return; + data[type] = depObjectify(data[type], type, warn) + }) +} + +function bugsTypos(bugs, warn) { + if (!bugs) return + Object.keys(bugs).forEach(function (k) { + if (typos.bugs[k]) { + warn("typo", k, typos.bugs[k], "bugs") + bugs[typos.bugs[k]] = bugs[k] + delete bugs[k] + } + }) +} diff --git a/node_modules/normalize-package-data/lib/make_warning.js b/node_modules/normalize-package-data/lib/make_warning.js new file mode 100644 index 0000000000000..4ac74ad7cb25c --- /dev/null +++ b/node_modules/normalize-package-data/lib/make_warning.js @@ -0,0 +1,23 @@ +var util = require("util") +var messages = require("./warning_messages.json") + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + var warningName = args.shift() + if (warningName == "typo") { + return makeTypoWarning.apply(null,args) + } + else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'" + args.unshift(msgTemplate) + return util.format.apply(null, args) + } +} + +function makeTypoWarning (providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']" + probableName = field + "['" + probableName + "']" + } + return util.format(messages.typo, providedName, probableName) +} diff --git a/node_modules/normalize-package-data/lib/normalize.js b/node_modules/normalize-package-data/lib/normalize.js new file mode 100644 index 0000000000000..bd1bfef123103 --- /dev/null +++ b/node_modules/normalize-package-data/lib/normalize.js @@ -0,0 +1,39 @@ +module.exports = normalize + +var fixer = require("./fixer") +normalize.fixer = fixer + +var makeWarning = require("./make_warning") + +var fieldsToFix = ['name','version','description','repository','modules','scripts' + ,'files','bin','man','bugs','keywords','readme','homepage','license'] +var otherThingsToFix = ['dependencies','people', 'typos'] + +var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field" +}) +// two ways to do this in CoffeeScript on only one line, sub-70 chars: +// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" +// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) +thingsToFix = thingsToFix.concat(otherThingsToFix) + +function normalize (data, warn, strict) { + if(warn === true) warn = null, strict = true + if(!strict) strict = false + if(!warn || data.private) warn = function(msg) { /* noop */ } + + if (data.scripts && + data.scripts.install === "node-gyp rebuild" && + !data.scripts.preinstall) { + data.gypfile = true + } + fixer.warn = function() { warn(makeWarning.apply(null, arguments)) } + thingsToFix.forEach(function(thingName) { + fixer["fix" + ucFirst(thingName)](data, strict) + }) + data._id = data.name + "@" + data.version +} + +function ucFirst (string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} diff --git a/node_modules/normalize-package-data/lib/safe_format.js b/node_modules/normalize-package-data/lib/safe_format.js new file mode 100644 index 0000000000000..b07f1006d1ad2 --- /dev/null +++ b/node_modules/normalize-package-data/lib/safe_format.js @@ -0,0 +1,9 @@ +var util = require('util') + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + args.forEach(function(arg) { + if (!arg) throw new TypeError('Bad arguments.') + }) + return util.format.apply(null, arguments) +} diff --git a/node_modules/normalize-package-data/lib/typos.json b/node_modules/normalize-package-data/lib/typos.json new file mode 100644 index 0000000000000..7f9dd283b30ff --- /dev/null +++ b/node_modules/normalize-package-data/lib/typos.json @@ -0,0 +1,25 @@ +{ + "topLevel": { + "dependancies": "dependencies" + ,"dependecies": "dependencies" + ,"depdenencies": "dependencies" + ,"devEependencies": "devDependencies" + ,"depends": "dependencies" + ,"dev-dependencies": "devDependencies" + ,"devDependences": "devDependencies" + ,"devDepenencies": "devDependencies" + ,"devdependencies": "devDependencies" + ,"repostitory": "repository" + ,"repo": "repository" + ,"prefereGlobal": "preferGlobal" + ,"hompage": "homepage" + ,"hampage": "homepage" + ,"autohr": "author" + ,"autor": "author" + ,"contributers": "contributors" + ,"publicationConfig": "publishConfig" + ,"script": "scripts" + }, + "bugs": { "web": "url", "name": "url" }, + "script": { "server": "start", "tests": "test" } +} diff --git a/node_modules/normalize-package-data/lib/warning_messages.json b/node_modules/normalize-package-data/lib/warning_messages.json new file mode 100644 index 0000000000000..4890f506ed965 --- /dev/null +++ b/node_modules/normalize-package-data/lib/warning_messages.json @@ -0,0 +1,30 @@ +{ + "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field" + ,"missingRepository": "No repository field." + ,"brokenGitUrl": "Probably broken git url: %s" + ,"nonObjectScripts": "scripts must be an object" + ,"nonStringScript": "script values must be string commands" + ,"nonArrayFiles": "Invalid 'files' member" + ,"invalidFilename": "Invalid filename in 'files' list: %s" + ,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names" + ,"nonStringBundleDependency": "Invalid bundleDependencies member: %s" + ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s" + ,"nonObjectDependencies": "%s field must be an object" + ,"nonStringDependency": "Invalid dependency: %s %s" + ,"deprecatedArrayDependencies": "specifying %s as array is deprecated" + ,"deprecatedModules": "modules field is deprecated" + ,"nonArrayKeywords": "keywords should be an array of strings" + ,"nonStringKeyword": "keywords should be an array of strings" + ,"conflictingName": "%s is also the name of a node core module." + ,"nonStringDescription": "'description' field should be a string" + ,"missingDescription": "No description" + ,"missingReadme": "No README data" + ,"missingLicense": "No license field." + ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}" + ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted." + ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted." + ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted." + ,"nonUrlHomepage": "homepage field must be a string url. Deleted." + ,"invalidLicense": "license should be a valid SPDX license expression" + ,"typo": "%s should probably be %s." +} diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json new file mode 100644 index 0000000000000..dea34bb7ffcec --- /dev/null +++ b/node_modules/normalize-package-data/package.json @@ -0,0 +1,31 @@ +{ + "name": "normalize-package-data", + "version": "2.5.0", + "author": "Meryn Stol ", + "description": "Normalizes data that can be found in package.json files.", + "license": "BSD-2-Clause", + "repository": { + "type": "git", + "url": "git://github.com/npm/normalize-package-data.git" + }, + "main": "lib/normalize.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "devDependencies": { + "async": "^2.6.1", + "tap": "^12.4.0", + "underscore": "^1.8.3" + }, + "files": [ + "lib/*.js", + "lib/*.json", + "AUTHORS" + ] +} diff --git a/node_modules/normalize-path/LICENSE b/node_modules/normalize-path/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /dev/null +++ b/node_modules/normalize-path/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/normalize-path/README.md b/node_modules/normalize-path/README.md new file mode 100644 index 0000000000000..daa0edda31f96 --- /dev/null +++ b/node_modules/normalize-path/README.md @@ -0,0 +1,92 @@ +# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save normalize-path +``` + +## Usage + +```js +var normalize = require('normalize-path'); + +normalize('\\foo\\bar\\baz\\'); +//=> '/foo/bar/baz' + +normalize('./foo/bar/baz/'); +//=> './foo/bar/baz' +``` + +Pass `false` as the last argument to **keep** trailing slashes: + +```js +normalize('./foo/bar/baz/', false); +//=> './foo/bar/baz/' + +normalize('foo\\bar\\baz\\', false); +//=> 'foo/bar/baz/' +``` + +## About + +### Related projects + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") +* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with "Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.") +* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.") +* [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.") +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") +* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments "Get n specific segments of a file path, e.g. first 2, last 3, etc.") +* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g… [more](https://github.com/jonschlinkert/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext "Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.") +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") + +### 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) | +| 1 | [phated](https://github.com/phated) | + +### 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.3, on March 29, 2017._ \ No newline at end of file diff --git a/node_modules/normalize-path/index.js b/node_modules/normalize-path/index.js new file mode 100644 index 0000000000000..4a4f8ccdb12c3 --- /dev/null +++ b/node_modules/normalize-path/index.js @@ -0,0 +1,19 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var removeTrailingSeparator = require('remove-trailing-separator'); + +module.exports = function normalizePath(str, stripTrailing) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + str = str.replace(/[\\\/]+/g, '/'); + if (stripTrailing !== false) { + str = removeTrailingSeparator(str); + } + return str; +}; diff --git a/node_modules/normalize-path/package.json b/node_modules/normalize-path/package.json new file mode 100644 index 0000000000000..c16ef9d25e72a --- /dev/null +++ b/node_modules/normalize-path/package.json @@ -0,0 +1,78 @@ +{ + "name": "normalize-path", + "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/normalize-path", + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "devDependencies": { + "benchmarked": "^0.1.1", + "gulp-format-md": "^0.1.11", + "minimist": "^1.2.0", + "mocha": "*" + }, + "keywords": [ + "backslash", + "file", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "verb": { + "related": { + "list": [ + "contains-path", + "ends-with", + "is-absolute", + "is-relative", + "parse-filepath", + "path-ends-with", + "path-segments", + "rewrite-ext", + "unixify" + ], + "description": "Other useful libraries for working with paths in node.js:" + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/npm-run-all/LICENSE b/node_modules/npm-run-all/LICENSE new file mode 100644 index 0000000000000..c39e6949ed2dc --- /dev/null +++ b/node_modules/npm-run-all/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/npm-run-all/README.md b/node_modules/npm-run-all/README.md new file mode 100644 index 0000000000000..2fffee5980471 --- /dev/null +++ b/node_modules/npm-run-all/README.md @@ -0,0 +1,214 @@ +# npm-run-all + +[![npm version](https://img.shields.io/npm/v/npm-run-all.svg)](https://www.npmjs.com/package/npm-run-all) +[![Downloads/month](https://img.shields.io/npm/dm/npm-run-all.svg)](https://www.npmjs.com/package/npm-run-all) +[![Build Status](https://travis-ci.org/mysticatea/npm-run-all.svg?branch=master)](https://travis-ci.org/mysticatea/npm-run-all) +[![Build status](https://ci.appveyor.com/api/projects/status/v0owd44q1r7hceir/branch/master?svg=true)](https://ci.appveyor.com/project/mysticatea/npm-run-all/branch/master) +[![Coverage Status](https://coveralls.io/repos/mysticatea/npm-run-all/badge.svg?branch=master&service=github)](https://coveralls.io/github/mysticatea/npm-run-all?branch=master) +[![Dependency Status](https://david-dm.org/mysticatea/npm-run-all.svg)](https://david-dm.org/mysticatea/npm-run-all) + +A CLI tool to run multiple npm-scripts in parallel or sequential / serial. + +``` +> npm-run-all clean lint build:* +``` + +``` +> npm-run-all clean --parallel "build:* -- --watch" +``` + +## Installation + +``` +npm install npm-run-all +``` + +- This package works in both Windows and UNIX-like environments. +- This package is tested in the follow node versions. + - `0.10` (*requires `npm >= 2.0.0`, so please run `npm install -g npm@latest`*) + - `0.12` + - `4.x` + - `5.x` + +## Usage + +``` +Usage: npm-run-all [...tasks] [OPTIONS] + + Run specified tasks. + + Options: + -h, --help Print this text. + -v, --version Print version number. + + -c, --continue-on-error Set the flag to ignore errors to the current + group of tasks. + -l, --print-label Set the flag to print the task name as a prefix + on each line of output, to the current group of + tasks. + -n, --print-name Set the flag to print the task name before + running each task, to the current group of + tasks. + --silent Set "silent" to the log level of npm. + + -p, --parallel [...tasks] Run a group of tasks in parallel. + e.g. 'npm-run-all -p foo bar' is similar to + 'npm run foo & npm run bar'. + -P [...tasks] Run a group of tasks in parallel as ignoring + errors. This is shorthand of '-p -c [...tasks]'. + + -s, --sequential [...tasks] Run a group of tasks in sequential. + --serial [...tasks] '--serial' is a synonym of '--sequential'. + e.g. 'npm-run-all -s foo bar' is similar to + 'npm run foo && npm run bar'. + -S [...tasks] Run a group of tasks in sequential as ignoring + errors. This is shorthand of '-s -c [...tasks]'. +``` + +### Run tasks sequentially / serially + +``` +npm-run-all build:html build:js +``` + +This is same as `npm run build:html && npm run build:js`. + +**Note:** If a task exited with non zero code, the following tasks are not run. + +### Run tasks in parallel + +``` +npm-run-all --parallel watch:html watch:js +``` + +This is same as `npm run watch:html & npm run watch:js`.
+Of course, this works on **Windows** as well! + +**Note:** If a task exited with non zero code, the other tasks and those descendant processes are killed with `SIGTERM` (On Windows, with `taskkill.exe /F /T`). + +### Run a mix of sequential and parallel tasks + +``` +npm-run-all clean lint --parallel watch:html watch:js +``` + +1. First, this runs `clean` and `lint` sequentially / serially. +2. Next, runs `watch:html` and `watch:js` in parallell. + +``` +npm-run-all a b --parallel c d --sequential e f --parallel g h i +``` +or + +``` +npm-run-all a b --parallel c d --serial e f --parallel g h i +``` + +1. First, runs `a` and `b` sequentially / serially. +2. Second, runs `c` and `d` in parallell. +3. Third, runs `e` and `f` sequentially / serially. +4. Lastly, runs `g`, `h`, and `i` in parallell. + +### Run with arguments + +``` +npm-run-all "delay 3000" --parallel watch:* +npm-run-all --parallel "build:* -- --watch" +``` + +We can enclose a script name or a pattern in quotes to use arguments. +When you use a pattern, arguments are forwarded to every matched task. + +An example: https://gist.github.com/mysticatea/34949629c9e0a01a9e7d
+See also: https://docs.npmjs.com/cli/run-script + +### Glob-like pattern matching for task names + +``` +npm-run-all --parallel watch:* +``` + +In this case, runs sub tasks of `watch`. e.g. `watch:html`, `watch:js`. +But, doesn't run sub-sub tasks. e.g. `watch:js:index`. + +`npm-run-all` reads the actual npm-script list from `package.json` in the current directory. + +``` +npm-run-all --parallel watch:** +``` + +If we use a globstar `**`, runs both sub tasks and sub-sub tasks. + +This matching rule is similar to [glob](https://www.npmjs.com/package/glob#glob-primer). +The Difference is one -- the separator is `:`, instead of `/`. + +### Continue on error + +We can use `--continue-on-error` option to ignore errors. + +``` +npm-run-all --sequential --continue-on-error foo bar +npm-run-all --parallel --continue-on-error foo bar +``` + +`npm-run-all` stops subsequence when a task exited with non-zero code by default. +But when `--continue-on-error` was specified, `npm-run-all` continues subsequence on error. + +There are shorthands. + +``` +npm-run-all -S foo bar +npm-run-all -P foo bar +``` + +## Node API + +``` +var runAll = require("npm-run-all"); +``` + +### runAll + +``` +var promise = runAll(patterns, options); +``` + +Run npm-scripts. + +- **patterns** `string|string[]` -- Glob-like patterns for task names. +- **options** `object` + - **options.parallel** `boolean` -- + A flag to run tasks in parallel. + Default is `false`. + - **options.continueOnError** `boolean` -- + A flag to ignore errors. + Default is `false`. + - **options.stdin** `stream.Readable|null` -- + A readable stream to send to the stdin of npm-scripts. + Default is nothing. + Set `process.stdin` in order to send from stdin. + - **options.stdout** `stream.Writable|null` -- + A writable stream to receive from the stdout of npm-scripts. + Default is nothing. + Set `process.stdout` in order to print to stdout. + - **options.stderr** `stream.Writable|null` -- + A writable stream to receive from the stderr of npm-scripts + Default is nothing. + Set `process.stderr` in order to print to stderr. + - **options.taskList** `string[]|null` -- + A string array that is all task names. + By default, reads from `package.json` in the current directory. + - **options.packageConfig** `object|null` -- + A map-like object to overwrite package configs. + Keys are package names. + Every value is a map-like object (Pairs of variable name and value). + e.g. `{"npm-run-all": {"test": 777, "test2": 333}}` + Default is `null`. + - **options.silent** `boolean` -- + The flag to set `silent` to the log level of npm. + Default is `false`. + +`runAll` returns a promise that becomes *fulfilled* when all tasks are completed. +The promise will become *rejected* when any of the tasks exit with a non-zero code. + +See also: https://doc.esdoc.org/github.com/mysticatea/npm-run-all/ diff --git a/node_modules/npm-run-all/bin/help.js b/node_modules/npm-run-all/bin/help.js new file mode 100644 index 0000000000000..d45f4691a11e7 --- /dev/null +++ b/node_modules/npm-run-all/bin/help.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise = require("babel-runtime/core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +exports.default = printHelp; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +/** + * Print a help text. + * + * @param {stream.Writable} output - A writable stream to print. + * @returns {Promise} Always a fulfilled promise. + * @private + */ +function printHelp(output) { + output.write("\nUsage: npm-run-all [...tasks] [OPTIONS]\n\n Run specified tasks.\n\n Options:\n -h, --help Print this text.\n -v, --version Print version number.\n\n -c, --continue-on-error Set the flag to ignore errors to the current\n group of tasks.\n -l, --print-label Set the flag to print the task name as a prefix\n on each line of output, to the current group of\n tasks.\n -n, --print-name Set the flag to print the task name before\n running each task, to the current group of\n tasks.\n --silent Set \"silent\" to the log level of npm.\n\n -p, --parallel [...tasks] Run a group of tasks in parallel.\n e.g. 'npm-run-all -p foo bar' is similar to\n 'npm run foo & npm run bar'.\n -P [...tasks] Run a group of tasks in parallel as ignoring\n errors. This is shorthand of '-p -c [...tasks]'.\n\n -s, --sequential [...tasks] Run a group of tasks in sequential.\n --serial [...tasks] '--serial' is a synonym of '--sequential'.\n e.g. 'npm-run-all -s foo bar' is similar to\n 'npm run foo && npm run bar'.\n -S [...tasks] Run a group of tasks in sequential as ignoring\n errors. This is shorthand of '-s -c [...tasks]'.\n\n See Also:\n https://github.com/mysticatea/npm-run-all#readme\n"); + + return _promise2.default.resolve(null); +} \ No newline at end of file diff --git a/node_modules/npm-run-all/bin/main.js b/node_modules/npm-run-all/bin/main.js new file mode 100644 index 0000000000000..613d14bed1468 --- /dev/null +++ b/node_modules/npm-run-all/bin/main.js @@ -0,0 +1,243 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = require("babel-runtime/helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = require("babel-runtime/core-js/object/keys"); + +var _keys2 = _interopRequireDefault(_keys); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _promise = require("babel-runtime/core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +exports.default = npmRunAll; + +var _npmRunAll = require("../lib/npm-run-all"); + +var _npmRunAll2 = _interopRequireDefault(_npmRunAll); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var START_PROMISE = _promise2.default.resolve(null); /** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +/* eslint no-process-env: 0 */ + +var OVERWRITE_OPTION = /^--([^:]+?):([^=]+?)(?:=(.+))?$/; +var CONFIG_PATTERN = /^npm_package_config_(.+)$/; + +/** + * Overwrites a specified package config. + * + * @param {object} config - A config object to be overwritten. + * @param {string} packageName - A package name to overwrite. + * @param {string} variable - A variable name to overwrite. + * @param {string} value - A new value to overwrite. + * @returns {void} + */ +function overwriteConfig(config, packageName, variable, value) { + var scope = config[packageName] || (config[packageName] = {}); // eslint-disable-line no-param-reassign + scope[variable] = value; +} + +/** + * Creates a package config object. + * This checks `process.env` and creates the default value. + * + * @returns {object} Created config object. + */ +function createPackageConfig() { + var retv = {}; + var packageName = process.env.npm_package_name; + if (!packageName) { + return retv; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3.default)((0, _keys2.default)(process.env)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var key = _step.value; + + var m = CONFIG_PATTERN.exec(key); + if (m != null) { + overwriteConfig(retv, packageName, m[1], process.env[key]); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return retv; +} + +/** + * Parses arguments. + * + * @param {string[]} args - Arguments to parse. + * @returns {{ + * groups: { + * parallel: boolean, + * continueOnError: boolean, + * patterns: string[] + * }[], + * packageConfig: object + * }} A running plan. + */ +function parse(args) { + var packageConfig = createPackageConfig(); + var groups = [{ + parallel: false, + continueOnError: false, + printLabel: false, + printName: false, + patterns: [] + }]; + + for (var i = 0; i < args.length; ++i) { + var arg = args[i]; + + switch (arg) { + case "-S": + case "-s": + case "--sequential": + case "--serial": + groups.push({ + parallel: false, + continueOnError: arg === "-S", + printLabel: false, + printName: false, + patterns: [] + }); + break; + + case "-P": + case "-p": + case "--parallel": + groups.push({ + parallel: true, + continueOnError: arg === "-P", + printLabel: false, + printName: false, + patterns: [] + }); + break; + + case "-c": + case "--continue-on-error": + groups[groups.length - 1].continueOnError = true; + break; + + case "-l": + case "--print-label": + groups[groups.length - 1].printLabel = true; + break; + + case "-n": + case "--print-name": + groups[groups.length - 1].printName = true; + break; + + case "--color": + case "--no-color": + case "--silent": + // do nothing. + break; + + default: + { + var matched = OVERWRITE_OPTION.exec(arg); + if (matched) { + overwriteConfig(packageConfig, matched[1], matched[2], matched[3] || args[++i]); + } else if (arg[0] === "-") { + throw new Error("Invalid Option: " + arg); + } else { + groups[groups.length - 1].patterns.push(arg); + } + break; + } + } + } + + return { groups: groups, packageConfig: packageConfig }; +} + +/** + * Parses arguments, then run specified npm-scripts. + * + * @param {string[]} args - Arguments to parse. + * @param {stream.Writable} stdout - A writable stream to print logs. + * @param {stream.Writable} stderr - A writable stream to print errors. + * @returns {Promise} A promise which comes to be fulfilled when all npm-scripts are completed. + * @private + */ +function npmRunAll(args, stdout, stderr) { + try { + var _ret = function () { + var stdin = process.stdin; + var silent = args.indexOf("--silent") !== -1 || process.env.npm_config_loglevel === "silent"; + + var _parse = parse(args); + + var groups = _parse.groups; + var packageConfig = _parse.packageConfig; + + + return { + v: groups.reduce(function (prev, _ref) { + var patterns = _ref.patterns; + var parallel = _ref.parallel; + var continueOnError = _ref.continueOnError; + var printLabel = _ref.printLabel; + var printName = _ref.printName; + + if (patterns.length === 0) { + return prev; + } + return prev.then(function () { + return (0, _npmRunAll2.default)(patterns, { + stdout: stdout, + stderr: stderr, + stdin: stdin, + parallel: parallel, + continueOnError: continueOnError, + printLabel: printLabel, + printName: printName, + packageConfig: packageConfig, + silent: silent + }); + }); + }, START_PROMISE) + }; + }(); + + if ((typeof _ret === "undefined" ? "undefined" : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } catch (err) { + return _promise2.default.reject(err); + } +} \ No newline at end of file diff --git a/node_modules/npm-run-all/bin/npm-run-all.js b/node_modules/npm-run-all/bin/npm-run-all.js new file mode 100755 index 0000000000000..23c2570fe4ff4 --- /dev/null +++ b/node_modules/npm-run-all/bin/npm-run-all.js @@ -0,0 +1,58 @@ +#!/usr/bin/env node +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = main; + + +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +/** + * The main process of `npm-run-all` command. + * + * @param {string[]} args - Arguments to parse. + * @param {stream.Writable} stdout - A writable stream to print logs. + * @param {stream.Writable} stderr - A writable stream to print errors. + * @returns {Promise} A promise which comes to be fulfilled when all npm-scripts are completed. + * @private + */ +function main(args) { + var stdout = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; + var stderr = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; + + switch (args[0]) { + case undefined: + case "-h": + case "--help": + return require("./help").default(stdout); + + case "-v": + case "--version": + return require("./version").default(stdout); + + default: + return require("./main").default(args, stdout, stderr); + } +} + +/* eslint-disable no-process-exit */ +/* istanbul ignore if */ +if (require.main === module) { + // Execute. + var promise = main(process.argv.slice(2), process.stdout, process.stderr); + + // Error Handling. + promise.then(function () { + // I'm not sure why, but maybe the process never exits on Git Bash (MINGW64) + process.exit(0); + }, function (err) { + console.error("ERROR:", err.message); // eslint-disable-line no-console + process.exit(1); + }); +} \ No newline at end of file diff --git a/node_modules/npm-run-all/bin/version.js b/node_modules/npm-run-all/bin/version.js new file mode 100644 index 0000000000000..9030a17e07549 --- /dev/null +++ b/node_modules/npm-run-all/bin/version.js @@ -0,0 +1,48 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise = require("babel-runtime/core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +exports.default = printVersion; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +/** + * Reads the version of `npm-run-all`. + * + * @param {string} path - A path to `package.json`. + * @returns {string|null} A version text. + */ +function read(path) { + try { + return require(path).version; + } catch (err) { + return null; + } +} + +// In tests, `../../package.json` is correct. +var version = read("../package.json") || read("../../package.json"); + +/** + * Print a version text. + * + * @param {stream.Writable} output - A writable stream to print. + * @returns {Promise} Always a fulfilled promise. + * @private + */ +function printVersion(output) { + output.write("v" + version + "\n"); + return _promise2.default.resolve(null); +} \ No newline at end of file diff --git a/node_modules/npm-run-all/index.js b/node_modules/npm-run-all/index.js new file mode 100644 index 0000000000000..467be2ca8c6cb --- /dev/null +++ b/node_modules/npm-run-all/index.js @@ -0,0 +1,8 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict"; + +module.exports = require("./lib/npm-run-all").default; diff --git a/node_modules/npm-run-all/lib/create-header.js b/node_modules/npm-run-all/lib/create-header.js new file mode 100644 index 0000000000000..442a83688c8d1 --- /dev/null +++ b/node_modules/npm-run-all/lib/create-header.js @@ -0,0 +1,56 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createHeader; + +var _chalk = require("chalk"); + +var _chalk2 = _interopRequireDefault(_chalk); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Creates the header text for a given task. + * + * @param {string} nameAndArgs - A task name and arguments. + * @param {object} packageInfo - A package.json's information. + * @param {object} packageInfo.body - A package.json's JSON object. + * @param {string} packageInfo.path - A package.json's file path. + * @param {boolean} isTTY - The flag to color the header. + * @returns {string} The header of a given task. + */ +function createHeader(nameAndArgs, packageInfo, isTTY) { + if (!packageInfo) { + return "\n> " + nameAndArgs + "\n\n"; + } + + var index = nameAndArgs.indexOf(" "); + var name = index === -1 ? nameAndArgs : nameAndArgs.slice(0, index); + var args = index === -1 ? "" : nameAndArgs.slice(index + 1); + + var _ref = packageInfo || {}; + + var _ref$body = _ref.body; + var packageName = _ref$body.name; + var packageVersion = _ref$body.version; + var scriptBody = _ref$body.scripts[name]; + var packagePath = _ref.path; + + var color = isTTY ? _chalk2.default.styles.gray : { open: "", close: "" }; + + return "\n" + color.open + "> " + packageName + "@" + packageVersion + " " + name + " " + packagePath + color.close + "\n" + color.open + "> " + scriptBody + " " + args + color.close + "\n\n"; +} /** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/create-prefix-transform-stream.js b/node_modules/npm-run-all/lib/create-prefix-transform-stream.js new file mode 100644 index 0000000000000..162c2e6c5965f --- /dev/null +++ b/node_modules/npm-run-all/lib/create-prefix-transform-stream.js @@ -0,0 +1,129 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = require("babel-runtime/helpers/createClass"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = require("babel-runtime/helpers/inherits"); + +var _inherits3 = _interopRequireDefault(_inherits2); + +exports.default = createPrefixTransform; + +var _stream = require("stream"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +var ALL_BR = /\n/g; + +/** + * The transform stream to insert a specific prefix. + * + * Several streams can exist for the same output stream. + * This stream will insert the prefix if the last output came from other instance. + * To do that, this stream is using a shared state object. + * + * @private + */ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var PrefixTransform = function (_Transform) { + (0, _inherits3.default)(PrefixTransform, _Transform); + + /** + * @param {string} prefix - A prefix text to be inserted. + * @param {object} state - A state object. + * @param {string} state.lastPrefix - The last prefix which is printed. + * @param {boolean} state.lastIsLinebreak -The flag to check whether the last output is a line break or not. + */ + + function PrefixTransform(prefix, state) { + (0, _classCallCheck3.default)(this, PrefixTransform); + + var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(PrefixTransform).call(this)); + + _this.prefix = prefix; + _this.state = state; + return _this; + } + + /** + * Transforms the output chunk. + * + * @param {string|Buffer} chunk - A chunk to be transformed. + * @param {string} encoding - The encoding of the chunk. + * @param {function} callback - A callback function that is called when done. + * @returns {void} + */ + + + (0, _createClass3.default)(PrefixTransform, [{ + key: "_transform", + value: function _transform(chunk, encoding, callback) { + var prefix = this.prefix; + var nPrefix = "\n" + prefix; + var state = this.state; + var firstPrefix = state.lastIsLinebreak ? prefix : state.lastPrefix !== prefix ? "\n" : + /* otherwise */""; + var prefixed = ("" + firstPrefix + chunk).replace(ALL_BR, nPrefix); + var index = prefixed.indexOf(prefix, Math.max(0, prefixed.length - prefix.length)); + + state.lastPrefix = prefix; + state.lastIsLinebreak = index !== -1; + + callback(null, index !== -1 ? prefixed.slice(0, index) : prefixed); + } + }]); + return PrefixTransform; +}(_stream.Transform); + +//------------------------------------------------------------------------------ +// Public API +//------------------------------------------------------------------------------ + +/** + * Create a transform stream to insert the specific prefix. + * + * Several streams can exist for the same output stream. + * This stream will insert the prefix if the last output came from other instance. + * To do that, this stream is using a shared state object. + * + * @param {string} prefix - A prefix text to be inserted. + * @param {object} state - A state object. + * @param {string} state.lastPrefix - The last prefix which is printed. + * @param {boolean} state.lastIsLinebreak -The flag to check whether the last output is a line break or not. + * @returns {stream.Transform} The created transform stream. + */ + + +function createPrefixTransform(prefix, state) { + return new PrefixTransform(prefix, state); +} \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/match-tasks.js b/node_modules/npm-run-all/lib/match-tasks.js new file mode 100644 index 0000000000000..5e285f1bd243a --- /dev/null +++ b/node_modules/npm-run-all/lib/match-tasks.js @@ -0,0 +1,196 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _keys = require("babel-runtime/core-js/object/keys"); + +var _keys2 = _interopRequireDefault(_keys); + +var _create = require("babel-runtime/core-js/object/create"); + +var _create2 = _interopRequireDefault(_create); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = require("babel-runtime/helpers/createClass"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +exports.default = matchTasks; + +var _minimatch = require("minimatch"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var COLON_OR_SLASH = /[:\/]/g; /** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +var CONVERT_MAP = { ":": "/", "/": ":" }; + +/** + * Swaps ":" and "/", in order to use ":" as the separator in minimatch. + * + * @param {string} s - A text to swap. + * @returns {string} The text which was swapped. + */ +function swapColonAndSlash(s) { + return s.replace(COLON_OR_SLASH, function (matched) { + return CONVERT_MAP[matched]; + }); +} + +/** + * Creates a filter from user-specified pattern text. + * + * The task name is the part until the first space. + * The rest part is the arguments for this task. + * + * @param {string} pattern - A pattern to create filter. + * @returns {{match: function, task: string, args: string}} The filter object of the pattern. + */ +function createFilter(pattern) { + var trimmed = pattern.trim(); + var spacePos = trimmed.indexOf(" "); + var task = spacePos < 0 ? trimmed : trimmed.slice(0, spacePos); + var args = spacePos < 0 ? "" : trimmed.slice(spacePos); + var matcher = new _minimatch.Minimatch(swapColonAndSlash(task)); + var match = matcher.match.bind(matcher); + + return { match: match, task: task, args: args }; +} + +/** + * The set to remove overlapped task. + */ + +var TaskSet = function () { + /** + * Creates a instance. + */ + + function TaskSet() { + (0, _classCallCheck3.default)(this, TaskSet); + + this.result = []; + this.sourceMap = (0, _create2.default)(null); + } + + /** + * Adds a command (a pattern) into this set if it's not overlapped. + * "Overlapped" is meaning that the command was added from a different source. + * + * @param {string} command - A pattern text to add. + * @param {string} source - A task name to check. + */ + + + (0, _createClass3.default)(TaskSet, [{ + key: "add", + value: function add(command, source) { + var sourceList = this.sourceMap[command] || (this.sourceMap[command] = []); + if (sourceList.length === 0 || sourceList.indexOf(source) !== -1) { + this.result.push(command); + } + sourceList.push(source); + } + }]); + return TaskSet; +}(); + +/** + * Enumerates tasks which matches with given patterns. + * + * @param {string[]} taskList - A list of actual task names. + * @param {string[]} patterns - Pattern texts to match. + * @returns {string[]} Tasks which matches with the patterns. + * @private + */ + + +function matchTasks(taskList, patterns) { + var filters = patterns.map(createFilter); + var candidates = taskList.map(swapColonAndSlash); + var taskSet = new TaskSet(); + var unknownSet = (0, _create2.default)(null); + + // Take tasks while keep the order of patterns. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3.default)(filters), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var filter = _step.value; + + var found = false; + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = (0, _getIterator3.default)(candidates), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var candidate = _step2.value; + + if (filter.match(candidate)) { + found = true; + taskSet.add(swapColonAndSlash(candidate) + filter.args, filter.task); + } + } + + // Built-in tasks should be allowed. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + if (!found && (filter.task === "restart" || filter.task === "env")) { + taskSet.add(filter.task + filter.args, filter.task); + found = true; + } + if (!found) { + unknownSet[filter.task] = true; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var unknownTasks = (0, _keys2.default)(unknownSet); + if (unknownTasks.length > 0) { + throw new Error("Task not found: \"" + unknownTasks.join("\", ") + "\""); + } + return taskSet.result; +} \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/npm-run-all.js b/node_modules/npm-run-all/lib/npm-run-all.js new file mode 100644 index 0000000000000..4599f8a98d0c9 --- /dev/null +++ b/node_modules/npm-run-all/lib/npm-run-all.js @@ -0,0 +1,278 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = require("babel-runtime/helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _toConsumableArray2 = require("babel-runtime/helpers/toConsumableArray"); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _promise = require("babel-runtime/core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +var _keys = require("babel-runtime/core-js/object/keys"); + +var _keys2 = _interopRequireDefault(_keys); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.default = npmRunAll; + +var _matchTasks = require("./match-tasks"); + +var _matchTasks2 = _interopRequireDefault(_matchTasks); + +var _readPackageJson = require("./read-package-json"); + +var _readPackageJson2 = _interopRequireDefault(_readPackageJson); + +var _runTasksInParallel = require("./run-tasks-in-parallel"); + +var _runTasksInParallel2 = _interopRequireDefault(_runTasksInParallel); + +var _runTasksInSequencial = require("./run-tasks-in-sequencial"); + +var _runTasksInSequencial2 = _interopRequireDefault(_runTasksInSequencial); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Converts a given value to an array. + * + * @param {string|string[]|null|undefined} x - A value to convert. + * @returns {string[]} An array. + */ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +function toArray(x) { + if (x == null) { + return []; + } + return Array.isArray(x) ? x : [x]; +} + +/** + * Converts a given config object to an `--:=` style option array. + * + * @param {object|null} config - + * A map-like object to overwrite package configs. + * Keys are package names. + * Every value is a map-like object (Pairs of variable name and value). + * @returns {string[]} `--:=` style options. + */ +function toOverwriteOptions(config) { + var options = []; + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3.default)((0, _keys2.default)(config)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var packageName = _step.value; + + var packageConfig = config[packageName]; + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = (0, _getIterator3.default)((0, _keys2.default)(packageConfig)), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var variableName = _step2.value; + + var value = packageConfig[variableName]; + + options.push("--" + packageName + ":" + variableName + "=" + value); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return options; +} + +/** + * Gets the maximum length. + * + * @param {number} length - The current maximum length. + * @param {string} name - A name. + * @returns {number} The maximum length. + */ +function maxLength(length, name) { + return Math.max(name.length, length); +} + +/** + * Runs npm-scripts which are matched with given patterns. + * + * @param {string|string[]} patternOrPatterns - Patterns to run. + * A pattern is a npm-script name or a Glob-like pattern. + * @param {object|undefined} [options] Optional. + * @param {boolean} options.parallel - + * If this is `true`, run scripts in parallel. + * Otherwise, run scripts in sequencial. + * Default is `false`. + * @param {stream.Readable|null} options.stdin - + * A readable stream to send messages to stdin of child process. + * If this is `null`, ignores it. + * If this is `process.stdin`, inherits it. + * Otherwise, makes a pipe. + * Default is `null`. + * @param {stream.Writable|null} options.stdout - + * A writable stream to receive messages from stdout of child process. + * If this is `null`, cannot send. + * If this is `process.stdout`, inherits it. + * Otherwise, makes a pipe. + * Default is `null`. + * @param {stream.Writable|null} options.stderr - + * A writable stream to receive messages from stderr of child process. + * If this is `null`, cannot send. + * If this is `process.stderr`, inherits it. + * Otherwise, makes a pipe. + * Default is `null`. + * @param {string[]} options.taskList - + * Actual name list of npm-scripts. + * This function search npm-script names in this list. + * If this is `null`, this function reads `package.json` of current directly. + * @param {object|null} options.packageConfig - + * A map-like object to overwrite package configs. + * Keys are package names. + * Every value is a map-like object (Pairs of variable name and value). + * e.g. `{"npm-run-all": {"test": 777}}` + * Default is `null`. + * @param {boolean} options.silent - + * The flag to set `silent` to the log level of npm. + * Default is `false`. + * @param {boolean} options.continueOnError - + * The flag to ignore errors. + * Default is `false`. + * @param {boolean} options.printLabel - + * The flag to print task names at the head of each line. + * Default is `false`. + * @param {boolean} options.printName - + * The flag to print task names before running each task. + * Default is `false`. + * @returns {Promise} + * A promise object which becomes fullfilled when all npm-scripts are completed. + */ +function npmRunAll(patternOrPatterns) { + var _ref = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var _ref$parallel = _ref.parallel; + var parallel = _ref$parallel === undefined ? false : _ref$parallel; + var _ref$stdin = _ref.stdin; + var stdin = _ref$stdin === undefined ? null : _ref$stdin; + var _ref$stdout = _ref.stdout; + var stdout = _ref$stdout === undefined ? null : _ref$stdout; + var _ref$stderr = _ref.stderr; + var stderr = _ref$stderr === undefined ? null : _ref$stderr; + var _ref$taskList = _ref.taskList; + var taskList = _ref$taskList === undefined ? null : _ref$taskList; + var _ref$packageConfig = _ref.packageConfig; + var packageConfig = _ref$packageConfig === undefined ? null : _ref$packageConfig; + var _ref$silent = _ref.silent; + var silent = _ref$silent === undefined ? false : _ref$silent; + var _ref$continueOnError = _ref.continueOnError; + var continueOnError = _ref$continueOnError === undefined ? false : _ref$continueOnError; + var _ref$printLabel = _ref.printLabel; + var printLabel = _ref$printLabel === undefined ? false : _ref$printLabel; + var _ref$printName = _ref.printName; + var printName = _ref$printName === undefined ? false : _ref$printName; + + try { + var _ret = function () { + var patterns = toArray(patternOrPatterns); + if (patterns.length === 0) { + return { + v: _promise2.default.resolve(null) + }; + } + if (taskList != null && Array.isArray(taskList) === false) { + throw new Error("Invalid options.taskList"); + } + + var prefixOptions = []; + if (silent) { + prefixOptions.push("--silent"); + } + if (packageConfig != null) { + prefixOptions.push.apply(prefixOptions, (0, _toConsumableArray3.default)(toOverwriteOptions(packageConfig))); + } + + return { + v: _promise2.default.resolve(taskList).then(function (taskList) { + // eslint-disable-line no-shadow + if (taskList != null) { + return { taskList: taskList, packageInfo: null }; + } + return (0, _readPackageJson2.default)(); + }).then(function (_ref2) { + var taskList = _ref2.taskList; + var packageInfo = _ref2.packageInfo; + // eslint-disable-line no-shadow + var tasks = (0, _matchTasks2.default)(taskList, patterns); + var labelWidth = tasks.reduce(maxLength, 0); + var runTasks = parallel ? _runTasksInParallel2.default : _runTasksInSequencial2.default; + + return runTasks(tasks, { + stdin: stdin, + stdout: stdout, + stderr: stderr, + prefixOptions: prefixOptions, + continueOnError: continueOnError, + labelState: { + enabled: printLabel, + width: labelWidth, + lastPrefix: null, + lastIsLinebreak: true + }, + printName: printName, + packageInfo: packageInfo + }); + }) + }; + }(); + + if ((typeof _ret === "undefined" ? "undefined" : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } catch (err) { + return _promise2.default.reject(new Error(err.message)); + } +} \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/read-package-json.js b/node_modules/npm-run-all/lib/read-package-json.js new file mode 100644 index 0000000000000..2819cac31d587 --- /dev/null +++ b/node_modules/npm-run-all/lib/read-package-json.js @@ -0,0 +1,48 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = require("babel-runtime/core-js/object/keys"); + +var _keys2 = _interopRequireDefault(_keys); + +exports.default = readPackageJson; + +var _path = require("path"); + +var _readPkg = require("read-pkg"); + +var _readPkg2 = _interopRequireDefault(_readPkg); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Reads the package.json in the current directory. + * + * @returns {object} package.json's information. + */ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +function readPackageJson() { + var path = (0, _path.join)(process.cwd(), "package.json"); + return (0, _readPkg2.default)(path).then(function (body) { + return { + taskList: (0, _keys2.default)(body.scripts || {}), + packageInfo: { path: path, body: body } + }; + }); +} \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/run-task.js b/node_modules/npm-run-all/lib/run-task.js new file mode 100644 index 0000000000000..dd8ca21117f3a --- /dev/null +++ b/node_modules/npm-run-all/lib/run-task.js @@ -0,0 +1,180 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise = require("babel-runtime/core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +exports.default = runTask; + +var _chalk = require("chalk"); + +var _chalk2 = _interopRequireDefault(_chalk); + +var _shellQuote = require("shell-quote"); + +var _stringPrototype = require("string.prototype.padend"); + +var _stringPrototype2 = _interopRequireDefault(_stringPrototype); + +var _createHeader = require("./create-header"); + +var _createHeader2 = _interopRequireDefault(_createHeader); + +var _createPrefixTransformStream = require("./create-prefix-transform-stream"); + +var _createPrefixTransformStream2 = _interopRequireDefault(_createPrefixTransformStream); + +var _spawn = require("./spawn"); + +var _spawn2 = _interopRequireDefault(_spawn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Wraps stdout/stderr with a transform stream to add the task name as prefix. + * + * @param {string} taskName - The task name. + * @param {stream.Writable} source - An output stream to be wrapped. + * @param {object} labelState - An label state for the transform stream. + * @returns {stream.Writable} `source` or the created wrapped stream. + */ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +function wrapLabeling(taskName, source, labelState) { + if (source == null || !labelState.enabled) { + return source; + } + + var label = (0, _stringPrototype2.default)(taskName, labelState.width); + var color = source.isTTY ? _chalk2.default.gray : function (x) { + return x; + }; + var prefix = color("[" + label + "] "); + var stream = (0, _createPrefixTransformStream2.default)(prefix, labelState); + + stream.pipe(source); + + return stream; +} + +/** + * Converts a given stream to an option for `child_process.spawn`. + * + * @param {stream.Readable|stream.Writable|null} stream - An original stream to convert. + * @param {process.stdin|process.stdout|process.stderr} std - A standard stream for this option. + * @returns {string|stream.Readable|stream.Writable} An option for `child_process.spawn`. + */ +function detectStreamKind(stream, std) { + return stream == null ? "ignore" : + // `|| !std.isTTY` is needed for the workaround of https://github.com/nodejs/node/issues/5620 + stream !== std || !std.isTTY ? "pipe" : + /* else */stream; +} + +//------------------------------------------------------------------------------ +// Interface +//------------------------------------------------------------------------------ + +/** + * Run a npm-script of a given name. + * The return value is a promise which has an extra method: `abort()`. + * The `abort()` kills the child process to run the npm-script. + * + * @param {string} task - A npm-script name to run. + * @param {object} options - An option object. + * @param {stream.Readable|null} options.stdin - + * A readable stream to send messages to stdin of child process. + * If this is `null`, ignores it. + * If this is `process.stdin`, inherits it. + * Otherwise, makes a pipe. + * @param {stream.Writable|null} options.stdout - + * A writable stream to receive messages from stdout of child process. + * If this is `null`, cannot send. + * If this is `process.stdout`, inherits it. + * Otherwise, makes a pipe. + * @param {stream.Writable|null} options.stderr - + * A writable stream to receive messages from stderr of child process. + * If this is `null`, cannot send. + * If this is `process.stderr`, inherits it. + * Otherwise, makes a pipe. + * @param {string[]} options.prefixOptions - + * An array of options which are inserted before the task name. + * @param {object} options.labelState - A state object for printing labels. + * @param {boolean} options.printName - The flag to print task names before running each task. + * @returns {Promise} + * A promise object which becomes fullfilled when the npm-script is completed. + * This promise object has an extra method: `abort()`. + * @private + */ +function runTask(task, _ref) { + var stdin = _ref.stdin; + var sourceStdout = _ref.stdout; + var sourceStderr = _ref.stderr; + var prefixOptions = _ref.prefixOptions; + var labelState = _ref.labelState; + var printName = _ref.printName; + var packageInfo = _ref.packageInfo; + + var cp = null; + var promise = new _promise2.default(function (resolve, reject) { + var stdout = wrapLabeling(task, sourceStdout, labelState); + var stderr = wrapLabeling(task, sourceStderr, labelState); + var stdinKind = detectStreamKind(stdin, process.stdin); + var stdoutKind = detectStreamKind(stdout, process.stdout); + var stderrKind = detectStreamKind(stderr, process.stderr); + + // Print task name. + if (printName && stdout != null) { + stdout.write((0, _createHeader2.default)(task, packageInfo, sourceStdout.isTTY)); + } + + // Execute. + cp = (0, _spawn2.default)("npm", ["run-script"].concat(prefixOptions, (0, _shellQuote.parse)(task)), { stdio: [stdinKind, stdoutKind, stderrKind] }); + + // Piping stdio. + if (stdinKind === "pipe") { + stdin.pipe(cp.stdin); + } + if (stdoutKind === "pipe") { + cp.stdout.pipe(stdout, { end: false }); + } + if (stderrKind === "pipe") { + cp.stderr.pipe(stderr, { end: false }); + } + + // Register + cp.on("error", function (err) { + cp = null; + reject(err); + }); + cp.on("close", function (code) { + cp = null; + resolve({ task: task, code: code }); + }); + }); + + promise.abort = function abort() { + if (cp != null) { + cp.kill(); + cp = null; + } + }; + + return promise; +} \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/run-tasks-in-parallel.js b/node_modules/npm-run-all/lib/run-tasks-in-parallel.js new file mode 100644 index 0000000000000..e693cc190fd5e --- /dev/null +++ b/node_modules/npm-run-all/lib/run-tasks-in-parallel.js @@ -0,0 +1,66 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise = require("babel-runtime/core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +exports.default = runTasksInParallel; + +var _runTask = require("./run-task"); + +var _runTask2 = _interopRequireDefault(_runTask); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Run npm-scripts of given names in parallel. + * + * If a npm-script exited with a non-zero code, this aborts other all npm-scripts. + * + * @param {string} tasks - A list of npm-script name to run in parallel. + * @param {object} options - An option object. + * @returns {Promise} A promise object which becomes fullfilled when all npm-scripts are completed. + * @private + */ +function runTasksInParallel(tasks, options) { + var taskPromises = tasks.map(function (task) { + return (0, _runTask2.default)(task, options); + }); + if (options.continueOnError) { + return _promise2.default.all(taskPromises); + } + + // When one of tasks exited with non-zero, abort all tasks. + // And wait for all tasks exit. + var nonZeroExited = null; + var parallelPromise = _promise2.default.all(taskPromises.map(function (p) { + return p.then(function (item) { + if (nonZeroExited == null && item.code) { + nonZeroExited = nonZeroExited || item; + taskPromises.forEach(function (t) { + t.abort(); + }); + } + }); + })); + parallelPromise.catch(function () { + taskPromises.forEach(function (t) { + t.abort(); + }); + }); + + // Make fail if there are tasks that exited non-zero. + return parallelPromise.then(function () { + if (nonZeroExited != null) { + throw new Error(nonZeroExited.task + ": None-Zero Exit(" + nonZeroExited.code + ");"); + } + }); +} /** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/run-tasks-in-sequencial.js b/node_modules/npm-run-all/lib/run-tasks-in-sequencial.js new file mode 100644 index 0000000000000..443aa69d5e5de --- /dev/null +++ b/node_modules/npm-run-all/lib/run-tasks-in-sequencial.js @@ -0,0 +1,63 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise = require("babel-runtime/core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +exports.default = runTasksInSequencial; + +var _runTask = require("./run-task"); + +var _runTask2 = _interopRequireDefault(_runTask); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var START_PROMISE = _promise2.default.resolve({ code: 0 }); + +/** + * Throws an error if a given result indicates non-zero exit. + * + * @param {{task: string, code: number}} result - A result object. + * @returns {void} + */ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +function rejectIfNonZeroExit(result) { + if (result.code) { + throw new Error(result.task + ": None-Zero Exit(" + result.code + ");"); + } +} + +/** + * Run npm-scripts of given names in sequencial. + * + * If a npm-script exited with a non-zero code, this aborts subsequent npm-scripts. + * + * @param {string} tasks - A list of npm-script name to run in sequencial. + * @param {object} options - An option object. + * @returns {Promise} A promise object which becomes fullfilled when all npm-scripts are completed. + * @private + */ +function runTasksInSequencial(tasks, options) { + if (options.continueOnError) { + return tasks.reduce(function (prev, task) { + return prev.then(function () { + return (0, _runTask2.default)(task, options); + }); + }, START_PROMISE); + } + + return tasks.reduce(function (prev, task) { + return prev.then(function (result) { + rejectIfNonZeroExit(result); + return (0, _runTask2.default)(task, options); + }); + }, START_PROMISE).then(rejectIfNonZeroExit); +} \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/spawn-posix.js b/node_modules/npm-run-all/lib/spawn-posix.js new file mode 100644 index 0000000000000..3e0c7bfe21dff --- /dev/null +++ b/node_modules/npm-run-all/lib/spawn-posix.js @@ -0,0 +1,88 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getIterator2 = require("babel-runtime/core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +exports.default = spawn; + +var _crossSpawnAsync = require("cross-spawn-async"); + +var _crossSpawnAsync2 = _interopRequireDefault(_crossSpawnAsync); + +var _psTree = require("ps-tree"); + +var _psTree2 = _interopRequireDefault(_psTree); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Kills the new process and its sub processes. + * @this ChildProcess + */ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +/* eslint no-param-reassign: 0 */ +function kill() { + (0, _psTree2.default)(this.pid, function (err, descendent) { + if (err) { + return; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3.default)(descendent), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var pid = _step.value.PID; + + try { + process.kill(pid); + } catch (err2) { + // ignore. + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + }); +} + +/** + * Launches a new process with the given command. + * This is almost same as `child_process.spawn`. + * + * This returns a `ChildProcess` instance. + * `kill` method of the instance kills the new process and its sub processes. + * + * @param {string} command - The command to run. + * @param {string[]} args - List of string arguments. + * @param {object} options - Options. + * @returns {ChildProcess} A ChildProcess instance of new process. + * @private + */ +function spawn(command, args, options) { + var child = (0, _crossSpawnAsync2.default)(command, args, options); + child.kill = kill; + + return child; +} \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/spawn-win32.js b/node_modules/npm-run-all/lib/spawn-win32.js new file mode 100644 index 0000000000000..5366f11c1db13 --- /dev/null +++ b/node_modules/npm-run-all/lib/spawn-win32.js @@ -0,0 +1,45 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = spawn; + +var _crossSpawnAsync = require("cross-spawn-async"); + +var _crossSpawnAsync2 = _interopRequireDefault(_crossSpawnAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Kills the new process and its sub processes forcibly. + * @this ChildProcess + */ +function kill() { + (0, _crossSpawnAsync2.default)("taskkill", ["/F", "/T", "/PID", this.pid]); +} + +/** + * Launches a new process with the given command. + * This is almost same as `child_process.spawn`. + * + * This returns a `ChildProcess` instance. + * `kill` method of the instance kills the new process and its sub processes forcibly. + * + * @param {string} command - The command to run. + * @param {string[]} args - List of string arguments. + * @param {object} options - Options. + * @returns {ChildProcess} A ChildProcess instance of new process. + * @private + */ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +function spawn(command, args, options) { + var child = (0, _crossSpawnAsync2.default)(command, args, options); + child.kill = kill; + + return child; +} \ No newline at end of file diff --git a/node_modules/npm-run-all/lib/spawn.js b/node_modules/npm-run-all/lib/spawn.js new file mode 100644 index 0000000000000..66874cd05b575 --- /dev/null +++ b/node_modules/npm-run-all/lib/spawn.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ + +/** + * Launches a new process with the given command. + * This is {@link ./spawn-posix.js:spawn} or {@link ./spawn-win32.js:spawn} + * @private + */ +exports.default = require(process.platform === "win32" ? "./spawn-win32" : "./spawn-posix").default; \ No newline at end of file diff --git a/node_modules/npm-run-all/package.json b/node_modules/npm-run-all/package.json new file mode 100644 index 0000000000000..c47e4dafc88f2 --- /dev/null +++ b/node_modules/npm-run-all/package.json @@ -0,0 +1,75 @@ +{ + "name": "npm-run-all", + "version": "1.8.0", + "description": "A CLI tool to run multiple npm-scripts in parallel or sequential / serial.", + "bin": "bin/npm-run-all.js", + "files": [ + "bin", + "lib", + "index.js" + ], + "scripts": { + "preversion": "npm run build", + "postversion": "git push && git push --tags", + "clean": "rimraf bin coverage docs lib", + "lint": "eslint src test test-workspace", + "build": "babel-node src/bin/npm-run-all.js clean lint build:*", + "build:babel": "babel src --out-dir .", + "build:esdoc": "esdoc -c esdoc.json", + "test": "npm run lint && babel-node node_modules/isparta/bin/isparta cover node_modules/mocha/bin/_mocha -- test/*.js --timeout 60000", + "watch": "mocha test/*.js --require babel-register --timeout 60000 --watch --growl", + "coveralls": "cat coverage/lcov.info | coveralls" + }, + "dependencies": { + "babel-runtime": "^6.3.13", + "chalk": "^1.1.3", + "cross-spawn-async": "^2.1.9", + "minimatch": "^3.0.0", + "ps-tree": "^1.0.1", + "read-pkg": "^1.1.0", + "shell-quote": "^1.4.3", + "string.prototype.padend": "^3.0.0" + }, + "devDependencies": { + "babel-cli": "^6.4.0", + "babel-core": "^6.4.0", + "babel-plugin-espower": "^2.0.0", + "babel-plugin-transform-runtime": "^6.4.3", + "babel-preset-es2015": "^6.3.13", + "babel-register": "^6.4.3", + "coveralls": "^2.11.4", + "esdoc": "^0.4.3", + "esdoc-importpath-plugin": "^0.0.1", + "eslint": "^1.10.3", + "eslint-config-mysticatea": "^1.9.0", + "eslint-plugin-mysticatea": "^1.0.3", + "eslint-plugin-node": "^0.6.0", + "isparta": "^4.0.0", + "mocha": "^2.3.4", + "power-assert": "^1.2.0", + "rimraf": "^2.4.4" + }, + "repository": { + "type": "git", + "url": "https://github.com/mysticatea/npm-run-all.git" + }, + "keywords": [ + "cli", + "command", + "commandline", + "tool", + "npm", + "npm-scripts", + "run", + "sequential", + "serial", + "parallel", + "task" + ], + "author": "Toru Nagashima", + "license": "MIT", + "bugs": { + "url": "https://github.com/mysticatea/npm-run-all/issues" + }, + "homepage": "https://github.com/mysticatea/npm-run-all" +} diff --git a/node_modules/object-copy/LICENSE b/node_modules/object-copy/LICENSE new file mode 100644 index 0000000000000..e28e6032316ae --- /dev/null +++ b/node_modules/object-copy/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/object-copy/index.js b/node_modules/object-copy/index.js new file mode 100644 index 0000000000000..f9faa2235a82c --- /dev/null +++ b/node_modules/object-copy/index.js @@ -0,0 +1,174 @@ +'use strict'; + +var typeOf = require('kind-of'); +var copyDescriptor = require('copy-descriptor'); +var define = require('define-property'); + +/** + * Copy static properties, prototype properties, and descriptors from one object to another. + * + * ```js + * function App() {} + * var proto = App.prototype; + * App.prototype.set = function() {}; + * App.prototype.get = function() {}; + * + * var obj = {}; + * copy(obj, proto); + * ``` + * @param {Object} `receiver` + * @param {Object} `provider` + * @param {String|Array} `omit` One or more properties to omit + * @return {Object} + * @api public + */ + +function copy(receiver, provider, omit) { + if (!isObject(receiver)) { + throw new TypeError('expected receiving object to be an object.'); + } + if (!isObject(provider)) { + throw new TypeError('expected providing object to be an object.'); + } + + var props = nativeKeys(provider); + var keys = Object.keys(provider); + var len = props.length; + omit = arrayify(omit); + + while (len--) { + var key = props[len]; + + if (has(keys, key)) { + define(receiver, key, provider[key]); + } else if (!(key in receiver) && !has(omit, key)) { + copyDescriptor(receiver, provider, key); + } + } +}; + +/** + * Return true if the given value is an object or function + */ + +function isObject(val) { + return typeOf(val) === 'object' || typeof val === 'function'; +} + +/** + * Returns true if an array has any of the given elements, or an + * object has any of the give keys. + * + * ```js + * has(['a', 'b', 'c'], 'c'); + * //=> true + * + * has(['a', 'b', 'c'], ['c', 'z']); + * //=> true + * + * has({a: 'b', c: 'd'}, ['c', 'z']); + * //=> true + * ``` + * @param {Object} `obj` + * @param {String|Array} `val` + * @return {Boolean} + */ + +function has(obj, val) { + val = arrayify(val); + var len = val.length; + + if (isObject(obj)) { + for (var key in obj) { + if (val.indexOf(key) > -1) { + return true; + } + } + + var keys = nativeKeys(obj); + return has(keys, val); + } + + if (Array.isArray(obj)) { + var arr = obj; + while (len--) { + if (arr.indexOf(val[len]) > -1) { + return true; + } + } + return false; + } + + throw new TypeError('expected an array or object.'); +} + +/** + * Cast the given value to an array. + * + * ```js + * arrayify('foo'); + * //=> ['foo'] + * + * arrayify(['foo']); + * //=> ['foo'] + * ``` + * + * @param {String|Array} `val` + * @return {Array} + */ + +function arrayify(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +} + +/** + * Returns true if a value has a `contructor` + * + * ```js + * hasConstructor({}); + * //=> true + * + * hasConstructor(Object.create(null)); + * //=> false + * ``` + * @param {Object} `value` + * @return {Boolean} + */ + +function hasConstructor(val) { + return isObject(val) && typeof val.constructor !== 'undefined'; +} + +/** + * Get the native `ownPropertyNames` from the constructor of the + * given `object`. An empty array is returned if the object does + * not have a constructor. + * + * ```js + * nativeKeys({a: 'b', b: 'c', c: 'd'}) + * //=> ['a', 'b', 'c'] + * + * nativeKeys(function(){}) + * //=> ['length', 'caller'] + * ``` + * + * @param {Object} `obj` Object that has a `constructor`. + * @return {Array} Array of keys. + */ + +function nativeKeys(val) { + if (!hasConstructor(val)) return []; + return Object.getOwnPropertyNames(val); +} + +/** + * Expose `copy` + */ + +module.exports = copy; + +/** + * Expose `copy.has` for tests + */ + +module.exports.has = has; diff --git a/node_modules/object-copy/node_modules/define-property/LICENSE b/node_modules/object-copy/node_modules/define-property/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/object-copy/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/object-copy/node_modules/define-property/README.md b/node_modules/object-copy/node_modules/define-property/README.md new file mode 100644 index 0000000000000..8cac698ad8d86 --- /dev/null +++ b/node_modules/object-copy/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/object-copy/node_modules/define-property/index.js b/node_modules/object-copy/node_modules/define-property/index.js new file mode 100644 index 0000000000000..3e0e5e133caf5 --- /dev/null +++ b/node_modules/object-copy/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/object-copy/node_modules/define-property/package.json b/node_modules/object-copy/node_modules/define-property/package.json new file mode 100644 index 0000000000000..43561bf56af1b --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/.editorconfig b/node_modules/object-copy/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000000000..449f0da4c1605 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/object-copy/node_modules/is-descriptor/.eslintrc b/node_modules/object-copy/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000000000..24e5090e5497d --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/.gitattributes b/node_modules/object-copy/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000000000..660957e70cf2a --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000000000..37535da621119 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object-copy/node_modules/is-descriptor/.nycrc b/node_modules/object-copy/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md b/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000000000..4963353ee916e --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/node_modules/object-copy/node_modules/is-descriptor/LICENSE b/node_modules/object-copy/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000000000..c0d7f136277fb --- /dev/null +++ b/node_modules/object-copy/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/object-copy/node_modules/is-descriptor/README.md b/node_modules/object-copy/node_modules/is-descriptor/README.md new file mode 100644 index 0000000000000..fd9ddcfb7373e --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), 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 +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### 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. +* [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. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/node_modules/object-copy/node_modules/is-descriptor/index.js b/node_modules/object-copy/node_modules/is-descriptor/index.js new file mode 100644 index 0000000000000..c9dd24d225e8f --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/node_modules/object-copy/node_modules/is-descriptor/package.json b/node_modules/object-copy/node_modules/is-descriptor/package.json new file mode 100644 index 0000000000000..6d6ca8ba08cee --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/test/index.js b/node_modules/object-copy/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000000000..0b74a35fd8807 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/object-copy/package.json b/node_modules/object-copy/package.json new file mode 100644 index 0000000000000..f02a96cdeece1 --- /dev/null +++ b/node_modules/object-copy/package.json @@ -0,0 +1,47 @@ +{ + "name": "object-copy", + "description": "Copy static properties, prototype properties, and descriptors from one object to another.", + "version": "0.1.0", + "homepage": "https://github.com/jonschlinkert/object-copy", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object-copy", + "bugs": { + "url": "https://github.com/jonschlinkert/object-copy/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "devDependencies": { + "gulp-format-md": "*", + "mocha": "*" + }, + "keywords": [ + "copy", + "object" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [] + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/object-inspect/.eslintrc b/node_modules/object-inspect/.eslintrc new file mode 100644 index 0000000000000..21f903923ef11 --- /dev/null +++ b/node_modules/object-inspect/.eslintrc @@ -0,0 +1,53 @@ +{ + "root": true, + "extends": "@ljharb", + "rules": { + "complexity": 0, + "func-style": [2, "declaration"], + "indent": [2, 4], + "max-lines": 1, + "max-lines-per-function": 1, + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "no-param-reassign": 1, + "strict": 0, // TODO + }, + "overrides": [ + { + "files": ["test/**", "test-*", "example/**"], + "extends": "@ljharb/eslint-config/tests", + "rules": { + "id-length": 0, + }, + }, + { + "files": ["example/**"], + "rules": { + "no-console": 0, + }, + }, + { + "files": ["test/browser/**"], + "env": { + "browser": true, + }, + }, + { + "files": ["test/bigint*"], + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], + }, + }, + { + "files": "index.js", + "globals": { + "HTMLElement": false, + }, + "rules": { + "no-use-before-define": 1, + }, + }, + ], +} diff --git a/node_modules/object-inspect/.github/FUNDING.yml b/node_modules/object-inspect/.github/FUNDING.yml new file mode 100644 index 0000000000000..730276bd121df --- /dev/null +++ b/node_modules/object-inspect/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/object-inspect +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object-inspect/.nycrc b/node_modules/object-inspect/.nycrc new file mode 100644 index 0000000000000..58a5db7834ad5 --- /dev/null +++ b/node_modules/object-inspect/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "instrumentation": false, + "sourceMap": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "example", + "test", + "test-core-js.js" + ] +} diff --git a/node_modules/object-inspect/CHANGELOG.md b/node_modules/object-inspect/CHANGELOG.md new file mode 100644 index 0000000000000..c5772b4c07882 --- /dev/null +++ b/node_modules/object-inspect/CHANGELOG.md @@ -0,0 +1,389 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19 + +### Commits + +- [Fix] in IE 8, global can !== window despite them being prototypes of each other [`30d0859`](https://github.com/inspect-js/object-inspect/commit/30d0859dc4606cf75c2410edcd5d5c6355f8d372) + +## [v1.13.0](https://github.com/inspect-js/object-inspect/compare/v1.12.3...v1.13.0) - 2023-10-14 + +### Commits + +- [New] add special handling for the global object [`431bab2`](https://github.com/inspect-js/object-inspect/commit/431bab21a490ee51d35395966a504501e8c685da) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`fd4f619`](https://github.com/inspect-js/object-inspect/commit/fd4f6193562b4b0e95dcf5c0201b4e8cbbc4f58d) +- [Dev Deps] update `mock-property`, `tape` [`b453f6c`](https://github.com/inspect-js/object-inspect/commit/b453f6ceeebf8a1b738a1029754092e0367a4134) +- [Dev Deps] update `error-cause` [`e8ffc57`](https://github.com/inspect-js/object-inspect/commit/e8ffc577d73b92bb6a4b00c44f14e3319e374888) +- [Dev Deps] update `tape` [`054b8b9`](https://github.com/inspect-js/object-inspect/commit/054b8b9b98633284cf989e582450ebfbbe53503c) +- [Dev Deps] temporarily remove `aud` due to breaking change in transitive deps [`2476845`](https://github.com/inspect-js/object-inspect/commit/2476845e0678dd290c541c81cd3dec8420782c52) +- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` [`383fa5e`](https://github.com/inspect-js/object-inspect/commit/383fa5eebc0afd705cc778a4b49d8e26452e49a8) +- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6 [`68c244c`](https://github.com/inspect-js/object-inspect/commit/68c244c5174cdd877e5dcb8ee90aa3f44b2f25be) + +## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12 + +### Commits + +- [Fix] in eg FF 24, collections lack forEach [`75fc226`](https://github.com/inspect-js/object-inspect/commit/75fc22673c82d45f28322b1946bb0eb41b672b7f) +- [actions] update rebase action to use reusable workflow [`250a277`](https://github.com/inspect-js/object-inspect/commit/250a277a095e9dacc029ab8454dcfc15de549dcd) +- [Dev Deps] update `aud`, `es-value-fixtures`, `tape` [`66a19b3`](https://github.com/inspect-js/object-inspect/commit/66a19b3209ccc3c5ef4b34c3cb0160e65d1ce9d5) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `error-cause` [`c43d332`](https://github.com/inspect-js/object-inspect/commit/c43d3324b48384a16fd3dc444e5fc589d785bef3) +- [Tests] add `@pkgjs/support` to `postlint` [`e2618d2`](https://github.com/inspect-js/object-inspect/commit/e2618d22a7a3fa361b6629b53c1752fddc9c4d80) + +## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26 + +### Commits + +- [Fix] use `util.inspect` for a custom inspection symbol method [`e243bf2`](https://github.com/inspect-js/object-inspect/commit/e243bf2eda6c4403ac6f1146fddb14d12e9646c1) +- [meta] add support info [`ca20ba3`](https://github.com/inspect-js/object-inspect/commit/ca20ba35713c17068ca912a86c542f5e8acb656c) +- [Fix] ignore `cause` in node v16.9 and v16.10 where it has a bug [`86aa553`](https://github.com/inspect-js/object-inspect/commit/86aa553a4a455562c2c56f1540f0bf857b9d314b) + +## [v1.12.1](https://github.com/inspect-js/object-inspect/compare/v1.12.0...v1.12.1) - 2022-05-21 + +### Commits + +- [Tests] use `mock-property` [`4ec8893`](https://github.com/inspect-js/object-inspect/commit/4ec8893ea9bfd28065ca3638cf6762424bf44352) +- [meta] use `npmignore` to autogenerate an npmignore file [`07f868c`](https://github.com/inspect-js/object-inspect/commit/07f868c10bd25a9d18686528339bb749c211fc9a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b05244b`](https://github.com/inspect-js/object-inspect/commit/b05244b4f331e00c43b3151bc498041be77ccc91) +- [Dev Deps] update `@ljharb/eslint-config`, `error-cause`, `es-value-fixtures`, `functions-have-names`, `tape` [`d037398`](https://github.com/inspect-js/object-inspect/commit/d037398dcc5d531532e4c19c4a711ed677f579c1) +- [Fix] properly handle callable regexes in older engines [`848fe48`](https://github.com/inspect-js/object-inspect/commit/848fe48bd6dd0064ba781ee6f3c5e54a94144c37) + +## [v1.12.0](https://github.com/inspect-js/object-inspect/compare/v1.11.1...v1.12.0) - 2021-12-18 + +### Commits + +- [New] add `numericSeparator` boolean option [`2d2d537`](https://github.com/inspect-js/object-inspect/commit/2d2d537f5359a4300ce1c10241369f8024f89e11) +- [Robustness] cache more prototype methods [`191533d`](https://github.com/inspect-js/object-inspect/commit/191533da8aec98a05eadd73a5a6e979c9c8653e8) +- [New] ensure an Error’s `cause` is displayed [`53bc2ce`](https://github.com/inspect-js/object-inspect/commit/53bc2cee4e5a9cc4986f3cafa22c0685f340715e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`bc164b6`](https://github.com/inspect-js/object-inspect/commit/bc164b6e2e7d36b263970f16f54de63048b84a36) +- [Robustness] cache `RegExp.prototype.test` [`a314ab8`](https://github.com/inspect-js/object-inspect/commit/a314ab8271b905cbabc594c82914d2485a8daf12) +- [meta] fix auto-changelog settings [`5ed0983`](https://github.com/inspect-js/object-inspect/commit/5ed0983be72f73e32e2559997517a95525c7e20d) + +## [v1.11.1](https://github.com/inspect-js/object-inspect/compare/v1.11.0...v1.11.1) - 2021-12-05 + +### Commits + +- [meta] add `auto-changelog` [`7dbdd22`](https://github.com/inspect-js/object-inspect/commit/7dbdd228401d6025d8b7391476d88aee9ea9bbdf) +- [actions] reuse common workflows [`c8823bc`](https://github.com/inspect-js/object-inspect/commit/c8823bc0a8790729680709d45fb6e652432e91aa) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`7532b12`](https://github.com/inspect-js/object-inspect/commit/7532b120598307497b712890f75af8056f6d37a6) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`94abb5d`](https://github.com/inspect-js/object-inspect/commit/94abb5d4e745bf33253942dea86b3e538d2ff6c6) +- [actions] update codecov uploader [`5ed5102`](https://github.com/inspect-js/object-inspect/commit/5ed51025267a00e53b1341357315490ac4eb0874) +- [Dev Deps] update `eslint`, `tape` [`37b2ad2`](https://github.com/inspect-js/object-inspect/commit/37b2ad26c08d94bfd01d5d07069a0b28ef4e2ad7) +- [meta] add `sideEffects` flag [`d341f90`](https://github.com/inspect-js/object-inspect/commit/d341f905ef8bffa6a694cda6ddc5ba343532cd4f) + +## [v1.11.0](https://github.com/inspect-js/object-inspect/compare/v1.10.3...v1.11.0) - 2021-07-12 + +### Commits + +- [New] `customInspect`: add `symbol` option, to mimic modern util.inspect behavior [`e973a6e`](https://github.com/inspect-js/object-inspect/commit/e973a6e21f8140c5837cf25e9d89bdde88dc3120) +- [Dev Deps] update `eslint` [`05f1cb3`](https://github.com/inspect-js/object-inspect/commit/05f1cb3cbcfe1f238e8b51cf9bc294305b7ed793) + +## [v1.10.3](https://github.com/inspect-js/object-inspect/compare/v1.10.2...v1.10.3) - 2021-05-07 + +### Commits + +- [Fix] handle core-js Symbol shams [`4acfc2c`](https://github.com/inspect-js/object-inspect/commit/4acfc2c4b503498759120eb517abad6d51c9c5d6) +- [readme] update badges [`95c323a`](https://github.com/inspect-js/object-inspect/commit/95c323ad909d6cbabb95dd6015c190ba6db9c1f2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`cb38f48`](https://github.com/inspect-js/object-inspect/commit/cb38f485de6ec7a95109b5a9bbd0a1deba2f6611) + +## [v1.10.2](https://github.com/inspect-js/object-inspect/compare/v1.10.1...v1.10.2) - 2021-04-17 + +### Commits + +- [Fix] use a robust check for a boxed Symbol [`87f12d6`](https://github.com/inspect-js/object-inspect/commit/87f12d6e69ce530be04659c81a4cd502943acac5) + +## [v1.10.1](https://github.com/inspect-js/object-inspect/compare/v1.10.0...v1.10.1) - 2021-04-17 + +### Commits + +- [Fix] use a robust check for a boxed bigint [`d5ca829`](https://github.com/inspect-js/object-inspect/commit/d5ca8298b6d2e5c7b9334a5b21b96ed95d225c91) + +## [v1.10.0](https://github.com/inspect-js/object-inspect/compare/v1.9.0...v1.10.0) - 2021-04-17 + +### Commits + +- [Tests] increase coverage [`d8abb8a`](https://github.com/inspect-js/object-inspect/commit/d8abb8a62c2f084919df994a433b346e0d87a227) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`4bfec2e`](https://github.com/inspect-js/object-inspect/commit/4bfec2e30aaef6ddef6cbb1448306f9f8b9520b7) +- [New] respect `Symbol.toStringTag` on objects [`799b58f`](https://github.com/inspect-js/object-inspect/commit/799b58f536a45e4484633a8e9daeb0330835f175) +- [Fix] do not allow Symbol.toStringTag to masquerade as builtins [`d6c5b37`](https://github.com/inspect-js/object-inspect/commit/d6c5b37d7e94427796b82432fb0c8964f033a6ab) +- [New] add `WeakRef` support [`b6d898e`](https://github.com/inspect-js/object-inspect/commit/b6d898ee21868c780a7ee66b28532b5b34ed7f09) +- [meta] do not publish github action workflow files [`918cdfc`](https://github.com/inspect-js/object-inspect/commit/918cdfc4b6fe83f559ff6ef04fe66201e3ff5cbd) +- [meta] create `FUNDING.yml` [`0bb5fc5`](https://github.com/inspect-js/object-inspect/commit/0bb5fc516dbcd2cd728bd89cee0b580acc5ce301) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22c8dc0`](https://github.com/inspect-js/object-inspect/commit/22c8dc0cac113d70f4781e49a950070923a671be) +- [meta] use `prepublishOnly` script for npm 7+ [`e52ee09`](https://github.com/inspect-js/object-inspect/commit/e52ee09e8050b8dbac94ef57f786675567728223) +- [Dev Deps] update `eslint` [`7c4e6fd`](https://github.com/inspect-js/object-inspect/commit/7c4e6fdedcd27cc980e13c9ad834d05a96f3d40c) + +## [v1.9.0](https://github.com/inspect-js/object-inspect/compare/v1.8.0...v1.9.0) - 2020-11-30 + +### Commits + +- [Tests] migrate tests to Github Actions [`d262251`](https://github.com/inspect-js/object-inspect/commit/d262251e13e16d3490b5473672f6b6d6ff86675d) +- [New] add enumerable own Symbols to plain object output [`ee60c03`](https://github.com/inspect-js/object-inspect/commit/ee60c033088cff9d33baa71e59a362a541b48284) +- [Tests] add passing tests [`01ac3e4`](https://github.com/inspect-js/object-inspect/commit/01ac3e4b5a30f97875a63dc9b1416b3bd626afc9) +- [actions] add "Require Allow Edits" action [`c2d7746`](https://github.com/inspect-js/object-inspect/commit/c2d774680cde4ca4af332d84d4121b26f798ba9e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js` [`70058de`](https://github.com/inspect-js/object-inspect/commit/70058de1579fc54d1d15ed6c2dbe246637ce70ff) +- [Fix] hex characters in strings should be uppercased, to match node `assert` [`6ab8faa`](https://github.com/inspect-js/object-inspect/commit/6ab8faaa0abc08fe7a8e2afd8b39c6f1f0e00113) +- [Tests] run `nyc` on all tests [`4c47372`](https://github.com/inspect-js/object-inspect/commit/4c473727879ddc8e28b599202551ddaaf07b6210) +- [Tests] node 0.8 has an unpredictable property order; fix `groups` test by removing property [`f192069`](https://github.com/inspect-js/object-inspect/commit/f192069a978a3b60e6f0e0d45ac7df260ab9a778) +- [New] add enumerable properties to Function inspect result, per node’s `assert` [`fd38e1b`](https://github.com/inspect-js/object-inspect/commit/fd38e1bc3e2a1dc82091ce3e021917462eee64fc) +- [Tests] fix tests for node < 10, due to regex match `groups` [`2ac6462`](https://github.com/inspect-js/object-inspect/commit/2ac6462cc4f72eaa0b63a8cfee9aabe3008b2330) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`44b59e2`](https://github.com/inspect-js/object-inspect/commit/44b59e2676a7f825ef530dfd19dafb599e3b9456) +- [Robustness] cache `Symbol.prototype.toString` [`f3c2074`](https://github.com/inspect-js/object-inspect/commit/f3c2074d8f32faf8292587c07c9678ea931703dd) +- [Dev Deps] update `eslint` [`9411294`](https://github.com/inspect-js/object-inspect/commit/94112944b9245e3302e25453277876402d207e7f) +- [meta] `require-allow-edits` no longer requires an explicit github token [`36c0220`](https://github.com/inspect-js/object-inspect/commit/36c02205de3c2b0e84d53777c5c9fd54a36c48ab) +- [actions] update rebase checkout action to v2 [`55a39a6`](https://github.com/inspect-js/object-inspect/commit/55a39a64e944f19c6a7d8efddf3df27700f20d14) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f59fd3c`](https://github.com/inspect-js/object-inspect/commit/f59fd3cf406c3a7c7ece140904a80bbc6bacfcca) +- [Dev Deps] update `eslint` [`a492bec`](https://github.com/inspect-js/object-inspect/commit/a492becec644b0155c9c4bc1caf6f9fac11fb2c7) + +## [v1.8.0](https://github.com/inspect-js/object-inspect/compare/v1.7.0...v1.8.0) - 2020-06-18 + +### Fixed + +- [New] add `indent` option [`#27`](https://github.com/inspect-js/object-inspect/issues/27) + +### Commits + +- [Tests] add codecov [`4324cbb`](https://github.com/inspect-js/object-inspect/commit/4324cbb1a2bd7710822a4151ff373570db22453e) +- [New] add `maxStringLength` option [`b3995cb`](https://github.com/inspect-js/object-inspect/commit/b3995cb71e15b5ee127a3094c43994df9d973502) +- [New] add `customInspect` option, to disable custom inspect methods [`28b9179`](https://github.com/inspect-js/object-inspect/commit/28b9179ee802bb3b90810100c11637db90c2fb6d) +- [Tests] add Date and RegExp tests [`3b28eca`](https://github.com/inspect-js/object-inspect/commit/3b28eca57b0367aeadffac604ea09e8bdae7d97b) +- [actions] add automatic rebasing / merge commit blocking [`0d9c6c0`](https://github.com/inspect-js/object-inspect/commit/0d9c6c044e83475ff0bfffb9d35b149834c83a2e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape`; add `aud` [`7c204f2`](https://github.com/inspect-js/object-inspect/commit/7c204f22b9e41bc97147f4d32d4cb045b17769a6) +- [readme] fix repo URLs, remove testling [`34ca9a0`](https://github.com/inspect-js/object-inspect/commit/34ca9a0dabfe75bd311f806a326fadad029909a3) +- [Fix] when truncating a deep array, note it as `[Array]` instead of just `[Object]` [`f74c82d`](https://github.com/inspect-js/object-inspect/commit/f74c82dd0b35386445510deb250f34c41be3ec0e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1a8a5ea`](https://github.com/inspect-js/object-inspect/commit/1a8a5ea069ea2bee89d77caedad83ffa23d35711) +- [Fix] do not be fooled by a function’s own `toString` method [`7cb5c65`](https://github.com/inspect-js/object-inspect/commit/7cb5c657a976f94715c19c10556a30f15bb7d5d7) +- [patch] indicate explicitly that anon functions are anonymous, to match node [`81ebdd4`](https://github.com/inspect-js/object-inspect/commit/81ebdd4215005144074bbdff3f6bafa01407910a) +- [Dev Deps] loosen the `core-js` dep [`e7472e8`](https://github.com/inspect-js/object-inspect/commit/e7472e8e242117670560bd995830c2a4d12080f5) +- [Dev Deps] update `tape` [`699827e`](https://github.com/inspect-js/object-inspect/commit/699827e6b37258b5203c33c78c009bf4b0e6a66d) +- [meta] add `safe-publish-latest` [`c5d2868`](https://github.com/inspect-js/object-inspect/commit/c5d2868d6eb33c472f37a20f89ceef2787046088) +- [Dev Deps] update `@ljharb/eslint-config` [`9199501`](https://github.com/inspect-js/object-inspect/commit/919950195d486114ccebacbdf9d74d7f382693b0) + +## [v1.7.0](https://github.com/inspect-js/object-inspect/compare/v1.6.0...v1.7.0) - 2019-11-10 + +### Commits + +- [Tests] use shared travis-ci configs [`19899ed`](https://github.com/inspect-js/object-inspect/commit/19899edbf31f4f8809acf745ce34ad1ce1bfa63b) +- [Tests] add linting [`a00f057`](https://github.com/inspect-js/object-inspect/commit/a00f057d917f66ea26dd37769c6b810ec4af97e8) +- [Tests] lint last file [`2698047`](https://github.com/inspect-js/object-inspect/commit/2698047b58af1e2e88061598ef37a75f228dddf6) +- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`589e87a`](https://github.com/inspect-js/object-inspect/commit/589e87a99cadcff4b600e6a303418e9d922836e8) +- [New] add support for `WeakMap` and `WeakSet` [`3ddb3e4`](https://github.com/inspect-js/object-inspect/commit/3ddb3e4e0c8287130c61a12e0ed9c104b1549306) +- [meta] clean up license so github can detect it properly [`27527bb`](https://github.com/inspect-js/object-inspect/commit/27527bb801520c9610c68cc3b55d6f20a2bee56d) +- [Tests] cover `util.inspect.custom` [`36d47b9`](https://github.com/inspect-js/object-inspect/commit/36d47b9c59056a57ef2f1491602c726359561800) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape` [`b614eaa`](https://github.com/inspect-js/object-inspect/commit/b614eaac901da0e5c69151f534671f990a94cace) +- [Tests] fix coverage thresholds [`7b7b176`](https://github.com/inspect-js/object-inspect/commit/7b7b176e15f8bd6e8b2f261ff5a493c2fe78d9c2) +- [Tests] bigint tests now can run on unflagged node [`063af31`](https://github.com/inspect-js/object-inspect/commit/063af31ce9cd13c202e3b67c07ba06dc9b7c0f81) +- [Refactor] add early bailout to `isMap` and `isSet` checks [`fc51047`](https://github.com/inspect-js/object-inspect/commit/fc5104714a3671d37e225813db79470d6335683b) +- [meta] add `funding` field [`7f9953a`](https://github.com/inspect-js/object-inspect/commit/7f9953a113eec7b064a6393cf9f90ba15f1d131b) +- [Tests] Fix invalid strict-mode syntax with hexadecimal [`a8b5425`](https://github.com/inspect-js/object-inspect/commit/a8b542503b4af1599a275209a1a99f5fdedb1ead) +- [Dev Deps] update `@ljharb/eslint-config` [`98df157`](https://github.com/inspect-js/object-inspect/commit/98df1577314d9188a3fc3f17fdcf2fba697ae1bd) +- add copyright to LICENSE [`bb69fd0`](https://github.com/inspect-js/object-inspect/commit/bb69fd017a062d299e44da1f9b2c7dcd67f621e6) +- [Tests] use `npx aud` in `posttest` [`4838353`](https://github.com/inspect-js/object-inspect/commit/4838353593974cf7f905b9ef04c03c094f0cdbe2) +- [Tests] move `0.6` to allowed failures, because it won‘t build on travis [`1bff32a`](https://github.com/inspect-js/object-inspect/commit/1bff32aa52e8aea687f0856b28ba754b3e43ebf7) + +## [v1.6.0](https://github.com/inspect-js/object-inspect/compare/v1.5.0...v1.6.0) - 2018-05-02 + +### Commits + +- [New] add support for boxed BigInt primitives [`356c66a`](https://github.com/inspect-js/object-inspect/commit/356c66a410e7aece7162c8319880a5ef647beaa9) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`c77b65b`](https://github.com/inspect-js/object-inspect/commit/c77b65bba593811b906b9ec57561c5cba92e2db3) +- [New] Add support for upcoming `BigInt` [`1ac548e`](https://github.com/inspect-js/object-inspect/commit/1ac548e4b27e26466c28c9a5e63e5d4e0591c31f) +- [Tests] run bigint tests in CI with --harmony-bigint flag [`d31b738`](https://github.com/inspect-js/object-inspect/commit/d31b73831880254b5c6cf5691cda9a149fbc5f04) +- [Dev Deps] update `core-js`, `tape` [`ff9eff6`](https://github.com/inspect-js/object-inspect/commit/ff9eff67113341ee1aaf80c1c22d683f43bfbccf) +- [Docs] fix example to use `safer-buffer` [`48cae12`](https://github.com/inspect-js/object-inspect/commit/48cae12a73ec6cacc955175bc56bbe6aee6a211f) + +## [v1.5.0](https://github.com/inspect-js/object-inspect/compare/v1.4.1...v1.5.0) - 2017-12-25 + +### Commits + +- [New] add `quoteStyle` option [`f5a72d2`](https://github.com/inspect-js/object-inspect/commit/f5a72d26edb3959b048f74c056ca7100a6b091e4) +- [Tests] add more test coverage [`30ebe4e`](https://github.com/inspect-js/object-inspect/commit/30ebe4e1fa943b99ecbb85be7614256d536e2759) +- [Tests] require 0.6 to pass [`99a008c`](https://github.com/inspect-js/object-inspect/commit/99a008ccace189a60fd7da18bf00e32c9572b980) + +## [v1.4.1](https://github.com/inspect-js/object-inspect/compare/v1.4.0...v1.4.1) - 2017-12-19 + +### Commits + +- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12` [`6674476`](https://github.com/inspect-js/object-inspect/commit/6674476cc56acaac1bde96c84fed5ef631911906) +- [Fix] `inspect(Object(-0))` should be “Object(-0)”, not “Object(0)” [`d0a031f`](https://github.com/inspect-js/object-inspect/commit/d0a031f1cbb3024ee9982bfe364dd18a7e4d1bd3) + +## [v1.4.0](https://github.com/inspect-js/object-inspect/compare/v1.3.0...v1.4.0) - 2017-10-24 + +### Commits + +- [Tests] add `npm run coverage` [`3b48fb2`](https://github.com/inspect-js/object-inspect/commit/3b48fb25db037235eeb808f0b2830aad7aa36f70) +- [Tests] remove commented-out osx builds [`71e24db`](https://github.com/inspect-js/object-inspect/commit/71e24db8ad6ee3b9b381c5300b0475f2ba595a73) +- [New] add support for `util.inspect.custom`, in node only. [`20cca77`](https://github.com/inspect-js/object-inspect/commit/20cca7762d7e17f15b21a90793dff84acce155df) +- [Tests] up to `node` `v8.6`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node [`252952d`](https://github.com/inspect-js/object-inspect/commit/252952d230d8065851dd3d4d5fe8398aae068529) +- [Tests] up to `node` `v8.8` [`4aa868d`](https://github.com/inspect-js/object-inspect/commit/4aa868d3a62914091d489dd6ec6eed194ee67cd3) +- [Dev Deps] update `core-js`, `tape` [`59483d1`](https://github.com/inspect-js/object-inspect/commit/59483d1df418f852f51fa0db7b24aa6b0209a27a) + +## [v1.3.0](https://github.com/inspect-js/object-inspect/compare/v1.2.2...v1.3.0) - 2017-07-31 + +### Fixed + +- [Fix] Map/Set: work around core-js bug < v2.5.0 [`#9`](https://github.com/inspect-js/object-inspect/issues/9) + +### Commits + +- [New] add support for arrays with additional object keys [`0d19937`](https://github.com/inspect-js/object-inspect/commit/0d199374ee37959e51539616666f420ccb29acb9) +- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; fix new npm breaking on older nodes [`e24784a`](https://github.com/inspect-js/object-inspect/commit/e24784a90c49117787157a12a63897c49cf89bbb) +- Only apps should have lockfiles [`c6faebc`](https://github.com/inspect-js/object-inspect/commit/c6faebcb2ee486a889a4a1c4d78c0776c7576185) +- [Dev Deps] update `tape` [`7345a0a`](https://github.com/inspect-js/object-inspect/commit/7345a0aeba7e91b888a079c10004d17696a7f586) + +## [v1.2.2](https://github.com/inspect-js/object-inspect/compare/v1.2.1...v1.2.2) - 2017-03-24 + +### Commits + +- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; improve test matrix [`a2ddc15`](https://github.com/inspect-js/object-inspect/commit/a2ddc15a1f2c65af18076eea1c0eb9cbceb478a0) +- [Tests] up to `node` `v7.0`, `v6.9`, `v5.12`, `v4.6`, `io.js` `v3.3`; improve test matrix [`a48949f`](https://github.com/inspect-js/object-inspect/commit/a48949f6b574b2d4d2298109d8e8d0eb3e7a83e7) +- [Performance] check for primitive types as early as possible. [`3b8092a`](https://github.com/inspect-js/object-inspect/commit/3b8092a2a4deffd0575f94334f00194e2d48dad3) +- [Refactor] remove unneeded `else`s. [`7255034`](https://github.com/inspect-js/object-inspect/commit/725503402e08de4f96f6bf2d8edef44ac36f26b6) +- [Refactor] avoid recreating `lowbyte` function every time. [`81edd34`](https://github.com/inspect-js/object-inspect/commit/81edd3475bd15bdd18e84de7472033dcf5004aaa) +- [Fix] differentiate -0 from 0 [`521d345`](https://github.com/inspect-js/object-inspect/commit/521d3456b009da7bf1c5785c8a9df5a9f8718264) +- [Refactor] move object key gathering into separate function [`aca6265`](https://github.com/inspect-js/object-inspect/commit/aca626536eaeef697196c6e9db3e90e7e0355b6a) +- [Refactor] consolidate wrapping logic for boxed primitives into a function. [`4e440cd`](https://github.com/inspect-js/object-inspect/commit/4e440cd9065df04802a2a1dead03f48c353ca301) +- [Robustness] use `typeof` instead of comparing to literal `undefined` [`5ca6f60`](https://github.com/inspect-js/object-inspect/commit/5ca6f601937506daff8ed2fcf686363b55807b69) +- [Refactor] consolidate Map/Set notations. [`4e576e5`](https://github.com/inspect-js/object-inspect/commit/4e576e5d7ed2f9ec3fb7f37a0d16732eb10758a9) +- [Tests] ensure that this function remains anonymous, despite ES6 name inference. [`7540ae5`](https://github.com/inspect-js/object-inspect/commit/7540ae591278756db614fa4def55ca413150e1a3) +- [Refactor] explicitly coerce Error objects to strings. [`7f4ca84`](https://github.com/inspect-js/object-inspect/commit/7f4ca8424ee8dc2c0ca5a422d94f7fac40327261) +- [Refactor] split up `var` declarations for debuggability [`6f2c11e`](https://github.com/inspect-js/object-inspect/commit/6f2c11e6a85418586a00292dcec5e97683f89bc3) +- [Robustness] cache `Object.prototype.toString` [`df44a20`](https://github.com/inspect-js/object-inspect/commit/df44a20adfccf31529d60d1df2079bfc3c836e27) +- [Dev Deps] update `tape` [`3ec714e`](https://github.com/inspect-js/object-inspect/commit/3ec714eba57bc3f58a6eb4fca1376f49e70d300a) +- [Dev Deps] update `tape` [`beb72d9`](https://github.com/inspect-js/object-inspect/commit/beb72d969653747d7cde300393c28755375329b0) + +## [v1.2.1](https://github.com/inspect-js/object-inspect/compare/v1.2.0...v1.2.1) - 2016-04-09 + +### Fixed + +- [Fix] fix Boolean `false` object inspection. [`#7`](https://github.com/substack/object-inspect/pull/7) + +## [v1.2.0](https://github.com/inspect-js/object-inspect/compare/v1.1.0...v1.2.0) - 2016-04-09 + +### Fixed + +- [New] add support for inspecting String/Number/Boolean objects. [`#6`](https://github.com/inspect-js/object-inspect/issues/6) + +### Commits + +- [Dev Deps] update `tape` [`742caa2`](https://github.com/inspect-js/object-inspect/commit/742caa262cf7af4c815d4821c8bd0129c1446432) + +## [v1.1.0](https://github.com/inspect-js/object-inspect/compare/1.0.2...v1.1.0) - 2015-12-14 + +### Merged + +- [New] add ES6 Map/Set support. [`#4`](https://github.com/inspect-js/object-inspect/pull/4) + +### Fixed + +- [New] add ES6 Map/Set support. [`#3`](https://github.com/inspect-js/object-inspect/issues/3) + +### Commits + +- Update `travis.yml` to test on bunches of `iojs` and `node` versions. [`4c1fd65`](https://github.com/inspect-js/object-inspect/commit/4c1fd65cc3bd95307e854d114b90478324287fd2) +- [Dev Deps] update `tape` [`88a907e`](https://github.com/inspect-js/object-inspect/commit/88a907e33afbe408e4b5d6e4e42a33143f88848c) + +## [1.0.2](https://github.com/inspect-js/object-inspect/compare/1.0.1...1.0.2) - 2015-08-07 + +### Commits + +- [Fix] Cache `Object.prototype.hasOwnProperty` in case it's deleted later. [`1d0075d`](https://github.com/inspect-js/object-inspect/commit/1d0075d3091dc82246feeb1f9871cb2b8ed227b3) +- [Dev Deps] Update `tape` [`ca8d5d7`](https://github.com/inspect-js/object-inspect/commit/ca8d5d75635ddbf76f944e628267581e04958457) +- gitignore node_modules since this is a reusable modules. [`ed41407`](https://github.com/inspect-js/object-inspect/commit/ed41407811743ca530cdeb28f982beb96026af82) + +## [1.0.1](https://github.com/inspect-js/object-inspect/compare/1.0.0...1.0.1) - 2015-07-19 + +### Commits + +- Make `inspect` work with symbol primitives and objects, including in node 0.11 and 0.12. [`ddf1b94`](https://github.com/inspect-js/object-inspect/commit/ddf1b94475ab951f1e3bccdc0a48e9073cfbfef4) +- bump tape [`103d674`](https://github.com/inspect-js/object-inspect/commit/103d67496b504bdcfdd765d303a773f87ec106e2) +- use newer travis config [`d497276`](https://github.com/inspect-js/object-inspect/commit/d497276c1da14234bb5098a59cf20de75fbc316a) + +## [1.0.0](https://github.com/inspect-js/object-inspect/compare/0.4.0...1.0.0) - 2014-08-05 + +### Commits + +- error inspect works properly [`260a22d`](https://github.com/inspect-js/object-inspect/commit/260a22d134d3a8a482c67d52091c6040c34f4299) +- seen coverage [`57269e8`](https://github.com/inspect-js/object-inspect/commit/57269e8baa992a7439047f47325111fdcbcb8417) +- htmlelement instance coverage [`397ffe1`](https://github.com/inspect-js/object-inspect/commit/397ffe10a1980350868043ef9de65686d438979f) +- more element coverage [`6905cc2`](https://github.com/inspect-js/object-inspect/commit/6905cc2f7df35600177e613b0642b4df5efd3eca) +- failing test for type errors [`385b615`](https://github.com/inspect-js/object-inspect/commit/385b6152e49b51b68449a662f410b084ed7c601a) +- fn name coverage [`edc906d`](https://github.com/inspect-js/object-inspect/commit/edc906d40fca6b9194d304062c037ee8e398c4c2) +- server-side element test [`362d1d3`](https://github.com/inspect-js/object-inspect/commit/362d1d3e86f187651c29feeb8478110afada385b) +- custom inspect fn [`e89b0f6`](https://github.com/inspect-js/object-inspect/commit/e89b0f6fe6d5e03681282af83732a509160435a6) +- fixed browser test [`b530882`](https://github.com/inspect-js/object-inspect/commit/b5308824a1c8471c5617e394766a03a6977102a9) +- depth test, matches node [`1cfd9e0`](https://github.com/inspect-js/object-inspect/commit/1cfd9e0285a4ae1dff44101ad482915d9bf47e48) +- exercise hasOwnProperty path [`8d753fb`](https://github.com/inspect-js/object-inspect/commit/8d753fb362a534fa1106e4d80f2ee9bea06a66d9) +- more cases covered for errors [`c5c46a5`](https://github.com/inspect-js/object-inspect/commit/c5c46a569ec4606583497e8550f0d8c7ad39a4a4) +- \W obj key test case [`b0eceee`](https://github.com/inspect-js/object-inspect/commit/b0eceeea6e0eb94d686c1046e99b9e25e5005f75) +- coverage for explicit depth param [`e12b91c`](https://github.com/inspect-js/object-inspect/commit/e12b91cd59683362f3a0e80f46481a0211e26c15) + +## [0.4.0](https://github.com/inspect-js/object-inspect/compare/0.3.1...0.4.0) - 2014-03-21 + +### Commits + +- passing lowbyte interpolation test [`b847511`](https://github.com/inspect-js/object-inspect/commit/b8475114f5def7e7961c5353d48d3d8d9a520985) +- lowbyte test [`4a2b0e1`](https://github.com/inspect-js/object-inspect/commit/4a2b0e142667fc933f195472759385ac08f3946c) + +## [0.3.1](https://github.com/inspect-js/object-inspect/compare/0.3.0...0.3.1) - 2014-03-04 + +### Commits + +- sort keys [`a07b19c`](https://github.com/inspect-js/object-inspect/commit/a07b19cc3b1521a82d4fafb6368b7a9775428a05) + +## [0.3.0](https://github.com/inspect-js/object-inspect/compare/0.2.0...0.3.0) - 2014-03-04 + +### Commits + +- [] and {} instead of [ ] and { } [`654c44b`](https://github.com/inspect-js/object-inspect/commit/654c44b2865811f3519e57bb8526e0821caf5c6b) + +## [0.2.0](https://github.com/inspect-js/object-inspect/compare/0.1.3...0.2.0) - 2014-03-04 + +### Commits + +- failing holes test [`99cdfad`](https://github.com/inspect-js/object-inspect/commit/99cdfad03c6474740275a75636fe6ca86c77737a) +- regex already work [`e324033`](https://github.com/inspect-js/object-inspect/commit/e324033267025995ec97d32ed0a65737c99477a6) +- failing undef/null test [`1f88a00`](https://github.com/inspect-js/object-inspect/commit/1f88a00265d3209719dda8117b7e6360b4c20943) +- holes in the all example [`7d345f3`](https://github.com/inspect-js/object-inspect/commit/7d345f3676dcbe980cff89a4f6c243269ebbb709) +- check for .inspect(), fixes Buffer use-case [`c3f7546`](https://github.com/inspect-js/object-inspect/commit/c3f75466dbca125347d49847c05262c292f12b79) +- fixes for holes [`ce25f73`](https://github.com/inspect-js/object-inspect/commit/ce25f736683de4b92ff27dc5471218415e2d78d8) +- weird null behavior [`405c1ea`](https://github.com/inspect-js/object-inspect/commit/405c1ea72cd5a8cf3b498c3eaa903d01b9fbcab5) +- tape is actually a devDependency, upgrade [`703b0ce`](https://github.com/inspect-js/object-inspect/commit/703b0ce6c5817b4245a082564bccd877e0bb6990) +- put date in the example [`a342219`](https://github.com/inspect-js/object-inspect/commit/a3422190eeaa013215f46df2d0d37b48595ac058) +- passing the null test [`4ab737e`](https://github.com/inspect-js/object-inspect/commit/4ab737ebf862a75d247ebe51e79307a34d6380d4) + +## [0.1.3](https://github.com/inspect-js/object-inspect/compare/0.1.1...0.1.3) - 2013-07-26 + +### Commits + +- special isElement() check [`882768a`](https://github.com/inspect-js/object-inspect/commit/882768a54035d30747be9de1baf14e5aa0daa128) +- oh right old IEs don't have indexOf either [`36d1275`](https://github.com/inspect-js/object-inspect/commit/36d12756c38b08a74370b0bb696c809e529913a5) + +## [0.1.1](https://github.com/inspect-js/object-inspect/compare/0.1.0...0.1.1) - 2013-07-26 + +### Commits + +- tests! [`4422fd9`](https://github.com/inspect-js/object-inspect/commit/4422fd95532c2745aa6c4f786f35f1090be29998) +- fix for ie<9, doesn't have hasOwnProperty [`6b7d611`](https://github.com/inspect-js/object-inspect/commit/6b7d61183050f6da801ea04473211da226482613) +- fix for all IEs: no f.name [`4e0c2f6`](https://github.com/inspect-js/object-inspect/commit/4e0c2f6dfd01c306d067d7163319acc97c94ee50) +- badges [`5ed0d88`](https://github.com/inspect-js/object-inspect/commit/5ed0d88e4e407f9cb327fa4a146c17921f9680f3) + +## [0.1.0](https://github.com/inspect-js/object-inspect/compare/0.0.0...0.1.0) - 2013-07-26 + +### Commits + +- [Function] for functions [`ad5c485`](https://github.com/inspect-js/object-inspect/commit/ad5c485098fc83352cb540a60b2548ca56820e0b) + +## 0.0.0 - 2013-07-26 + +### Commits + +- working browser example [`34be6b6`](https://github.com/inspect-js/object-inspect/commit/34be6b6548f9ce92bdc3c27572857ba0c4a1218d) +- package.json etc [`cad51f2`](https://github.com/inspect-js/object-inspect/commit/cad51f23fc6bcf1a456ed6abe16088256c2f632f) +- docs complete [`b80cce2`](https://github.com/inspect-js/object-inspect/commit/b80cce2490c4e7183a9ee11ea89071f0abec4446) +- circular example [`4b4a7b9`](https://github.com/inspect-js/object-inspect/commit/4b4a7b92209e4e6b4630976cb6bcd17d14165a59) +- string rep [`7afb479`](https://github.com/inspect-js/object-inspect/commit/7afb479baa798d27f09e0a178b72ea327f60f5c8) diff --git a/node_modules/object-inspect/LICENSE b/node_modules/object-inspect/LICENSE new file mode 100644 index 0000000000000..ca64cc1e60520 --- /dev/null +++ b/node_modules/object-inspect/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/object-inspect/example/all.js b/node_modules/object-inspect/example/all.js new file mode 100644 index 0000000000000..2f3355c509acd --- /dev/null +++ b/node_modules/object-inspect/example/all.js @@ -0,0 +1,23 @@ +'use strict'; + +var inspect = require('../'); +var Buffer = require('safer-buffer').Buffer; + +var holes = ['a', 'b']; +holes[4] = 'e'; +holes[6] = 'g'; + +var obj = { + a: 1, + b: [3, 4, undefined, null], + c: undefined, + d: null, + e: { + regex: /^x/i, + buf: Buffer.from('abc'), + holes: holes + }, + now: new Date() +}; +obj.self = obj; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/circular.js b/node_modules/object-inspect/example/circular.js new file mode 100644 index 0000000000000..487a7c169d0df --- /dev/null +++ b/node_modules/object-inspect/example/circular.js @@ -0,0 +1,6 @@ +'use strict'; + +var inspect = require('../'); +var obj = { a: 1, b: [3, 4] }; +obj.c = obj; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/fn.js b/node_modules/object-inspect/example/fn.js new file mode 100644 index 0000000000000..9b5db8de036ff --- /dev/null +++ b/node_modules/object-inspect/example/fn.js @@ -0,0 +1,5 @@ +'use strict'; + +var inspect = require('../'); +var obj = [1, 2, function f(n) { return n + 5; }, 4]; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/inspect.js b/node_modules/object-inspect/example/inspect.js new file mode 100644 index 0000000000000..e2df7c9f47135 --- /dev/null +++ b/node_modules/object-inspect/example/inspect.js @@ -0,0 +1,10 @@ +'use strict'; + +/* eslint-env browser */ +var inspect = require('../'); + +var d = document.createElement('div'); +d.setAttribute('id', 'beep'); +d.innerHTML = 'woooiiiii'; + +console.log(inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }])); diff --git a/node_modules/object-inspect/index.js b/node_modules/object-inspect/index.js new file mode 100644 index 0000000000000..ff203349231e3 --- /dev/null +++ b/node_modules/object-inspect/index.js @@ -0,0 +1,524 @@ +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = require('./util.inspect'); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } + if (obj === global) { + return '{ [object globalThis] }'; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} diff --git a/node_modules/object-inspect/package-support.json b/node_modules/object-inspect/package-support.json new file mode 100644 index 0000000000000..5cc12d0585a38 --- /dev/null +++ b/node_modules/object-inspect/package-support.json @@ -0,0 +1,20 @@ +{ + "versions": [ + { + "version": "*", + "target": { + "node": "all" + }, + "response": { + "type": "time-permitting" + }, + "backing": { + "npm-funding": true, + "donations": [ + "https://github.com/ljharb", + "https://tidelift.com/funding/github/npm/object-inspect" + ] + } + } + ] +} diff --git a/node_modules/object-inspect/package.json b/node_modules/object-inspect/package.json new file mode 100644 index 0000000000000..02de342ecb2d9 --- /dev/null +++ b/node_modules/object-inspect/package.json @@ -0,0 +1,99 @@ +{ + "name": "object-inspect", + "version": "1.13.1", + "description": "string representations of objects in node and the browser", + "main": "index.js", + "sideEffects": false, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@pkgjs/support": "^0.0.6", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "error-cause": "^1.0.6", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "glob": "=10.3.7", + "globalthis": "^1.0.3", + "has-tostringtag": "^1.0.0", + "in-publish": "^2.0.1", + "jackspeak": "=2.1.1", + "make-arrow-function": "^1.2.0", + "mock-property": "^1.0.2", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "string.prototype.repeat": "^1.0.0", + "tape": "^5.7.1" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "lint": "eslint --ext=js,mjs .", + "postlint": "npx @pkgjs/support validate", + "test": "npm run tests-only && npm run test:corejs", + "tests-only": "nyc tape 'test/*.js'", + "test:corejs": "nyc tape test-core-js.js 'test/*.js'", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": [ + "test/*.js", + "test/browser/*.js" + ], + "browsers": [ + "ie/6..latest", + "chrome/latest", + "firefox/latest", + "safari/latest", + "opera/latest", + "iphone/latest", + "ipad/latest", + "android/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/object-inspect.git" + }, + "homepage": "https://github.com/inspect-js/object-inspect", + "keywords": [ + "inspect", + "util.inspect", + "object", + "stringify", + "pretty" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "browser": { + "./util.inspect.js": false + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "./test-core-js.js" + ] + }, + "support": true +} diff --git a/node_modules/object-inspect/readme.markdown b/node_modules/object-inspect/readme.markdown new file mode 100644 index 0000000000000..9ff6bec3661be --- /dev/null +++ b/node_modules/object-inspect/readme.markdown @@ -0,0 +1,86 @@ +# object-inspect [![Version Badge][2]][1] + +string representations of objects in node and the browser + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +# example + +## circular + +``` js +var inspect = require('object-inspect'); +var obj = { a: 1, b: [3,4] }; +obj.c = obj; +console.log(inspect(obj)); +``` + +## dom element + +``` js +var inspect = require('object-inspect'); + +var d = document.createElement('div'); +d.setAttribute('id', 'beep'); +d.innerHTML = 'woooiiiii'; + +console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ])); +``` + +output: + +``` +[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ] +``` + +# methods + +``` js +var inspect = require('object-inspect') +``` + +## var s = inspect(obj, opts={}) + +Return a string `s` with the string representation of `obj` up to a depth of `opts.depth`. + +Additional options: + - `quoteStyle`: must be "single" or "double", if present. Default `'single'` for strings, `'double'` for HTML elements. + - `maxStringLength`: must be `0`, a positive integer, `Infinity`, or `null`, if present. Default `Infinity`. + - `customInspect`: When `true`, a custom inspect method function will be invoked (either undere the `util.inspect.custom` symbol, or the `inspect` property). When the string `'symbol'`, only the symbol method will be invoked. Default `true`. + - `indent`: must be "\t", `null`, or a positive integer. Default `null`. + - `numericSeparator`: must be a boolean, if present. Default `false`. If `true`, all numbers will be printed with numeric separators (eg, `1234.5678` will be printed as `'1_234.567_8'`) + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install object-inspect +``` + +# license + +MIT + +[1]: https://npmjs.org/package/object-inspect +[2]: https://versionbadg.es/inspect-js/object-inspect.svg +[5]: https://david-dm.org/inspect-js/object-inspect.svg +[6]: https://david-dm.org/inspect-js/object-inspect +[7]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg +[8]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies +[11]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/object-inspect.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg +[downloads-url]: https://npm-stat.com/charts.html?package=object-inspect +[codecov-image]: https://codecov.io/gh/inspect-js/object-inspect/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/object-inspect/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/object-inspect +[actions-url]: https://github.com/inspect-js/object-inspect/actions diff --git a/node_modules/object-inspect/test-core-js.js b/node_modules/object-inspect/test-core-js.js new file mode 100644 index 0000000000000..e53c40022533f --- /dev/null +++ b/node_modules/object-inspect/test-core-js.js @@ -0,0 +1,26 @@ +'use strict'; + +require('core-js'); + +var inspect = require('./'); +var test = require('tape'); + +test('Maps', function (t) { + t.equal(inspect(new Map([[1, 2]])), 'Map (1) {1 => 2}'); + t.end(); +}); + +test('WeakMaps', function (t) { + t.equal(inspect(new WeakMap([[{}, 2]])), 'WeakMap { ? }'); + t.end(); +}); + +test('Sets', function (t) { + t.equal(inspect(new Set([[1, 2]])), 'Set (1) {[ 1, 2 ]}'); + t.end(); +}); + +test('WeakSets', function (t) { + t.equal(inspect(new WeakSet([[1, 2]])), 'WeakSet { ? }'); + t.end(); +}); diff --git a/node_modules/object-inspect/test/bigint.js b/node_modules/object-inspect/test/bigint.js new file mode 100644 index 0000000000000..4ecc31df8ab3f --- /dev/null +++ b/node_modules/object-inspect/test/bigint.js @@ -0,0 +1,58 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { + t.test('primitives', function (st) { + st.plan(3); + + st.equal(inspect(BigInt(-256)), '-256n'); + st.equal(inspect(BigInt(0)), '0n'); + st.equal(inspect(BigInt(256)), '256n'); + }); + + t.test('objects', function (st) { + st.plan(3); + + st.equal(inspect(Object(BigInt(-256))), 'Object(-256n)'); + st.equal(inspect(Object(BigInt(0))), 'Object(0n)'); + st.equal(inspect(Object(BigInt(256))), 'Object(256n)'); + }); + + t.test('syntactic primitives', function (st) { + st.plan(3); + + /* eslint-disable no-new-func */ + st.equal(inspect(Function('return -256n')()), '-256n'); + st.equal(inspect(Function('return 0n')()), '0n'); + st.equal(inspect(Function('return 256n')()), '256n'); + }); + + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { + st.plan(1); + + var faker = {}; + faker[Symbol.toStringTag] = 'BigInt'; + st.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'BigInt\' }', + 'object lying about being a BigInt inspects as an object' + ); + }); + + t.test('numericSeparator', function (st) { + st.equal(inspect(BigInt(0), { numericSeparator: false }), '0n', '0n, numericSeparator false'); + st.equal(inspect(BigInt(0), { numericSeparator: true }), '0n', '0n, numericSeparator true'); + + st.equal(inspect(BigInt(1234), { numericSeparator: false }), '1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(1234), { numericSeparator: true }), '1_234n', '1234n, numericSeparator true'); + st.equal(inspect(BigInt(-1234), { numericSeparator: false }), '-1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(-1234), { numericSeparator: true }), '-1_234n', '1234n, numericSeparator true'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/browser/dom.js b/node_modules/object-inspect/test/browser/dom.js new file mode 100644 index 0000000000000..210c0b233e9f7 --- /dev/null +++ b/node_modules/object-inspect/test/browser/dom.js @@ -0,0 +1,15 @@ +var inspect = require('../../'); +var test = require('tape'); + +test('dom element', function (t) { + t.plan(1); + + var d = document.createElement('div'); + d.setAttribute('id', 'beep'); + d.innerHTML = 'woooiiiii'; + + t.equal( + inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]), + '[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]' + ); +}); diff --git a/node_modules/object-inspect/test/circular.js b/node_modules/object-inspect/test/circular.js new file mode 100644 index 0000000000000..5df4233cb202e --- /dev/null +++ b/node_modules/object-inspect/test/circular.js @@ -0,0 +1,16 @@ +var inspect = require('../'); +var test = require('tape'); + +test('circular', function (t) { + t.plan(2); + var obj = { a: 1, b: [3, 4] }; + obj.c = obj; + t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }'); + + var double = {}; + double.a = [double]; + double.b = {}; + double.b.inner = double.b; + double.b.obj = double; + t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }'); +}); diff --git a/node_modules/object-inspect/test/deep.js b/node_modules/object-inspect/test/deep.js new file mode 100644 index 0000000000000..99ce32a088f90 --- /dev/null +++ b/node_modules/object-inspect/test/deep.js @@ -0,0 +1,12 @@ +var inspect = require('../'); +var test = require('tape'); + +test('deep', function (t) { + t.plan(4); + var obj = [[[[[[500]]]]]]; + t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]'); + t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]'); + t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]'); + + t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]'); +}); diff --git a/node_modules/object-inspect/test/element.js b/node_modules/object-inspect/test/element.js new file mode 100644 index 0000000000000..47fa9e240029e --- /dev/null +++ b/node_modules/object-inspect/test/element.js @@ -0,0 +1,53 @@ +var inspect = require('../'); +var test = require('tape'); + +test('element', function (t) { + t.plan(3); + var elem = { + nodeName: 'div', + attributes: [{ name: 'class', value: 'row' }], + getAttribute: function (key) { return key; }, + childNodes: [] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); + t.deepEqual(inspect(obj, { quoteStyle: 'single' }), "[ 1,
, 3 ]"); + t.deepEqual(inspect(obj, { quoteStyle: 'double' }), '[ 1,
, 3 ]'); +}); + +test('element no attr', function (t) { + t.plan(1); + var elem = { + nodeName: 'div', + getAttribute: function (key) { return key; }, + childNodes: [] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); +}); + +test('element with contents', function (t) { + t.plan(1); + var elem = { + nodeName: 'div', + getAttribute: function (key) { return key; }, + childNodes: [{ nodeName: 'b' }] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
...
, 3 ]'); +}); + +test('element instance', function (t) { + t.plan(1); + var h = global.HTMLElement; + global.HTMLElement = function (name, attr) { + this.nodeName = name; + this.attributes = attr; + }; + global.HTMLElement.prototype.getAttribute = function () {}; + + var elem = new global.HTMLElement('div', []); + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); + global.HTMLElement = h; +}); diff --git a/node_modules/object-inspect/test/err.js b/node_modules/object-inspect/test/err.js new file mode 100644 index 0000000000000..cc1d884abdc52 --- /dev/null +++ b/node_modules/object-inspect/test/err.js @@ -0,0 +1,48 @@ +var test = require('tape'); +var ErrorWithCause = require('error-cause/Error'); + +var inspect = require('../'); + +test('type error', function (t) { + t.plan(1); + var aerr = new TypeError(); + aerr.foo = 555; + aerr.bar = [1, 2, 3]; + + var berr = new TypeError('tuv'); + berr.baz = 555; + + var cerr = new SyntaxError(); + cerr.message = 'whoa'; + cerr['a-b'] = 5; + + var withCause = new ErrorWithCause('foo', { cause: 'bar' }); + var withCausePlus = new ErrorWithCause('foo', { cause: 'bar' }); + withCausePlus.foo = 'bar'; + var withUndefinedCause = new ErrorWithCause('foo', { cause: undefined }); + var withEnumerableCause = new Error('foo'); + withEnumerableCause.cause = 'bar'; + + var obj = [ + new TypeError(), + new TypeError('xxx'), + aerr, + berr, + cerr, + withCause, + withCausePlus, + withUndefinedCause, + withEnumerableCause + ]; + t.equal(inspect(obj), '[ ' + [ + '[TypeError]', + '[TypeError: xxx]', + '{ [TypeError] foo: 555, bar: [ 1, 2, 3 ] }', + '{ [TypeError: tuv] baz: 555 }', + '{ [SyntaxError: whoa] message: \'whoa\', \'a-b\': 5 }', + 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: \'bar\' }', + '{ [Error: foo] ' + ('cause' in Error.prototype ? '' : '[cause]: \'bar\', ') + 'foo: \'bar\' }', + 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: undefined }', + '{ [Error: foo] cause: \'bar\' }' + ].join(', ') + ' ]'); +}); diff --git a/node_modules/object-inspect/test/fakes.js b/node_modules/object-inspect/test/fakes.js new file mode 100644 index 0000000000000..a65c08c15a6e4 --- /dev/null +++ b/node_modules/object-inspect/test/fakes.js @@ -0,0 +1,29 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); +var forEach = require('for-each'); + +test('fakes', { skip: !hasToStringTag }, function (t) { + forEach([ + 'Array', + 'Boolean', + 'Date', + 'Error', + 'Number', + 'RegExp', + 'String' + ], function (expected) { + var faker = {}; + faker[Symbol.toStringTag] = expected; + + t.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'' + expected + '\' }', + 'faker masquerading as ' + expected + ' is not shown as one' + ); + }); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/fn.js b/node_modules/object-inspect/test/fn.js new file mode 100644 index 0000000000000..de3ca625e73ad --- /dev/null +++ b/node_modules/object-inspect/test/fn.js @@ -0,0 +1,76 @@ +var inspect = require('../'); +var test = require('tape'); +var arrow = require('make-arrow-function')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +test('function', function (t) { + t.plan(1); + var obj = [1, 2, function f(n) { return n; }, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function: f], 4 ]'); +}); + +test('function name', function (t) { + t.plan(1); + var f = (function () { + return function () {}; + }()); + f.toString = function toStr() { return 'function xxx () {}'; }; + var obj = [1, 2, f, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)] { toString: [Function: toStr] }, 4 ]'); +}); + +test('anon function', function (t) { + var f = (function () { + return function () {}; + }()); + var obj = [1, 2, f, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)], 4 ]'); + + t.end(); +}); + +test('arrow function', { skip: !arrow }, function (t) { + t.equal(inspect(arrow), '[Function (anonymous)]'); + + t.end(); +}); + +test('truly nameless function', { skip: !arrow || !functionsHaveConfigurableNames }, function (t) { + function f() {} + Object.defineProperty(f, 'name', { value: false }); + t.equal(f.name, false); + t.equal( + inspect(f), + '[Function: f]', + 'named function with falsy `.name` does not hide its original name' + ); + + function g() {} + Object.defineProperty(g, 'name', { value: true }); + t.equal(g.name, true); + t.equal( + inspect(g), + '[Function: true]', + 'named function with truthy `.name` hides its original name' + ); + + var anon = function () {}; // eslint-disable-line func-style + Object.defineProperty(anon, 'name', { value: null }); + t.equal(anon.name, null); + t.equal( + inspect(anon), + '[Function (anonymous)]', + 'anon function with falsy `.name` does not hide its anonymity' + ); + + var anon2 = function () {}; // eslint-disable-line func-style + Object.defineProperty(anon2, 'name', { value: 1 }); + t.equal(anon2.name, 1); + t.equal( + inspect(anon2), + '[Function: 1]', + 'anon function with truthy `.name` hides its anonymity' + ); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/global.js b/node_modules/object-inspect/test/global.js new file mode 100644 index 0000000000000..c57216aebd518 --- /dev/null +++ b/node_modules/object-inspect/test/global.js @@ -0,0 +1,17 @@ +'use strict'; + +var inspect = require('../'); + +var test = require('tape'); +var globalThis = require('globalthis')(); + +test('global object', function (t) { + /* eslint-env browser */ + var expected = typeof window === 'undefined' ? 'globalThis' : 'Window'; + t.equal( + inspect([globalThis]), + '[ { [object ' + expected + '] } ]' + ); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/has.js b/node_modules/object-inspect/test/has.js new file mode 100644 index 0000000000000..01800dee6b078 --- /dev/null +++ b/node_modules/object-inspect/test/has.js @@ -0,0 +1,15 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var mockProperty = require('mock-property'); + +test('when Object#hasOwnProperty is deleted', function (t) { + t.plan(1); + var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays + + t.teardown(mockProperty(Array.prototype, 1, { value: 2 })); // this is needed to account for "in" vs "hasOwnProperty" + t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); + + t.equal(inspect(arr), '[ 1, , 3 ]'); +}); diff --git a/node_modules/object-inspect/test/holes.js b/node_modules/object-inspect/test/holes.js new file mode 100644 index 0000000000000..87fc8c84aedf7 --- /dev/null +++ b/node_modules/object-inspect/test/holes.js @@ -0,0 +1,15 @@ +var test = require('tape'); +var inspect = require('../'); + +var xs = ['a', 'b']; +xs[5] = 'f'; +xs[7] = 'j'; +xs[8] = 'k'; + +test('holes', function (t) { + t.plan(1); + t.equal( + inspect(xs), + "[ 'a', 'b', , , , 'f', , 'j', 'k' ]" + ); +}); diff --git a/node_modules/object-inspect/test/indent-option.js b/node_modules/object-inspect/test/indent-option.js new file mode 100644 index 0000000000000..89d8fcedfa318 --- /dev/null +++ b/node_modules/object-inspect/test/indent-option.js @@ -0,0 +1,271 @@ +var test = require('tape'); +var forEach = require('for-each'); + +var inspect = require('../'); + +test('bad indent options', function (t) { + forEach([ + undefined, + true, + false, + -1, + 1.2, + Infinity, + -Infinity, + NaN + ], function (indent) { + t['throws']( + function () { inspect('', { indent: indent }); }, + TypeError, + inspect(indent) + ' is invalid' + ); + }); + + t.end(); +}); + +test('simple object with indent', function (t) { + t.plan(2); + + var obj = { a: 1, b: 2 }; + + var expectedSpaces = [ + '{', + ' a: 1,', + ' b: 2', + '}' + ].join('\n'); + var expectedTabs = [ + '{', + ' a: 1,', + ' b: 2', + '}' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('two deep object with indent', function (t) { + t.plan(2); + + var obj = { a: 1, b: { c: 3, d: 4 } }; + + var expectedSpaces = [ + '{', + ' a: 1,', + ' b: {', + ' c: 3,', + ' d: 4', + ' }', + '}' + ].join('\n'); + var expectedTabs = [ + '{', + ' a: 1,', + ' b: {', + ' c: 3,', + ' d: 4', + ' }', + '}' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('simple array with all single line elements', function (t) { + t.plan(2); + + var obj = [1, 2, 3, 'asdf\nsdf']; + + var expected = '[ 1, 2, 3, \'asdf\\nsdf\' ]'; + + t.equal(inspect(obj, { indent: 2 }), expected, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expected, 'tabs'); +}); + +test('array with complex elements', function (t) { + t.plan(2); + + var obj = [1, { a: 1, b: { c: 1 } }, 'asdf\nsdf']; + + var expectedSpaces = [ + '[', + ' 1,', + ' {', + ' a: 1,', + ' b: {', + ' c: 1', + ' }', + ' },', + ' \'asdf\\nsdf\'', + ']' + ].join('\n'); + var expectedTabs = [ + '[', + ' 1,', + ' {', + ' a: 1,', + ' b: {', + ' c: 1', + ' }', + ' },', + ' \'asdf\\nsdf\'', + ']' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('values', function (t) { + t.plan(2); + var obj = [{}, [], { 'a-b': 5 }]; + + var expectedSpaces = [ + '[', + ' {},', + ' [],', + ' {', + ' \'a-b\': 5', + ' }', + ']' + ].join('\n'); + var expectedTabs = [ + '[', + ' {},', + ' [],', + ' {', + ' \'a-b\': 5', + ' }', + ']' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('Map', { skip: typeof Map !== 'function' }, function (t) { + var map = new Map(); + map.set({ a: 1 }, ['b']); + map.set(3, NaN); + + var expectedStringSpaces = [ + 'Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + '}' + ].join('\n'); + var expectedStringTabs = [ + 'Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + '}' + ].join('\n'); + var expectedStringTabsDoubleQuotes = [ + 'Map (2) {', + ' { a: 1 } => [ "b" ],', + ' 3 => NaN', + '}' + ].join('\n'); + + t.equal( + inspect(map, { indent: 2 }), + expectedStringSpaces, + 'Map keys are not indented (two)' + ); + t.equal( + inspect(map, { indent: '\t' }), + expectedStringTabs, + 'Map keys are not indented (tabs)' + ); + t.equal( + inspect(map, { indent: '\t', quoteStyle: 'double' }), + expectedStringTabsDoubleQuotes, + 'Map keys are not indented (tabs + double quotes)' + ); + + t.equal(inspect(new Map(), { indent: 2 }), 'Map (0) {}', 'empty Map should show as empty (two)'); + t.equal(inspect(new Map(), { indent: '\t' }), 'Map (0) {}', 'empty Map should show as empty (tabs)'); + + var nestedMap = new Map(); + nestedMap.set(nestedMap, map); + var expectedNestedSpaces = [ + 'Map (1) {', + ' [Circular] => Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + ' }', + '}' + ].join('\n'); + var expectedNestedTabs = [ + 'Map (1) {', + ' [Circular] => Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + ' }', + '}' + ].join('\n'); + t.equal(inspect(nestedMap, { indent: 2 }), expectedNestedSpaces, 'Map containing a Map should work (two)'); + t.equal(inspect(nestedMap, { indent: '\t' }), expectedNestedTabs, 'Map containing a Map should work (tabs)'); + + t.end(); +}); + +test('Set', { skip: typeof Set !== 'function' }, function (t) { + var set = new Set(); + set.add({ a: 1 }); + set.add(['b']); + var expectedStringSpaces = [ + 'Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + '}' + ].join('\n'); + var expectedStringTabs = [ + 'Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + '}' + ].join('\n'); + t.equal(inspect(set, { indent: 2 }), expectedStringSpaces, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (two)'); + t.equal(inspect(set, { indent: '\t' }), expectedStringTabs, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (tabs)'); + + t.equal(inspect(new Set(), { indent: 2 }), 'Set (0) {}', 'empty Set should show as empty (two)'); + t.equal(inspect(new Set(), { indent: '\t' }), 'Set (0) {}', 'empty Set should show as empty (tabs)'); + + var nestedSet = new Set(); + nestedSet.add(set); + nestedSet.add(nestedSet); + var expectedNestedSpaces = [ + 'Set (2) {', + ' Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + ' },', + ' [Circular]', + '}' + ].join('\n'); + var expectedNestedTabs = [ + 'Set (2) {', + ' Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + ' },', + ' [Circular]', + '}' + ].join('\n'); + t.equal(inspect(nestedSet, { indent: 2 }), expectedNestedSpaces, 'Set containing a Set should work (two)'); + t.equal(inspect(nestedSet, { indent: '\t' }), expectedNestedTabs, 'Set containing a Set should work (tabs)'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/inspect.js b/node_modules/object-inspect/test/inspect.js new file mode 100644 index 0000000000000..1abf81b1f00b3 --- /dev/null +++ b/node_modules/object-inspect/test/inspect.js @@ -0,0 +1,139 @@ +var test = require('tape'); +var hasSymbols = require('has-symbols/shams')(); +var utilInspect = require('../util.inspect'); +var repeat = require('string.prototype.repeat'); + +var inspect = require('..'); + +test('inspect', function (t) { + t.plan(5); + + var obj = [{ inspect: function xyzInspect() { return '!XYZ¡'; } }, []]; + var stringResult = '[ !XYZ¡, [] ]'; + var falseResult = '[ { inspect: [Function: xyzInspect] }, [] ]'; + + t.equal(inspect(obj), stringResult); + t.equal(inspect(obj, { customInspect: true }), stringResult); + t.equal(inspect(obj, { customInspect: 'symbol' }), falseResult); + t.equal(inspect(obj, { customInspect: false }), falseResult); + t['throws']( + function () { inspect(obj, { customInspect: 'not a boolean or "symbol"' }); }, + TypeError, + '`customInspect` must be a boolean or the string "symbol"' + ); +}); + +test('inspect custom symbol', { skip: !hasSymbols || !utilInspect || !utilInspect.custom }, function (t) { + t.plan(4); + + var obj = { inspect: function stringInspect() { return 'string'; } }; + obj[utilInspect.custom] = function custom() { return 'symbol'; }; + + var symbolResult = '[ symbol, [] ]'; + var stringResult = '[ string, [] ]'; + var falseResult = '[ { inspect: [Function: stringInspect]' + (utilInspect.custom ? ', [' + inspect(utilInspect.custom) + ']: [Function: custom]' : '') + ' }, [] ]'; + + var symbolStringFallback = utilInspect.custom ? symbolResult : stringResult; + var symbolFalseFallback = utilInspect.custom ? symbolResult : falseResult; + + t.equal(inspect([obj, []]), symbolStringFallback); + t.equal(inspect([obj, []], { customInspect: true }), symbolStringFallback); + t.equal(inspect([obj, []], { customInspect: 'symbol' }), symbolFalseFallback); + t.equal(inspect([obj, []], { customInspect: false }), falseResult); +}); + +test('symbols', { skip: !hasSymbols }, function (t) { + t.plan(2); + + var obj = { a: 1 }; + obj[Symbol('test')] = 2; + obj[Symbol.iterator] = 3; + Object.defineProperty(obj, Symbol('non-enum'), { + enumerable: false, + value: 4 + }); + + if (typeof Symbol.iterator === 'symbol') { + t.equal(inspect(obj), '{ a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }', 'object with symbols'); + t.equal(inspect([obj, []]), '[ { a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }, [] ]', 'object with symbols in array'); + } else { + // symbol sham key ordering is unreliable + t.match( + inspect(obj), + /^(?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 })$/, + 'object with symbols (nondeterministic symbol sham key ordering)' + ); + t.match( + inspect([obj, []]), + /^\[ (?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 }), \[\] \]$/, + 'object with symbols in array (nondeterministic symbol sham key ordering)' + ); + } +}); + +test('maxStringLength', function (t) { + t['throws']( + function () { inspect('', { maxStringLength: -1 }); }, + TypeError, + 'maxStringLength must be >= 0, or Infinity, not negative' + ); + + var str = repeat('a', 1e8); + + t.equal( + inspect([str], { maxStringLength: 10 }), + '[ \'aaaaaaaaaa\'... 99999990 more characters ]', + 'maxStringLength option limits output' + ); + + t.equal( + inspect(['f'], { maxStringLength: null }), + '[ \'\'... 1 more character ]', + 'maxStringLength option accepts `null`' + ); + + t.equal( + inspect([str], { maxStringLength: Infinity }), + '[ \'' + str + '\' ]', + 'maxStringLength option accepts ∞' + ); + + t.end(); +}); + +test('inspect options', { skip: !utilInspect.custom }, function (t) { + var obj = {}; + obj[utilInspect.custom] = function () { + return JSON.stringify(arguments); + }; + t.equal( + inspect(obj), + utilInspect(obj, { depth: 5 }), + 'custom symbols will use node\'s inspect' + ); + t.equal( + inspect(obj, { depth: 2 }), + utilInspect(obj, { depth: 2 }), + 'a reduced depth will be passed to node\'s inspect' + ); + t.equal( + inspect({ d1: obj }, { depth: 3 }), + '{ d1: ' + utilInspect(obj, { depth: 2 }) + ' }', + 'deep objects will receive a reduced depth' + ); + t.equal( + inspect({ d1: obj }, { depth: 1 }), + '{ d1: [Object] }', + 'unlike nodejs inspect, customInspect will not be used once the depth is exceeded.' + ); + t.end(); +}); + +test('inspect URL', { skip: typeof URL === 'undefined' }, function (t) { + t.match( + inspect(new URL('https://nodejs.org')), + /nodejs\.org/, // Different environments stringify it differently + 'url can be inspected' + ); + t.end(); +}); diff --git a/node_modules/object-inspect/test/lowbyte.js b/node_modules/object-inspect/test/lowbyte.js new file mode 100644 index 0000000000000..68a345d857800 --- /dev/null +++ b/node_modules/object-inspect/test/lowbyte.js @@ -0,0 +1,12 @@ +var test = require('tape'); +var inspect = require('../'); + +var obj = { x: 'a\r\nb', y: '\x05! \x1f \x12' }; + +test('interpolate low bytes', function (t) { + t.plan(1); + t.equal( + inspect(obj), + "{ x: 'a\\r\\nb', y: '\\x05! \\x1F \\x12' }" + ); +}); diff --git a/node_modules/object-inspect/test/number.js b/node_modules/object-inspect/test/number.js new file mode 100644 index 0000000000000..8f287e8e2ab93 --- /dev/null +++ b/node_modules/object-inspect/test/number.js @@ -0,0 +1,58 @@ +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); + +var inspect = require('../'); + +test('negative zero', function (t) { + t.equal(inspect(0), '0', 'inspect(0) === "0"'); + t.equal(inspect(Object(0)), 'Object(0)', 'inspect(Object(0)) === "Object(0)"'); + + t.equal(inspect(-0), '-0', 'inspect(-0) === "-0"'); + t.equal(inspect(Object(-0)), 'Object(-0)', 'inspect(Object(-0)) === "Object(-0)"'); + + t.end(); +}); + +test('numericSeparator', function (t) { + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { inspect(true, { numericSeparator: nonBoolean }); }, + TypeError, + inspect(nonBoolean) + ' is not a boolean' + ); + }); + + t.test('3 digit numbers', function (st) { + var failed = false; + for (var i = -999; i < 1000; i += 1) { + var actual = inspect(i); + var actualSepNo = inspect(i, { numericSeparator: false }); + var actualSepYes = inspect(i, { numericSeparator: true }); + var expected = String(i); + if (actual !== expected || actualSepNo !== expected || actualSepYes !== expected) { + failed = true; + t.equal(actual, expected); + t.equal(actualSepNo, expected); + t.equal(actualSepYes, expected); + } + } + + st.notOk(failed, 'all 3 digit numbers passed'); + + st.end(); + }); + + t.equal(inspect(1e3), '1000', '1000'); + t.equal(inspect(1e3, { numericSeparator: false }), '1000', '1000, numericSeparator false'); + t.equal(inspect(1e3, { numericSeparator: true }), '1_000', '1000, numericSeparator true'); + t.equal(inspect(-1e3), '-1000', '-1000'); + t.equal(inspect(-1e3, { numericSeparator: false }), '-1000', '-1000, numericSeparator false'); + t.equal(inspect(-1e3, { numericSeparator: true }), '-1_000', '-1000, numericSeparator true'); + + t.equal(inspect(1234.5678, { numericSeparator: true }), '1_234.567_8', 'fractional numbers get separators'); + t.equal(inspect(1234.56789, { numericSeparator: true }), '1_234.567_89', 'fractional numbers get separators'); + t.equal(inspect(1234.567891, { numericSeparator: true }), '1_234.567_891', 'fractional numbers get separators'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/quoteStyle.js b/node_modules/object-inspect/test/quoteStyle.js new file mode 100644 index 0000000000000..ae4d734bff6c3 --- /dev/null +++ b/node_modules/object-inspect/test/quoteStyle.js @@ -0,0 +1,17 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); + +test('quoteStyle option', function (t) { + t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/toStringTag.js b/node_modules/object-inspect/test/toStringTag.js new file mode 100644 index 0000000000000..95f82703d08f3 --- /dev/null +++ b/node_modules/object-inspect/test/toStringTag.js @@ -0,0 +1,40 @@ +'use strict'; + +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); + +var inspect = require('../'); + +test('Symbol.toStringTag', { skip: !hasToStringTag }, function (t) { + t.plan(4); + + var obj = { a: 1 }; + t.equal(inspect(obj), '{ a: 1 }', 'object, no Symbol.toStringTag'); + + obj[Symbol.toStringTag] = 'foo'; + t.equal(inspect(obj), '{ a: 1, [Symbol(Symbol.toStringTag)]: \'foo\' }', 'object with Symbol.toStringTag'); + + t.test('null objects', { skip: 'toString' in { __proto__: null } }, function (st) { + st.plan(2); + + var dict = { __proto__: null, a: 1 }; + st.equal(inspect(dict), '[Object: null prototype] { a: 1 }', 'null object with Symbol.toStringTag'); + + dict[Symbol.toStringTag] = 'Dict'; + st.equal(inspect(dict), '[Dict: null prototype] { a: 1, [Symbol(Symbol.toStringTag)]: \'Dict\' }', 'null object with Symbol.toStringTag'); + }); + + t.test('instances', function (st) { + st.plan(4); + + function C() { + this.a = 1; + } + st.equal(Object.prototype.toString.call(new C()), '[object Object]', 'instance, no toStringTag, Object.prototype.toString'); + st.equal(inspect(new C()), 'C { a: 1 }', 'instance, no toStringTag'); + + C.prototype[Symbol.toStringTag] = 'Class!'; + st.equal(Object.prototype.toString.call(new C()), '[object Class!]', 'instance, with toStringTag, Object.prototype.toString'); + st.equal(inspect(new C()), 'C [Class!] { a: 1 }', 'instance, with toStringTag'); + }); +}); diff --git a/node_modules/object-inspect/test/undef.js b/node_modules/object-inspect/test/undef.js new file mode 100644 index 0000000000000..e3f4961229c24 --- /dev/null +++ b/node_modules/object-inspect/test/undef.js @@ -0,0 +1,12 @@ +var test = require('tape'); +var inspect = require('../'); + +var obj = { a: 1, b: [3, 4, undefined, null], c: undefined, d: null }; + +test('undef and null', function (t) { + t.plan(1); + t.equal( + inspect(obj), + '{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }' + ); +}); diff --git a/node_modules/object-inspect/test/values.js b/node_modules/object-inspect/test/values.js new file mode 100644 index 0000000000000..4832b9fe95dcf --- /dev/null +++ b/node_modules/object-inspect/test/values.js @@ -0,0 +1,211 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var mockProperty = require('mock-property'); +var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('values', function (t) { + t.plan(1); + var obj = [{}, [], { 'a-b': 5 }]; + t.equal(inspect(obj), '[ {}, [], { \'a-b\': 5 } ]'); +}); + +test('arrays with properties', function (t) { + t.plan(1); + var arr = [3]; + arr.foo = 'bar'; + var obj = [1, 2, arr]; + obj.baz = 'quux'; + obj.index = -1; + t.equal(inspect(obj), '[ 1, 2, [ 3, foo: \'bar\' ], baz: \'quux\', index: -1 ]'); +}); + +test('has', function (t) { + t.plan(1); + t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); + + t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }'); +}); + +test('indexOf seen', function (t) { + t.plan(1); + var xs = [1, 2, 3, {}]; + xs.push(xs); + + var seen = []; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[ 1, 2, 3, {}, [Circular] ]' + ); +}); + +test('seen seen', function (t) { + t.plan(1); + var xs = [1, 2, 3]; + + var seen = [xs]; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[Circular]' + ); +}); + +test('seen seen seen', function (t) { + t.plan(1); + var xs = [1, 2, 3]; + + var seen = [5, xs]; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[Circular]' + ); +}); + +test('symbols', { skip: !hasSymbols }, function (t) { + var sym = Symbol('foo'); + t.equal(inspect(sym), 'Symbol(foo)', 'Symbol("foo") should be "Symbol(foo)"'); + if (typeof sym === 'symbol') { + // Symbol shams are incapable of differentiating boxed from unboxed symbols + t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"'); + } + + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { + st.plan(1); + + var faker = {}; + faker[Symbol.toStringTag] = 'Symbol'; + st.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'Symbol\' }', + 'object lying about being a Symbol inspects as an object' + ); + }); + + t.end(); +}); + +test('Map', { skip: typeof Map !== 'function' }, function (t) { + var map = new Map(); + map.set({ a: 1 }, ['b']); + map.set(3, NaN); + var expectedString = 'Map (2) {' + inspect({ a: 1 }) + ' => ' + inspect(['b']) + ', 3 => NaN}'; + t.equal(inspect(map), expectedString, 'new Map([[{ a: 1 }, ["b"]], [3, NaN]]) should show size and contents'); + t.equal(inspect(new Map()), 'Map (0) {}', 'empty Map should show as empty'); + + var nestedMap = new Map(); + nestedMap.set(nestedMap, map); + t.equal(inspect(nestedMap), 'Map (1) {[Circular] => ' + expectedString + '}', 'Map containing a Map should work'); + + t.end(); +}); + +test('WeakMap', { skip: typeof WeakMap !== 'function' }, function (t) { + var map = new WeakMap(); + map.set({ a: 1 }, ['b']); + var expectedString = 'WeakMap { ? }'; + t.equal(inspect(map), expectedString, 'new WeakMap([[{ a: 1 }, ["b"]]]) should not show size or contents'); + t.equal(inspect(new WeakMap()), 'WeakMap { ? }', 'empty WeakMap should not show as empty'); + + t.end(); +}); + +test('Set', { skip: typeof Set !== 'function' }, function (t) { + var set = new Set(); + set.add({ a: 1 }); + set.add(['b']); + var expectedString = 'Set (2) {' + inspect({ a: 1 }) + ', ' + inspect(['b']) + '}'; + t.equal(inspect(set), expectedString, 'new Set([{ a: 1 }, ["b"]]) should show size and contents'); + t.equal(inspect(new Set()), 'Set (0) {}', 'empty Set should show as empty'); + + var nestedSet = new Set(); + nestedSet.add(set); + nestedSet.add(nestedSet); + t.equal(inspect(nestedSet), 'Set (2) {' + expectedString + ', [Circular]}', 'Set containing a Set should work'); + + t.end(); +}); + +test('WeakSet', { skip: typeof WeakSet !== 'function' }, function (t) { + var map = new WeakSet(); + map.add({ a: 1 }); + var expectedString = 'WeakSet { ? }'; + t.equal(inspect(map), expectedString, 'new WeakSet([{ a: 1 }]) should not show size or contents'); + t.equal(inspect(new WeakSet()), 'WeakSet { ? }', 'empty WeakSet should not show as empty'); + + t.end(); +}); + +test('WeakRef', { skip: typeof WeakRef !== 'function' }, function (t) { + var ref = new WeakRef({ a: 1 }); + var expectedString = 'WeakRef { ? }'; + t.equal(inspect(ref), expectedString, 'new WeakRef({ a: 1 }) should not show contents'); + + t.end(); +}); + +test('FinalizationRegistry', { skip: typeof FinalizationRegistry !== 'function' }, function (t) { + var registry = new FinalizationRegistry(function () {}); + var expectedString = 'FinalizationRegistry [FinalizationRegistry] {}'; + t.equal(inspect(registry), expectedString, 'new FinalizationRegistry(function () {}) should work normallys'); + + t.end(); +}); + +test('Strings', function (t) { + var str = 'abc'; + + t.equal(inspect(str), "'" + str + "'", 'primitive string shows as such'); + t.equal(inspect(str, { quoteStyle: 'single' }), "'" + str + "'", 'primitive string shows as such, single quoted'); + t.equal(inspect(str, { quoteStyle: 'double' }), '"' + str + '"', 'primitive string shows as such, double quoted'); + t.equal(inspect(Object(str)), 'Object(' + inspect(str) + ')', 'String object shows as such'); + t.equal(inspect(Object(str), { quoteStyle: 'single' }), 'Object(' + inspect(str, { quoteStyle: 'single' }) + ')', 'String object shows as such, single quoted'); + t.equal(inspect(Object(str), { quoteStyle: 'double' }), 'Object(' + inspect(str, { quoteStyle: 'double' }) + ')', 'String object shows as such, double quoted'); + + t.end(); +}); + +test('Numbers', function (t) { + var num = 42; + + t.equal(inspect(num), String(num), 'primitive number shows as such'); + t.equal(inspect(Object(num)), 'Object(' + inspect(num) + ')', 'Number object shows as such'); + + t.end(); +}); + +test('Booleans', function (t) { + t.equal(inspect(true), String(true), 'primitive true shows as such'); + t.equal(inspect(Object(true)), 'Object(' + inspect(true) + ')', 'Boolean object true shows as such'); + + t.equal(inspect(false), String(false), 'primitive false shows as such'); + t.equal(inspect(Object(false)), 'Object(' + inspect(false) + ')', 'Boolean false object shows as such'); + + t.end(); +}); + +test('Date', function (t) { + var now = new Date(); + t.equal(inspect(now), String(now), 'Date shows properly'); + t.equal(inspect(new Date(NaN)), 'Invalid Date', 'Invalid Date shows properly'); + + t.end(); +}); + +test('RegExps', function (t) { + t.equal(inspect(/a/g), '/a/g', 'regex shows properly'); + t.equal(inspect(new RegExp('abc', 'i')), '/abc/i', 'new RegExp shows properly'); + + var match = 'abc abc'.match(/[ab]+/); + delete match.groups; // for node < 10 + t.equal(inspect(match), '[ \'ab\', index: 0, input: \'abc abc\' ]', 'RegExp match object shows properly'); + + t.end(); +}); diff --git a/node_modules/object-inspect/util.inspect.js b/node_modules/object-inspect/util.inspect.js new file mode 100644 index 0000000000000..7784fab55d088 --- /dev/null +++ b/node_modules/object-inspect/util.inspect.js @@ -0,0 +1 @@ +module.exports = require('util').inspect; diff --git a/node_modules/object-keys/.editorconfig b/node_modules/object-keys/.editorconfig new file mode 100644 index 0000000000000..eaa214161f5cd --- /dev/null +++ b/node_modules/object-keys/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/object-keys/.eslintrc b/node_modules/object-keys/.eslintrc new file mode 100644 index 0000000000000..9a8d5b0e95e36 --- /dev/null +++ b/node_modules/object-keys/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 23], + "id-length": [2, { "min": 1, "max": 40 }], + "max-params": [2, 3], + "max-statements": [2, 23], + "max-statements-per-line": [2, { "max": 2 }], + "no-extra-parens": [1], + "no-invalid-this": [1], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": [2, "after"] + } +} diff --git a/node_modules/object-keys/.travis.yml b/node_modules/object-keys/.travis.yml new file mode 100644 index 0000000000000..94a6ce42df6f7 --- /dev/null +++ b/node_modules/object-keys/.travis.yml @@ -0,0 +1,277 @@ +language: node_js +os: + - linux +node_js: + - "11.8" + - "10.15" + - "9.11" + - "8.15" + - "7.10" + - "6.16" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "11.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.15" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true + - env: POSTTEST=true diff --git a/node_modules/object-keys/CHANGELOG.md b/node_modules/object-keys/CHANGELOG.md new file mode 100644 index 0000000000000..b7d92df248e7c --- /dev/null +++ b/node_modules/object-keys/CHANGELOG.md @@ -0,0 +1,232 @@ +1.1.1 / 2019-04-06 +================= + * [Fix] exclude deprecated Firefox keys (#53) + +1.1.0 / 2019-02-10 +================= + * [New] [Refactor] move full implementation to `implementation` entry point + * [Refactor] only evaluate the implementation if `Object.keys` is not present + * [Tests] up to `node` `v11.8`, `v10.15`, `v8.15`, `v6.16` + * [Tests] remove jscs + * [Tests] switch to `npm audit` from `nsp` + +1.0.12 / 2018-06-18 +================= + * [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46) + +1.0.11 / 2016-07-05 +================= + * [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32) + +1.0.10 / 2016-07-04 +================= + * [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31) + * [Fix] In IE 6, `window.external` makes `Object.keys` throw + * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Dev Deps] remove unused eccheck script + dep + +1.0.9 / 2015-10-19 +================= + * [Fix] Blacklist 'frame' property on window (#16, #17) + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` + +1.0.8 / 2015-10-14 +================= + * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327) + * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322) + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs` + +1.0.7 / 2015-07-18 +================= + * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8. + * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15) + * [Tests] Improve test output for automation equality bugfix + * [Tests] Test on `io.js` `v2.4` + +1.0.6 / 2015-07-09 +================= + * [Fix] Use an object lookup rather than ES5's `indexOf` (#14) + * [Tests] ES3 browsers don't have `Array.isArray` + * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs. + +1.0.5 / 2015-07-03 +================= + * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws + * [Tests] Test up to `io.js` `v2.3` + * [Dev Deps] Update `nsp`, `eslint` + +1.0.4 / 2015-05-23 +================= + * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments` + * Test on latest `node` and `io.js` + * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert` + +1.0.3 / 2015-01-06 +================= + * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance + +1.0.2 / 2014-12-28 +================= + * Update lots of dev dependencies + * Tweaks to README + * Make `object-keys` more robust against later environment tampering + +1.0.1 / 2014-09-03 +================= + * Update URLs and badges in README + +1.0.0 / 2014-08-26 +================= + * v1.0.0 + +0.6.1 / 2014-08-25 +================= + * v0.6.1 + * Updating dependencies (tape, covert, is) + * Update badges in readme + * Use separate var statements + +0.6.0 / 2014-04-23 +================= + * v0.6.0 + * Updating dependencies (tape, covert) + * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers + * Improve test matrix: test all node versions, but only latest two stables are a failure + * Remove internal foreach shim. + +0.5.1 / 2014-03-09 +================= + * 0.5.1 + * Updating dependencies (tape, covert, is) + * Removing forEach from the module (but keeping it in tests) + +0.5.0 / 2014-01-30 +================= + * 0.5.0 + * Explicitly returning the shim, instead of returning native Object.keys when present + * Adding a changelog. + * Cleaning up IIFE wrapping + * Testing on node 0.4 through 0.11 + +0.4.0 / 2013-08-14 +================== + + * v0.4.0 + * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function' + * If it's a string, make sure to use charAt instead of brackets. + * Only use Function#call if necessary. + * Making sure the context tests actually run. + * Better function detection + * Adding the android browser + * Fixing testling files + * Updating tape + * Removing the "is" dependency. + * Making an isArguments shim. + * Adding a local forEach shim and tests. + * Updating paths. + * Moving the shim test. + * v0.3.0 + +0.3.0 / 2013-05-18 +================== + + * README tweak. + * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5). + * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5) + * Updating readme. + * Updating dependencies. + * Giving credit to lodash. + * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2). + * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding node 0.10 to travis. + * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3) + * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2) + * Moving "indexof" and "is" to be dev dependencies. + * Making sure the shim works with functions. + * Flattening the tests. + +0.2.0 / 2013-05-10 +================== + + * v0.2.0 + * Object.keys should work with arrays. + +0.1.8 / 2013-05-10 +================== + + * v0.1.8 + * Upgrading dependencies. + * Using a simpler check. + * Fixing a bug in hasDontEnumBug browsers. + * Using the newest tape! + * Fixing this error test. + * "undefined" is probably a reserved word in ES3. + * Better test message. + +0.1.7 / 2013-04-17 +================== + + * Upgrading "is" once more. + * The key "null" is breaking some browsers. + +0.1.6 / 2013-04-17 +================== + + * v0.1.6 + * Upgrading "is" + +0.1.5 / 2013-04-14 +================== + + * Bumping version. + * Adding more testling browsers. + * Updating "is" + +0.1.4 / 2013-04-08 +================== + + * Using "is" instead of "is-extended". + +0.1.3 / 2013-04-07 +================== + + * Using "foreach" instead of my own shim. + * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug. + +0.1.2 / 2013-04-03 +================== + + * Adding dependency status; moving links to an index at the bottom. + * Upgrading is-extended; version 0.1.2 + * Adding an npm version badge. + +0.1.1 / 2013-04-01 +================== + + * Adding Travis CI. + * Bumping the version. + * Adding indexOf since IE sucks. + * Adding a forEach shim since older browsers don't have Array#forEach. + * Upgrading tape - 0.3.2 uses Array#map + * Using explicit end instead of plan. + * Can't test with Array.isArray in older browsers. + * Using is-extended. + * Fixing testling files. + * JSHint/JSLint-ing. + * Removing an unused object. + * Using strict mode. + +0.1.0 / 2013-03-30 +================== + + * Changing the exports should have meant a higher version bump. + * Oops, fixing the repo URL. + * Adding more tests. + * 0.0.2 + * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1) + * Move shim export to a separate file. diff --git a/node_modules/object-keys/LICENSE b/node_modules/object-keys/LICENSE new file mode 100644 index 0000000000000..28553fdd06841 --- /dev/null +++ b/node_modules/object-keys/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/object-keys/README.md b/node_modules/object-keys/README.md new file mode 100644 index 0000000000000..ed4c277023a8a --- /dev/null +++ b/node_modules/object-keys/README.md @@ -0,0 +1,76 @@ +#object-keys [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable. + +Most common usage: +```js +var keys = Object.keys || require('object-keys'); +``` + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.deepEqual(keys(obj), ['a', 'b', 'c']); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is not present */ +delete Object.keys; +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is present */ +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, Object.keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +## Source +Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url]. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/object-keys +[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg +[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg +[travis-url]: https://travis-ci.org/ljharb/object-keys +[deps-svg]: https://david-dm.org/ljharb/object-keys.svg +[deps-url]: https://david-dm.org/ljharb/object-keys +[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/object-keys.png +[testling-url]: https://ci.testling.com/ljharb/object-keys +[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589 +[lodash-url]: https://github.com/lodash/lodash +[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object-keys.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object-keys + diff --git a/node_modules/object-keys/implementation.js b/node_modules/object-keys/implementation.js new file mode 100644 index 0000000000000..5b32986195497 --- /dev/null +++ b/node_modules/object-keys/implementation.js @@ -0,0 +1,122 @@ +'use strict'; + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = require('./isArguments'); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; diff --git a/node_modules/object-keys/index.js b/node_modules/object-keys/index.js new file mode 100644 index 0000000000000..a43807d2f695c --- /dev/null +++ b/node_modules/object-keys/index.js @@ -0,0 +1,32 @@ +'use strict'; + +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; diff --git a/node_modules/object-keys/isArguments.js b/node_modules/object-keys/isArguments.js new file mode 100644 index 0000000000000..f2a2a9014d925 --- /dev/null +++ b/node_modules/object-keys/isArguments.js @@ -0,0 +1,17 @@ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json new file mode 100644 index 0000000000000..99ea923870ceb --- /dev/null +++ b/node_modules/object-keys/package.json @@ -0,0 +1,88 @@ +{ + "name": "object-keys", + "version": "1.1.1", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net" + }, + { + "name": "Ivan Starkov", + "email": "istarkov@gmail.com" + }, + { + "name": "Gary Katsevman", + "email": "git@gkatsev.com" + } + ], + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent audit", + "tests-only": "node test/index.js", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "eslint .", + "preaudit": "npm install --package-lock --package-lock-only", + "audit": "npm audit", + "postaudit": "rm package-lock.json" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^13.1.1", + "covert": "^1.1.1", + "eslint": "^5.13.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "tape": "^4.9.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/object-keys/test/index.js b/node_modules/object-keys/test/index.js new file mode 100644 index 0000000000000..5402465a19b5b --- /dev/null +++ b/node_modules/object-keys/test/index.js @@ -0,0 +1,5 @@ +'use strict'; + +require('./isArguments'); + +require('./shim'); diff --git a/node_modules/object-visit/LICENSE b/node_modules/object-visit/LICENSE new file mode 100644 index 0000000000000..ec85897eb167c --- /dev/null +++ b/node_modules/object-visit/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/object-visit/README.md b/node_modules/object-visit/README.md new file mode 100644 index 0000000000000..64015cb9af148 --- /dev/null +++ b/node_modules/object-visit/README.md @@ -0,0 +1,83 @@ +# object-visit [![NPM version](https://img.shields.io/npm/v/object-visit.svg?style=flat)](https://www.npmjs.com/package/object-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/object-visit.svg?style=flat)](https://npmjs.org/package/object-visit) [![NPM total downloads](https://img.shields.io/npm/dt/object-visit.svg?style=flat)](https://npmjs.org/package/object-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object-visit) + +> Call a specified method on each value in the given object. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save object-visit +``` + +## Usage + +```js +var visit = require('object-visit'); + +var ctx = { + data: {}, + set: function (key, value) { + if (typeof key === 'object') { + visit(ctx, 'set', key); + } else { + ctx.data[key] = value; + } + } +}; + +ctx.set('a', 'a'); +ctx.set('b', 'b'); +ctx.set('c', 'c'); +ctx.set({d: {e: 'f'}}); + +console.log(ctx.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }}; +``` + +## About + +### Related projects + +* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/jonschlinkert/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods "base-methods 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`.") +* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [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.") +* [map-visit](https://www.npmjs.com/package/map-visit): Map `visit` over an array of objects. | [homepage](https://github.com/jonschlinkert/map-visit "Map `visit` over an array of objects.") + +### 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 30, 2017._ \ No newline at end of file diff --git a/node_modules/object-visit/index.js b/node_modules/object-visit/index.js new file mode 100644 index 0000000000000..fcaeda92595e0 --- /dev/null +++ b/node_modules/object-visit/index.js @@ -0,0 +1,33 @@ +/*! + * object-visit + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +module.exports = function visit(thisArg, method, target, val) { + if (!isObject(thisArg) && typeof thisArg !== 'function') { + throw new Error('object-visit expects `thisArg` to be an object.'); + } + + if (typeof method !== 'string') { + throw new Error('object-visit expects `method` name to be a string'); + } + + if (typeof thisArg[method] !== 'function') { + return thisArg; + } + + var args = [].slice.call(arguments, 3); + target = target || {}; + + for (var key in target) { + var arr = [key, target[key]].concat(args); + thisArg[method].apply(thisArg, arr); + } + return thisArg; +}; diff --git a/node_modules/object-visit/node_modules/isobject/LICENSE b/node_modules/object-visit/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..943e71d05511e --- /dev/null +++ b/node_modules/object-visit/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/object-visit/node_modules/isobject/README.md b/node_modules/object-visit/node_modules/isobject/README.md new file mode 100644 index 0000000000000..d01feaa40bc13 --- /dev/null +++ b/node_modules/object-visit/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/object-visit/node_modules/isobject/index.d.ts b/node_modules/object-visit/node_modules/isobject/index.d.ts new file mode 100644 index 0000000000000..55f81c275f150 --- /dev/null +++ b/node_modules/object-visit/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/object-visit/node_modules/isobject/index.js b/node_modules/object-visit/node_modules/isobject/index.js new file mode 100644 index 0000000000000..2d59958bf4eab --- /dev/null +++ b/node_modules/object-visit/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/object-visit/node_modules/isobject/package.json b/node_modules/object-visit/node_modules/isobject/package.json new file mode 100644 index 0000000000000..62aa8c1b2feea --- /dev/null +++ b/node_modules/object-visit/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "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" + ] + } +} diff --git a/node_modules/object-visit/package.json b/node_modules/object-visit/package.json new file mode 100644 index 0000000000000..15fd0ff8d38c9 --- /dev/null +++ b/node_modules/object-visit/package.json @@ -0,0 +1,65 @@ +{ + "name": "object-visit", + "description": "Call a specified method on each value in the given object.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/object-visit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object-visit", + "bugs": { + "url": "https://github.com/jonschlinkert/object-visit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "context", + "function", + "helper", + "key", + "method", + "object", + "value", + "visit", + "visitor" + ], + "verb": { + "related": { + "list": [ + "base-methods", + "collection-visit", + "define-property", + "map-visit" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/object.assign/.editorconfig b/node_modules/object.assign/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/object.assign/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/object.assign/.eslintrc b/node_modules/object.assign/.eslintrc new file mode 100644 index 0000000000000..131851698feac --- /dev/null +++ b/node_modules/object.assign/.eslintrc @@ -0,0 +1,28 @@ +{ + "root": true, + + "extends": "@ljharb", + + "ignorePatterns": ["dist/"], + + "rules": { + "eqeqeq": [2, "allow-null"], + "id-length": [2, { "min": 1, "max": 30 }], + "max-statements": [2, 33], + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": [1, { "ignore": [0] }], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "no-invalid-this": 1, + "max-lines-per-function": 0, + "max-statements-per-line": [2, { "max": 3 }], + "no-magic-numbers": 0, + }, + }, + ], +} diff --git a/node_modules/object.assign/.github/FUNDING.yml b/node_modules/object.assign/.github/FUNDING.yml new file mode 100644 index 0000000000000..ef7fdbfa08a09 --- /dev/null +++ b/node_modules/object.assign/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/object.assign +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object.assign/.nycrc b/node_modules/object.assign/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/object.assign/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/object.assign/CHANGELOG.md b/node_modules/object.assign/CHANGELOG.md new file mode 100644 index 0000000000000..8c3d666724232 --- /dev/null +++ b/node_modules/object.assign/CHANGELOG.md @@ -0,0 +1,233 @@ +4.1.5 / 2023-11-30 +================== + * [meta] republish without testing HTML file (#85) + * [Deps] update `call-bind`, `define-properties` + * [Dev Deps] use `hasown` instead of `has` + * [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `npmignore`, `mock-property`, `tape` + * [actions] update rebase action + +4.1.4 / 2022-08-16 +================== + * [meta] fix `npmignore` integration (#83) + +4.1.3 / 2022-08-05 +================== + * [Refactor] make steps closer to actual spec + * [Refactor] simplify object coercible check + * [readme] remove defunct badges, add coverage and actions badges + * [eslint] ignore coverage output + * [meta] use `npmignore` to autogenerate an npmignore file + * [meta] remove audit-level + * [Deps] update `call-bind`, `define-properties`, `has-symbols` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `functions-have-names`, `safe-publish-latest`, `ses`, `tape` + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] reuse common workflows + * [actions] update codecov uploader + * [Tests] add implementation tests + * [Tests] use `mock-property` + * [Tests] disable posttest pending `aud` handling `file:` deps + * [Tests] migrate remaining tests to Github Actions (#81) + * [Tests] gitignore coverage output + * [Tests] test node v1-v9 on Github Actions instead of travis; resume testing all minors (#80) + +4.1.2 / 2020-10-30 +================== + * [Refactor] use extracted `call-bind` instead of full `es-abstract` + * [Dev Deps] update `eslint`, `ses`, `browserify` + * [Tests] run tests in SES + * [Tests] ses-compat: show error stacks + +4.1.1 / 2020-09-11 +================== + * [Fix] avoid mutating `Object.assign` in modern engines + * [Refactor] use `callBind` from `es-abstract` instead of `function-bind` + * [Deps] update `has-symbols`, `object-keys`, `define-properties` + * [meta] add `funding` field, FUNDING.yml + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `browserify`, `covert`, `for-each`, `is`, `tape`, `functions-have-names`; add `aud`, `safe-publish-latest`; remove `jscs` + * [actions] add Require Allow Edits workflow + * [actions] add automatic rebasing / merge commit blocking + * [Tests] ses-compat - add test to ensure package initializes correctly after ses lockdown (#77) + * [Tests] Add passing test for a source of `window.location` (#68) + * [Tests] use shared travis-ci config + * [Tests] use `npx aud` instead of `npm audit` with hoops or `nsp` + * [Tests] use `functions-have-names` + +4.1.0 / 2017-12-21 +================== + * [New] add `auto` entry point (#52) + * [Refactor] Use `has-symbols` module + * [Deps] update `function-bind`, `object-keys` + * [Dev Deps] update `@es-shims/api`, `browserify`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is` + * [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS + +4.0.4 / 2016-07-04 +================== + * [Fix] Cache original `getOwnPropertySymbols`, and use that when `Object.getOwnPropertySymbols` is unavailable + * [Deps] update `object-keys` + * [Dev Deps] update `eslint`, `get-own-property-symbols`, `core-js`, `jscs`, `nsp`, `browserify`, `@ljharb/eslint-config`, `tape`, `@es-shims/api` + * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` + * [Tests] run sham tests on node 0.10 + * [Tests] use pretest/posttest for linting/security + +4.0.3 / 2015-10-21 +================== + * [Fix] Support core-js's Symbol sham (#17) + * [Fix] Ensure that properties removed or made non-enumerable during enumeration are not assigned (#16) + * [Fix] Avoid looking up keys and values more than once + * [Tests] Avoid using `reduce` so `npm run test:shams:corejs` passes in `node` `v0.8` ([core-js#122](https://github.com/zloirock/core-js/issues/122)) + * [Tests] Refactor to use my conventional structure that separates shimmed, implementation, and common tests + * [Tests] Create `npm run test:shams` and better organize tests for symbol shams + * [Tests] Remove `nsp` in favor of `requiresafe` + +4.0.2 / 2015-10-20 +================== + * [Fix] Ensure correct property enumeration order, particularly in v8 (#15) + * [Deps] update `object-keys`, `define-properties` + * [Dev Deps] update `browserify`, `is`, `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + +4.0.1 / 2015-08-16 +================== + * [Docs] Add `Symbol` note to readme + +4.0.0 / 2015-08-15 +================== + * [Breaking] Implement the [es-shim API](es-shims/api). + * [Robustness] Make implementation robust against later modification of environment methods. + * [Refactor] Move implementation to `implementation.js` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Deps] update `object-keys`, `define-properties` + * [Dev Deps] update `browserify`, `tape`, `eslint`, `jscs`, `browserify` + * [Tests] Add `npm run tests-only` + * [Tests] use my personal shared `eslint` config. + * [Tests] up to `io.js` `v3.0` + +3.0.1 / 2015-06-28 +================== + * Cache `Object` and `Array#push` to make the shim more robust. + * [Fix] Remove use of `Array#filter`, which isn't in ES3. + * [Deps] Update `object-keys`, `define-properties` + * [Dev Deps] Update `get-own-property-symbols`, `browserify`, `eslint`, `nsp` + * [Tests] Test up to `io.js` `v2.3` + * [Tests] Adding `Object.assign` tests for non-object targets, per https://github.com/paulmillr/es6-shim/issues/348 + +3.0.0 / 2015-05-20 +================== + * Attempt to feature-detect Symbols, even if `typeof Symbol() !== 'symbol'` (#12) + * Make a separate `hasSymbols` internal module + * Update `browserify`, `eslint` + +2.0.3 / 2015-06-28 +================== + * Cache `Object` and `Array#push` to make the shim more robust. + * [Fix] Remove use of `Array#filter`, which isn't in ES3 + * [Deps] Update `object-keys`, `define-properties` + * [Dev Deps] Update `browserify`, `nsp`, `eslint` + * [Tests] Test up to `io.js` `v2.3` + +2.0.2 / 2015-05-20 +================== + * Make sure `.shim` is non-enumerable. + * Refactor `.shim` implementation to use `define-properties` predicates, rather than `delete`ing the original. + * Update docs to match spec/implementation. (#11) + * Add `npm run eslint` + * Test up to `io.js` `v2.0` + * Update `jscs`, `browserify`, `covert` + +2.0.1 / 2015-04-12 +================== + * Make sure non-enumerable Symbols are excluded. + +2.0.0 / 2015-04-12 +================== + * Make sure the shim function overwrites a broken implementation with pending exceptions. + * Ensure shim is not enumerable using `define-properties` + * Ensure `Object.assign` includes symbols. + * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. + * Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. + * Add `npm run security` via `nsp` + * Update `browserify`, `jscs`, `tape`, `object-keys`, `is` + +1.1.1 / 2014-12-14 +================== + * Actually include the browser build in `npm` + +1.1.0 / 2014-12-14 +================== + * Add `npm run build`, and build an automatic-shimming browser distribution as part of the npm publish process. + * Update `is`, `jscs` + +1.0.3 / 2014-11-29 +================== + * Revert "optimize --production installs" + +1.0.2 / 2014-11-27 +================== + * Update `jscs`, `is`, `object-keys`, `tape` + * Add badges to README + * Name URLs in README + * Lock `covert` to `v1.0.0` + * Optimize --production installs + +1.0.1 / 2014-08-26 +================== + * Update `is`, `covert` + +1.0.0 / 2014-08-07 +================== + * Update `object-keys`, `tape` + +0.5.0 / 2014-07-31 +================== + * Object.assign no longer throws on null or undefined sources, per https://bugs.ecmascript.org/show_bug.cgi?id=3096 + +0.4.3 / 2014-07-30 +================== + * Don’t modify vars in the function signature, since it deoptimizes v8 + +0.4.2 / 2014-07-30 +================== + * Fixing the version number: v0.4.2 + +0.4.1 / 2014-07-19 +================== + * Revert "Use the native Object.keys if it’s available." + +0.4.0 / 2014-07-19 +================== + * Use the native Object.keys if it’s available. + * Fixes [#2](https://github.com/ljharb/object.assign/issues/2). + * Adding failing tests for [#2](https://github.com/ljharb/object.assign/issues/2). + * Fix indentation. + * Adding `npm run lint` + * Update `tape`, `covert` + * README: Use SVG badge for Travis [#1](https://github.com/ljharb/object.assign/issues/1) from mathiasbynens/patch-1 + +0.3.1 / 2014-04-10 +================== + * Object.assign does partially modify objects if it throws, per https://twitter.com/awbjs/status/454320863093862400 + +0.3.0 / 2014-04-10 +================== + * Update with newest ES6 behavior - Object.assign now takes a variable number of source objects. + * Update `tape` + * Make sure old and unstable nodes don’t fail Travis + +0.2.1 / 2014-03-16 +================== + * Let object-keys handle the fallback + * Update dependency badges + * Adding bower.json + +0.2.0 / 2014-03-16 +================== + * Use a for loop, because ES3 browsers don’t have "reduce" + +0.1.1 / 2014-03-14 +================== + * Updating readme + +0.1.0 / 2014-03-14 +================== + * Initial release. + diff --git a/node_modules/object.assign/LICENSE b/node_modules/object.assign/LICENSE new file mode 100644 index 0000000000000..ab29cbd63b72d --- /dev/null +++ b/node_modules/object.assign/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/object.assign/README.md b/node_modules/object.assign/README.md new file mode 100644 index 0000000000000..8e933fee62601 --- /dev/null +++ b/node_modules/object.assign/README.md @@ -0,0 +1,136 @@ +# object.assign [![Version Badge][npm-version-svg]][npm-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][npm-url] + +An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. + +Takes a minimum of 2 arguments: `target` and `source`. +Takes a variable sized list of source arguments - at least 1, as many as you want. +Throws a TypeError if the `target` argument is `null` or `undefined`. + +Most common usage: +```js +var assign = require('object.assign').getPolyfill(); // returns native method if compliant + /* or */ +var assign = require('object.assign/polyfill')(); // returns native method if compliant +``` + +## Example + +```js +var assert = require('assert'); + +// Multiple sources! +var target = { a: true }; +var source1 = { b: true }; +var source2 = { c: true }; +var sourceN = { n: true }; + +var expected = { + a: true, + b: true, + c: true, + n: true +}; + +assign(target, source1, source2, sourceN); +assert.deepEqual(target, expected); // AWESOME! +``` + +```js +var target = { + a: true, + b: true, + c: true +}; +var source1 = { + c: false, + d: false +}; +var sourceN = { + e: false +}; + +var assigned = assign(target, source1, sourceN); +assert.equal(target, assigned); // returns the target object +assert.deepEqual(assigned, { + a: true, + b: true, + c: false, + d: false, + e: false +}); +``` + +```js +/* when Object.assign is not present */ +delete Object.assign; +var shimmedAssign = require('object.assign').shim(); + /* or */ +var shimmedAssign = require('object.assign/shim')(); + +assert.equal(shimmedAssign, assign); + +var target = { + a: true, + b: true, + c: true +}; +var source = { + c: false, + d: false, + e: false +}; + +var assigned = assign(target, source); +assert.deepEqual(Object.assign(target, source), assign(target, source)); +``` + +```js +/* when Object.assign is present */ +var shimmedAssign = require('object.assign').shim(); +assert.equal(shimmedAssign, Object.assign); + +var target = { + a: true, + b: true, + c: true +}; +var source = { + c: false, + d: false, + e: false +}; + +assert.deepEqual(Object.assign(target, source), assign(target, source)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[npm-url]: https://npmjs.org/package/object.assign +[npm-version-svg]: http://versionbadg.es/ljharb/object.assign.svg +[travis-svg]: https://travis-ci.org/ljharb/object.assign.svg +[travis-url]: https://travis-ci.org/ljharb/object.assign +[deps-svg]: https://david-dm.org/ljharb/object.assign.svg?theme=shields.io +[deps-url]: https://david-dm.org/ljharb/object.assign +[dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io +[dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object.assign.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object.assign.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object.assign +[codecov-image]: https://codecov.io/gh/ljharb/object.assign/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/object.assign/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/object.assign +[actions-url]: https://github.com/ljharb/object.assign/actions diff --git a/node_modules/object.assign/auto.js b/node_modules/object.assign/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/object.assign/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/object.assign/dist/browser.js b/node_modules/object.assign/dist/browser.js new file mode 100644 index 0000000000000..92d2826470b15 --- /dev/null +++ b/node_modules/object.assign/dist/browser.js @@ -0,0 +1,1141 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + +},{"./":5,"get-intrinsic":10}],5:[function(require,module,exports){ +'use strict'; + +var bind = require('function-bind'); +var GetIntrinsic = require('get-intrinsic'); +var setFunctionLength = require('set-function-length'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + +},{"function-bind":9,"get-intrinsic":10,"set-function-length":20}],6:[function(require,module,exports){ +'use strict'; + +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var gopd = require('gopd'); + +/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + +},{"get-intrinsic":10,"gopd":11,"has-property-descriptors":12}],7:[function(require,module,exports){ +'use strict'; + +var keys = require('object-keys'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var defineDataProperty = require('define-data-property'); + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var supportsDescriptors = require('has-property-descriptors')(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + +},{"define-data-property":6,"has-property-descriptors":12,"object-keys":18}],8:[function(require,module,exports){ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + +},{}],9:[function(require,module,exports){ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; + +},{"./implementation":8}],10:[function(require,module,exports){ +'use strict'; + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); +var hasProto = require('has-proto')(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('hasown'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + +},{"function-bind":9,"has-proto":13,"has-symbols":14,"hasown":16}],11:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + +},{"get-intrinsic":10}],12:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + +},{"get-intrinsic":10}],13:[function(require,module,exports){ +'use strict'; + +var test = { + foo: {} +}; + +var $Object = Object; + +module.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); +}; + +},{}],14:[function(require,module,exports){ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + +},{"./shams":15}],15:[function(require,module,exports){ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + +},{}],16:[function(require,module,exports){ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ +module.exports = bind.call(call, $hasOwn); + +},{"function-bind":9}],17:[function(require,module,exports){ +'use strict'; + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = require('./isArguments'); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + +},{"./isArguments":19}],18:[function(require,module,exports){ +'use strict'; + +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + +},{"./implementation":17,"./isArguments":19}],19:[function(require,module,exports){ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + +},{}],20:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var gOPD = require('gopd'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $floor = GetIntrinsic('%Math.floor%'); + +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(fn, 'length', length, true, true); + } else { + define(fn, 'length', length); + } + } + return fn; +}; + +},{"define-data-property":6,"get-intrinsic":10,"gopd":11,"has-property-descriptors":12}],21:[function(require,module,exports){ +'use strict'; + +var implementation = require('./implementation'); + +var lacksProperEnumerationOrder = function () { + if (!Object.assign) { + return false; + } + /* + * v8, specifically in node 4.x, has a bug with incorrect property enumeration order + * note: this does not detect the bug unless there's 20 characters + */ + var str = 'abcdefghijklmnopqrst'; + var letters = str.split(''); + var map = {}; + for (var i = 0; i < letters.length; ++i) { + map[letters[i]] = letters[i]; + } + var obj = Object.assign({}, map); + var actual = ''; + for (var k in obj) { + actual += k; + } + return str !== actual; +}; + +var assignHasPendingExceptions = function () { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, 'xy'); + } catch (e) { + return thrower[1] === 'y'; + } + return false; +}; + +module.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; +}; + +},{"./implementation":2}],22:[function(require,module,exports){ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimAssign() { + var polyfill = getPolyfill(); + define( + Object, + { assign: polyfill }, + { assign: function () { return Object.assign !== polyfill; } } + ); + return polyfill; +}; + +},{"./polyfill":21,"define-properties":7}]},{},[1]); diff --git a/node_modules/object.assign/hasSymbols.js b/node_modules/object.assign/hasSymbols.js new file mode 100644 index 0000000000000..34841e01199eb --- /dev/null +++ b/node_modules/object.assign/hasSymbols.js @@ -0,0 +1,43 @@ +'use strict'; + +var keys = require('object-keys'); + +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + /* + * temp disabled per https://github.com/ljharb/object.assign/issues/17 + * if (sym instanceof Symbol) { return false; } + * temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + * if (!(symObj instanceof Symbol)) { return false; } + */ + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-unreachable-loop + if (keys(obj).length !== 0) { return false; } + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js new file mode 100644 index 0000000000000..7a85167a7174d --- /dev/null +++ b/node_modules/object.assign/implementation.js @@ -0,0 +1,46 @@ +'use strict'; + +// modified from https://github.com/es-shims/es6-shim +var objectKeys = require('object-keys'); +var hasSymbols = require('has-symbols/shams')(); +var callBound = require('call-bind/callBound'); +var toObject = Object; +var $push = callBound('Array.prototype.push'); +var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; + +// eslint-disable-next-line no-unused-vars +module.exports = function assign(target, source1) { + if (target == null) { throw new TypeError('target must be an object'); } + var to = toObject(target); // step 1 + if (arguments.length === 1) { + return to; // step 2 + } + for (var s = 1; s < arguments.length; ++s) { + var from = toObject(arguments[s]); // step 3.a.i + + // step 3.a.ii: + var keys = objectKeys(from); + var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); + if (getSymbols) { + var syms = getSymbols(from); + for (var j = 0; j < syms.length; ++j) { + var key = syms[j]; + if ($propIsEnumerable(from, key)) { + $push(keys, key); + } + } + } + + // step 3.a.iii: + for (var i = 0; i < keys.length; ++i) { + var nextKey = keys[i]; + if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2 + var propValue = from[nextKey]; // step 3.a.iii.2.a + to[nextKey] = propValue; // step 3.a.iii.2.b + } + } + } + + return to; // step 4 +}; diff --git a/node_modules/object.assign/index.js b/node_modules/object.assign/index.js new file mode 100644 index 0000000000000..9b50603769174 --- /dev/null +++ b/node_modules/object.assign/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var polyfill = callBind.apply(getPolyfill()); +// eslint-disable-next-line no-unused-vars +var bound = function assign(target, source1) { + return polyfill(Object, arguments); +}; + +defineProperties(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; diff --git a/node_modules/object.assign/package.json b/node_modules/object.assign/package.json new file mode 100644 index 0000000000000..5559eb93c3bc4 --- /dev/null +++ b/node_modules/object.assign/package.json @@ -0,0 +1,96 @@ +{ + "name": "object.assign", + "version": "4.1.5", + "author": "Jordan Harband", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "pretest": "npm run lint && es-shim-api --bound", + "test": "npm run tests-only && npm run test:ses", + "posttest": "aud --production", + "tests-only": "npm run test:implementation && npm run test:shim", + "test:native": "nyc node test/native", + "test:shim": "nyc node test/shimmed", + "test:implementation": "nyc node test", + "test:ses": "node test/ses-compat", + "lint": "eslint .", + "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", + "prepublishOnly": "safe-publish-latest && npm run build", + "prepublish": "not-in-publish || npm run prepublishOnly" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object.assign.git" + }, + "keywords": [ + "Object.assign", + "assign", + "ES6", + "extend", + "$.extend", + "jQuery", + "_.extend", + "Underscore", + "es-shim API", + "polyfill", + "shim" + ], + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "browserify": "^16.5.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "hasown": "^2.0.0", + "is": "^3.3.0", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "ses": "^0.11.1", + "tape": "^5.7.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "bower.json", + "browserShim.js", + "!dist/" + ] + } +} diff --git a/node_modules/object.assign/polyfill.js b/node_modules/object.assign/polyfill.js new file mode 100644 index 0000000000000..ca94aea9ba30d --- /dev/null +++ b/node_modules/object.assign/polyfill.js @@ -0,0 +1,55 @@ +'use strict'; + +var implementation = require('./implementation'); + +var lacksProperEnumerationOrder = function () { + if (!Object.assign) { + return false; + } + /* + * v8, specifically in node 4.x, has a bug with incorrect property enumeration order + * note: this does not detect the bug unless there's 20 characters + */ + var str = 'abcdefghijklmnopqrst'; + var letters = str.split(''); + var map = {}; + for (var i = 0; i < letters.length; ++i) { + map[letters[i]] = letters[i]; + } + var obj = Object.assign({}, map); + var actual = ''; + for (var k in obj) { + actual += k; + } + return str !== actual; +}; + +var assignHasPendingExceptions = function () { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, 'xy'); + } catch (e) { + return thrower[1] === 'y'; + } + return false; +}; + +module.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; +}; diff --git a/node_modules/object.assign/shim.js b/node_modules/object.assign/shim.js new file mode 100644 index 0000000000000..9f896ae3cf90a --- /dev/null +++ b/node_modules/object.assign/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimAssign() { + var polyfill = getPolyfill(); + define( + Object, + { assign: polyfill }, + { assign: function () { return Object.assign !== polyfill; } } + ); + return polyfill; +}; diff --git a/node_modules/object.assign/test/implementation.js b/node_modules/object.assign/test/implementation.js new file mode 100644 index 0000000000000..05d7d7ada705b --- /dev/null +++ b/node_modules/object.assign/test/implementation.js @@ -0,0 +1,19 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) { + st['throws'](function () { implementation(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { implementation(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(implementation, Object), t); + + t.end(); +}); diff --git a/node_modules/object.assign/test/index.js b/node_modules/object.assign/test/index.js new file mode 100644 index 0000000000000..776b2b3342e63 --- /dev/null +++ b/node_modules/object.assign/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var assign = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { assign(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { assign(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(assign, t); + + t.end(); +}); diff --git a/node_modules/object.assign/test/native.js b/node_modules/object.assign/test/native.js new file mode 100644 index 0000000000000..49a70f7987691 --- /dev/null +++ b/node_modules/object.assign/test/native.js @@ -0,0 +1,49 @@ +'use strict'; + +var test = require('tape'); +var defineProperties = require('define-properties'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +var runTests = require('./tests'); + +test('native', function (t) { + t.equal(Object.assign.length, 2, 'Object.assign has a length of 2'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad object value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + // v8 in node 0.8 and 0.10 have non-enumerable string properties + var stringCharsAreEnumerable = isEnumerable.call('xy', 0); + t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) { + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: '2' }); + var error; + try { Object.assign(thrower, 'xy'); } catch (e) { error = e; } + st.equal(error instanceof TypeError, true, 'error is TypeError'); + st.equal(thrower[1], '2', 'thrower[1] === "2"'); + + st.end(); + }); + + runTests(Object.assign, t); + + t.end(); +}); diff --git a/node_modules/object.assign/test/ses-compat.js b/node_modules/object.assign/test/ses-compat.js new file mode 100644 index 0000000000000..9669eb9a98e39 --- /dev/null +++ b/node_modules/object.assign/test/ses-compat.js @@ -0,0 +1,12 @@ +'use strict'; + +/* globals lockdown */ + +// requiring ses exposes "lockdown" on the global +require('ses'); + +// lockdown freezes the primordials +lockdown({ errorTaming: 'unsafe' }); + +// initialize the module +require('./'); diff --git a/node_modules/object.assign/test/shimmed.js b/node_modules/object.assign/test/shimmed.js new file mode 100644 index 0000000000000..ee577587a8961 --- /dev/null +++ b/node_modules/object.assign/test/shimmed.js @@ -0,0 +1,52 @@ +'use strict'; + +var assign = require('../'); +assign.shim(); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(Object.assign.length, 2, 'Object.assign has a length of 2'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad object value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + // v8 in node 0.8 and 0.10 have non-enumerable string properties + var stringCharsAreEnumerable = isEnumerable.call('xy', 0); + t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) { + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: '2' }); + var error; + try { Object.assign(thrower, 'xy'); } catch (e) { error = e; } + st.equal(error instanceof TypeError, true, 'error is TypeError'); + st.equal(thrower[1], '2', 'thrower[1] === "2"'); + + st.end(); + }); + + runTests(Object.assign, t); + + t.end(); +}); diff --git a/node_modules/object.assign/test/tests.js b/node_modules/object.assign/test/tests.js new file mode 100644 index 0000000000000..eff2793d3000c --- /dev/null +++ b/node_modules/object.assign/test/tests.js @@ -0,0 +1,232 @@ +'use strict'; + +var hasSymbols = require('has-symbols/shams')(); +var forEach = require('for-each'); +var hasOwn = require('hasown'); +var mockProperty = require('mock-property'); + +module.exports = function (assign, t) { + t.test('error cases', function (st) { + st['throws'](function () { assign(null); }, TypeError, 'target must be an object'); + st['throws'](function () { assign(undefined); }, TypeError, 'target must be an object'); + st['throws'](function () { assign(null, {}); }, TypeError, 'target must be an object'); + st['throws'](function () { assign(undefined, {}); }, TypeError, 'target must be an object'); + st.end(); + }); + + t.test('non-object target, no sources', function (st) { + var bool = assign(true); + st.equal(typeof bool, 'object', 'bool is object'); + st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`'); + + var number = assign(1); + st.equal(typeof number, 'object', 'number is object'); + st.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`'); + + var string = assign('1'); + st.equal(typeof string, 'object', 'number is object'); + st.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`'); + + st.end(); + }); + + t.test('non-object target, with sources', function (st) { + var signal = {}; + + st.test('boolean', function (st2) { + var bool = assign(true, { a: signal }); + st2.equal(typeof bool, 'object', 'bool is object'); + st2.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`'); + st2.equal(bool.a, signal, 'source properties copied'); + st2.end(); + }); + + st.test('number', function (st2) { + var number = assign(1, { a: signal }); + st2.equal(typeof number, 'object', 'number is object'); + st2.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`'); + st2.equal(number.a, signal, 'source properties copied'); + st2.end(); + }); + + st.test('string', function (st2) { + var string = assign('1', { a: signal }); + st2.equal(typeof string, 'object', 'number is object'); + st2.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`'); + st2.equal(string.a, signal, 'source properties copied'); + st2.end(); + }); + + st.end(); + }); + + t.test('non-object sources', function (st) { + st.deepEqual(assign({ a: 1 }, null, { b: 2 }), { a: 1, b: 2 }, 'ignores null source'); + st.deepEqual(assign({ a: 1 }, { b: 2 }, undefined), { a: 1, b: 2 }, 'ignores undefined source'); + st.end(); + }); + + t.test('returns the modified target object', function (st) { + var target = {}; + var returned = assign(target, { a: 1 }); + st.equal(returned, target, 'returned object is the same reference as the target object'); + st.end(); + }); + + t.test('has the right length', function (st) { + st.equal(assign.length, 2, 'length is 2 => 2 required arguments'); + st.end(); + }); + + t.test('merge two objects', function (st) { + var target = { a: 1 }; + var returned = assign(target, { b: 2 }); + st.deepEqual(returned, { a: 1, b: 2 }, 'returned object has properties from both'); + st.end(); + }); + + t.test('works with functions', function (st) { + var target = function () {}; + target.a = 1; + var returned = assign(target, { b: 2 }); + st.equal(target, returned, 'returned object is target'); + st.equal(returned.a, 1); + st.equal(returned.b, 2); + st.end(); + }); + + t.test('works with primitives', function (st) { + var target = 2; + var source = { b: 42 }; + var returned = assign(target, source); + st.equal(Object.prototype.toString.call(returned), '[object Number]', 'returned is object form of number primitive'); + st.equal(Number(returned), target, 'returned and target have same valueOf'); + st.equal(returned.b, source.b); + st.end(); + }); + + /* globals window */ + t.test('works with window.location', { skip: typeof window === 'undefined' }, function (st) { + var target = {}; + assign(target, window.location); + for (var prop in window.location) { + if (hasOwn(window.location, prop)) { + st.deepEqual(target[prop], window.location[prop], prop + ' is copied'); + } + } + st.end(); + }); + + t.test('merge N objects', function (st) { + var target = { a: 1 }; + var source1 = { b: 2 }; + var source2 = { c: 3 }; + var returned = assign(target, source1, source2); + st.deepEqual(returned, { a: 1, b: 2, c: 3 }, 'returned object has properties from all sources'); + st.end(); + }); + + t.test('only iterates over own keys', function (st) { + var Foo = function () {}; + Foo.prototype.bar = true; + var foo = new Foo(); + foo.baz = true; + var target = { a: 1 }; + var returned = assign(target, foo); + st.equal(returned, target, 'returned object is the same reference as the target object'); + st.deepEqual(target, { a: 1, baz: true }, 'returned object has only own properties from both'); + st.end(); + }); + + t.test('includes enumerable symbols, after keys', { skip: !hasSymbols }, function (st) { + var visited = []; + var obj = {}; + Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } }); + var symbol = Symbol('enumerable'); + Object.defineProperty(obj, symbol, { + enumerable: true, + get: function () { visited.push(symbol); return Infinity; } + }); + var nonEnumSymbol = Symbol('non-enumerable'); + Object.defineProperty(obj, nonEnumSymbol, { + enumerable: false, + get: function () { visited.push(nonEnumSymbol); return -Infinity; } + }); + var target = assign({}, obj); + st.deepEqual(visited, ['a', symbol], 'key is visited first, then symbol'); + st.equal(target.a, 42, 'target.a is 42'); + st.equal(target[symbol], Infinity, 'target[symbol] is Infinity'); + st.notEqual(target[nonEnumSymbol], -Infinity, 'target[nonEnumSymbol] is not -Infinity'); + st.end(); + }); + + t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) { + st.teardown(mockProperty(Object, 'getOwnPropertySymbols', { 'delete': true })); + + var visited = []; + var obj = {}; + Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } }); + var keys = ['a']; + if (hasSymbols) { + var symbol = Symbol('sym'); + Object.defineProperty(obj, symbol, { + enumerable: true, + get: function () { visited.push(symbol); return Infinity; } + }); + keys.push(symbol); + } + var target = assign({}, obj); + st.deepEqual(visited, keys, 'assign visits expected keys'); + st.equal(target.a, 42, 'target.a is 42'); + + if (hasSymbols) { + st.equal(target[symbol], Infinity); + } + st.end(); + }); + + t.test('preserves correct property enumeration order', function (st) { + var str = 'abcdefghijklmnopqrst'; + var letters = {}; + forEach(str.split(''), function (letter) { + letters[letter] = letter; + }); + + var n = 5; + st.comment('run the next test ' + n + ' times'); + var object = assign({}, letters); + var actual = ''; + for (var k in object) { + actual += k; + } + for (var i = 0; i < n; ++i) { + st.equal(actual, str, 'property enumeration order should be followed'); + } + st.end(); + }); + + t.test('checks enumerability and existence, in case of modification during [[Get]]', { skip: !Object.defineProperty }, function (st) { + var targetBvalue = {}; + var targetCvalue = {}; + var target = { b: targetBvalue, c: targetCvalue }; + var source = {}; + Object.defineProperty(source, 'a', { + enumerable: true, + get: function () { + delete this.b; + Object.defineProperty(this, 'c', { enumerable: false }); + return 'a'; + } + }); + var sourceBvalue = {}; + var sourceCvalue = {}; + source.b = sourceBvalue; + source.c = sourceCvalue; + var result = assign(target, source); + st.equal(result, target, 'sanity check: result is === target'); + st.equal(result.b, targetBvalue, 'target key not overwritten by deleted source key'); + st.equal(result.c, targetCvalue, 'target key not overwritten by non-enumerable source key'); + + st.end(); + }); +}; diff --git a/node_modules/object.omit/LICENSE b/node_modules/object.omit/LICENSE new file mode 100644 index 0000000000000..842218cf09a20 --- /dev/null +++ b/node_modules/object.omit/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/object.omit/README.md b/node_modules/object.omit/README.md new file mode 100644 index 0000000000000..246efe092383e --- /dev/null +++ b/node_modules/object.omit/README.md @@ -0,0 +1,118 @@ +# object.omit [![NPM version](https://img.shields.io/npm/v/object.omit.svg?style=flat)](https://www.npmjs.com/package/object.omit) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.omit.svg?style=flat)](https://npmjs.org/package/object.omit) [![NPM total downloads](https://img.shields.io/npm/dt/object.omit.svg?style=flat)](https://npmjs.org/package/object.omit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.omit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.omit) + +> Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save object.omit +``` + +## Usage + +```js +var omit = require('object.omit'); +``` + +Pass a string `key` to omit: + +```js +omit({a: 'a', b: 'b', c: 'c'}, 'a') +//=> { b: 'b', c: 'c' } +``` + +Pass an array of `keys` to omit: + +```js +omit({a: 'a', b: 'b', c: 'c'}, ['a', 'c']) +//=> { b: 'b' } +``` + +Returns the object if no keys are passed: + +```js +omit({a: 'a', b: 'b', c: 'c'}) +//=> {a: 'a', b: 'b', c: 'c'} +``` + +Returns an empty object if no value is passed. + +```js +omit() +//=> {} +``` + +### Filter function + +An optional filter function may be passed as the last argument, with or without keys passed on the arguments: + +**filter on keys** + +```js +var res = omit({a: 'a', b: 'b', c: 'c'}, function (val, key) { + return key === 'a'; +}); +//=> {a: 'a'} +``` + +**filter on values** + +```js +var fn = function() {}; +var obj = {a: 'a', b: 'b', c: fn}; + +var res = omit(obj, ['a'], function (val, key) { + return typeof val !== 'function'; +}); +//=> {b: 'b'} +``` + +## About + +### Related projects + +* [object.defaults](https://www.npmjs.com/package/object.defaults): Like `extend` but only copies missing properties/values to the target object. | [homepage](https://github.com/jonschlinkert/object.defaults "Like `extend` but only copies missing properties/values to the target object.") +* [object.filter](https://www.npmjs.com/package/object.filter): Create a new object filtered to have only properties for which the callback returns true. | [homepage](https://github.com/jonschlinkert/object.filter "Create a new object filtered to have only properties for which the callback returns true.") +* [object.pick](https://www.npmjs.com/package/object.pick): Returns a filtered copy of an object with only the specified keys, similar to `_.pick… [more](https://github.com/jonschlinkert/object.pick) | [homepage](https://github.com/jonschlinkert/object.pick "Returns a filtered copy of an object with only the specified keys, similar to`_.pick` from lodash / underscore.") +* [object.pluck](https://www.npmjs.com/package/object.pluck): Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with… [more](https://github.com/jonschlinkert/object.pluck) | [homepage](https://github.com/jonschlinkert/object.pluck "Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with values unmodified from those of the original object.") +* [object.reduce](https://www.npmjs.com/package/object.reduce): Reduces an object to a value that is the accumulated result of running each property… [more](https://github.com/jonschlinkert/object.reduce) | [homepage](https://github.com/jonschlinkert/object.reduce "Reduces an object to a value that is the accumulated result of running each property in the object through a callback.") + +### 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/object.omit/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 27, 2016._ \ No newline at end of file diff --git a/node_modules/object.omit/index.js b/node_modules/object.omit/index.js new file mode 100644 index 0000000000000..503a3c3030c82 --- /dev/null +++ b/node_modules/object.omit/index.js @@ -0,0 +1,40 @@ +/*! + * object.omit + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isObject = require('is-extendable'); +var forOwn = require('for-own'); + +module.exports = function omit(obj, keys) { + if (!isObject(obj)) return {}; + + keys = [].concat.apply([], [].slice.call(arguments, 1)); + var last = keys[keys.length - 1]; + var res = {}, fn; + + if (typeof last === 'function') { + fn = keys.pop(); + } + + var isFunction = typeof fn === 'function'; + if (!keys.length && !isFunction) { + return obj; + } + + forOwn(obj, function(value, key) { + if (keys.indexOf(key) === -1) { + + if (!isFunction) { + res[key] = value; + } else if (fn(value, key, obj)) { + res[key] = value; + } + } + }); + return res; +}; diff --git a/node_modules/object.omit/package.json b/node_modules/object.omit/package.json new file mode 100644 index 0000000000000..2cec4c10e569a --- /dev/null +++ b/node_modules/object.omit/package.json @@ -0,0 +1,67 @@ +{ + "name": "object.omit", + "description": "Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/object.omit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object.omit", + "bugs": { + "url": "https://github.com/jonschlinkert/object.omit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.1.2", + "should": "^11.1.1" + }, + "keywords": [ + "clear", + "delete", + "key", + "object", + "omit", + "property", + "remove", + "value" + ], + "verb": { + "related": { + "list": [ + "object.defaults", + "object.filter", + "object.pick", + "object.pluck", + "object.reduce" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/node_modules/object.pick/LICENSE b/node_modules/object.pick/LICENSE new file mode 100644 index 0000000000000..39245ac1c6061 --- /dev/null +++ b/node_modules/object.pick/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/object.pick/README.md b/node_modules/object.pick/README.md new file mode 100644 index 0000000000000..48f7453482c81 --- /dev/null +++ b/node_modules/object.pick/README.md @@ -0,0 +1,76 @@ +# object.pick [![NPM version](https://img.shields.io/npm/v/object.pick.svg?style=flat)](https://www.npmjs.com/package/object.pick) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![NPM total downloads](https://img.shields.io/npm/dt/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.pick.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.pick) + +> Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore. + +You might also be interested in [object.omit](https://github.com/jonschlinkert/object.omit). + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save object.pick +``` + +## benchmarks + +This is the [fastest implementation](http://jsperf.com/pick-props) I tested. Pull requests welcome! + +## Usage + +```js +var pick = require('object.pick'); + +pick({a: 'a', b: 'b'}, 'a') +//=> {a: 'a'} + +pick({a: 'a', b: 'b', c: 'c'}, ['a', 'b']) +//=> {a: 'a', b: 'b'} +``` + +## 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.") +* [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.") +* [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.") +* [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.") + +### 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/object.pick/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 27, 2016._ \ No newline at end of file diff --git a/node_modules/object.pick/index.js b/node_modules/object.pick/index.js new file mode 100644 index 0000000000000..0ce01782ad8e5 --- /dev/null +++ b/node_modules/object.pick/index.js @@ -0,0 +1,35 @@ +/*! + * object.pick + * + * Copyright (c) 2014-2015 Jon Schlinkert, contributors. + * Licensed under the MIT License + */ + +'use strict'; + +var isObject = require('isobject'); + +module.exports = function pick(obj, keys) { + if (!isObject(obj) && typeof obj !== 'function') { + return {}; + } + + var res = {}; + if (typeof keys === 'string') { + if (keys in obj) { + res[keys] = obj[keys]; + } + return res; + } + + var len = keys.length; + var idx = -1; + + while (++idx < len) { + var key = keys[idx]; + if (key in obj) { + res[key] = obj[key]; + } + } + return res; +}; diff --git a/node_modules/object.pick/node_modules/isobject/LICENSE b/node_modules/object.pick/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..943e71d05511e --- /dev/null +++ b/node_modules/object.pick/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/object.pick/node_modules/isobject/README.md b/node_modules/object.pick/node_modules/isobject/README.md new file mode 100644 index 0000000000000..d01feaa40bc13 --- /dev/null +++ b/node_modules/object.pick/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/object.pick/node_modules/isobject/index.d.ts b/node_modules/object.pick/node_modules/isobject/index.d.ts new file mode 100644 index 0000000000000..55f81c275f150 --- /dev/null +++ b/node_modules/object.pick/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/object.pick/node_modules/isobject/index.js b/node_modules/object.pick/node_modules/isobject/index.js new file mode 100644 index 0000000000000..2d59958bf4eab --- /dev/null +++ b/node_modules/object.pick/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/object.pick/node_modules/isobject/package.json b/node_modules/object.pick/node_modules/isobject/package.json new file mode 100644 index 0000000000000..62aa8c1b2feea --- /dev/null +++ b/node_modules/object.pick/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "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" + ] + } +} diff --git a/node_modules/object.pick/package.json b/node_modules/object.pick/package.json new file mode 100644 index 0000000000000..b655dbeb49906 --- /dev/null +++ b/node_modules/object.pick/package.json @@ -0,0 +1,60 @@ +{ + "name": "object.pick", + "description": "Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore.", + "version": "1.3.0", + "homepage": "https://github.com/jonschlinkert/object.pick", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object.pick", + "bugs": { + "url": "https://github.com/jonschlinkert/object.pick/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.1.2", + "vinyl": "^2.0.0" + }, + "keywords": [ + "object", + "pick" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "extend-shallow", + "get-value", + "mixin-deep", + "set-value" + ], + "highlight": "object.omit" + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/onchange/.npmignore b/node_modules/onchange/.npmignore new file mode 100644 index 0000000000000..70139601f6d9c --- /dev/null +++ b/node_modules/onchange/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +__test__/ diff --git a/node_modules/onchange/README.md b/node_modules/onchange/README.md new file mode 100644 index 0000000000000..db7af4641562d --- /dev/null +++ b/node_modules/onchange/README.md @@ -0,0 +1,63 @@ +# onchange + +Use glob patterns to watch file sets and run a command when anything is added, changed or deleted. + +## Install + +```sh +npm install onchange +``` + +## Usage + +```sh +onchange 'app/**/*.js' 'test/**/*.js' -- npm test +``` + +You can match as many glob patterns as you like, just put the command you want to run after the `--` and it will run any time a file matching any of the globs is added changed or deleted. + +If you want a more verbose output, include the `-v` flag. For example: + +```sh +onchange 'app/**/*.js' 'test/**/*.js' -v -- npm test +``` + +To use the event and file that changed, use `{{event}}` or `{{changed}}` anywhere in the command after `--`. For example: + +```sh +onchange '**/*.js' -- echo '{{event}} to {{changed}}' +``` + +To execute the command on the first run, include the `-i` flag: For example: + +```sh +onchange '**/*.js' -i -- npm start +``` + +To exclude matches: + +```sh +onchange '**/*.ts' -e 'dist/**/*.js' -- tslint +``` + +To wait for the current process to exit between restarts: + +```sh +onchange '**/*.js' -w -- npm test +``` + +## TypeScript + +Includes [typings](index.d.ts) for TypeScript users. + +--- + +### Copyright (c) 2013 Stephen Belanger + +#### Licensed under MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/onchange/cli.js b/node_modules/onchange/cli.js new file mode 100755 index 0000000000000..7c54f7ead04fa --- /dev/null +++ b/node_modules/onchange/cli.js @@ -0,0 +1,55 @@ +#!/usr/bin/env node +var onchange = require('./') +var arrify = require('arrify') + +// Parse argv with minimist...it's easier this way. +var argv = require('minimist')(process.argv.slice(2), { + '--': true, + boolean: ['v', 'i', 'w'], + string: ['e', 'c'], + alias: { + verbose: ['v'], + initial: ['i'], + exclude: ['e'], + wait: ['w'], + cwd: ['c'] + } +}) + +// Print usage info +if (!argv._.length || argv.help) { + console.log('Usage: onchange [...file] -- [...args]') + process.exit() +} + +// Setup some storage variables +var matches = argv._.slice() + +// Build exclusion list +var exclude = arrify(argv.exclude) + +// Ignore node_modules folders, as they eat CPU like crazy +if (exclude.length === 0) { + exclude.push('**/node_modules/**') +} + +// Shift first thing after to command and use the rest as args +var args = argv['--'].slice() +var command = args.shift() + +var options = { + exclude: exclude, + verbose: argv.verbose, + initial: argv.initial, + wait: argv.wait, + cwd: argv.cwd +} + +if (!command) { + console.error('Remember to pass the command after "--":') + console.error(' onchange \'**/*.js\' -- echo \'{{changed}}\'') + process.exit(1) +} + +// Start watcher +onchange(matches, command, args, options) diff --git a/node_modules/onchange/index.d.ts b/node_modules/onchange/index.d.ts new file mode 100644 index 0000000000000..03a0907141315 --- /dev/null +++ b/node_modules/onchange/index.d.ts @@ -0,0 +1,15 @@ +declare function onchange (matches: string[], command: string, args?: string[], options?: onchange.Options): void; + +declare namespace onchange { + export interface Options { + exclude?: string[]; + cwd?: string; + initial?: boolean; + verbose?: boolean; + wait?: boolean; + stdout?: any; + stderr?: any; + } +} + +export = onchange; diff --git a/node_modules/onchange/index.js b/node_modules/onchange/index.js new file mode 100644 index 0000000000000..2f55540a94c22 --- /dev/null +++ b/node_modules/onchange/index.js @@ -0,0 +1,109 @@ +var resolve = require('path').resolve +var spawn = require('cross-spawn').spawn +var chokidar = require('chokidar') +var arrify = require('arrify') + +module.exports = function (match, command, args, opts) { + opts = opts || {} + + var matches = arrify(match) + var verbose = !!opts.verbose + var initial = !!opts.initial + var wait = !!opts.wait + var cwd = opts.cwd ? resolve(opts.cwd) : process.cwd() + var exclude = opts.exclude || [] + var stdout = opts.stdout || process.stdout + var stderr = opts.stderr || process.stderr + + var child + var pending + + // Convert arguments to templates + var tmpls = args ? args.map(tmpl) : [] + var watcher = chokidar.watch(matches, { cwd: cwd, ignored: exclude }) + + // Logging + var log = verbose ? function log (message) { + stdout.write('onchange: ' + message + '\n') + } : function () {} + + function start (opts) { + // Set pending options for next execution. + if (child) { + pending = opts + + if (wait) { + log('waiting for process and restarting') + } else { + log('killing process and restarting') + child.kill() + } + + return + } + + // Generate argument strings from templates. + var filtered = tmpls.map(function (tmpl) { + return tmpl(opts) + }) + + log('executing "' + [command].concat(filtered).join(' ') + '"') + + child = spawn(command, filtered, { + cwd: cwd, + stdio: ['ignore', stdout, stderr] + }) + + child.on('exit', function (code, signal) { + var arg = pending + + child = null + pending = null + + if (code == null) { + log('process exited with ' + signal) + } else { + log('process completed with code ' + code) + } + + if (arg) { + start(arg) + } + }) + } + + watcher.on('ready', function () { + log('watching ' + matches.join(', ')) + + // Execute initial event, without changed options. + if (initial) { + start({ event: '', changed: '' }) + } + + // For any change, creation or deletion, try to run. + // Restart if the last run is still active. + watcher.on('all', function (event, changed) { + // Log the event and the file affected + log(event + ' to ' + changed) + + start({ event: event, changed: changed }) + }) + }) + + watcher.on('error', function (error) { + log('watcher error: ' + error) + }) +} + +// +// Helpers +// + +// Double mustache template generator +function tmpl (str) { + return function (data) { + return str.replace(/{{([^{}]+)}}/g, function (_, key) { + return data[key] + }) + } +} diff --git a/node_modules/onchange/package.json b/node_modules/onchange/package.json new file mode 100644 index 0000000000000..aad2fb279bae2 --- /dev/null +++ b/node_modules/onchange/package.json @@ -0,0 +1,34 @@ +{ + "name": "onchange", + "version": "2.5.0", + "description": "Use glob patterns to watch file sets and run a command when anything is added, changed or deleted.", + "author": "Stephen Belanger ", + "keywords": [ + "glob", + "watch", + "change" + ], + "bin": { + "onchange": "cli.js" + }, + "license": "MIT", + "dependencies": { + "arrify": "~1.0.1", + "chokidar": "~1.5.1", + "cross-spawn": "~4.0.0", + "minimist": "~1.2.0" + }, + "main": "index.js", + "typings": "index.d.ts", + "scripts": { + "test": "node test/index.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/Qard/onchange.git" + }, + "bugs": { + "url": "https://github.com/Qard/onchange/issues" + }, + "homepage": "https://github.com/Qard/onchange" +} diff --git a/node_modules/onchange/test/__test__/file.txt b/node_modules/onchange/test/__test__/file.txt new file mode 100644 index 0000000000000..a51e91eebe3b1 --- /dev/null +++ b/node_modules/onchange/test/__test__/file.txt @@ -0,0 +1 @@ +0.4851403703797541 \ No newline at end of file diff --git a/node_modules/onchange/test/__test__/out.txt b/node_modules/onchange/test/__test__/out.txt new file mode 100644 index 0000000000000..b677cd09e8011 --- /dev/null +++ b/node_modules/onchange/test/__test__/out.txt @@ -0,0 +1,2 @@ +change __test__/file.txt +change __test__/file.txt diff --git a/node_modules/onchange/test/index.js b/node_modules/onchange/test/index.js new file mode 100644 index 0000000000000..221ba46eb683f --- /dev/null +++ b/node_modules/onchange/test/index.js @@ -0,0 +1,45 @@ +var fs = require('fs') +var join = require('path').join +var assert = require('assert') +var onchange = require('../') + +var FIXTURE_DIR = join(__dirname, '__test__') + +// Set up test directory before proceeding. +if (!fs.existsSync(FIXTURE_DIR)) { + fs.mkdirSync(FIXTURE_DIR) +} + +function run (cb) { + var out = fs.createWriteStream(join(FIXTURE_DIR, 'out.txt')) + var count = 0 + + onchange(['__test__/*'], 'node', ['slow.js', '{{event}}', '{{changed}}'], { + cwd: __dirname, + stdout: out + }) + + function write () { + count++ + fs.writeFileSync(join(FIXTURE_DIR, 'file.txt'), Math.random().toString()) + + if (count >= 10) { + cb(null, count) + return + } + + setTimeout(write, 500) + } + + write() +} + +run(function (err, count) { + var result = fs.readFileSync(join(FIXTURE_DIR, 'out.txt'), 'utf8') + var lines = result.trim().split('\n').length + + assert.equal(lines, 2) + assert.equal(count, 10) + + process.exit(0) +}) \ No newline at end of file diff --git a/node_modules/onchange/test/slow.js b/node_modules/onchange/test/slow.js new file mode 100644 index 0000000000000..81da090f1dccc --- /dev/null +++ b/node_modules/onchange/test/slow.js @@ -0,0 +1,9 @@ +require('net').createServer().listen() + +console.log(process.argv[2], process.argv[3]) + +process.on('SIGTERM', function () { + setTimeout(function () { + process.exit(0) + }, 2000) +}) \ No newline at end of file diff --git a/node_modules/parse-glob/LICENSE b/node_modules/parse-glob/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/parse-glob/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/parse-glob/README.md b/node_modules/parse-glob/README.md new file mode 100644 index 0000000000000..000ccd99cb423 --- /dev/null +++ b/node_modules/parse-glob/README.md @@ -0,0 +1,115 @@ +# parse-glob [![NPM version](https://badge.fury.io/js/parse-glob.svg)](http://badge.fury.io/js/parse-glob) [![Build Status](https://travis-ci.org/jonschlinkert/parse-glob.svg)](https://travis-ci.org/jonschlinkert/parse-glob) + +> Parse a glob pattern into an object of tokens. + +**Changes from v1.0.0 to v3.0.4** + +* all path-related properties are now on the `path` object +* all boolean properties are now on the `is` object +* adds `base` property + +See the [properties](#properties) section for details. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i parse-glob --save +``` + +* parses 1,000+ glob patterns in 29ms (2.3 GHz Intel Core i7) +* Extensive [unit tests](./test.js) (more than 1,000 lines), covering wildcards, globstars, character classes, brace patterns, extglobs, dotfiles and other complex patterns. + +See the tests for [hundreds of examples](./test.js). + +## Usage + +```js +var parseGlob = require('parse-glob'); +``` + +**Example** + +```js +parseGlob('a/b/c/**/*.{yml,json}'); +``` + +**Returns:** + +```js +{ orig: 'a/b/c/**/*.{yml,json}', + is: + { glob: true, + negated: false, + extglob: false, + braces: true, + brackets: false, + globstar: true, + dotfile: false, + dotdir: false }, + glob: '**/*.{yml,json}', + base: 'a/b/c', + path: + { dirname: 'a/b/c/**/', + basename: '*.{yml,json}', + filename: '*', + extname: '.{yml,json}', + ext: '{yml,json}' } } +``` + +## Properties + +The object returned by parseGlob has the following properties: + +* `orig`: a copy of the original, unmodified glob pattern +* `is`: an object with boolean information about the glob: + - `glob`: true if the pattern actually a glob pattern + - `negated`: true if it's a negation pattern (`!**/foo.js`) + - `extglob`: true if it has extglobs (`@(foo|bar)`) + - `braces`: true if it has braces (`{1..2}` or `.{txt,md}`) + - `brackets`: true if it has POSIX brackets (`[[:alpha:]]`) + - `globstar`: true if the pattern has a globstar (double star, `**`) + - `dotfile`: true if the pattern should match dotfiles + - `dotdir`: true if the pattern should match dot-directories (like `.git`) +* `glob`: the glob pattern part of the string, if any +* `base`: the non-glob part of the string, if any +* `path`: file path segments + - `dirname`: directory + - `basename`: file name with extension + - `filename`: file name without extension + - `extname`: file extension with dot + - `ext`: file extension without dot + +## Related +* [glob-base](https://www.npmjs.com/package/glob-base): Returns an object with the (non-glob) base path and the actual pattern. | [homepage](https://github.com/jonschlinkert/glob-base) +* [glob-parent](https://www.npmjs.com/package/glob-parent): Strips glob magic from a string to provide the parent path | [homepage](https://github.com/es128/glob-parent) +* [glob-path-regex](https://www.npmjs.com/package/glob-path-regex): Regular expression for matching the parts of glob pattern. | [homepage](https://github.com/regexps/glob-path-regex) +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern. | [homepage](https://github.com/jonschlinkert/is-glob) +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/parse-glob/issues/new). + +## 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 © 2014-2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 22, 2015._ \ No newline at end of file diff --git a/node_modules/parse-glob/index.js b/node_modules/parse-glob/index.js new file mode 100644 index 0000000000000..4ab691afc7d58 --- /dev/null +++ b/node_modules/parse-glob/index.js @@ -0,0 +1,156 @@ +/*! + * parse-glob + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isGlob = require('is-glob'); +var findBase = require('glob-base'); +var extglob = require('is-extglob'); +var dotfile = require('is-dotfile'); + +/** + * Expose `cache` + */ + +var cache = module.exports.cache = {}; + +/** + * Parse a glob pattern into tokens. + * + * When no paths or '**' are in the glob, we use a + * different strategy for parsing the filename, since + * file names can contain braces and other difficult + * patterns. such as: + * + * - `*.{a,b}` + * - `(**|*.js)` + */ + +module.exports = function parseGlob(glob) { + if (cache.hasOwnProperty(glob)) { + return cache[glob]; + } + + var tok = {}; + tok.orig = glob; + tok.is = {}; + + // unescape dots and slashes in braces/brackets + glob = escape(glob); + + var parsed = findBase(glob); + tok.is.glob = parsed.isGlob; + + tok.glob = parsed.glob; + tok.base = parsed.base; + var segs = /([^\/]*)$/.exec(glob); + + tok.path = {}; + tok.path.dirname = ''; + tok.path.basename = segs[1] || ''; + tok.path.dirname = glob.split(tok.path.basename).join('') || ''; + var basename = (tok.path.basename || '').split('.') || ''; + tok.path.filename = basename[0] || ''; + tok.path.extname = basename.slice(1).join('.') || ''; + tok.path.ext = ''; + + if (isGlob(tok.path.dirname) && !tok.path.basename) { + if (!/\/$/.test(tok.glob)) { + tok.path.basename = tok.glob; + } + tok.path.dirname = tok.base; + } + + if (glob.indexOf('/') === -1 && !tok.is.globstar) { + tok.path.dirname = ''; + tok.path.basename = tok.orig; + } + + var dot = tok.path.basename.indexOf('.'); + if (dot !== -1) { + tok.path.filename = tok.path.basename.slice(0, dot); + tok.path.extname = tok.path.basename.slice(dot); + } + + if (tok.path.extname.charAt(0) === '.') { + var exts = tok.path.extname.split('.'); + tok.path.ext = exts[exts.length - 1]; + } + + // unescape dots and slashes in braces/brackets + tok.glob = unescape(tok.glob); + tok.path.dirname = unescape(tok.path.dirname); + tok.path.basename = unescape(tok.path.basename); + tok.path.filename = unescape(tok.path.filename); + tok.path.extname = unescape(tok.path.extname); + + // Booleans + var is = (glob && tok.is.glob); + tok.is.negated = glob && glob.charAt(0) === '!'; + tok.is.extglob = glob && extglob(glob); + tok.is.braces = has(is, glob, '{'); + tok.is.brackets = has(is, glob, '[:'); + tok.is.globstar = has(is, glob, '**'); + tok.is.dotfile = dotfile(tok.path.basename) || dotfile(tok.path.filename); + tok.is.dotdir = dotdir(tok.path.dirname); + return (cache[glob] = tok); +} + +/** + * Returns true if the glob matches dot-directories. + * + * @param {Object} `tok` The tokens object + * @param {Object} `path` The path object + * @return {Object} + */ + +function dotdir(base) { + if (base.indexOf('/.') !== -1) { + return true; + } + if (base.charAt(0) === '.' && base.charAt(1) !== '/') { + return true; + } + return false; +} + +/** + * Returns true if the pattern has the given `ch`aracter(s) + * + * @param {Object} `glob` The glob pattern. + * @param {Object} `ch` The character to test for + * @return {Object} + */ + +function has(is, glob, ch) { + return is && glob.indexOf(ch) !== -1; +} + +/** + * Escape/unescape utils + */ + +function escape(str) { + var re = /\{([^{}]*?)}|\(([^()]*?)\)|\[([^\[\]]*?)\]/g; + return str.replace(re, function (outter, braces, parens, brackets) { + var inner = braces || parens || brackets; + if (!inner) { return outter; } + return outter.split(inner).join(esc(inner)); + }); +} + +function esc(str) { + str = str.split('/').join('__SLASH__'); + str = str.split('.').join('__DOT__'); + return str; +} + +function unescape(str) { + str = str.split('__SLASH__').join('/'); + str = str.split('__DOT__').join('.'); + return str; +} diff --git a/node_modules/parse-glob/package.json b/node_modules/parse-glob/package.json new file mode 100644 index 0000000000000..a4acb5236f01b --- /dev/null +++ b/node_modules/parse-glob/package.json @@ -0,0 +1,62 @@ +{ + "name": "parse-glob", + "description": "Parse a glob pattern into an object of tokens.", + "version": "3.0.4", + "homepage": "https://github.com/jonschlinkert/parse-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/parse-glob", + "bugs": { + "url": "https://github.com/jonschlinkert/parse-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js" + }, + "dependencies": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "devDependencies": { + "browserify": "^9.0.3", + "lodash": "^3.3.1", + "mocha": "*" + }, + "keywords": [ + "glob", + "match", + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ] +} diff --git a/node_modules/parse-json/index.js b/node_modules/parse-json/index.js new file mode 100644 index 0000000000000..04add8ae27353 --- /dev/null +++ b/node_modules/parse-json/index.js @@ -0,0 +1,35 @@ +'use strict'; +var errorEx = require('error-ex'); +var fallback = require('./vendor/parse'); + +var JSONError = errorEx('JSONError', { + fileName: errorEx.append('in %s') +}); + +module.exports = function (x, reviver, filename) { + if (typeof reviver === 'string') { + filename = reviver; + reviver = null; + } + + try { + try { + return JSON.parse(x, reviver); + } catch (err) { + fallback.parse(x, { + mode: 'json', + reviver: reviver + }); + + throw err; + } + } catch (err) { + var jsonErr = new JSONError(err); + + if (filename) { + jsonErr.fileName = filename; + } + + throw jsonErr; + } +}; diff --git a/node_modules/parse-json/license b/node_modules/parse-json/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/parse-json/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/parse-json/package.json b/node_modules/parse-json/package.json new file mode 100644 index 0000000000000..93e3c41ba293f --- /dev/null +++ b/node_modules/parse-json/package.json @@ -0,0 +1,46 @@ +{ + "name": "parse-json", + "version": "2.2.0", + "description": "Parse JSON with more helpful errors", + "license": "MIT", + "repository": "sindresorhus/parse-json", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && node test.js" + }, + "files": [ + "index.js", + "vendor" + ], + "keywords": [ + "parse", + "json", + "graceful", + "error", + "message", + "humanize", + "friendly", + "helpful", + "string", + "str" + ], + "dependencies": { + "error-ex": "^1.2.0" + }, + "devDependencies": { + "ava": "0.0.4", + "xo": "*" + }, + "xo": { + "ignores": [ + "vendor/**" + ] + } +} diff --git a/node_modules/parse-json/readme.md b/node_modules/parse-json/readme.md new file mode 100644 index 0000000000000..ca96e60a69999 --- /dev/null +++ b/node_modules/parse-json/readme.md @@ -0,0 +1,83 @@ +# parse-json [![Build Status](https://travis-ci.org/sindresorhus/parse-json.svg?branch=master)](https://travis-ci.org/sindresorhus/parse-json) + +> Parse JSON with more helpful errors + + +## Install + +``` +$ npm install --save parse-json +``` + + +## Usage + +```js +var parseJson = require('parse-json'); +var json = '{\n\t"foo": true,\n}'; + + +JSON.parse(json); +/* +undefined:3 +} +^ +SyntaxError: Unexpected token } +*/ + + +parseJson(json); +/* +JSONError: Trailing comma in object at 3:1 +} +^ +*/ + + +parseJson(json, 'foo.json'); +/* +JSONError: Trailing comma in object at 3:1 in foo.json +} +^ +*/ + + +// you can also add the filename at a later point +try { + parseJson(json); +} catch (err) { + err.fileName = 'foo.json'; + throw err; +} +/* +JSONError: Trailing comma in object at 3:1 in foo.json +} +^ +*/ +``` + +## API + +### parseJson(input, [reviver], [filename]) + +#### input + +Type: `string` + +#### reviver + +Type: `function` + +Prescribes how the value originally produced by parsing is transformed, before being returned. See [`JSON.parse` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter +) for more. + +#### filename + +Type: `string` + +Filename displayed in the error message. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/parse-json/vendor/parse.js b/node_modules/parse-json/vendor/parse.js new file mode 100644 index 0000000000000..5f9fe998610d0 --- /dev/null +++ b/node_modules/parse-json/vendor/parse.js @@ -0,0 +1,752 @@ +/* + * Author: Alex Kocharin + * GIT: https://github.com/rlidwka/jju + * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/ + */ + +// RTFM: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + +var Uni = require('./unicode') + +function isHexDigit(x) { + return (x >= '0' && x <= '9') + || (x >= 'A' && x <= 'F') + || (x >= 'a' && x <= 'f') +} + +function isOctDigit(x) { + return x >= '0' && x <= '7' +} + +function isDecDigit(x) { + return x >= '0' && x <= '9' +} + +var unescapeMap = { + '\'': '\'', + '"' : '"', + '\\': '\\', + 'b' : '\b', + 'f' : '\f', + 'n' : '\n', + 'r' : '\r', + 't' : '\t', + 'v' : '\v', + '/' : '/', +} + +function formatError(input, msg, position, lineno, column, json5) { + var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1) + , tmppos = position - column - 1 + , srcline = '' + , underline = '' + + var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON + + // output no more than 70 characters before the wrong ones + if (tmppos < position - 70) { + tmppos = position - 70 + } + + while (1) { + var chr = input[++tmppos] + + if (isLineTerminator(chr) || tmppos === input.length) { + if (position >= tmppos) { + // ending line error, so show it after the last char + underline += '^' + } + break + } + srcline += chr + + if (position === tmppos) { + underline += '^' + } else if (position > tmppos) { + underline += input[tmppos] === '\t' ? '\t' : ' ' + } + + // output no more than 78 characters on the string + if (srcline.length > 78) break + } + + return result + '\n' + srcline + '\n' + underline +} + +function parse(input, options) { + // parse as a standard JSON mode + var json5 = !(options.mode === 'json' || options.legacy) + var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON + var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON + + var length = input.length + , lineno = 0 + , linestart = 0 + , position = 0 + , stack = [] + + var tokenStart = function() {} + var tokenEnd = function(v) {return v} + + /* tokenize({ + raw: '...', + type: 'whitespace'|'comment'|'key'|'literal'|'separator'|'newline', + value: 'number'|'string'|'whatever', + path: [...], + }) + */ + if (options._tokenize) { + ;(function() { + var start = null + tokenStart = function() { + if (start !== null) throw Error('internal error, token overlap') + start = position + } + + tokenEnd = function(v, type) { + if (start != position) { + var hash = { + raw: input.substr(start, position-start), + type: type, + stack: stack.slice(0), + } + if (v !== undefined) hash.value = v + options._tokenize.call(null, hash) + } + start = null + return v + } + })() + } + + function fail(msg) { + var column = position - linestart + + if (!msg) { + if (position < length) { + var token = '\'' + + JSON + .stringify(input[position]) + .replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + + '\'' + + if (!msg) msg = 'Unexpected token ' + token + } else { + if (!msg) msg = 'Unexpected end of input' + } + } + + var error = SyntaxError(formatError(input, msg, position, lineno, column, json5)) + error.row = lineno + 1 + error.column = column + 1 + throw error + } + + function newline(chr) { + // account for + if (chr === '\r' && input[position] === '\n') position++ + linestart = position + lineno++ + } + + function parseGeneric() { + var result + + while (position < length) { + tokenStart() + var chr = input[position++] + + if (chr === '"' || (chr === '\'' && json5)) { + return tokenEnd(parseString(chr), 'literal') + + } else if (chr === '{') { + tokenEnd(undefined, 'separator') + return parseObject() + + } else if (chr === '[') { + tokenEnd(undefined, 'separator') + return parseArray() + + } else if (chr === '-' + || chr === '.' + || isDecDigit(chr) + // + number Infinity NaN + || (json5 && (chr === '+' || chr === 'I' || chr === 'N')) + ) { + return tokenEnd(parseNumber(), 'literal') + + } else if (chr === 'n') { + parseKeyword('null') + return tokenEnd(null, 'literal') + + } else if (chr === 't') { + parseKeyword('true') + return tokenEnd(true, 'literal') + + } else if (chr === 'f') { + parseKeyword('false') + return tokenEnd(false, 'literal') + + } else { + position-- + return tokenEnd(undefined) + } + } + } + + function parseKey() { + var result + + while (position < length) { + tokenStart() + var chr = input[position++] + + if (chr === '"' || (chr === '\'' && json5)) { + return tokenEnd(parseString(chr), 'key') + + } else if (chr === '{') { + tokenEnd(undefined, 'separator') + return parseObject() + + } else if (chr === '[') { + tokenEnd(undefined, 'separator') + return parseArray() + + } else if (chr === '.' + || isDecDigit(chr) + ) { + return tokenEnd(parseNumber(true), 'key') + + } else if (json5 + && Uni.isIdentifierStart(chr) || (chr === '\\' && input[position] === 'u')) { + // unicode char or a unicode sequence + var rollback = position - 1 + var result = parseIdentifier() + + if (result === undefined) { + position = rollback + return tokenEnd(undefined) + } else { + return tokenEnd(result, 'key') + } + + } else { + position-- + return tokenEnd(undefined) + } + } + } + + function skipWhiteSpace() { + tokenStart() + while (position < length) { + var chr = input[position++] + + if (isLineTerminator(chr)) { + position-- + tokenEnd(undefined, 'whitespace') + tokenStart() + position++ + newline(chr) + tokenEnd(undefined, 'newline') + tokenStart() + + } else if (isWhiteSpace(chr)) { + // nothing + + } else if (chr === '/' + && json5 + && (input[position] === '/' || input[position] === '*') + ) { + position-- + tokenEnd(undefined, 'whitespace') + tokenStart() + position++ + skipComment(input[position++] === '*') + tokenEnd(undefined, 'comment') + tokenStart() + + } else { + position-- + break + } + } + return tokenEnd(undefined, 'whitespace') + } + + function skipComment(multi) { + while (position < length) { + var chr = input[position++] + + if (isLineTerminator(chr)) { + // LineTerminator is an end of singleline comment + if (!multi) { + // let parent function deal with newline + position-- + return + } + + newline(chr) + + } else if (chr === '*' && multi) { + // end of multiline comment + if (input[position] === '/') { + position++ + return + } + + } else { + // nothing + } + } + + if (multi) { + fail('Unclosed multiline comment') + } + } + + function parseKeyword(keyword) { + // keyword[0] is not checked because it should've checked earlier + var _pos = position + var len = keyword.length + for (var i=1; i= length || keyword[i] != input[position]) { + position = _pos-1 + fail() + } + position++ + } + } + + function parseObject() { + var result = options.null_prototype ? Object.create(null) : {} + , empty_object = {} + , is_non_empty = false + + while (position < length) { + skipWhiteSpace() + var item1 = parseKey() + skipWhiteSpace() + tokenStart() + var chr = input[position++] + tokenEnd(undefined, 'separator') + + if (chr === '}' && item1 === undefined) { + if (!json5 && is_non_empty) { + position-- + fail('Trailing comma in object') + } + return result + + } else if (chr === ':' && item1 !== undefined) { + skipWhiteSpace() + stack.push(item1) + var item2 = parseGeneric() + stack.pop() + + if (item2 === undefined) fail('No value found for key ' + item1) + if (typeof(item1) !== 'string') { + if (!json5 || typeof(item1) !== 'number') { + fail('Wrong key type: ' + item1) + } + } + + if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== 'replace') { + if (options.reserved_keys === 'throw') { + fail('Reserved key: ' + item1) + } else { + // silently ignore it + } + } else { + if (typeof(options.reviver) === 'function') { + item2 = options.reviver.call(null, item1, item2) + } + + if (item2 !== undefined) { + is_non_empty = true + Object.defineProperty(result, item1, { + value: item2, + enumerable: true, + configurable: true, + writable: true, + }) + } + } + + skipWhiteSpace() + + tokenStart() + var chr = input[position++] + tokenEnd(undefined, 'separator') + + if (chr === ',') { + continue + + } else if (chr === '}') { + return result + + } else { + fail() + } + + } else { + position-- + fail() + } + } + + fail() + } + + function parseArray() { + var result = [] + + while (position < length) { + skipWhiteSpace() + stack.push(result.length) + var item = parseGeneric() + stack.pop() + skipWhiteSpace() + tokenStart() + var chr = input[position++] + tokenEnd(undefined, 'separator') + + if (item !== undefined) { + if (typeof(options.reviver) === 'function') { + item = options.reviver.call(null, String(result.length), item) + } + if (item === undefined) { + result.length++ + item = true // hack for check below, not included into result + } else { + result.push(item) + } + } + + if (chr === ',') { + if (item === undefined) { + fail('Elisions are not supported') + } + + } else if (chr === ']') { + if (!json5 && item === undefined && result.length) { + position-- + fail('Trailing comma in array') + } + return result + + } else { + position-- + fail() + } + } + } + + function parseNumber() { + // rewind because we don't know first char + position-- + + var start = position + , chr = input[position++] + , t + + var to_num = function(is_octal) { + var str = input.substr(start, position - start) + + if (is_octal) { + var result = parseInt(str.replace(/^0o?/, ''), 8) + } else { + var result = Number(str) + } + + if (Number.isNaN(result)) { + position-- + fail('Bad numeric literal - "' + input.substr(start, position - start + 1) + '"') + } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) { + // additional restrictions imposed by json + position-- + fail('Non-json numeric literal - "' + input.substr(start, position - start + 1) + '"') + } else { + return result + } + } + + // ex: -5982475.249875e+29384 + // ^ skipping this + if (chr === '-' || (chr === '+' && json5)) chr = input[position++] + + if (chr === 'N' && json5) { + parseKeyword('NaN') + return NaN + } + + if (chr === 'I' && json5) { + parseKeyword('Infinity') + + // returning +inf or -inf + return to_num() + } + + if (chr >= '1' && chr <= '9') { + // ex: -5982475.249875e+29384 + // ^^^ skipping these + while (position < length && isDecDigit(input[position])) position++ + chr = input[position++] + } + + // special case for leading zero: 0.123456 + if (chr === '0') { + chr = input[position++] + + // new syntax, "0o777" old syntax, "0777" + var is_octal = chr === 'o' || chr === 'O' || isOctDigit(chr) + var is_hex = chr === 'x' || chr === 'X' + + if (json5 && (is_octal || is_hex)) { + while (position < length + && (is_hex ? isHexDigit : isOctDigit)( input[position] ) + ) position++ + + var sign = 1 + if (input[start] === '-') { + sign = -1 + start++ + } else if (input[start] === '+') { + start++ + } + + return sign * to_num(is_octal) + } + } + + if (chr === '.') { + // ex: -5982475.249875e+29384 + // ^^^ skipping these + while (position < length && isDecDigit(input[position])) position++ + chr = input[position++] + } + + if (chr === 'e' || chr === 'E') { + chr = input[position++] + if (chr === '-' || chr === '+') position++ + // ex: -5982475.249875e+29384 + // ^^^ skipping these + while (position < length && isDecDigit(input[position])) position++ + chr = input[position++] + } + + // we have char in the buffer, so count for it + position-- + return to_num() + } + + function parseIdentifier() { + // rewind because we don't know first char + position-- + + var result = '' + + while (position < length) { + var chr = input[position++] + + if (chr === '\\' + && input[position] === 'u' + && isHexDigit(input[position+1]) + && isHexDigit(input[position+2]) + && isHexDigit(input[position+3]) + && isHexDigit(input[position+4]) + ) { + // UnicodeEscapeSequence + chr = String.fromCharCode(parseInt(input.substr(position+1, 4), 16)) + position += 5 + } + + if (result.length) { + // identifier started + if (Uni.isIdentifierPart(chr)) { + result += chr + } else { + position-- + return result + } + + } else { + if (Uni.isIdentifierStart(chr)) { + result += chr + } else { + return undefined + } + } + } + + fail() + } + + function parseString(endChar) { + // 7.8.4 of ES262 spec + var result = '' + + while (position < length) { + var chr = input[position++] + + if (chr === endChar) { + return result + + } else if (chr === '\\') { + if (position >= length) fail() + chr = input[position++] + + if (unescapeMap[chr] && (json5 || (chr != 'v' && chr != "'"))) { + result += unescapeMap[chr] + + } else if (json5 && isLineTerminator(chr)) { + // line continuation + newline(chr) + + } else if (chr === 'u' || (chr === 'x' && json5)) { + // unicode/character escape sequence + var off = chr === 'u' ? 4 : 2 + + // validation for \uXXXX + for (var i=0; i= length) fail() + if (!isHexDigit(input[position])) fail('Bad escape sequence') + position++ + } + + result += String.fromCharCode(parseInt(input.substr(position-off, off), 16)) + } else if (json5 && isOctDigit(chr)) { + if (chr < '4' && isOctDigit(input[position]) && isOctDigit(input[position+1])) { + // three-digit octal + var digits = 3 + } else if (isOctDigit(input[position])) { + // two-digit octal + var digits = 2 + } else { + var digits = 1 + } + position += digits - 1 + result += String.fromCharCode(parseInt(input.substr(position-digits, digits), 8)) + /*if (!isOctDigit(input[position])) { + // \0 is allowed still + result += '\0' + } else { + fail('Octal literals are not supported') + }*/ + + } else if (json5) { + // \X -> x + result += chr + + } else { + position-- + fail() + } + + } else if (isLineTerminator(chr)) { + fail() + + } else { + if (!json5 && chr.charCodeAt(0) < 32) { + position-- + fail('Unexpected control character') + } + + // SourceCharacter but not one of " or \ or LineTerminator + result += chr + } + } + + fail() + } + + skipWhiteSpace() + var return_value = parseGeneric() + if (return_value !== undefined || position < length) { + skipWhiteSpace() + + if (position >= length) { + if (typeof(options.reviver) === 'function') { + return_value = options.reviver.call(null, '', return_value) + } + return return_value + } else { + fail() + } + + } else { + if (position) { + fail('No data, only a whitespace') + } else { + fail('No data, empty input') + } + } +} + +/* + * parse(text, options) + * or + * parse(text, reviver) + * + * where: + * text - string + * options - object + * reviver - function + */ +module.exports.parse = function parseJSON(input, options) { + // support legacy functions + if (typeof(options) === 'function') { + options = { + reviver: options + } + } + + if (input === undefined) { + // parse(stringify(x)) should be equal x + // with JSON functions it is not 'cause of undefined + // so we're fixing it + return undefined + } + + // JSON.parse compat + if (typeof(input) !== 'string') input = String(input) + if (options == null) options = {} + if (options.reserved_keys == null) options.reserved_keys = 'ignore' + + if (options.reserved_keys === 'throw' || options.reserved_keys === 'ignore') { + if (options.null_prototype == null) { + options.null_prototype = true + } + } + + try { + return parse(input, options) + } catch(err) { + // jju is a recursive parser, so JSON.parse("{{{{{{{") could blow up the stack + // + // this catch is used to skip all those internal calls + if (err instanceof SyntaxError && err.row != null && err.column != null) { + var old_err = err + err = SyntaxError(old_err.message) + err.column = old_err.column + err.row = old_err.row + } + throw err + } +} + +module.exports.tokenize = function tokenizeJSON(input, options) { + if (options == null) options = {} + + options._tokenize = function(smth) { + if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack) + tokens.push(smth) + } + + var tokens = [] + tokens.data = module.exports.parse(input, options) + return tokens +} + diff --git a/node_modules/parse-json/vendor/unicode.js b/node_modules/parse-json/vendor/unicode.js new file mode 100644 index 0000000000000..1a29143c2d6b1 --- /dev/null +++ b/node_modules/parse-json/vendor/unicode.js @@ -0,0 +1,71 @@ + +// This is autogenerated with esprima tools, see: +// https://github.com/ariya/esprima/blob/master/esprima.js +// +// PS: oh God, I hate Unicode + +// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart: + +var Uni = module.exports + +module.exports.isWhiteSpace = function isWhiteSpace(x) { + // section 7.2, table 2 + return x === '\u0020' + || x === '\u00A0' + || x === '\uFEFF' // <-- this is not a Unicode WS, only a JS one + || (x >= '\u0009' && x <= '\u000D') // 9 A B C D + + // + whitespace characters from unicode, category Zs + || x === '\u1680' + || x === '\u180E' + || (x >= '\u2000' && x <= '\u200A') // 0 1 2 3 4 5 6 7 8 9 A + || x === '\u2028' + || x === '\u2029' + || x === '\u202F' + || x === '\u205F' + || x === '\u3000' +} + +module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) { + return x === '\u0020' + || x === '\u0009' + || x === '\u000A' + || x === '\u000D' +} + +module.exports.isLineTerminator = function isLineTerminator(x) { + // ok, here is the part when JSON is wrong + // section 7.3, table 3 + return x === '\u000A' + || x === '\u000D' + || x === '\u2028' + || x === '\u2029' +} + +module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) { + return x === '\u000A' + || x === '\u000D' +} + +module.exports.isIdentifierStart = function isIdentifierStart(x) { + return x === '$' + || x === '_' + || (x >= 'A' && x <= 'Z') + || (x >= 'a' && x <= 'z') + || (x >= '\u0080' && Uni.NonAsciiIdentifierStart.test(x)) +} + +module.exports.isIdentifierPart = function isIdentifierPart(x) { + return x === '$' + || x === '_' + || (x >= 'A' && x <= 'Z') + || (x >= 'a' && x <= 'z') + || (x >= '0' && x <= '9') // <-- addition to Start + || (x >= '\u0080' && Uni.NonAsciiIdentifierPart.test(x)) +} + +module.exports.NonAsciiIdentifierStart = /[\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]/ + +// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart: + +module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ diff --git a/node_modules/pascalcase/LICENSE b/node_modules/pascalcase/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/pascalcase/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/pascalcase/README.md b/node_modules/pascalcase/README.md new file mode 100644 index 0000000000000..fa3fd00fe9ced --- /dev/null +++ b/node_modules/pascalcase/README.md @@ -0,0 +1,80 @@ +# pascalcase [![NPM version](https://badge.fury.io/js/pascalcase.svg)](http://badge.fury.io/js/pascalcase) + +> Convert a string to pascal-case. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i pascalcase --save +``` + +## Usage + +```js +var pascalcase = require('pascalcase'); + +pascalcase('a'); +//=> 'A' + +pascalcase('foo bar baz'); +//=> 'FooBarBaz' + +pascalcase('foo_bar-baz'); +//=> 'FooBarBaz' + +pascalcase('foo.bar.baz'); +//=> 'FooBarBaz' + +pascalcase('foo/bar/baz'); +//=> 'FooBarBaz' + +pascalcase('foo[bar)baz'); +//=> 'FooBarBaz' + +pascalcase('#foo+bar*baz'); +//=> 'FooBarBaz' + +pascalcase('$foo~bar`baz'); +//=> 'FooBarBaz' + +pascalcase('_foo_bar-baz-'); +//=> 'FooBarBaz' +``` + +## Related projects + +* [justified](https://github.com/jonschlinkert/justified): Wrap words to a specified length and justified the text. +* [pad-left](https://github.com/jonschlinkert/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. +* [pad-right](https://github.com/jonschlinkert/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. + +## 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/pascalcase/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 19, 2015._ \ No newline at end of file diff --git a/node_modules/pascalcase/index.js b/node_modules/pascalcase/index.js new file mode 100644 index 0000000000000..7e8159ce4eaf1 --- /dev/null +++ b/node_modules/pascalcase/index.js @@ -0,0 +1,21 @@ +/*! + * pascalcase + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +function pascalcase(str) { + if (typeof str !== 'string') { + throw new TypeError('expected a string.'); + } + str = str.replace(/([A-Z])/g, ' $1'); + if (str.length === 1) { return str.toUpperCase(); } + str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); + str = str.charAt(0).toUpperCase() + str.slice(1); + return str.replace(/[\W_]+(\w|$)/g, function (_, ch) { + return ch.toUpperCase(); + }); +} + +module.exports = pascalcase; diff --git a/node_modules/pascalcase/package.json b/node_modules/pascalcase/package.json new file mode 100644 index 0000000000000..0576d1397df1a --- /dev/null +++ b/node_modules/pascalcase/package.json @@ -0,0 +1,46 @@ +{ + "name": "pascalcase", + "description": "Convert a string to pascal-case.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/pascalcase", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/pascalcase", + "bugs": { + "url": "https://github.com/jonschlinkert/pascalcase/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "camelcase", + "case", + "casing", + "pascal", + "pascal-case", + "pascalcase", + "string" + ], + "verb": { + "related": { + "list": [ + "pad-left", + "pad-right", + "word-wrap", + "repeat-string", + "justified" + ] + } + } +} \ No newline at end of file diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js new file mode 100644 index 0000000000000..22aa6c3560799 --- /dev/null +++ b/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/node_modules/path-is-absolute/license b/node_modules/path-is-absolute/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json new file mode 100644 index 0000000000000..91196d5e9c133 --- /dev/null +++ b/node_modules/path-is-absolute/package.json @@ -0,0 +1,43 @@ +{ + "name": "path-is-absolute", + "version": "1.0.1", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": "sindresorhus/path-is-absolute", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "devDependencies": { + "xo": "^0.16.0" + } +} diff --git a/node_modules/path-is-absolute/readme.md b/node_modules/path-is-absolute/readme.md new file mode 100644 index 0000000000000..8dbdf5fcb775e --- /dev/null +++ b/node_modules/path-is-absolute/readme.md @@ -0,0 +1,59 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +const pathIsAbsolute = require('path-is-absolute'); + +// Running on Linux +pathIsAbsolute('/home/foo'); +//=> true +pathIsAbsolute('C:/Users/foo'); +//=> false + +// Running on Windows +pathIsAbsolute('C:/Users/foo'); +//=> true +pathIsAbsolute('/home/foo'); +//=> false + +// Running on any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +pathIsAbsolute.posix('C:/Users/foo'); +//=> false +pathIsAbsolute.win32('C:/Users/foo'); +//=> true +pathIsAbsolute.win32('/home/foo'); +//=> false +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +POSIX specific version. + +### pathIsAbsolute.win32(path) + +Windows specific version. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-parse/LICENSE b/node_modules/path-parse/LICENSE new file mode 100644 index 0000000000000..810f3dbea83b5 --- /dev/null +++ b/node_modules/path-parse/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Javier Blanco + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/path-parse/README.md b/node_modules/path-parse/README.md new file mode 100644 index 0000000000000..05097f86aef36 --- /dev/null +++ b/node_modules/path-parse/README.md @@ -0,0 +1,42 @@ +# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse) + +> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com). + +## Install + +``` +$ npm install --save path-parse +``` + +## Usage + +```js +var pathParse = require('path-parse'); + +pathParse('/home/user/dir/file.txt'); +//=> { +// root : "/", +// dir : "/home/user/dir", +// base : "file.txt", +// ext : ".txt", +// name : "file" +// } +``` + +## API + +See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs. + +### pathParse(path) + +### pathParse.posix(path) + +The Posix specific version. + +### pathParse.win32(path) + +The Windows specific version. + +## License + +MIT © [Javier Blanco](http://jbgutierrez.info) diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js new file mode 100644 index 0000000000000..f062d0a23e629 --- /dev/null +++ b/node_modules/path-parse/index.js @@ -0,0 +1,75 @@ +'use strict'; + +var isWindows = process.platform === 'win32'; + +// Regex to split a windows path into into [dir, root, basename, name, ext] +var splitWindowsRe = + /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; + +var win32 = {}; + +function win32SplitPath(filename) { + return splitWindowsRe.exec(filename).slice(1); +} + +win32.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = win32SplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + return { + root: allParts[1], + dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3] + }; +}; + + + +// Split a filename into [dir, root, basename, name, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; +var posix = {}; + + +function posixSplitPath(filename) { + return splitPathRe.exec(filename).slice(1); +} + + +posix.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = posixSplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + return { + root: allParts[1], + dir: allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3], + }; +}; + + +if (isWindows) + module.exports = win32.parse; +else /* posix */ + module.exports = posix.parse; + +module.exports.posix = posix.parse; +module.exports.win32 = win32.parse; diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json new file mode 100644 index 0000000000000..36c23f84e7063 --- /dev/null +++ b/node_modules/path-parse/package.json @@ -0,0 +1,33 @@ +{ + "name": "path-parse", + "version": "1.0.7", + "description": "Node.js path.parse() ponyfill", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/jbgutierrez/path-parse.git" + }, + "keywords": [ + "path", + "paths", + "file", + "dir", + "parse", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim" + ], + "author": "Javier Blanco ", + "license": "MIT", + "bugs": { + "url": "https://github.com/jbgutierrez/path-parse/issues" + }, + "homepage": "https://github.com/jbgutierrez/path-parse#readme" +} diff --git a/node_modules/path-type/index.js b/node_modules/path-type/index.js new file mode 100644 index 0000000000000..207a1d19cc5eb --- /dev/null +++ b/node_modules/path-type/index.js @@ -0,0 +1,29 @@ +'use strict'; +var fs = require('graceful-fs'); +var Promise = require('pinkie-promise'); +var pify = require('pify'); + +function type(fn, fn2, fp) { + if (typeof fp !== 'string') { + return Promise.reject(new TypeError('Expected a string')); + } + + return pify(fs[fn], Promise)(fp).then(function (stats) { + return stats[fn2](); + }); +} + +function typeSync(fn, fn2, fp) { + if (typeof fp !== 'string') { + throw new TypeError('Expected a string'); + } + + return fs[fn](fp)[fn2](); +} + +exports.file = type.bind(null, 'stat', 'isFile'); +exports.dir = type.bind(null, 'stat', 'isDirectory'); +exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink'); +exports.fileSync = typeSync.bind(null, 'statSync', 'isFile'); +exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory'); +exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); diff --git a/node_modules/path-type/license b/node_modules/path-type/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/path-type/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/path-type/package.json b/node_modules/path-type/package.json new file mode 100644 index 0000000000000..6e54f69bb7ea5 --- /dev/null +++ b/node_modules/path-type/package.json @@ -0,0 +1,52 @@ +{ + "name": "path-type", + "version": "1.1.0", + "description": "Check if a path is a file, directory, or symlink", + "license": "MIT", + "repository": "sindresorhus/path-type", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "fs", + "type", + "is", + "check", + "directory", + "dir", + "file", + "filepath", + "symlink", + "symbolic", + "link", + "stat", + "stats", + "filesystem" + ], + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/path-type/readme.md b/node_modules/path-type/readme.md new file mode 100644 index 0000000000000..eac12d609ed3f --- /dev/null +++ b/node_modules/path-type/readme.md @@ -0,0 +1,42 @@ +# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type) + +> Check if a path is a file, directory, or symlink + + +## Install + +``` +$ npm install --save path-type +``` + + +## Usage + +```js +var pathType = require('path-type'); + +pathType.file('package.json').then(function (isFile) { + console.log(isFile); + //=> true +}) +``` + + +## API + +### .file(path) +### .dir(path) +### .symlink(path) + +Returns a promise that resolves to a boolean of whether the path is the checked type. + +### .fileSync(path) +### .dirSync(path) +### .symlinkSync(path) + +Returns a boolean of whether the path is the checked type. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/pause-stream/.npmignore b/node_modules/pause-stream/.npmignore new file mode 100644 index 0000000000000..13abef4f58898 --- /dev/null +++ b/node_modules/pause-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/pause-stream/LICENSE b/node_modules/pause-stream/LICENSE new file mode 100644 index 0000000000000..6a477d4c24c0d --- /dev/null +++ b/node_modules/pause-stream/LICENSE @@ -0,0 +1,231 @@ +Dual Licensed MIT and Apache 2 + +The MIT License + +Copyright (c) 2013 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. + + + ----------------------------------------------------------------------- + + 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 (c) 2013 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. \ No newline at end of file diff --git a/node_modules/pause-stream/index.js b/node_modules/pause-stream/index.js new file mode 100644 index 0000000000000..0e0bf96bbda7c --- /dev/null +++ b/node_modules/pause-stream/index.js @@ -0,0 +1,3 @@ +//through@2 handles this by default! +module.exports = require('through') + diff --git a/node_modules/pause-stream/package.json b/node_modules/pause-stream/package.json new file mode 100644 index 0000000000000..2a22646151d1a --- /dev/null +++ b/node_modules/pause-stream/package.json @@ -0,0 +1,35 @@ +{ + "name": "pause-stream", + "version": "0.0.11", + "description": "a ThroughStream that strictly buffers all readable events when paused.", + "main": "index.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "stream-tester": "0.0.2", + "stream-spec": "~0.2.0" + }, + "scripts": { + "test": "node test/index.js && node test/pause-end.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/pause-stream.git" + }, + "keywords": [ + "stream", + "pipe", + "pause", + "drain", + "buffer" + ], + "author": "Dominic Tarr (dominictarr.com)", + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } +} diff --git a/node_modules/pause-stream/readme.markdown b/node_modules/pause-stream/readme.markdown new file mode 100644 index 0000000000000..2366939161dff --- /dev/null +++ b/node_modules/pause-stream/readme.markdown @@ -0,0 +1,29 @@ +# PauseStream + +This is a `Stream` that will strictly buffer when paused. +Connect it to anything you need buffered. + +``` js + var ps = require('pause-stream')(); + + badlyBehavedStream.pipe(ps.pause()) + + aLittleLater(function (err, data) { + ps.pipe(createAnotherStream(data)) + ps.resume() + }) +``` + +`PauseStream` will buffer whenever paused. +it will buffer when yau have called `pause` manually. +but also when it's downstream `dest.write()===false`. +it will attempt to drain the buffer when you call resume +or the downstream emits `'drain'` + +`PauseStream` is tested using [stream-spec](https://github.com/dominictarr/stream-spec) +and [stream-tester](https://github.com/dominictarr/stream-tester) + +This is now the default case of +[through](https://github.com/dominictarr/through) + +https://github.com/dominictarr/pause-stream/commit/4a6fe3dc2c11091b1efbfde912e0473719ed9cc0 diff --git a/node_modules/pause-stream/test/index.js b/node_modules/pause-stream/test/index.js new file mode 100644 index 0000000000000..db8778dac631b --- /dev/null +++ b/node_modules/pause-stream/test/index.js @@ -0,0 +1,17 @@ +var spec = require('stream-spec') +var tester = require('stream-tester') +var ps = require('..')() + +spec(ps) + .through({strict: false}) + .validateOnExit() + +var master = tester.createConsistent + +tester.createRandomStream(1000) //1k random numbers + .pipe(master = tester.createConsistentStream()) + .pipe(tester.createUnpauseStream()) + .pipe(ps) + .pipe(tester.createPauseStream()) + .pipe(master.createSlave()) + diff --git a/node_modules/pause-stream/test/pause-end.js b/node_modules/pause-stream/test/pause-end.js new file mode 100644 index 0000000000000..a6c27ef19817c --- /dev/null +++ b/node_modules/pause-stream/test/pause-end.js @@ -0,0 +1,33 @@ + +var pause = require('..') +var assert = require('assert') + +var ps = pause() +var read = [], ended = false + +ps.on('data', function (i) { + read.push(i) +}) + +ps.on('end', function () { + ended = true +}) + +assert.deepEqual(read, []) + +ps.write(0) +ps.write(1) +ps.write(2) + +assert.deepEqual(read, [0, 1, 2]) + +ps.pause() + +assert.deepEqual(read, [0, 1, 2]) + +ps.end() +assert.equal(ended, false) +ps.resume() +assert.equal(ended, true) + + diff --git a/node_modules/pify/index.js b/node_modules/pify/index.js new file mode 100644 index 0000000000000..7c720ebee8872 --- /dev/null +++ b/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/pify/license b/node_modules/pify/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/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/pify/package.json b/node_modules/pify/package.json new file mode 100644 index 0000000000000..311d1982e074f --- /dev/null +++ b/node_modules/pify/package.json @@ -0,0 +1,48 @@ +{ + "name": "pify", + "version": "2.3.0", + "description": "Promisify a callback-style function", + "license": "MIT", + "repository": "sindresorhus/pify", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava && npm run optimization-test", + "optimization-test": "node --allow-natives-syntax optimization-test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "promises", + "promisify", + "denodify", + "denodeify", + "callback", + "cb", + "node", + "then", + "thenify", + "convert", + "transform", + "wrap", + "wrapper", + "bind", + "to", + "async", + "es2015" + ], + "devDependencies": { + "ava": "*", + "pinkie-promise": "^1.0.0", + "v8-natives": "0.0.2", + "xo": "*" + } +} diff --git a/node_modules/pify/readme.md b/node_modules/pify/readme.md new file mode 100644 index 0000000000000..c79ca8bf64392 --- /dev/null +++ b/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/pinkie-promise/index.js b/node_modules/pinkie-promise/index.js new file mode 100644 index 0000000000000..777377a1f777b --- /dev/null +++ b/node_modules/pinkie-promise/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = typeof Promise === 'function' ? Promise : require('pinkie'); diff --git a/node_modules/pinkie-promise/license b/node_modules/pinkie-promise/license new file mode 100644 index 0000000000000..1aeb74fd25e17 --- /dev/null +++ b/node_modules/pinkie-promise/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/pinkie-promise/package.json b/node_modules/pinkie-promise/package.json new file mode 100644 index 0000000000000..3515f8ff345d1 --- /dev/null +++ b/node_modules/pinkie-promise/package.json @@ -0,0 +1,35 @@ +{ + "name": "pinkie-promise", + "version": "2.0.1", + "description": "ES2015 Promise ponyfill", + "license": "MIT", + "repository": "floatdrop/pinkie-promise", + "author": { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "promises", + "es2015", + "es6", + "polyfill", + "ponyfill" + ], + "dependencies": { + "pinkie": "^2.0.0" + }, + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/pinkie-promise/readme.md b/node_modules/pinkie-promise/readme.md new file mode 100644 index 0000000000000..78477f4297d67 --- /dev/null +++ b/node_modules/pinkie-promise/readme.md @@ -0,0 +1,28 @@ +# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise) + +> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill + +Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill. + +## Install + +``` +$ npm install --save pinkie-promise +``` + +## Usage + +```js +var Promise = require('pinkie-promise'); + +new Promise(function (resolve) { resolve('unicorns'); }); +//=> Promise { 'unicorns' } +``` + +## Related + +- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function + +## License + +MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/pinkie/index.js b/node_modules/pinkie/index.js new file mode 100644 index 0000000000000..14ce1bfe3d491 --- /dev/null +++ b/node_modules/pinkie/index.js @@ -0,0 +1,292 @@ +'use strict'; + +var PENDING = 'pending'; +var SETTLED = 'settled'; +var FULFILLED = 'fulfilled'; +var REJECTED = 'rejected'; +var NOOP = function () {}; +var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function'; + +var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; +var asyncQueue = []; +var asyncTimer; + +function asyncFlush() { + // run promise callbacks + for (var i = 0; i < asyncQueue.length; i++) { + asyncQueue[i][0](asyncQueue[i][1]); + } + + // reset async asyncQueue + asyncQueue = []; + asyncTimer = false; +} + +function asyncCall(callback, arg) { + asyncQueue.push([callback, arg]); + + if (!asyncTimer) { + asyncTimer = true; + asyncSetTimer(asyncFlush, 0); + } +} + +function invokeResolver(resolver, promise) { + function resolvePromise(value) { + resolve(promise, value); + } + + function rejectPromise(reason) { + reject(promise, reason); + } + + try { + resolver(resolvePromise, rejectPromise); + } catch (e) { + rejectPromise(e); + } +} + +function invokeCallback(subscriber) { + var owner = subscriber.owner; + var settled = owner._state; + var value = owner._data; + var callback = subscriber[settled]; + var promise = subscriber.then; + + if (typeof callback === 'function') { + settled = FULFILLED; + try { + value = callback(value); + } catch (e) { + reject(promise, e); + } + } + + if (!handleThenable(promise, value)) { + if (settled === FULFILLED) { + resolve(promise, value); + } + + if (settled === REJECTED) { + reject(promise, value); + } + } +} + +function handleThenable(promise, value) { + var resolved; + + try { + if (promise === value) { + throw new TypeError('A promises callback cannot return that same promise.'); + } + + if (value && (typeof value === 'function' || typeof value === 'object')) { + // then should be retrieved only once + var then = value.then; + + if (typeof then === 'function') { + then.call(value, function (val) { + if (!resolved) { + resolved = true; + + if (value === val) { + fulfill(promise, val); + } else { + resolve(promise, val); + } + } + }, function (reason) { + if (!resolved) { + resolved = true; + + reject(promise, reason); + } + }); + + return true; + } + } + } catch (e) { + if (!resolved) { + reject(promise, e); + } + + return true; + } + + return false; +} + +function resolve(promise, value) { + if (promise === value || !handleThenable(promise, value)) { + fulfill(promise, value); + } +} + +function fulfill(promise, value) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = value; + + asyncCall(publishFulfillment, promise); + } +} + +function reject(promise, reason) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = reason; + + asyncCall(publishRejection, promise); + } +} + +function publish(promise) { + promise._then = promise._then.forEach(invokeCallback); +} + +function publishFulfillment(promise) { + promise._state = FULFILLED; + publish(promise); +} + +function publishRejection(promise) { + promise._state = REJECTED; + publish(promise); + if (!promise._handled && isNode) { + global.process.emit('unhandledRejection', promise._data, promise); + } +} + +function notifyRejectionHandled(promise) { + global.process.emit('rejectionHandled', promise); +} + +/** + * @class + */ +function Promise(resolver) { + if (typeof resolver !== 'function') { + throw new TypeError('Promise resolver ' + resolver + ' is not a function'); + } + + if (this instanceof Promise === false) { + throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); + } + + this._then = []; + + invokeResolver(resolver, this); +} + +Promise.prototype = { + constructor: Promise, + + _state: PENDING, + _then: null, + _data: undefined, + _handled: false, + + then: function (onFulfillment, onRejection) { + var subscriber = { + owner: this, + then: new this.constructor(NOOP), + fulfilled: onFulfillment, + rejected: onRejection + }; + + if ((onRejection || onFulfillment) && !this._handled) { + this._handled = true; + if (this._state === REJECTED && isNode) { + asyncCall(notifyRejectionHandled, this); + } + } + + if (this._state === FULFILLED || this._state === REJECTED) { + // already resolved, call callback async + asyncCall(invokeCallback, subscriber); + } else { + // subscribe + this._then.push(subscriber); + } + + return subscriber.then; + }, + + catch: function (onRejection) { + return this.then(null, onRejection); + } +}; + +Promise.all = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.all().'); + } + + return new Promise(function (resolve, reject) { + var results = []; + var remaining = 0; + + function resolver(index) { + remaining++; + return function (value) { + results[index] = value; + if (!--remaining) { + resolve(results); + } + }; + } + + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolver(i), reject); + } else { + results[i] = promise; + } + } + + if (!remaining) { + resolve(results); + } + }); +}; + +Promise.race = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.race().'); + } + + return new Promise(function (resolve, reject) { + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolve, reject); + } else { + resolve(promise); + } + } + }); +}; + +Promise.resolve = function (value) { + if (value && typeof value === 'object' && value.constructor === Promise) { + return value; + } + + return new Promise(function (resolve) { + resolve(value); + }); +}; + +Promise.reject = function (reason) { + return new Promise(function (resolve, reject) { + reject(reason); + }); +}; + +module.exports = Promise; diff --git a/node_modules/pinkie/license b/node_modules/pinkie/license new file mode 100644 index 0000000000000..1aeb74fd25e17 --- /dev/null +++ b/node_modules/pinkie/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/pinkie/package.json b/node_modules/pinkie/package.json new file mode 100644 index 0000000000000..cb9057b81564a --- /dev/null +++ b/node_modules/pinkie/package.json @@ -0,0 +1,36 @@ +{ + "name": "pinkie", + "version": "2.0.4", + "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", + "license": "MIT", + "repository": "floatdrop/pinkie", + "author": { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && nyc mocha", + "coverage": "nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "promises", + "es2015", + "es6" + ], + "devDependencies": { + "core-assert": "^0.1.1", + "coveralls": "^2.11.4", + "mocha": "*", + "nyc": "^3.2.2", + "promises-aplus-tests": "*", + "xo": "^0.10.1" + } +} diff --git a/node_modules/pinkie/readme.md b/node_modules/pinkie/readme.md new file mode 100644 index 0000000000000..1565f95889661 --- /dev/null +++ b/node_modules/pinkie/readme.md @@ -0,0 +1,83 @@ +

+
+ pinkie +
+
+

+ +> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation + +[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master) + +There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality. + +This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though). + + +## Install + +``` +$ npm install --save pinkie +``` + + +## Usage + +```js +var fs = require('fs'); +var Promise = require('pinkie'); + +new Promise(function (resolve, reject) { + fs.readFile('foo.json', 'utf8', function (err, data) { + if (err) { + reject(err); + return; + } + + resolve(data); + }); +}); +//=> Promise +``` + + +### API + +`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot: + +#### new Promise(executor) + +Returns new instance of `Promise`. + +##### executor + +*Required* +Type: `function` + +Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it. + +#### pinkie.all(promises) + +Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved. + +#### pinkie.race(promises) + +Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise. + +#### pinkie.reject(reason) + +Returns a Promise object that is rejected with the given `reason`. + +#### pinkie.resolve(value) + +Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`. + + +## Related + +- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module + + +## License + +MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/posix-character-classes/LICENSE b/node_modules/posix-character-classes/LICENSE new file mode 100644 index 0000000000000..b11cb7968e5bd --- /dev/null +++ b/node_modules/posix-character-classes/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/posix-character-classes/README.md b/node_modules/posix-character-classes/README.md new file mode 100644 index 0000000000000..894ae237a3acb --- /dev/null +++ b/node_modules/posix-character-classes/README.md @@ -0,0 +1,103 @@ +# posix-character-classes [![NPM version](https://img.shields.io/npm/v/posix-character-classes.svg?style=flat)](https://www.npmjs.com/package/posix-character-classes) [![NPM monthly downloads](https://img.shields.io/npm/dm/posix-character-classes.svg?style=flat)](https://npmjs.org/package/posix-character-classes) [![NPM total downloads](https://img.shields.io/npm/dt/posix-character-classes.svg?style=flat)](https://npmjs.org/package/posix-character-classes) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/posix-character-classes.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/posix-character-classes) + +> POSIX character classes for creating regular expressions. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save posix-character-classes +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add posix-character-classes +``` + +## Usage + +```js +var posix = require('posix-character-classes'); +console.log(posix.alpha); +//=> 'A-Za-z' +``` + +## POSIX Character classes + +The POSIX standard supports the following classes or categories of charactersh (note that classes must be defined within brackets)[1]: + +| **POSIX class** | **Equivalent to** | **Matches** | +| --- | --- | --- | +| `[:alnum:]` | `[A-Za-z0-9]` | digits, uppercase and lowercase letters | +| `[:alpha:]` | `[A-Za-z]` | upper- and lowercase letters | +| `[:ascii:]` | `[\x00-\x7F]` | ASCII characters | +| `[:blank:]` | `[ \t]` | space and TAB characters only | +| `[:cntrl:]` | `[\x00-\x1F\x7F]` | Control characters | +| `[:digit:]` | `[0-9]` | digits | +| `[:graph:]` | `[^[:cntrl:]]` | graphic characters (all characters which have graphic representation) | +| `[:lower:]` | `[a-z]` | lowercase letters | +| `[:print:]` | `[[:graph] ]` | graphic characters and space | +| `[:punct:]` | ``[-!"#$%&'()*+,./:;<=>?@[]^_`{ | }~]`` | all punctuation characters (all graphic characters except letters and digits) | +| `[:space:]` | `[ \t\n\r\f\v]` | all blank (whitespace) characters, including spaces, tabs, new lines, carriage returns, form feeds, and vertical tabs | +| `[:upper:]` | `[A-Z]` | uppercase letters | +| `[:word:]` | `[A-Za-z0-9_]` | word characters | +| `[:xdigit:]` | `[0-9A-Fa-f]` | hexadecimal digits | + +## Examples + +* `a[[:digit:]]b` matches `a0b`, `a1b`, ..., `a9b`. +* `a[:digit:]b` is invalid, character classes must be enclosed in brackets +* `[[:digit:]abc]` matches any digit, as well as `a`, `b`, and `c`. +* `[abc[:digit:]]` is the same as the previous, matching any digit, as well as `a`, `b`, and `c` +* `[^ABZ[:lower:]]` matches any character except lowercase letters, `A`, `B`, and `Z`. + +## About + +### 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._ + +
+
+
    +
  1. table and examples are based on the WikiBooks page for [Regular Expressions/POSIX Basic Regular Expressions](https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions), which is available under the [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/3.0/). + +
  2. +
+
\ No newline at end of file diff --git a/node_modules/posix-character-classes/index.js b/node_modules/posix-character-classes/index.js new file mode 100644 index 0000000000000..19f1c9866d07d --- /dev/null +++ b/node_modules/posix-character-classes/index.js @@ -0,0 +1,22 @@ +'use strict'; + +/** + * POSIX character classes + */ + +module.exports = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; diff --git a/node_modules/posix-character-classes/package.json b/node_modules/posix-character-classes/package.json new file mode 100644 index 0000000000000..acce4ba707840 --- /dev/null +++ b/node_modules/posix-character-classes/package.json @@ -0,0 +1,54 @@ +{ + "name": "posix-character-classes", + "description": "POSIX character classes for creating regular expressions.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/posix-character-classes", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/posix-character-classes", + "bugs": { + "url": "https://github.com/jonschlinkert/posix-character-classes/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "character", + "classes", + "posix" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + }, + "related-list": [ + "micromatch", + "nanomatch", + "extglob", + "expand-brackets" + ] + } +} diff --git a/node_modules/preserve/.gitattributes b/node_modules/preserve/.gitattributes new file mode 100644 index 0000000000000..759c2c5afdcbf --- /dev/null +++ b/node_modules/preserve/.gitattributes @@ -0,0 +1,14 @@ +# Enforce Unix newlines +*.* text eol=lf +*.css text eol=lf +*.html text eol=lf +*.js text eol=lf +*.json text eol=lf +*.less text eol=lf +*.md text eol=lf +*.yml text eol=lf + +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary \ No newline at end of file diff --git a/node_modules/preserve/.jshintrc b/node_modules/preserve/.jshintrc new file mode 100644 index 0000000000000..e72045d2b3dbc --- /dev/null +++ b/node_modules/preserve/.jshintrc @@ -0,0 +1,24 @@ +{ + "asi": false, + "boss": true, + "curly": true, + "eqeqeq": true, + "eqnull": true, + "esnext": true, + "immed": true, + "latedef": true, + "laxcomma": false, + "newcap": true, + "noarg": true, + "node": true, + "sub": true, + "undef": true, + "unused": true, + "globals": { + "define": true, + "before": true, + "after": true, + "describe": true, + "it": true + } +} \ No newline at end of file diff --git a/node_modules/preserve/.npmignore b/node_modules/preserve/.npmignore new file mode 100644 index 0000000000000..1a2e47f0da042 --- /dev/null +++ b/node_modules/preserve/.npmignore @@ -0,0 +1,53 @@ +# Numerous always-ignore extensions +*.csv +*.dat +*.diff +*.err +*.gz +*.log +*.orig +*.out +*.pid +*.rar +*.rej +*.seed +*.swo +*.swp +*.vi +*.yo-rc.json +*.zip +*~ +.ruby-version +lib-cov +npm-debug.log + +# Always-ignore dirs +/bower_components/ +/node_modules/ +/temp/ +/tmp/ +/vendor/ +_gh_pages + +# OS or Editor folders +*.esproj +*.komodoproject +.komodotools +*.sublime-* +._* +.cache +.DS_Store +.idea +.project +.settings +.tmproj +nbproject +Thumbs.db + +# grunt-html-validation +validation-status.json +validation-report.json + +# misc +TODO.md +benchmark \ No newline at end of file diff --git a/node_modules/preserve/.travis.yml b/node_modules/preserve/.travis.yml new file mode 100644 index 0000000000000..ff74a054e07e6 --- /dev/null +++ b/node_modules/preserve/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - '0.10' \ No newline at end of file diff --git a/node_modules/preserve/.verb.md b/node_modules/preserve/.verb.md new file mode 100644 index 0000000000000..72344a9eb30ca --- /dev/null +++ b/node_modules/preserve/.verb.md @@ -0,0 +1,59 @@ +# {%= name %} {%= badge("fury") %} + +> {%= description %} + +Useful for protecting tokens, like templates in HTML, from being mutated when the string is transformed in some way, like from a formatter/beautifier. + +**Example without `preserve`** + +Let's say you want to use [js-beautify] on a string of html with Lo-Dash/Underscore templates, such as: `
  • <%= name %>
`: + +js-beautify will render the template unusable (and apply incorrect formatting because of the unfamiliar syntax from the Lo-Dash template): + +```html +
    +
  • + <%=n ame %> +
  • +
+``` + +**Example with `preserve`** + +Correct. + +```html +
    +
  • <%= name %>
  • +
+``` + +For the record, this is just a random example, I've had very few issues with js-beautify in general. But with or without js-beautify, this kind of token mangling does happen sometimes when you use formatters, beautifiers or similar tools. + +## Install +{%= include("install-npm", {save: true}) %} + +## Run tests + +```bash +npm test +``` + +## API +{%= apidocs("index.js") %} + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue]({%= bugs.url %}) + +## Author +{%= include("author") %} + +## License +{%= copyright() %} +{%= license() %} + +*** + +{%= include("footer") %} + +[js-beautify]: https://github.com/beautify-web/js-beautify \ No newline at end of file diff --git a/node_modules/preserve/LICENSE b/node_modules/preserve/LICENSE new file mode 100644 index 0000000000000..5a9956a75dd7f --- /dev/null +++ b/node_modules/preserve/LICENSE @@ -0,0 +1,24 @@ +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/preserve/README.md b/node_modules/preserve/README.md new file mode 100644 index 0000000000000..75000b9334938 --- /dev/null +++ b/node_modules/preserve/README.md @@ -0,0 +1,90 @@ +# preserve [![NPM version](https://badge.fury.io/js/preserve.svg)](http://badge.fury.io/js/preserve) + +> Temporarily substitute tokens in the given `string` with placeholders, then put them back after transforming the string. + +Useful for protecting tokens, like templates in HTML, from being mutated when the string is transformed in some way, like from a formatter/beautifier. + +**Example without `preserve`** + +Let's say you want to use [js-beautify] on a string of html with Lo-Dash/Underscore templates, such as: `
  • <%= name %>
`: + +js-beautify will render the template unusable (and apply incorrect formatting because of the unfamiliar syntax from the Lo-Dash template): + +```html +
    +
  • + <%=n ame %> +
  • +
+``` + +**Example with `preserve`** + +Correct. + +```html +
    +
  • <%= name %>
  • +
+``` + +For the record, this is just a random example, I've had very few issues with js-beautify in general. But with or without js-beautify, this kind of token mangling does happen sometimes when you use formatters, beautifiers or similar tools. + +## Install +## Install with [npm](npmjs.org) + +```bash +npm i preserve --save +``` + +## Run tests + +```bash +npm test +``` + +## API +### [.before](index.js#L23) + +Replace tokens in `str` with a temporary, heuristic placeholder. + +* `str` **{String}** +* `returns` **{String}**: String with placeholders. + +```js +tokens.before('{a\\,b}'); +//=> '{__ID1__}' +``` + +### [.after](index.js#L44) + +Replace placeholders in `str` with original tokens. + +* `str` **{String}**: String with placeholders +* `returns` **{String}** `str`: String with original tokens. + +```js +tokens.after('{__ID1__}'); +//=> '{a\\,b}' +``` + + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/preserve/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015-2015, Jon Schlinkert. +Released under the MIT license + +*** + +_This file was generated by [verb](https://github.com/assemble/verb) on January 10, 2015._ + +[js-beautify]: https://github.com/beautify-web/js-beautify \ No newline at end of file diff --git a/node_modules/preserve/index.js b/node_modules/preserve/index.js new file mode 100644 index 0000000000000..a6c5d481d454a --- /dev/null +++ b/node_modules/preserve/index.js @@ -0,0 +1,54 @@ +/*! + * preserve + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +/** + * Replace tokens in `str` with a temporary, heuristic placeholder. + * + * ```js + * tokens.before('{a\\,b}'); + * //=> '{__ID1__}' + * ``` + * + * @param {String} `str` + * @return {String} String with placeholders. + * @api public + */ + +exports.before = function before(str, re) { + return str.replace(re, function (match) { + var id = randomize(); + cache[id] = match; + return '__ID' + id + '__'; + }); +}; + +/** + * Replace placeholders in `str` with original tokens. + * + * ```js + * tokens.after('{__ID1__}'); + * //=> '{a\\,b}' + * ``` + * + * @param {String} `str` String with placeholders + * @return {String} `str` String with original tokens. + * @api public + */ + +exports.after = function after(str) { + return str.replace(/__ID(.{5})__/g, function (_, id) { + return cache[id]; + }); +}; + +function randomize() { + return Math.random().toString().slice(2, 7); +} + +var cache = {}; \ No newline at end of file diff --git a/node_modules/preserve/package.json b/node_modules/preserve/package.json new file mode 100644 index 0000000000000..056c0faeaeeaf --- /dev/null +++ b/node_modules/preserve/package.json @@ -0,0 +1,48 @@ +{ + "name": "preserve", + "description": "Temporarily substitute tokens in the given `string` with placeholders, then put them back after transforming the string.", + "version": "0.2.0", + "homepage": "https://github.com/jonschlinkert/preserve", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/preserve.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/preserve/issues" + }, + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/preserve/blob/master/LICENSE-MIT" + }, + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha -R spec" + }, + "devDependencies": { + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "js-beautify": "^1.5.4", + "mocha": "*", + "should": "*" + }, + "keywords": [ + "escape", + "format", + "placeholder", + "placeholders", + "prettify", + "regex", + "replace", + "template", + "templates", + "token", + "tokens" + ] +} \ No newline at end of file diff --git a/node_modules/preserve/test.js b/node_modules/preserve/test.js new file mode 100644 index 0000000000000..9bf174f121cff --- /dev/null +++ b/node_modules/preserve/test.js @@ -0,0 +1,48 @@ +/*! + * preserve + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License + */ + +'use strict'; + +var should = require('should'); +var tokens = require('./'); + +var re = /<%=\s*[^>]+%>/g; +var pretty = function(str) { + return require('js-beautify').html(str, { + indent_char: ' ', + indent_size: 2, + }); +}; + +describe('preserve tokens', function () { + var testRe = /__ID.{5}__\n__ID.{5}__\n__ID.{5}__/; + var re = /<%=\s*[^>]+%>/g; + + it('should (e.g. shouldn\'t, but will) mangle tokens in the given string', function () { + var html = pretty('
  • <%= name %>
'); + html.should.equal('
    \n
  • \n <%=n ame %>\n
  • \n
'); + }); + + it('should preserve tokens in the given string', function () { + var html = tokens.after(pretty(tokens.before('
  • <%= name %>
', re))); + html.should.equal('
    \n
  • <%= name %>
  • \n
'); + }); + + describe('.before()', function () { + it('should replace matches with placeholder tokens:', function () { + tokens.before('<%= a %>\n<%= b %>\n<%= c %>', re).should.match(testRe); + }); + }); + + describe('tokens.after()', function () { + it('should replace placeholder tokens with original values:', function () { + var before = tokens.before('<%= a %>\n<%= b %>\n<%= c %>', re); + before.should.match(testRe); + tokens.after(before).should.equal('<%= a %>\n<%= b %>\n<%= c %>'); + }); + }); +}); diff --git a/node_modules/process-nextick-args/index.js b/node_modules/process-nextick-args/index.js new file mode 100644 index 0000000000000..3eecf11488531 --- /dev/null +++ b/node_modules/process-nextick-args/index.js @@ -0,0 +1,45 @@ +'use strict'; + +if (typeof process === 'undefined' || + !process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + diff --git a/node_modules/process-nextick-args/license.md b/node_modules/process-nextick-args/license.md new file mode 100644 index 0000000000000..c67e3532b5424 --- /dev/null +++ b/node_modules/process-nextick-args/license.md @@ -0,0 +1,19 @@ +# Copyright (c) 2015 Calvin Metcalf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.** diff --git a/node_modules/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json new file mode 100644 index 0000000000000..6070b723fcd34 --- /dev/null +++ b/node_modules/process-nextick-args/package.json @@ -0,0 +1,25 @@ +{ + "name": "process-nextick-args", + "version": "2.0.1", + "description": "process.nextTick but always with args", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/calvinmetcalf/process-nextick-args.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" + }, + "homepage": "https://github.com/calvinmetcalf/process-nextick-args", + "devDependencies": { + "tap": "~0.2.6" + } +} diff --git a/node_modules/process-nextick-args/readme.md b/node_modules/process-nextick-args/readme.md new file mode 100644 index 0000000000000..ecb432c9b21ff --- /dev/null +++ b/node_modules/process-nextick-args/readme.md @@ -0,0 +1,18 @@ +process-nextick-args +===== + +[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) + +```bash +npm install --save process-nextick-args +``` + +Always be able to pass arguments to process.nextTick, no matter the platform + +```js +var pna = require('process-nextick-args'); + +pna.nextTick(function (a, b, c) { + console.log(a, b, c); +}, 'step', 3, 'profit'); +``` diff --git a/node_modules/ps-tree/CHANGELOG.md b/node_modules/ps-tree/CHANGELOG.md new file mode 100644 index 0000000000000..ced6e2c383491 --- /dev/null +++ b/node_modules/ps-tree/CHANGELOG.md @@ -0,0 +1,11 @@ +# CHANGELOG + +## 1.2.0 + +- [#24] Improve performance +- [#27] Make tests deterministic +- [#29] Improve CI configurations + +## 1.1.1 + +- [#34] Locks `event-stream` to `3.3.4`. diff --git a/node_modules/ps-tree/LICENSE b/node_modules/ps-tree/LICENSE new file mode 100644 index 0000000000000..51b00ef651e43 --- /dev/null +++ b/node_modules/ps-tree/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Domenic Tarr, Charlie Robbins & the 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/ps-tree/README.md b/node_modules/ps-tree/README.md new file mode 100644 index 0000000000000..e9f1461075b56 --- /dev/null +++ b/node_modules/ps-tree/README.md @@ -0,0 +1,81 @@ +# ps-tree + +[![Build Status](https://travis-ci.org/indexzero/ps-tree.svg)](https://travis-ci.org/indexzero/ps-tree) +[![Code Climate](https://codeclimate.com/github/indexzero/ps-tree/badges/gpa.svg)](https://codeclimate.com/github/indexzero/ps-tree) +[![Test Coverage](https://codeclimate.com/github/indexzero/ps-tree/badges/coverage.svg)](https://codeclimate.com/github/indexzero/ps-tree) +[![npm Version](https://img.shields.io/npm/v/ps-tree.svg)](https://www.npmjs.com/package/ps-tree) +[![Node.js Version](https://img.shields.io/node/v/ps-tree.svg?style=flat)](http://nodejs.org/download/) +[![Dependency Status](https://david-dm.org/indexzero/ps-tree.svg)](https://david-dm.org/indexzero/ps-tree) + +Sometimes you cannot kill child processes like you would expect, this a feature of UNIX. + +>in UNIX, a process may terminate by using the exit call, and it's parent process may wait for that event by using the wait system call. the wait system call returns the process identifier of a terminated child, so that the parent tell which of the possibly many children has terminated. If the parent terminates, however, all it's children have assigned as their new parent the init process. Thus, the children still have a parent to collect their status and execution statistics. +> (from "operating system concepts") + +Solution: use `ps-tree` to get all processes that a `child_process` may have started, so that they may all be terminated. + +``` js +var cp = require('child_process'), + psTree = require('ps-tree'); + +var child = cp.exec("node -e 'while (true);'", function () {...}); + +// This will not actually kill the child it will kill the `sh` process. +child.kill(); +``` + +wtf? it's because exec actually works like this: + +``` js +function exec (cmd, cb) { + spawn('sh', ['-c', cmd]); + ... +} +``` + +`sh` starts parses the command string and starts processes, and waits for them to terminate, but `exec` returns a process object with the pid of the `sh` process. +However, since it is in `wait` mode killing it does not kill the children. + +Use `ps-tree` like this: + +``` js +var cp = require('child_process'), + psTree = require('ps-tree'); + +var child = cp.exec("node -e 'while (true);'", function () { /*...*/ }); + +psTree(child.pid, function (err, children) { + cp.spawn('kill', ['-9'].concat(children.map(function (p) { return p.PID }))); +}); +``` + +If you prefer to run **psTree** from the command line, use: `node ./bin/ps-tree.js` + +## Cross Platform support + + +The `ps-tree` module behaves differently on *nix vs. Windows by spawning different programs and parsing their output. This is based on `process.platform` and not on checking to see if a `ps` compatible program exists on the system. + +#### *nix + +1. " " need to be striped +```bash +$ ps -A -o comm,ppid,pid,stat +COMMAND PPID PID STAT +bbsd 2899 16958 Ss +watch 1914 16964 Z +ps 20688 16965 R+ +``` + +### Windows +1. `wmic PROCESS WHERE ParentProcessId=4604 GET Name,ParentProcessId,ProcessId,Status)` +2. The order of head columns is fixed +```shell +> wmic PROCESS GET Name,ProcessId,ParentProcessId,Status +Name ParentProcessId ProcessId Status +System Idle Process 0 0 +System 0 4 +smss.exe 4 228 +``` + +### LICENSE: MIT diff --git a/node_modules/ps-tree/bin/ps-tree.js b/node_modules/ps-tree/bin/ps-tree.js new file mode 100755 index 0000000000000..2bc98665033b0 --- /dev/null +++ b/node_modules/ps-tree/bin/ps-tree.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + +'use strict'; + +// +// Change the default parent PID if running +// under Windows. +// +var ppid = 1; +if (process.platform === 'win32') { + ppid = 0; +} + +require('../')(process.argv[2] || ppid, function (err, data) { + console.log(data); +}); diff --git a/node_modules/ps-tree/index.js b/node_modules/ps-tree/index.js new file mode 100755 index 0000000000000..8db8b3e9d0b49 --- /dev/null +++ b/node_modules/ps-tree/index.js @@ -0,0 +1,119 @@ +'use strict'; + +var spawn = require('child_process').spawn, + es = require('event-stream'); + +module.exports = function childrenOfPid(pid, callback) { + var headers = null; + + if (typeof callback !== 'function') { + throw new Error('childrenOfPid(pid, callback) expects callback'); + } + + if (typeof pid === 'number') { + pid = pid.toString(); + } + + // + // The `ps-tree` module behaves differently on *nix vs. Windows + // by spawning different programs and parsing their output. + // + // Linux: + // 1. " " need to be striped + // ```bash + // $ ps -A -o comm,ppid,pid,stat + // COMMAND PPID PID STAT + // bbsd 2899 16958 Ss + // watch 1914 16964 Z + // ps 20688 16965 R+ + // ``` + // + // Win32: + // 1. wmic PROCESS WHERE ParentProcessId=4604 GET Name,ParentProcessId,ProcessId,Status) + // 2. The order of head columns is fixed + // ```shell + // > wmic PROCESS GET Name,ProcessId,ParentProcessId,Status + // Name ParentProcessId ProcessId Status + // System Idle Process 0 0 + // System 0 4 + // smss.exe 4 228 + // ``` + + var processLister; + if (process.platform === 'win32') { + // See also: https://github.com/nodejs/node-v0.x-archive/issues/2318 + processLister = spawn('wmic.exe', ['PROCESS', 'GET', 'Name,ProcessId,ParentProcessId,Status']); + } else { + processLister = spawn('ps', ['-A', '-o', 'ppid,pid,stat,comm']); + } + + es.connect( + // spawn('ps', ['-A', '-o', 'ppid,pid,stat,comm']).stdout, + processLister.stdout, + es.split(), + es.map(function (line, cb) { //this could parse alot of unix command output + var columns = line.trim().split(/\s+/); + if (!headers) { + headers = columns; + + // + // Rename Win32 header name, to as same as the linux, for compatible. + // + headers = headers.map(normalizeHeader); + return cb(); + } + + var row = {}; + // For each header + var h = headers.slice(); + while (h.length) { + row[h.shift()] = h.length ? columns.shift() : columns.join(' '); + } + + return cb(null, row); + }), + es.writeArray(function (err, ps) { + var parents = {}, + children = []; + + parents[pid] = true; + ps.forEach(function (proc) { + if (parents[proc.PPID]) { + parents[proc.PID] = true; + children.push(proc) + } + }); + + callback(null, children); + }) + ).on('error', callback) +} + +/** + * Normalizes the given header `str` from the Windows + * title to the *nix title. + * + * @param {string} str Header string to normalize + */ +function normalizeHeader(str) { + if (process.platform !== 'win32') { + return str; + } + + switch (str) { + case 'Name': + return 'COMMAND'; + break; + case 'ParentProcessId': + return 'PPID'; + break; + case 'ProcessId': + return 'PID'; + break; + case 'Status': + return 'STAT'; + break; + default: + throw new Error('Unknown process listing header: ' + str); + } +} diff --git a/node_modules/ps-tree/package.json b/node_modules/ps-tree/package.json new file mode 100644 index 0000000000000..9450ad52db546 --- /dev/null +++ b/node_modules/ps-tree/package.json @@ -0,0 +1,49 @@ +{ + "name": "ps-tree", + "version": "1.2.0", + "description": "Get all children of a pid", + "license": "MIT", + "homepage": "http://github.com/indexzero/ps-tree#readme", + "repository": "github:indexzero/ps-tree", + "bugs": { + "url": "https://github.com/indexzero/ps-tree/issues", + "email": "charlie.robbins@gmail.com" + }, + "author": "Charlie Robbins ", + "contributors": [ + "Zhuohuan LI (https://github.com/zixia)", + "Simone Primarosa (https://github.com/simonepri)" + ], + "keyboards": [ + "ps-tree", + "ps", + "tree", + "ppid", + "pid" + ], + "main": "index.js", + "bin": { + "ps-tree": "./bin/ps-tree.js" + }, + "files": [ + "bin", + "index.js" + ], + "engines": { + "node": ">= 0.10" + }, + "scripts": { + "test": "istanbul cover node_modules/tape/bin/tape test/test.js", + "coverage": "cross-env CODECLIMATE_REPO_TOKEN=84436b4f13c70ace9c62e7f04928bf23c234eb212c0232d39d7fb1535beb2da5 node_modules/.bin/codeclimate-test-reporter < coverage/lcov.info" + }, + "dependencies": { + "event-stream": "=3.3.4" + }, + "devDependencies": { + "codeclimate-test-reporter": "^0.5.0", + "cross-env": "^2.0.1", + "istanbul": "^0.4.5", + "tape": "^4.9.0", + "tree-kill": "^1.1.0" + } +} diff --git a/node_modules/pseudomap/LICENSE b/node_modules/pseudomap/LICENSE new file mode 100644 index 0000000000000..19129e315fe59 --- /dev/null +++ b/node_modules/pseudomap/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/pseudomap/README.md b/node_modules/pseudomap/README.md new file mode 100644 index 0000000000000..778bf01dfaaf9 --- /dev/null +++ b/node_modules/pseudomap/README.md @@ -0,0 +1,60 @@ +# pseudomap + +A thing that is a lot like ES6 `Map`, but without iterators, for use +in environments where `for..of` syntax and `Map` are not available. + +If you need iterators, or just in general a more faithful polyfill to +ES6 Maps, check out [es6-map](http://npm.im/es6-map). + +If you are in an environment where `Map` is supported, then that will +be returned instead, unless `process.env.TEST_PSEUDOMAP` is set. + +You can use any value as keys, and any value as data. Setting again +with the identical key will overwrite the previous value. + +Internally, data is stored on an `Object.create(null)` style object. +The key is coerced to a string to generate the key on the internal +data-bag object. The original key used is stored along with the data. + +In the event of a stringified-key collision, a new key is generated by +appending an increasing number to the stringified-key until finding +either the intended key or an empty spot. + +Note that because object traversal order of plain objects is not +guaranteed to be identical to insertion order, the insertion order +guarantee of `Map.prototype.forEach` is not guaranteed in this +implementation. However, in all versions of Node.js and V8 where this +module works, `forEach` does traverse data in insertion order. + +## API + +Most of the [Map +API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), +with the following exceptions: + +1. A `Map` object is not an iterator. +2. `values`, `keys`, and `entries` methods are not implemented, + because they return iterators. +3. The argument to the constructor can be an Array of `[key, value]` + pairs, or a `Map` or `PseudoMap` object. But, since iterators + aren't used, passing any plain-old iterator won't initialize the + map properly. + +## USAGE + +Use just like a regular ES6 Map. + +```javascript +var PseudoMap = require('pseudomap') + +// optionally provide a pseudomap, or an array of [key,value] pairs +// as the argument to initialize the map with +var myMap = new PseudoMap() + +myMap.set(1, 'number 1') +myMap.set('1', 'string 1') +var akey = {} +var bkey = {} +myMap.set(akey, { some: 'data' }) +myMap.set(bkey, { some: 'other data' }) +``` diff --git a/node_modules/pseudomap/map.js b/node_modules/pseudomap/map.js new file mode 100644 index 0000000000000..7db15994612fd --- /dev/null +++ b/node_modules/pseudomap/map.js @@ -0,0 +1,9 @@ +if (process.env.npm_package_name === 'pseudomap' && + process.env.npm_lifecycle_script === 'test') + process.env.TEST_PSEUDOMAP = 'true' + +if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map +} else { + module.exports = require('./pseudomap') +} diff --git a/node_modules/pseudomap/package.json b/node_modules/pseudomap/package.json new file mode 100644 index 0000000000000..4b02ab7c78880 --- /dev/null +++ b/node_modules/pseudomap/package.json @@ -0,0 +1,25 @@ +{ + "name": "pseudomap", + "version": "1.0.2", + "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", + "main": "map.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "tap": "^2.3.1" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/pseudomap.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "bugs": { + "url": "https://github.com/isaacs/pseudomap/issues" + }, + "homepage": "https://github.com/isaacs/pseudomap#readme" +} diff --git a/node_modules/pseudomap/pseudomap.js b/node_modules/pseudomap/pseudomap.js new file mode 100644 index 0000000000000..25a21d829e8b3 --- /dev/null +++ b/node_modules/pseudomap/pseudomap.js @@ -0,0 +1,113 @@ +var hasOwnProperty = Object.prototype.hasOwnProperty + +module.exports = PseudoMap + +function PseudoMap (set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'") + + this.clear() + + if (set) { + if ((set instanceof PseudoMap) || + (typeof Map === 'function' && set instanceof Map)) + set.forEach(function (value, key) { + this.set(key, value) + }, this) + else if (Array.isArray(set)) + set.forEach(function (kv) { + this.set(kv[0], kv[1]) + }, this) + else + throw new TypeError('invalid argument') + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') + fn.call(thisp, this._data[k].value, this._data[k].key) + }, this) +} + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k) +} + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k) + return res && res.value +} + +PseudoMap.prototype.set = function (k, v) { + set(this._data, k, v) +} + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k) + if (res) { + delete this._data[res._index] + this._data.size-- + } +} + +PseudoMap.prototype.clear = function () { + var data = Object.create(null) + data.size = 0 + + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }) +} + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function () { + return this._data.size + }, + set: function (n) {}, + enumerable: true, + configurable: true +}) + +PseudoMap.prototype.values = +PseudoMap.prototype.keys = +PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version') +} + +// Either identical, or both NaN +function same (a, b) { + return a === b || a !== a && b !== b +} + +function Entry (k, v, i) { + this.key = k + this.value = v + this._index = i +} + +function find (data, k) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v + return + } + } + data.size++ + data[key] = new Entry(k, v, key) +} diff --git a/node_modules/pseudomap/test/basic.js b/node_modules/pseudomap/test/basic.js new file mode 100644 index 0000000000000..4378e4541e9a1 --- /dev/null +++ b/node_modules/pseudomap/test/basic.js @@ -0,0 +1,86 @@ +var t = require('tap') + +process.env.TEST_PSEUDOMAP = 'true' + +var PM = require('../') +runTests(PM) + +// if possible, verify that Map also behaves the same way +if (typeof Map === 'function') + runTests(Map) + + +function runTests (Map) { + t.throws(Map) + + var m = new Map() + + t.equal(m.size, 0) + + m.set(1, '1 string') + t.equal(m.get(1), '1 string') + t.equal(m.size, 1) + m.size = 1000 + t.equal(m.size, 1) + m.size = 0 + t.equal(m.size, 1) + + m = new Map([[1, 'number 1'], ['1', 'string 1']]) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + m = new Map(m) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + var akey = {} + var bkey = {} + m.set(akey, { some: 'data' }) + m.set(bkey, { some: 'other data' }) + t.same(m.get(akey), { some: 'data' }) + t.same(m.get(bkey), { some: 'other data' }) + t.equal(m.size, 4) + + var x = /x/ + var y = /x/ + m.set(x, 'x regex') + m.set(y, 'y regex') + t.equal(m.get(x), 'x regex') + m.set(x, 'x again') + t.equal(m.get(x), 'x again') + t.equal(m.size, 6) + + m.set(NaN, 'not a number') + t.equal(m.get(NaN), 'not a number') + m.set(NaN, 'it is a ' + typeof NaN) + t.equal(m.get(NaN), 'it is a number') + m.set('NaN', 'stringie nan') + t.equal(m.get(NaN), 'it is a number') + t.equal(m.get('NaN'), 'stringie nan') + t.equal(m.size, 8) + + m.delete(NaN) + t.equal(m.get(NaN), undefined) + t.equal(m.size, 7) + + var expect = [ + { value: 'number 1', key: 1 }, + { value: 'string 1', key: '1' }, + { value: { some: 'data' }, key: {} }, + { value: { some: 'other data' }, key: {} }, + { value: 'x again', key: /x/ }, + { value: 'y regex', key: /x/ }, + { value: 'stringie nan', key: 'NaN' } + ] + var actual = [] + + m.forEach(function (value, key) { + actual.push({ value: value, key: key }) + }) + t.same(actual, expect) + + m.clear() + t.equal(m.size, 0) +} diff --git a/node_modules/randomatic/LICENSE b/node_modules/randomatic/LICENSE new file mode 100644 index 0000000000000..38a4a0bf12ef1 --- /dev/null +++ b/node_modules/randomatic/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-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/randomatic/README.md b/node_modules/randomatic/README.md new file mode 100644 index 0000000000000..292e642251a2e --- /dev/null +++ b/node_modules/randomatic/README.md @@ -0,0 +1,193 @@ +# randomatic [![NPM version](https://img.shields.io/npm/v/randomatic.svg?style=flat)](https://www.npmjs.com/package/randomatic) [![NPM monthly downloads](https://img.shields.io/npm/dm/randomatic.svg?style=flat)](https://npmjs.org/package/randomatic) [![NPM total downloads](https://img.shields.io/npm/dt/randomatic.svg?style=flat)](https://npmjs.org/package/randomatic) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/randomatic.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/randomatic) + +> Generate randomized strings of a specified length using simple character sequences. The original generate-password. + +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 randomatic +``` + +## Usage + +```js +var randomize = require('randomatic'); +``` + +## API + +```js +randomize(pattern, length, options); +randomize.isCrypto; +``` + +* `pattern` **{String}**: (required) The pattern to use for randomizing +* `length` **{Number}**: (optional) The length of the string to generate +* `options` **{Object}**: (optional) See available [options](#options) +* `randomize.isCrypto` will be `true` when a cryptographically secure function is being used to generate random numbers. The value will be `false` when the function in use is `Math.random`. + +### pattern + +> The pattern to use for randomizing + +Patterns can contain any combination of the below characters, specified in any order. + +**Example:** + +To generate a 10-character randomized string using all available characters: + +```js +randomize('*', 10); +//=> 'x2_^-5_T[$' + +randomize('Aa0!', 10); +//=> 'LV3u~BSGhw' +``` + +* `a`: Lowercase alpha characters (`abcdefghijklmnopqrstuvwxyz'`) +* `A`: Uppercase alpha characters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ'`) +* `0`: Numeric characters (`0123456789'`) +* `!`: Special characters (`~!@#$%^&()_+-={}[];\',.`) +* `*`: All characters (all of the above combined) +* `?`: Custom characters (pass a string of custom characters to the options) + +### length + +> The length of the string to generate + +**Examples:** + +* `randomize('A', 5)` will generate a 5-character, uppercase, alphabetical, randomized string, e.g. `KDJWJ`. +* `randomize('0', 2)` will generate a 2-digit random number +* `randomize('0', 3)` will generate a 3-digit random number +* `randomize('0', 12)` will generate a 12-digit random number +* `randomize('A0', 16)` will generate a 16-character, alpha-numeric randomized string + +If `length` is left undefined, the length of the pattern in the first parameter will be used. For example: + +* `randomize('00')` will generate a 2-digit random number +* `randomize('000')` will generate a 3-digit random number +* `randomize('0000')` will generate a 4-digit random number... +* `randomize('AAAAA')` will generate a 5-character, uppercase alphabetical random string... + +These are just examples, [see the tests](./test.js) for more use cases and examples. + +## options + +> These are options that can be passed as the third argument. + +#### chars + +Type: `String` + +Default: `undefined` + +Define a custom string to be randomized. + +**Example:** + +* `randomize('?', 20, {chars: 'jonschlinkert'})` will generate a 20-character randomized string from the letters contained in `jonschlinkert`. +* `randomize('?', {chars: 'jonschlinkert'})` will generate a 13-character randomized string from the letters contained in `jonschlinkert`. + +#### exclude + +Type: `String|Array` + +Default: `undefined` + +Specify a string or array of characters can are excluded from the possible characters used to generate the randomized string. + +**Example:** + +* `randomize('*', 20, { exclude: '0oOiIlL1' })` will generate a 20-character randomized string using all of possible characters except for `0oOiIlL1`. + +## Usage Examples + +* `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc. +* `randomize('AAAA')` is equivelant to `randomize('A', 4)` +* `randomize('AAA0')` and `randomize('AA00')` and `randomize('A0A0')` are equivelant to `randomize('A0', 4)` +* `randomize('aa')`: results in double-digit, randomized, lower-case letters (`abcdefghijklmnopqrstuvwxyz`) +* `randomize('AAA')`: results in triple-digit, randomized, upper-case letters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ`) +* `randomize('0', 6)`: results in six-digit, randomized numbers (`0123456789`) +* `randomize('!', 5)`: results in single-digit randomized, _valid_ non-letter characters (`~!@#$%^&()_+-={}[] +* `randomize('A!a0', 9)`: results in nine-digit, randomized characters (any of the above) + +_The order in which the characters are defined is insignificant._ + +## 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: + +* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left "Left pad a string with zeros or a specified string. Fastest implementation.") +* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right "Right pad a string with zeros or a specified string. Fastest implementation.") +* [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.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 56 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [doowb](https://github.com/doowb) | +| 4 | [kivlor](https://github.com/kivlor) | +| 2 | [realityking](https://github.com/realityking) | +| 2 | [ywpark1](https://github.com/ywpark1) | +| 1 | [TrySound](https://github.com/TrySound) | +| 1 | [drag0s](https://github.com/drag0s) | +| 1 | [paulmillr](https://github.com/paulmillr) | +| 1 | [sunknudsen](https://github.com/sunknudsen) | +| 1 | [faizulhaque-tp](https://github.com/faizulhaque-tp) | +| 1 | [michaelrhodes](https://github.com/michaelrhodes) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/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.8.0, on October 23, 2018._ \ No newline at end of file diff --git a/node_modules/randomatic/index.js b/node_modules/randomatic/index.js new file mode 100644 index 0000000000000..dc636fb1b64a7 --- /dev/null +++ b/node_modules/randomatic/index.js @@ -0,0 +1,95 @@ +/*! + * randomatic + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isNumber = require('is-number'); +var typeOf = require('kind-of'); +var mathRandom = require('math-random'); + +/** + * Expose `randomatic` + */ + +module.exports = randomatic; +module.exports.isCrypto = !!mathRandom.cryptographic; + +/** + * Available mask characters + */ + +var type = { + lower: 'abcdefghijklmnopqrstuvwxyz', + upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + number: '0123456789', + special: '~!@#$%^&()_+-={}[];\',.' +}; + +type.all = type.lower + type.upper + type.number + type.special; + +/** + * Generate random character sequences of a specified `length`, + * based on the given `pattern`. + * + * @param {String} `pattern` The pattern to use for generating the random string. + * @param {String} `length` The length of the string to generate. + * @param {String} `options` + * @return {String} + * @api public + */ + +function randomatic(pattern, length, options) { + if (typeof pattern === 'undefined') { + throw new Error('randomatic expects a string or number.'); + } + + var custom = false; + if (arguments.length === 1) { + if (typeof pattern === 'string') { + length = pattern.length; + + } else if (isNumber(pattern)) { + options = {}; + length = pattern; + pattern = '*'; + } + } + + if (typeOf(length) === 'object' && length.hasOwnProperty('chars')) { + options = length; + pattern = options.chars; + length = pattern.length; + custom = true; + } + + var opts = options || {}; + var mask = ''; + var res = ''; + + // Characters to be used + if (pattern.indexOf('?') !== -1) mask += opts.chars; + if (pattern.indexOf('a') !== -1) mask += type.lower; + if (pattern.indexOf('A') !== -1) mask += type.upper; + if (pattern.indexOf('0') !== -1) mask += type.number; + if (pattern.indexOf('!') !== -1) mask += type.special; + if (pattern.indexOf('*') !== -1) mask += type.all; + if (custom) mask += pattern; + + // Characters to exclude + if (opts.exclude) { + var exclude = typeOf(opts.exclude) === 'string' ? opts.exclude : opts.exclude.join(''); + exclude = exclude.replace(new RegExp('[\\]]+', 'g'), ''); + mask = mask.replace(new RegExp('[' + exclude + ']+', 'g'), ''); + + if(opts.exclude.indexOf(']') !== -1) mask = mask.replace(new RegExp('[\\]]+', 'g'), ''); + } + + while (length--) { + res += mask.charAt(parseInt(mathRandom() * mask.length, 10)); + } + return res; +}; diff --git a/node_modules/randomatic/node_modules/is-number/LICENSE b/node_modules/randomatic/node_modules/is-number/LICENSE new file mode 100644 index 0000000000000..3f2eca18f1bc0 --- /dev/null +++ b/node_modules/randomatic/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/randomatic/node_modules/is-number/README.md b/node_modules/randomatic/node_modules/is-number/README.md new file mode 100644 index 0000000000000..6436992dcc55b --- /dev/null +++ b/node_modules/randomatic/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/randomatic/node_modules/is-number/index.js b/node_modules/randomatic/node_modules/is-number/index.js new file mode 100644 index 0000000000000..5221f4056f382 --- /dev/null +++ b/node_modules/randomatic/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/randomatic/node_modules/is-number/package.json b/node_modules/randomatic/node_modules/is-number/package.json new file mode 100644 index 0000000000000..c8a7af1b7a691 --- /dev/null +++ b/node_modules/randomatic/node_modules/is-number/package.json @@ -0,0 +1,76 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.1.0", + "gulp-format-md": "^1.0.0", + "mocha": "^3.0.1" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "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 + } + } +} diff --git a/node_modules/randomatic/node_modules/kind-of/CHANGELOG.md b/node_modules/randomatic/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000000000..01687d5cbb930 --- /dev/null +++ b/node_modules/randomatic/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# 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.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [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 \ No newline at end of file diff --git a/node_modules/randomatic/node_modules/kind-of/LICENSE b/node_modules/randomatic/node_modules/kind-of/LICENSE new file mode 100644 index 0000000000000..3f2eca18f1bc0 --- /dev/null +++ b/node_modules/randomatic/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/randomatic/node_modules/kind-of/README.md b/node_modules/randomatic/node_modules/kind-of/README.md new file mode 100644 index 0000000000000..0411dc58a2ffd --- /dev/null +++ b/node_modules/randomatic/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# 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/micromatch/is-glob) | [homepage](https://github.com/micromatch/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 a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [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** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 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 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [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.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/randomatic/node_modules/kind-of/index.js b/node_modules/randomatic/node_modules/kind-of/index.js new file mode 100644 index 0000000000000..dfa799b784975 --- /dev/null +++ b/node_modules/randomatic/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 typeof val.constructor === 'function' ? 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/randomatic/node_modules/kind-of/package.json b/node_modules/randomatic/node_modules/kind-of/package.json new file mode 100644 index 0000000000000..5820cad2390f7 --- /dev/null +++ b/node_modules/randomatic/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "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" + ], + "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" + ] + } +} diff --git a/node_modules/randomatic/package.json b/node_modules/randomatic/package.json new file mode 100644 index 0000000000000..97659addf254d --- /dev/null +++ b/node_modules/randomatic/package.json @@ -0,0 +1,80 @@ +{ + "name": "randomatic", + "description": "Generate randomized strings of a specified length using simple character sequences. The original generate-password.", + "version": "3.1.1", + "homepage": "https://github.com/jonschlinkert/randomatic", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Bogdan Chadkin (https://github.com/TrySound)", + "Dragos Fotescu (http://dragosfotescu.com)", + "Faiz ul haque (http://www.10pearls.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Michael Rhodes (http://michaelrhod.es)", + "Paul Miller (https://paulmillr.com)", + "Rouven Weßling (www.rouvenwessling.de)", + "Sun Knudsen (https://sunknudsen.com)" + ], + "repository": "jonschlinkert/randomatic", + "bugs": { + "url": "https://github.com/jonschlinkert/randomatic/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">= 0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.1.1", + "glob": "^7.1.2", + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.2" + }, + "keywords": [ + "alpha", + "alpha-numeric", + "alphanumeric", + "characters", + "chars", + "generate", + "generate-password", + "numeric", + "password", + "rand", + "random", + "randomatic", + "randomize", + "randomized" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "pad-left", + "pad-right", + "repeat-string" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/read-pkg/index.js b/node_modules/read-pkg/index.js new file mode 100644 index 0000000000000..c5c3afa8ed3b1 --- /dev/null +++ b/node_modules/read-pkg/index.js @@ -0,0 +1,48 @@ +'use strict'; +var path = require('path'); +var loadJsonFile = require('load-json-file'); +var normalizePackageData = require('normalize-package-data'); +var pathType = require('path-type'); + +module.exports = function (fp, opts) { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + + return pathType.dir(fp) + .then(function (isDir) { + if (isDir) { + fp = path.join(fp, 'package.json'); + } + + return loadJsonFile(fp); + }) + .then(function (x) { + if (opts.normalize !== false) { + normalizePackageData(x); + } + + return x; + }); +}; + +module.exports.sync = function (fp, opts) { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; + + var x = loadJsonFile.sync(fp); + + if (opts.normalize !== false) { + normalizePackageData(x); + } + + return x; +}; diff --git a/node_modules/read-pkg/license b/node_modules/read-pkg/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/read-pkg/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/read-pkg/package.json b/node_modules/read-pkg/package.json new file mode 100644 index 0000000000000..594b0c28b119e --- /dev/null +++ b/node_modules/read-pkg/package.json @@ -0,0 +1,42 @@ +{ + "name": "read-pkg", + "version": "1.1.0", + "description": "Read a package.json file", + "license": "MIT", + "repository": "sindresorhus/read-pkg", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load", + "pkg", + "package", + "normalize" + ], + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/read-pkg/readme.md b/node_modules/read-pkg/readme.md new file mode 100644 index 0000000000000..9a0d4cc45d984 --- /dev/null +++ b/node_modules/read-pkg/readme.md @@ -0,0 +1,79 @@ +# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg) + +> Read a package.json file + + +## Why + +- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) +- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) +- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) +- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) + + +## Install + +``` +$ npm install --save read-pkg +``` + + +## Usage + +```js +var readPkg = require('read-pkg'); + +readPkg().then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); + +readPkg(__dirname).then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); + +readPkg(path.join('unicorn', 'package.json')).then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); +``` + + +## API + +### readPkg([path], [options]) + +Returns a promise that resolves to the parsed JSON. + +### readPkg.sync([path], [options]) + +Returns the parsed JSON. + +#### path + +Type: `string` +Default: `.` + +Path to a `package.json` file or its directory. + +#### options + +##### normalize + +Type: `boolean` +Default: `true` + +[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. + + +## Related + +- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file +- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file +- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/readable-stream/.travis.yml b/node_modules/readable-stream/.travis.yml new file mode 100644 index 0000000000000..f62cdac0686da --- /dev/null +++ b/node_modules/readable-stream/.travis.yml @@ -0,0 +1,34 @@ +sudo: false +language: node_js +before_install: + - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: NPM_LEGACY=true + - node_js: '0.10' + env: NPM_LEGACY=true + - node_js: '0.11' + env: NPM_LEGACY=true + - node_js: '0.12' + env: NPM_LEGACY=true + - node_js: 1 + env: NPM_LEGACY=true + - node_js: 2 + env: NPM_LEGACY=true + - node_js: 3 + env: NPM_LEGACY=true + - node_js: 4 + - node_js: 5 + - node_js: 6 + - node_js: 7 + - node_js: 8 + - node_js: 9 +script: "npm run test" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md new file mode 100644 index 0000000000000..f478d58dca85b --- /dev/null +++ b/node_modules/readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md new file mode 100644 index 0000000000000..16ffb93f24bec --- /dev/null +++ b/node_modules/readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000000000..2873b3b2e5950 --- /dev/null +++ b/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md new file mode 100644 index 0000000000000..f1c5a9314f17a --- /dev/null +++ b/node_modules/readable-stream/README.md @@ -0,0 +1,58 @@ +# readable-stream + +***Node-core v8.17.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.17.0/docs/api/stream.html). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E +* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 0000000000000..83275f192e407 --- /dev/null +++ b/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/node_modules/readable-stream/duplex-browser.js b/node_modules/readable-stream/duplex-browser.js new file mode 100644 index 0000000000000..f8b2db83dbe73 --- /dev/null +++ b/node_modules/readable-stream/duplex-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000000000..46924cbfdf538 --- /dev/null +++ b/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require('./readable').Duplex diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000000000..57003c32d256c --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,131 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000000000..612edb4d8b443 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,47 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000000000..3af95cb2dbf1e --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,1019 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var destroyImpl = require('./internal/streams/destroy'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, { hasUnpiped: false }); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000000000..fcfc105af8e9a --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,214 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000000000..e1e897ff3b098 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,685 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = require('./internal/streams/destroy'); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + + // reuse the free corkReq. + state.corkedRequestsFree.next = corkReq; +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/readable-stream/lib/internal/streams/BufferList.js new file mode 100644 index 0000000000000..5e080976c3932 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -0,0 +1,78 @@ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = require('safe-buffer').Buffer; +var util = require('util'); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 0000000000000..85a821407fce4 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,84 @@ +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + pna.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, this, err); + } + } + + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + if (!_this._writableState) { + pna.nextTick(emitErrorNT, _this, err); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, _this, err); + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 0000000000000..9332a3fdae706 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js new file mode 100644 index 0000000000000..ce2ad5b6ee57f --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json new file mode 100644 index 0000000000000..514c178e92045 --- /dev/null +++ b/node_modules/readable-stream/package.json @@ -0,0 +1,52 @@ +{ + "name": "readable-stream", + "version": "2.3.8", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "devDependencies": { + "assert": "^1.4.0", + "babel-polyfill": "^6.9.1", + "buffer": "^4.9.0", + "lolex": "^2.3.2", + "nyc": "^6.4.0", + "tap": "^0.7.0", + "tape": "^4.8.0" + }, + "scripts": { + "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false, + "./readable.js": "./readable-browser.js", + "./writable.js": "./writable-browser.js", + "./duplex.js": "./duplex-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "license": "MIT" +} diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000000000..ffd791d7ff275 --- /dev/null +++ b/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require('./readable').PassThrough diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js new file mode 100644 index 0000000000000..e50372592ee6c --- /dev/null +++ b/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js new file mode 100644 index 0000000000000..ec89ec5330649 --- /dev/null +++ b/node_modules/readable-stream/readable.js @@ -0,0 +1,19 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); +} diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js new file mode 100644 index 0000000000000..b1baba26da03d --- /dev/null +++ b/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require('./readable').Transform diff --git a/node_modules/readable-stream/writable-browser.js b/node_modules/readable-stream/writable-browser.js new file mode 100644 index 0000000000000..ebdde6a85dcb1 --- /dev/null +++ b/node_modules/readable-stream/writable-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js new file mode 100644 index 0000000000000..3211a6f80d1ab --- /dev/null +++ b/node_modules/readable-stream/writable.js @@ -0,0 +1,8 @@ +var Stream = require("stream") +var Writable = require("./lib/_stream_writable.js") + +if (process.env.READABLE_STREAM === 'disable') { + module.exports = Stream && Stream.Writable || Writable +} else { + module.exports = Writable +} diff --git a/node_modules/readdirp/LICENSE b/node_modules/readdirp/LICENSE new file mode 100644 index 0000000000000..8a63b80ba66f5 --- /dev/null +++ b/node_modules/readdirp/LICENSE @@ -0,0 +1,20 @@ +This software is released under the MIT license: + +Copyright (c) 2012-2015 Thorsten Lorenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION 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/readdirp/README.md b/node_modules/readdirp/README.md new file mode 100644 index 0000000000000..431f40258250c --- /dev/null +++ b/node_modules/readdirp/README.md @@ -0,0 +1,204 @@ +# readdirp [![Build Status](https://secure.travis-ci.org/thlorenz/readdirp.svg)](http://travis-ci.org/thlorenz/readdirp) + +[![NPM](https://nodei.co/npm/readdirp.png?downloads=true&stars=true)](https://nodei.co/npm/readdirp/) + +Recursive version of [fs.readdir](http://nodejs.org/docs/latest/api/fs.html#fs_fs_readdir_path_callback). Exposes a **stream api**. + +```javascript +var readdirp = require('readdirp') + , path = require('path') + , es = require('event-stream'); + +// print out all JavaScript files along with their size + +var stream = readdirp({ root: path.join(__dirname), fileFilter: '*.js' }); +stream + .on('warn', function (err) { + console.error('non-fatal error', err); + // optionally call stream.destroy() here in order to abort and cause 'close' to be emitted + }) + .on('error', function (err) { console.error('fatal error', err); }) + .pipe(es.mapSync(function (entry) { + return { path: entry.path, size: entry.stat.size }; + })) + .pipe(es.stringify()) + .pipe(process.stdout); +``` + +Meant to be one of the recursive versions of [fs](http://nodejs.org/docs/latest/api/fs.html) functions, e.g., like [mkdirp](https://github.com/substack/node-mkdirp). + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Installation](#installation) +- [API](#api) + - [entry stream](#entry-stream) + - [options](#options) + - [entry info](#entry-info) + - [Filters](#filters) + - [Callback API](#callback-api) + - [allProcessed ](#allprocessed) + - [fileProcessed](#fileprocessed) +- [More Examples](#more-examples) + - [stream api](#stream-api) + - [stream api pipe](#stream-api-pipe) + - [grep](#grep) + - [using callback api](#using-callback-api) + - [tests](#tests) + + +# Installation + + npm install readdirp + +# API + +***var entryStream = readdirp (options)*** + +Reads given root recursively and returns a `stream` of [entry info](#entry-info)s. + +## entry stream + +Behaves as follows: + +- `emit('data')` passes an [entry info](#entry-info) whenever one is found +- `emit('warn')` passes a non-fatal `Error` that prevents a file/directory from being processed (i.e., if it is + inaccessible to the user) +- `emit('error')` passes a fatal `Error` which also ends the stream (i.e., when illegal options where passed) +- `emit('end')` called when all entries were found and no more will be emitted (i.e., we are done) +- `emit('close')` called when the stream is destroyed via `stream.destroy()` (which could be useful if you want to + manually abort even on a non fatal error) - at that point the stream is no longer `readable` and no more entries, + warning or errors are emitted +- to learn more about streams, consult the very detailed + [nodejs streams documentation](http://nodejs.org/api/stream.html) or the + [stream-handbook](https://github.com/substack/stream-handbook) + + +## options + +- **root**: path in which to start reading and recursing into subdirectories + +- **fileFilter**: filter to include/exclude files found (see [Filters](#filters) for more) + +- **directoryFilter**: filter to include/exclude directories found and to recurse into (see [Filters](#filters) for more) + +- **depth**: depth at which to stop recursing even if more subdirectories are found + +- **entryType**: determines if data events on the stream should be emitted for `'files'`, `'directories'`, `'both'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. Defaults to `'files'`. + +- **lstat**: if `true`, readdirp uses `fs.lstat` instead of `fs.stat` in order to stat files and includes symlink entries in the stream along with files. + +## entry info + +Has the following properties: + +- **parentDir** : directory in which entry was found (relative to given root) +- **fullParentDir** : full path to parent directory +- **name** : name of the file/directory +- **path** : path to the file/directory (relative to given root) +- **fullPath** : full path to the file/directory found +- **stat** : built in [stat object](http://nodejs.org/docs/v0.4.9/api/fs.html#fs.Stats) +- **Example**: (assuming root was `/User/dev/readdirp`) + + parentDir : 'test/bed/root_dir1', + fullParentDir : '/User/dev/readdirp/test/bed/root_dir1', + name : 'root_dir1_subdir1', + path : 'test/bed/root_dir1/root_dir1_subdir1', + fullPath : '/User/dev/readdirp/test/bed/root_dir1/root_dir1_subdir1', + stat : [ ... ] + +## Filters + +There are three different ways to specify filters for files and directories respectively. + +- **function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + +- **glob string**: a string (e.g., `*.js`) which is matched using [minimatch](https://github.com/isaacs/minimatch), so go there for more + information. + + Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. + + Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. + +- **array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. + + `[ '*.json', '*.js' ]` includes all JavaScript and Json files. + + + `[ '!.git', '!node_modules' ]` includes all directories except the '.git' and 'node_modules'. + +Directories that do not pass a filter will not be recursed into. + +## Callback API + +Although the stream api is recommended, readdirp also exposes a callback based api. + +***readdirp (options, callback1 [, callback2])*** + +If callback2 is given, callback1 functions as the **fileProcessed** callback, and callback2 as the **allProcessed** callback. + +If only callback1 is given, it functions as the **allProcessed** callback. + +### allProcessed + +- function with err and res parameters, e.g., `function (err, res) { ... }` +- **err**: array of errors that occurred during the operation, **res may still be present, even if errors occurred** +- **res**: collection of file/directory [entry infos](#entry-info) + +### fileProcessed + +- function with [entry info](#entry-info) parameter e.g., `function (entryInfo) { ... }` + + +# More Examples + +`on('error', ..)`, `on('warn', ..)` and `on('end', ..)` handling omitted for brevity + +```javascript +var readdirp = require('readdirp'); + +// Glob file filter +readdirp({ root: './test/bed', fileFilter: '*.js' }) + .on('data', function (entry) { + // do something with each JavaScript file entry + }); + +// Combined glob file filters +readdirp({ root: './test/bed', fileFilter: [ '*.js', '*.json' ] }) + .on('data', function (entry) { + // do something with each JavaScript and Json file entry + }); + +// Combined negated directory filters +readdirp({ root: './test/bed', directoryFilter: [ '!.git', '!*modules' ] }) + .on('data', function (entry) { + // do something with each file entry found outside '.git' or any modules directory + }); + +// Function directory filter +readdirp({ root: './test/bed', directoryFilter: function (di) { return di.name.length === 9; } }) + .on('data', function (entry) { + // do something with each file entry found inside directories whose name has length 9 + }); + +// Limiting depth +readdirp({ root: './test/bed', depth: 1 }) + .on('data', function (entry) { + // do something with each file entry found up to 1 subdirectory deep + }); + +// callback api +readdirp({ root: '.' }, function(fileInfo) { + // do something with file entry here + }, function (err, res) { + // all done, move on or do final step for all file entries here +}); +``` + +Try more examples by following [instructions](https://github.com/paulmillr/readdirp/blob/master/examples/Readme.md) +on how to get going. + +## tests + +The [readdirp tests](https://github.com/paulmillr/readdirp/blob/master/test/readdirp.js) also will give you a good idea on +how things work. + diff --git a/node_modules/readdirp/node_modules/arr-diff/LICENSE b/node_modules/readdirp/node_modules/arr-diff/LICENSE new file mode 100755 index 0000000000000..d734237bdedc6 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/arr-diff/README.md b/node_modules/readdirp/node_modules/arr-diff/README.md new file mode 100644 index 0000000000000..961f5c3f1bf20 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/arr-diff/index.js b/node_modules/readdirp/node_modules/arr-diff/index.js new file mode 100644 index 0000000000000..90f280772a86e --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/arr-diff/package.json b/node_modules/readdirp/node_modules/arr-diff/package.json new file mode 100644 index 0000000000000..c106813becc29 --- /dev/null +++ b/node_modules/readdirp/node_modules/arr-diff/package.json @@ -0,0 +1,69 @@ +{ + "name": "arr-diff", + "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.", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/arr-diff", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)" + ], + "repository": "jonschlinkert/arr-diff", + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "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" + }, + "keywords": [ + "arr", + "array", + "array differ", + "array-differ", + "diff", + "differ", + "difference" + ], + "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 + } + } +} diff --git a/node_modules/readdirp/node_modules/array-unique/LICENSE b/node_modules/readdirp/node_modules/array-unique/LICENSE new file mode 100755 index 0000000000000..842218cf09a20 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/array-unique/README.md b/node_modules/readdirp/node_modules/array-unique/README.md new file mode 100755 index 0000000000000..41c8c904efa99 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/array-unique/index.js b/node_modules/readdirp/node_modules/array-unique/index.js new file mode 100644 index 0000000000000..7e481e0724df9 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/array-unique/package.json b/node_modules/readdirp/node_modules/array-unique/package.json new file mode 100644 index 0000000000000..d87640abe6823 --- /dev/null +++ b/node_modules/readdirp/node_modules/array-unique/package.json @@ -0,0 +1,62 @@ +{ + "name": "array-unique", + "description": "Remove duplicate values from an array. Fastest ES5 implementation.", + "version": "0.3.2", + "homepage": "https://github.com/jonschlinkert/array-unique", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/array-unique", + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3", + "should": "^10.0.0" + }, + "keywords": [ + "array", + "unique" + ], + "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 + } + } +} diff --git a/node_modules/readdirp/node_modules/braces/LICENSE b/node_modules/readdirp/node_modules/braces/LICENSE new file mode 100644 index 0000000000000..d32ab4426a5f6 --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-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/readdirp/node_modules/braces/README.md b/node_modules/readdirp/node_modules/braces/README.md new file mode 100644 index 0000000000000..f909bfba1a1db --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/README.md @@ -0,0 +1,640 @@ +# braces [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/braces.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/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. + +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 braces +``` + +## Why use braces? + +Brace patterns are great for matching ranges. Users (and implementors) shouldn't have to think about whether or not they will break their application (or yours) from accidentally defining an aggressive brace pattern. _Braces is the only library that offers a [solution to this problem](#performance)_. + +* **Safe(r)**: Braces isn't vulnerable to DoS attacks like [brace-expansion](https://github.com/juliangruber/brace-expansion), [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) (a different bug than the [other regex DoS bug](https://medium.com/node-security/minimatch-redos-vulnerability-590da24e6d3c#.jew0b6mpc)). +* **Accurate**: complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +* **[fast and performant](#benchmarks)**: Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +* **Organized code base**: with parser and compiler that are eas(y|ier) to maintain and update when edge cases crop up. +* **Well-tested**: thousands of test assertions. Passes 100% of the [minimatch](https://github.com/isaacs/minimatch) and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests as well (as of the writing of this). + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +var braces = require('braces'); +braces(pattern[, options]); +``` + +By default, braces returns an optimized regex-source string. To get an array of brace patterns, use `brace.expand()`. + +The following section explains the difference in more detail. _(If you're curious about "why" braces does this by default, see [brace matching pitfalls](#brace-matching-pitfalls)_. + +### Optimized vs. expanded braces + +**Optimized** + +By default, patterns are optimized for regex and matching: + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +``` + +**Expanded** + +To expand patterns the same way as Bash or [minimatch](https://github.com/isaacs/minimatch), use the [.expand](#expand) method: + +```js +console.log(braces.expand('a/{x,y,z}/b')); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] +``` + +Or use [options.expand](#optionsexpand): + +```js +console.log(braces('a/{x,y,z}/b', {expand: true})); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] +``` + +## Features + +* [lists](#lists): Supports "lists": `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +* [sequences](#sequences): Supports alphabetical or numerical "sequences" (ranges): `{1..3}` => `['1', '2', '3']` +* [steps](#steps): Supports "steps" or increments: `{2..10..2}` => `['2', '4', '6', '8', '10']` +* [escaping](#escaping) +* [options](#options) + +### Lists + +Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric lists: + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric ranges (bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a{01..03}b')); // ['a01b', 'a02b', 'a03b'] +console.log(braces.expand('a{1..3}b')); // ['a1b', 'a2b', 'a3b'] +console.log(braces.expand('{a..c}')); // ['a', 'b', 'c'] +console.log(braces.expand('foo/{a..c}')); // ['foo/a', 'foo/b', 'foo/c'] + +// supports padded ranges +console.log(braces('a{01..03}b')); //=> [ 'a(0[1-3])b' ] +console.log(braces('a{001..300}b')); //=> [ 'a(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)b' ] +``` + +### Steps + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `65,536` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (this option is unncessary with the `.expand` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', {expand: true})); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.optimize + +**Type**: `Boolean` + +**Default**: `true` + +**Description**: Enabled by default. + +```js +console.log(braces('a/{b,c}/d')); +//=> [ 'a/(b|c)/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `true` + +**Description**: Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `250` + +**Description**: When `braces.expand()` is used, or `options.expand` is true, brace patterns will automatically be [optimized](#optionsoptimize) when the difference between the range minimum and range maximum exceeds the `rangeLimit`. This is to prevent huge ranges from freezing your application. + +You can set this to any number, or change `options.rangeLimit` to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['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'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +```js +var range = braces.expand('x{a..e}y', { + transform: function(str) { + return 'foo' + str; + } +}); + +console.log(range); +//=> [ 'xfooay', 'xfooby', 'xfoocy', 'xfoody', 'xfooey' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +var braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.unescape + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +* [brace expansion](#brace-expansion) is for generating new lists +* [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +* brace expansion can eat up a huge amount of processing resources +* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch](https://github.com/isaacs/minimatch)** | +| --- | --- | --- | +| `{1..9007199254740991}`[1] | `298 B` (5ms 459μs) | N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch](https://github.com/isaacs/minimatch)** | +| --- | --- | --- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +```bash +Benchmarking: (8 of 8) + · combination-nested + · combination + · escaped + · list-basic + · list-multiple + · no-braces + · sequence-basic + · sequence-multiple + +# benchmark/fixtures/combination-nested.js (52 bytes) + brace-expansion x 4,756 ops/sec ±1.09% (86 runs sampled) + braces x 11,202,303 ops/sec ±1.06% (88 runs sampled) + minimatch x 4,816 ops/sec ±0.99% (87 runs sampled) + + fastest is braces + +# benchmark/fixtures/combination.js (51 bytes) + brace-expansion x 625 ops/sec ±0.87% (87 runs sampled) + braces x 11,031,884 ops/sec ±0.72% (90 runs sampled) + minimatch x 637 ops/sec ±0.84% (88 runs sampled) + + fastest is braces + +# benchmark/fixtures/escaped.js (44 bytes) + brace-expansion x 163,325 ops/sec ±1.05% (87 runs sampled) + braces x 10,655,071 ops/sec ±1.22% (88 runs sampled) + minimatch x 147,495 ops/sec ±0.96% (88 runs sampled) + + fastest is braces + +# benchmark/fixtures/list-basic.js (40 bytes) + brace-expansion x 99,726 ops/sec ±1.07% (83 runs sampled) + braces x 10,596,584 ops/sec ±0.98% (88 runs sampled) + minimatch x 100,069 ops/sec ±1.17% (86 runs sampled) + + fastest is braces + +# benchmark/fixtures/list-multiple.js (52 bytes) + brace-expansion x 34,348 ops/sec ±1.08% (88 runs sampled) + braces x 9,264,131 ops/sec ±1.12% (88 runs sampled) + minimatch x 34,893 ops/sec ±0.87% (87 runs sampled) + + fastest is braces + +# benchmark/fixtures/no-braces.js (48 bytes) + brace-expansion x 275,368 ops/sec ±1.18% (89 runs sampled) + braces x 9,134,677 ops/sec ±0.95% (88 runs sampled) + minimatch x 3,755,954 ops/sec ±1.13% (89 runs sampled) + + fastest is braces + +# benchmark/fixtures/sequence-basic.js (41 bytes) + brace-expansion x 5,492 ops/sec ±1.35% (87 runs sampled) + braces x 8,485,034 ops/sec ±1.28% (89 runs sampled) + minimatch x 5,341 ops/sec ±1.17% (87 runs sampled) + + fastest is braces + +# benchmark/fixtures/sequence-multiple.js (51 bytes) + brace-expansion x 116 ops/sec ±0.77% (77 runs sampled) + braces x 9,445,118 ops/sec ±1.32% (84 runs sampled) + minimatch x 109 ops/sec ±1.16% (76 runs sampled) + + fastest is braces +``` + +## 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: + +* [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.") +* [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/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [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.") +* [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/micromatch/nanomatch) | [homepage](https://github.com/micromatch/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)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 188 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | + +### 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 17, 2018._ + +
+
+
    +
  1. this is the largest safe integer allowed in JavaScript. + +
  2. +
+
\ No newline at end of file diff --git a/node_modules/readdirp/node_modules/braces/index.js b/node_modules/readdirp/node_modules/braces/index.js new file mode 100644 index 0000000000000..048e1c2334573 --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/index.js @@ -0,0 +1,318 @@ +'use strict'; + +/** + * Module dependencies + */ + +var toRegex = require('to-regex'); +var unique = require('array-unique'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var Braces = require('./lib/braces'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; +var cache = {}; + +/** + * Convert the given `braces` pattern into a regex-compatible string. By default, only one string is generated for every input string. Set `options.expand` to true to return an array of patterns (similar to Bash or minimatch. Before using `options.expand`, it's recommended that you read the [performance notes](#performance)). + * + * ```js + * var braces = require('braces'); + * console.log(braces('{a,b,c}')); + * //=> ['(a|b|c)'] + * + * console.log(braces('{a,b,c}', {expand: true})); + * //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +function braces(pattern, options) { + var key = utils.createKey(String(pattern), options); + var arr = []; + + var disabled = options && options.cache === false; + if (!disabled && cache.hasOwnProperty(key)) { + return cache[key]; + } + + if (Array.isArray(pattern)) { + for (var i = 0; i < pattern.length; i++) { + arr.push.apply(arr, braces.create(pattern[i], options)); + } + } else { + arr = braces.create(pattern, options); + } + + if (options && options.nodupes === true) { + arr = unique(arr); + } + + if (!disabled) { + cache[key] = arr; + } + return arr; +} + +/** + * Expands a brace pattern into an array. This method is called by the main [braces](#braces) function when `options.expand` is true. Before using this method it's recommended that you read the [performance notes](#performance)) and advantages of using [.optimize](#optimize) instead. + * + * ```js + * var braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = function(pattern, options) { + return braces.create(pattern, extend({}, options, {expand: true})); +}; + +/** + * Expands a brace pattern into a regex-compatible, optimized string. This method is called by the main [braces](#braces) function by default. + * + * ```js + * var braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.optimize = function(pattern, options) { + return braces.create(pattern, options); +}; + +/** + * Processes a brace pattern and returns either an expanded array (if `options.expand` is true), a highly optimized regex-compatible string. This method is called by the main [braces](#braces) function. + * + * ```js + * var braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var maxLength = (options && options.maxLength) || MAX_LENGTH; + if (pattern.length >= maxLength) { + throw new Error('expected pattern to be less than ' + maxLength + ' characters'); + } + + function create() { + if (pattern === '' || pattern.length < 3) { + return [pattern]; + } + + if (utils.isEmptySets(pattern)) { + return []; + } + + if (utils.isQuotedString(pattern)) { + return [pattern.slice(1, -1)]; + } + + var proto = new Braces(options); + var result = !options || options.expand !== true + ? proto.optimize(pattern, options) + : proto.expand(pattern, options); + + // get the generated pattern(s) + var arr = result.output; + + // filter out empty strings if specified + if (options && options.noempty === true) { + arr = arr.filter(Boolean); + } + + // filter out duplicates if specified + if (options && options.nodupes === true) { + arr = unique(arr); + } + + Object.defineProperty(arr, 'result', { + enumerable: false, + value: result + }); + + return arr; + } + + return memoize('create', pattern, options, create); +}; + +/** + * Create a regular expression from the given string `pattern`. + * + * ```js + * var braces = require('braces'); + * + * console.log(braces.makeRe('id-{200..300}')); + * //=> /^(?:id-(20[0-9]|2[1-9][0-9]|300))$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +braces.makeRe = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var maxLength = (options && options.maxLength) || MAX_LENGTH; + if (pattern.length >= maxLength) { + throw new Error('expected pattern to be less than ' + maxLength + ' characters'); + } + + function makeRe() { + var arr = braces(pattern, options); + var opts = extend({strictErrors: false}, options); + return toRegex(arr, opts); + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var braces = require('braces'); + * var ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `pattern` Brace pattern to parse + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = function(pattern, options) { + var proto = new Braces(options); + return proto.parse(pattern, options); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var braces = require('braces'); + * var ast = braces.parse('a/{b,c}/d'); + * console.log(braces.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` AST from [.parse](#parse). If a string is passed it will be parsed first. + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +braces.compile = function(ast, options) { + var proto = new Braces(options); + return proto.compile(ast, options); +}; + +/** + * Clear the regex cache. + * + * ```js + * braces.clearCache(); + * ``` + * @api public + */ + +braces.clearCache = function() { + cache = braces.cache = {}; +}; + +/** + * Memoize a generated regex or function. A unique key is generated + * from the method name, pattern, and user-defined options. Set + * options.memoize to false to disable. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + ':' + pattern, options); + var disabled = options && options.cache === false; + if (disabled) { + braces.clearCache(); + return fn(pattern, options); + } + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + + var res = fn(pattern, options); + cache[key] = res; + return res; +} + +/** + * Expose `Braces` constructor and methods + * @type {Function} + */ + +braces.Braces = Braces; +braces.compilers = compilers; +braces.parsers = parsers; +braces.cache = cache; + +/** + * Expose `braces` + * @type {Function} + */ + +module.exports = braces; diff --git a/node_modules/readdirp/node_modules/braces/lib/braces.js b/node_modules/readdirp/node_modules/braces/lib/braces.js new file mode 100644 index 0000000000000..baf6bf1bc2bde --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/lib/braces.js @@ -0,0 +1,104 @@ +'use strict'; + +var extend = require('extend-shallow'); +var Snapdragon = require('snapdragon'); +var compilers = require('./compilers'); +var parsers = require('./parsers'); +var utils = require('./utils'); + +/** + * Customize Snapdragon parser and renderer + */ + +function Braces(options) { + this.options = extend({}, options); +} + +/** + * Initialize braces + */ + +Braces.prototype.init = function(options) { + if (this.isInitialized) return; + this.isInitialized = true; + var opts = utils.createOptions({}, this.options, options); + this.snapdragon = this.options.snapdragon || new Snapdragon(opts); + this.compiler = this.snapdragon.compiler; + this.parser = this.snapdragon.parser; + + compilers(this.snapdragon, opts); + parsers(this.snapdragon, opts); + + /** + * Call Snapdragon `.parse` method. When AST is returned, we check to + * see if any unclosed braces are left on the stack and, if so, we iterate + * over the stack and correct the AST so that compilers are called in the correct + * order and unbalance braces are properly escaped. + */ + + utils.define(this.snapdragon, 'parse', function(pattern, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + this.parser.ast.input = pattern; + + var stack = this.parser.stack; + while (stack.length) { + addParent({type: 'brace.close', val: ''}, stack.pop()); + } + + function addParent(node, parent) { + utils.define(node, 'parent', parent); + parent.nodes.push(node); + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); +}; + +/** + * Decorate `.parse` method + */ + +Braces.prototype.parse = function(ast, options) { + if (ast && typeof ast === 'object' && ast.nodes) return ast; + this.init(options); + return this.snapdragon.parse(ast, options); +}; + +/** + * Decorate `.compile` method + */ + +Braces.prototype.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = this.parse(ast, options); + } else { + this.init(options); + } + return this.snapdragon.compile(ast, options); +}; + +/** + * Expand + */ + +Braces.prototype.expand = function(pattern) { + var ast = this.parse(pattern, {expand: true}); + return this.compile(ast, {expand: true}); +}; + +/** + * Optimize + */ + +Braces.prototype.optimize = function(pattern) { + var ast = this.parse(pattern, {optimize: true}); + return this.compile(ast, {optimize: true}); +}; + +/** + * Expose `Braces` + */ + +module.exports = Braces; diff --git a/node_modules/readdirp/node_modules/braces/lib/compilers.js b/node_modules/readdirp/node_modules/braces/lib/compilers.js new file mode 100644 index 0000000000000..a3b820e415788 --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/lib/compilers.js @@ -0,0 +1,282 @@ +'use strict'; + +var utils = require('./utils'); + +module.exports = function(braces, options) { + braces.compiler + + /** + * bos + */ + + .set('bos', function() { + if (this.output) return; + this.ast.queue = isEscaped(this.ast) ? [this.ast.val] : []; + this.ast.count = 1; + }) + + /** + * Square brackets + */ + + .set('bracket', function(node) { + var close = node.close; + var open = !node.escaped ? '[' : '\\['; + var negated = node.negated; + var inner = node.inner; + + inner = inner.replace(/\\(?=[\\\w]|$)/g, '\\\\'); + if (inner === ']-') { + inner = '\\]\\-'; + } + + if (negated && inner.indexOf('.') === -1) { + inner += '.'; + } + if (negated && inner.indexOf('/') === -1) { + inner += '/'; + } + + var val = open + negated + inner + close; + var queue = node.parent.queue; + var last = utils.arrayify(queue.pop()); + + queue.push(utils.join(last, val)); + queue.push.apply(queue, []); + }) + + /** + * Brace + */ + + .set('brace', function(node) { + node.queue = isEscaped(node) ? [node.val] : []; + node.count = 1; + return this.mapVisit(node.nodes); + }) + + /** + * Open + */ + + .set('brace.open', function(node) { + node.parent.open = node.val; + }) + + /** + * Inner + */ + + .set('text', function(node) { + var queue = node.parent.queue; + var escaped = node.escaped; + var segs = [node.val]; + + if (node.optimize === false) { + options = utils.extend({}, options, {optimize: false}); + } + + if (node.multiplier > 1) { + node.parent.count *= node.multiplier; + } + + if (options.quantifiers === true && utils.isQuantifier(node.val)) { + escaped = true; + + } else if (node.val.length > 1) { + if (isType(node.parent, 'brace') && !isEscaped(node)) { + var expanded = utils.expand(node.val, options); + segs = expanded.segs; + + if (expanded.isOptimized) { + node.parent.isOptimized = true; + } + + // if nothing was expanded, we probably have a literal brace + if (!segs.length) { + var val = (expanded.val || node.val); + if (options.unescape !== false) { + // unescape unexpanded brace sequence/set separators + val = val.replace(/\\([,.])/g, '$1'); + // strip quotes + val = val.replace(/["'`]/g, ''); + } + + segs = [val]; + escaped = true; + } + } + + } else if (node.val === ',') { + if (options.expand) { + node.parent.queue.push(['']); + segs = ['']; + } else { + segs = ['|']; + } + } else { + escaped = true; + } + + if (escaped && isType(node.parent, 'brace')) { + if (node.parent.nodes.length <= 4 && node.parent.count === 1) { + node.parent.escaped = true; + } else if (node.parent.length <= 3) { + node.parent.escaped = true; + } + } + + if (!hasQueue(node.parent)) { + node.parent.queue = segs; + return; + } + + var last = utils.arrayify(queue.pop()); + if (node.parent.count > 1 && options.expand) { + last = multiply(last, node.parent.count); + node.parent.count = 1; + } + + queue.push(utils.join(utils.flatten(last), segs.shift())); + queue.push.apply(queue, segs); + }) + + /** + * Close + */ + + .set('brace.close', function(node) { + var queue = node.parent.queue; + var prev = node.parent.parent; + var last = prev.queue.pop(); + var open = node.parent.open; + var close = node.val; + + if (open && close && isOptimized(node, options)) { + open = '('; + close = ')'; + } + + // if a close brace exists, and the previous segment is one character + // don't wrap the result in braces or parens + var ele = utils.last(queue); + if (node.parent.count > 1 && options.expand) { + ele = multiply(queue.pop(), node.parent.count); + node.parent.count = 1; + queue.push(ele); + } + + if (close && typeof ele === 'string' && ele.length === 1) { + open = ''; + close = ''; + } + + if ((isLiteralBrace(node, options) || noInner(node)) && !node.parent.hasEmpty) { + queue.push(utils.join(open, queue.pop() || '')); + queue = utils.flatten(utils.join(queue, close)); + } + + if (typeof last === 'undefined') { + prev.queue = [queue]; + } else { + prev.queue.push(utils.flatten(utils.join(last, queue))); + } + }) + + /** + * eos + */ + + .set('eos', function(node) { + if (this.input) return; + + if (options.optimize !== false) { + this.output = utils.last(utils.flatten(this.ast.queue)); + } else if (Array.isArray(utils.last(this.ast.queue))) { + this.output = utils.flatten(this.ast.queue.pop()); + } else { + this.output = utils.flatten(this.ast.queue); + } + + if (node.parent.count > 1 && options.expand) { + this.output = multiply(this.output, node.parent.count); + } + + this.output = utils.arrayify(this.output); + this.ast.queue = []; + }); + +}; + +/** + * Multiply the segments in the current brace level + */ + +function multiply(queue, n, options) { + return utils.flatten(utils.repeat(utils.arrayify(queue), n)); +} + +/** + * Return true if `node` is escaped + */ + +function isEscaped(node) { + return node.escaped === true; +} + +/** + * Returns true if regex parens should be used for sets. If the parent `type` + * is not `brace`, then we're on a root node, which means we should never + * expand segments and open/close braces should be `{}` (since this indicates + * a brace is missing from the set) + */ + +function isOptimized(node, options) { + if (node.parent.isOptimized) return true; + return isType(node.parent, 'brace') + && !isEscaped(node.parent) + && options.expand !== true; +} + +/** + * Returns true if the value in `node` should be wrapped in a literal brace. + * @return {Boolean} + */ + +function isLiteralBrace(node, options) { + return isEscaped(node.parent) || options.optimize !== false; +} + +/** + * Returns true if the given `node` does not have an inner value. + * @return {Boolean} + */ + +function noInner(node, type) { + if (node.parent.queue.length === 1) { + return true; + } + var nodes = node.parent.nodes; + return nodes.length === 3 + && isType(nodes[0], 'brace.open') + && !isType(nodes[1], 'text') + && isType(nodes[2], 'brace.close'); +} + +/** + * Returns true if the given `node` is the given `type` + * @return {Boolean} + */ + +function isType(node, type) { + return typeof node !== 'undefined' && node.type === type; +} + +/** + * Returns true if the given `node` has a non-empty queue. + * @return {Boolean} + */ + +function hasQueue(node) { + return Array.isArray(node.queue) && node.queue.length; +} diff --git a/node_modules/readdirp/node_modules/braces/lib/parsers.js b/node_modules/readdirp/node_modules/braces/lib/parsers.js new file mode 100644 index 0000000000000..8bf3e92b55f7c --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/lib/parsers.js @@ -0,0 +1,360 @@ +'use strict'; + +var Node = require('snapdragon-node'); +var utils = require('./utils'); + +/** + * Braces parsers + */ + +module.exports = function(braces, options) { + braces.parser + .set('bos', function() { + if (!this.parsed) { + this.ast = this.nodes[0] = new Node(this.ast); + } + }) + + /** + * Character parsers + */ + + .set('escape', function() { + var pos = this.position(); + var m = this.match(/^(?:\\(.)|\$\{)/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + val: m[0] + })); + + if (node.val === '\\\\') { + return node; + } + + if (node.val === '${') { + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + node.val += ch; + if (ch === '\\') { + node.val += str[++idx]; + continue; + } + if (ch === '}') { + break; + } + } + } + + if (this.options.unescape !== false) { + node.val = node.val.replace(/\\([{}])/g, '$1'); + } + + if (last.val === '"' && this.input.charAt(0) === '"') { + last.val = node.val; + this.consume(1); + return; + } + + return concatNodes.call(this, pos, node, prev, options); + }) + + /** + * Brackets: "[...]" (basic, this is overridden by + * other parsers in more advanced implementations) + */ + + .set('bracket', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^(?:\[([!^]?)([^\]]{2,}|\]-)(\]|[^*+?]+)|\[)/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + var negated = m[1] ? '^' : ''; + var inner = m[2] || ''; + var close = m[3] || ''; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var esc = this.input.slice(0, 2); + if (inner === '' && esc === '\\]') { + inner += esc; + this.consume(2); + + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + if (ch === ']') { + close = ch; + break; + } + inner += ch; + } + } + + return pos(new Node({ + type: 'bracket', + val: val, + escaped: close !== ']', + negated: negated, + inner: inner, + close: close + })); + }) + + /** + * Empty braces (we capture these early to + * speed up processing in the compiler) + */ + + .set('multiplier', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^\{((?:,|\{,+\})+)\}/); + if (!m) return; + + this.multiplier = true; + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + match: m, + val: val + })); + + return concatNodes.call(this, pos, node, prev, options); + }) + + /** + * Open + */ + + .set('brace.open', function() { + var pos = this.position(); + var m = this.match(/^\{(?!(?:[^\\}]?|,+)\})/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + // if the last parsed character was an extglob character + // we need to _not optimize_ the brace pattern because + // it might be mistaken for an extglob by a downstream parser + if (last && last.val && isExtglobChar(last.val.slice(-1))) { + last.optimize = false; + } + + var open = pos(new Node({ + type: 'brace.open', + val: m[0] + })); + + var node = pos(new Node({ + type: 'brace', + nodes: [] + })); + + node.push(open); + prev.push(node); + this.push('brace', node); + }) + + /** + * Close + */ + + .set('brace.close', function() { + var pos = this.position(); + var m = this.match(/^\}/); + if (!m || !m[0]) return; + + var brace = this.pop('brace'); + var node = pos(new Node({ + type: 'brace.close', + val: m[0] + })); + + if (!this.isType(brace, 'brace')) { + if (this.options.strict) { + throw new Error('missing opening "{"'); + } + node.type = 'text'; + node.multiplier = 0; + node.escaped = true; + return node; + } + + var prev = this.prev(); + var last = utils.last(prev.nodes); + if (last.text) { + var lastNode = utils.last(last.nodes); + if (lastNode.val === ')' && /[!@*?+]\(/.test(last.text)) { + var open = last.nodes[0]; + var text = last.nodes[1]; + if (open.type === 'brace.open' && text && text.type === 'text') { + text.optimize = false; + } + } + } + + if (brace.nodes.length > 2) { + var first = brace.nodes[1]; + if (first.type === 'text' && first.val === ',') { + brace.nodes.splice(1, 1); + brace.nodes.push(first); + } + } + + brace.push(node); + }) + + /** + * Capture boundary characters + */ + + .set('boundary', function() { + var pos = this.position(); + var m = this.match(/^[$^](?!\{)/); + if (!m) return; + return pos(new Node({ + type: 'text', + val: m[0] + })); + }) + + /** + * One or zero, non-comma characters wrapped in braces + */ + + .set('nobrace', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^\{[^,]?\}/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + return pos(new Node({ + type: 'text', + multiplier: 0, + val: val + })); + }) + + /** + * Text + */ + + .set('text', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^((?!\\)[^${}[\]])+/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + val: val + })); + + return concatNodes.call(this, pos, node, prev, options); + }); +}; + +/** + * Returns true if the character is an extglob character. + */ + +function isExtglobChar(ch) { + return ch === '!' || ch === '@' || ch === '*' || ch === '?' || ch === '+'; +} + +/** + * Combine text nodes, and calculate empty sets (`{,,}`) + * @param {Function} `pos` Function to calculate node position + * @param {Object} `node` AST node + * @return {Object} + */ + +function concatNodes(pos, node, parent, options) { + node.orig = node.val; + var prev = this.prev(); + var last = utils.last(prev.nodes); + var isEscaped = false; + + if (node.val.length > 1) { + var a = node.val.charAt(0); + var b = node.val.slice(-1); + + isEscaped = (a === '"' && b === '"') + || (a === "'" && b === "'") + || (a === '`' && b === '`'); + } + + if (isEscaped && options.unescape !== false) { + node.val = node.val.slice(1, node.val.length - 1); + node.escaped = true; + } + + if (node.match) { + var match = node.match[1]; + if (!match || match.indexOf('}') === -1) { + match = node.match[0]; + } + + // replace each set with a single "," + var val = match.replace(/\{/g, ',').replace(/\}/g, ''); + node.multiplier *= val.length; + node.val = ''; + } + + var simpleText = last.type === 'text' + && last.multiplier === 1 + && node.multiplier === 1 + && node.val; + + if (simpleText) { + last.val += node.val; + return; + } + + prev.push(node); +} diff --git a/node_modules/readdirp/node_modules/braces/lib/utils.js b/node_modules/readdirp/node_modules/braces/lib/utils.js new file mode 100644 index 0000000000000..471667171d324 --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/lib/utils.js @@ -0,0 +1,343 @@ +'use strict'; + +var splitString = require('split-string'); +var utils = module.exports; + +/** + * Module dependencies + */ + +utils.extend = require('extend-shallow'); +utils.flatten = require('arr-flatten'); +utils.isObject = require('isobject'); +utils.fillRange = require('fill-range'); +utils.repeat = require('repeat-element'); +utils.unique = require('array-unique'); + +utils.define = function(obj, key, val) { + Object.defineProperty(obj, key, { + writable: true, + configurable: true, + enumerable: false, + value: val + }); +}; + +/** + * Returns true if the given string contains only empty brace sets. + */ + +utils.isEmptySets = function(str) { + return /^(?:\{,\})+$/.test(str); +}; + +/** + * Returns true if the given string contains only empty brace sets. + */ + +utils.isQuotedString = function(str) { + var open = str.charAt(0); + if (open === '\'' || open === '"' || open === '`') { + return str.slice(-1) === open; + } + return false; +}; + +/** + * Create the key to use for memoization. The unique key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + var id = pattern; + if (typeof options === 'undefined') { + return id; + } + var keys = Object.keys(options); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + id += ';' + key + '=' + String(options[key]); + } + return id; +}; + +/** + * Normalize options + */ + +utils.createOptions = function(options) { + var opts = utils.extend.apply(null, arguments); + if (typeof opts.expand === 'boolean') { + opts.optimize = !opts.expand; + } + if (typeof opts.optimize === 'boolean') { + opts.expand = !opts.optimize; + } + if (opts.optimize === true) { + opts.makeRe = true; + } + return opts; +}; + +/** + * Join patterns in `a` to patterns in `b` + */ + +utils.join = function(a, b, options) { + options = options || {}; + a = utils.arrayify(a); + b = utils.arrayify(b); + + if (!a.length) return b; + if (!b.length) return a; + + var len = a.length; + var idx = -1; + var arr = []; + + while (++idx < len) { + var val = a[idx]; + if (Array.isArray(val)) { + for (var i = 0; i < val.length; i++) { + val[i] = utils.join(val[i], b, options); + } + arr.push(val); + continue; + } + + for (var j = 0; j < b.length; j++) { + var bval = b[j]; + + if (Array.isArray(bval)) { + arr.push(utils.join(val, bval, options)); + } else { + arr.push(val + bval); + } + } + } + return arr; +}; + +/** + * Split the given string on `,` if not escaped. + */ + +utils.split = function(str, options) { + var opts = utils.extend({sep: ','}, options); + if (typeof opts.keepQuotes !== 'boolean') { + opts.keepQuotes = true; + } + if (opts.unescape === false) { + opts.keepEscaping = true; + } + return splitString(str, opts, utils.escapeBrackets(opts)); +}; + +/** + * Expand ranges or sets in the given `pattern`. + * + * @param {String} `str` + * @param {Object} `options` + * @return {Object} + */ + +utils.expand = function(str, options) { + var opts = utils.extend({rangeLimit: 10000}, options); + var segs = utils.split(str, opts); + var tok = { segs: segs }; + + if (utils.isQuotedString(str)) { + return tok; + } + + if (opts.rangeLimit === true) { + opts.rangeLimit = 10000; + } + + if (segs.length > 1) { + if (opts.optimize === false) { + tok.val = segs[0]; + return tok; + } + + tok.segs = utils.stringifyArray(tok.segs); + } else if (segs.length === 1) { + var arr = str.split('..'); + + if (arr.length === 1) { + tok.val = tok.segs[tok.segs.length - 1] || tok.val || str; + tok.segs = []; + return tok; + } + + if (arr.length === 2 && arr[0] === arr[1]) { + tok.escaped = true; + tok.val = arr[0]; + tok.segs = []; + return tok; + } + + if (arr.length > 1) { + if (opts.optimize !== false) { + opts.optimize = true; + delete opts.expand; + } + + if (opts.optimize !== true) { + var min = Math.min(arr[0], arr[1]); + var max = Math.max(arr[0], arr[1]); + var step = arr[2] || 1; + + if (opts.rangeLimit !== false && ((max - min) / step >= opts.rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + } + + arr.push(opts); + tok.segs = utils.fillRange.apply(null, arr); + + if (!tok.segs.length) { + tok.escaped = true; + tok.val = str; + return tok; + } + + if (opts.optimize === true) { + tok.segs = utils.stringifyArray(tok.segs); + } + + if (tok.segs === '') { + tok.val = str; + } else { + tok.val = tok.segs[0]; + } + return tok; + } + } else { + tok.val = str; + } + return tok; +}; + +/** + * Ensure commas inside brackets and parens are not split. + * @param {Object} `tok` Token from the `split-string` module + * @return {undefined} + */ + +utils.escapeBrackets = function(options) { + return function(tok) { + if (tok.escaped && tok.val === 'b') { + tok.val = '\\b'; + return; + } + + if (tok.val !== '(' && tok.val !== '[') return; + var opts = utils.extend({}, options); + var brackets = []; + var parens = []; + var stack = []; + var val = tok.val; + var str = tok.str; + var i = tok.idx - 1; + + while (++i < str.length) { + var ch = str[i]; + + if (ch === '\\') { + val += (opts.keepEscaping === false ? '' : ch) + str[++i]; + continue; + } + + if (ch === '(') { + parens.push(ch); + stack.push(ch); + } + + if (ch === '[') { + brackets.push(ch); + stack.push(ch); + } + + if (ch === ')') { + parens.pop(); + stack.pop(); + if (!stack.length) { + val += ch; + break; + } + } + + if (ch === ']') { + brackets.pop(); + stack.pop(); + if (!stack.length) { + val += ch; + break; + } + } + val += ch; + } + + tok.split = false; + tok.val = val.slice(1); + tok.idx = i; + }; +}; + +/** + * Returns true if the given string looks like a regex quantifier + * @return {Boolean} + */ + +utils.isQuantifier = function(str) { + return /^(?:[0-9]?,[0-9]|[0-9],)$/.test(str); +}; + +/** + * Cast `val` to an array. + * @param {*} `val` + */ + +utils.stringifyArray = function(arr) { + return [utils.arrayify(arr).join('|')]; +}; + +/** + * Cast `val` to an array. + * @param {*} `val` + */ + +utils.arrayify = function(arr) { + if (typeof arr === 'undefined') { + return []; + } + if (typeof arr === 'string') { + return [arr]; + } + return arr; +}; + +/** + * Returns true if the given `str` is a non-empty string + * @return {Boolean} + */ + +utils.isString = function(str) { + return str != null && typeof str === 'string'; +}; + +/** + * Get the last element from `array` + * @param {Array} `array` + * @return {*} + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +utils.escapeRegex = function(str) { + return str.replace(/\\?([!^*?()[\]{}+?/])/g, '\\$1'); +}; diff --git a/node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/LICENSE b/node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/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/readdirp/node_modules/braces/node_modules/extend-shallow/README.md b/node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/README.md new file mode 100644 index 0000000000000..cdc45d4ff7ad0 --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/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/readdirp/node_modules/braces/node_modules/extend-shallow/index.js b/node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/index.js new file mode 100644 index 0000000000000..92a067fcc489b --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/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/readdirp/node_modules/braces/node_modules/extend-shallow/package.json b/node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json new file mode 100644 index 0000000000000..b42e01c7a79e9 --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json @@ -0,0 +1,56 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "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" + }, + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ] +} \ No newline at end of file diff --git a/node_modules/readdirp/node_modules/braces/package.json b/node_modules/readdirp/node_modules/braces/package.json new file mode 100644 index 0000000000000..96cbb2b75c3d8 --- /dev/null +++ b/node_modules/readdirp/node_modules/braces/package.json @@ -0,0 +1,108 @@ +{ + "name": "braces", + "description": "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.", + "version": "2.3.2", + "homepage": "https://github.com/micromatch/braces", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "hemanth.hm (http://h3manth.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/braces", + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^2.0.0", + "brace-expansion": "^1.1.8", + "cross-spawn": "^5.1.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", + "is-windows": "^1.0.1", + "minimatch": "^3.0.4", + "mocha": "^3.2.0", + "noncharacters": "^1.1.0", + "text-table": "^0.2.0", + "time-diff": "^0.3.1", + "yargs-parser": "^8.0.0" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "expand-brackets", + "extglob", + "fill-range", + "micromatch", + "nanomatch" + ] + } + } +} diff --git a/node_modules/readdirp/node_modules/expand-brackets/LICENSE b/node_modules/readdirp/node_modules/expand-brackets/LICENSE new file mode 100644 index 0000000000000..6525171722f64 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/README.md b/node_modules/readdirp/node_modules/expand-brackets/README.md new file mode 100644 index 0000000000000..c0e33d080c404 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/changelog.md b/node_modules/readdirp/node_modules/expand-brackets/changelog.md new file mode 100644 index 0000000000000..0c0723ab4330c --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/index.js b/node_modules/readdirp/node_modules/expand-brackets/index.js new file mode 100644 index 0000000000000..74b8b1556a491 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/lib/compilers.js b/node_modules/readdirp/node_modules/expand-brackets/lib/compilers.js new file mode 100644 index 0000000000000..fbf7fe818b71d --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/lib/parsers.js b/node_modules/readdirp/node_modules/expand-brackets/lib/parsers.js new file mode 100644 index 0000000000000..450a512e4c586 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/lib/utils.js b/node_modules/readdirp/node_modules/expand-brackets/lib/utils.js new file mode 100644 index 0000000000000..599ff5126b0af --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/node_modules/define-property/LICENSE b/node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/node_modules/define-property/README.md b/node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/README.md new file mode 100644 index 0000000000000..8cac698ad8d86 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/node_modules/define-property/index.js b/node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/index.js new file mode 100644 index 0000000000000..3e0e5e133caf5 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/node_modules/define-property/package.json b/node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/package.json new file mode 100644 index 0000000000000..43561bf56af1b --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/LICENSE b/node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/README.md b/node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/README.md new file mode 100644 index 0000000000000..cdc45d4ff7ad0 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/index.js b/node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/index.js new file mode 100644 index 0000000000000..92a067fcc489b --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/package.json b/node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/package.json new file mode 100644 index 0000000000000..b42e01c7a79e9 --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow/package.json @@ -0,0 +1,56 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "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" + }, + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ] +} \ No newline at end of file diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.editorconfig b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000000000..449f0da4c1605 --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.eslintrc b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000000000..24e5090e5497d --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.gitattributes b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000000000..660957e70cf2a --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000000000..37535da621119 --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.nycrc b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/CHANGELOG.md b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000000000..4963353ee916e --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000000000..c0d7f136277fb --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/README.md b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/README.md new file mode 100644 index 0000000000000..fd9ddcfb7373e --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), 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 +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### 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. +* [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. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/index.js b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/index.js new file mode 100644 index 0000000000000..c9dd24d225e8f --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/package.json b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/package.json new file mode 100644 index 0000000000000..6d6ca8ba08cee --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/test/index.js b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000000000..0b74a35fd8807 --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/readdirp/node_modules/expand-brackets/package.json b/node_modules/readdirp/node_modules/expand-brackets/package.json new file mode 100644 index 0000000000000..1c5233cf7e922 --- /dev/null +++ b/node_modules/readdirp/node_modules/expand-brackets/package.json @@ -0,0 +1,85 @@ +{ + "name": "expand-brackets", + "description": "Expand POSIX bracket expressions (character classes) in glob patterns.", + "version": "2.1.4", + "homepage": "https://github.com/jonschlinkert/expand-brackets", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Martin Kolárik (http://kolarik.sk)" + ], + "repository": "jonschlinkert/expand-brackets", + "bugs": { + "url": "https://github.com/jonschlinkert/expand-brackets/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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" + }, + "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" + }, + "keywords": [ + "bracket", + "brackets", + "character class", + "expand", + "expression", + "posix" + ], + "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 + } + } +} diff --git a/node_modules/readdirp/node_modules/extglob/LICENSE b/node_modules/readdirp/node_modules/extglob/LICENSE new file mode 100644 index 0000000000000..e33d14b754e8c --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/README.md b/node_modules/readdirp/node_modules/extglob/README.md new file mode 100644 index 0000000000000..3255ea2b78c67 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/changelog.md b/node_modules/readdirp/node_modules/extglob/changelog.md new file mode 100644 index 0000000000000..c9fc4fcd72cb9 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/index.js b/node_modules/readdirp/node_modules/extglob/index.js new file mode 100644 index 0000000000000..116e6d5cbbc94 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/lib/.DS_Store b/node_modules/readdirp/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/readdirp/node_modules/extglob/lib/extglob.js b/node_modules/readdirp/node_modules/extglob/lib/extglob.js new file mode 100644 index 0000000000000..015f9289553a2 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/lib/parsers.js b/node_modules/readdirp/node_modules/extglob/lib/parsers.js new file mode 100644 index 0000000000000..2ba7352e9e242 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/lib/utils.js b/node_modules/readdirp/node_modules/extglob/lib/utils.js new file mode 100644 index 0000000000000..37a59fbce1563 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/node_modules/define-property/LICENSE b/node_modules/readdirp/node_modules/extglob/node_modules/define-property/LICENSE new file mode 100644 index 0000000000000..ec85897eb167c --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/node_modules/define-property/README.md b/node_modules/readdirp/node_modules/extglob/node_modules/define-property/README.md new file mode 100644 index 0000000000000..2f1af05f3c439 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/node_modules/define-property/index.js b/node_modules/readdirp/node_modules/extglob/node_modules/define-property/index.js new file mode 100644 index 0000000000000..27c19ebf6d0e0 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/node_modules/define-property/package.json b/node_modules/readdirp/node_modules/extglob/node_modules/define-property/package.json new file mode 100644 index 0000000000000..e0ab1ca0066c5 --- /dev/null +++ b/node_modules/readdirp/node_modules/extglob/node_modules/define-property/package.json @@ -0,0 +1,62 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "extend-shallow", + "merge-deep", + "assign-deep", + "mixin-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/LICENSE b/node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/node_modules/extend-shallow/README.md b/node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/README.md new file mode 100644 index 0000000000000..cdc45d4ff7ad0 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/node_modules/extend-shallow/index.js b/node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/index.js new file mode 100644 index 0000000000000..92a067fcc489b --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/extglob/node_modules/extend-shallow/package.json b/node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/package.json new file mode 100644 index 0000000000000..b42e01c7a79e9 --- /dev/null +++ b/node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow/package.json @@ -0,0 +1,56 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "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" + }, + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ] +} \ No newline at end of file diff --git a/node_modules/readdirp/node_modules/extglob/package.json b/node_modules/readdirp/node_modules/extglob/package.json new file mode 100644 index 0000000000000..afe515732b6e6 --- /dev/null +++ b/node_modules/readdirp/node_modules/extglob/package.json @@ -0,0 +1,108 @@ +{ + "name": "extglob", + "description": "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.", + "version": "2.0.4", + "homepage": "https://github.com/micromatch/extglob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Devon Govett (http://badassjs.com)", + "Isiah Meadows (https://www.isiahmeadows.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Matt Bierner (http://mattbierner.com)", + "Shinnosuke Watanabe (https://shinnn.github.io)" + ], + "repository": "micromatch/extglob", + "bugs": { + "url": "https://github.com/micromatch/extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "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" + }, + "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" + }, + "keywords": [ + "bash", + "extended", + "extglob", + "glob", + "globbing", + "ksh", + "match", + "pattern", + "patterns", + "regex", + "test", + "wildcard" + ], + "lintDeps": { + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**/*.js" + ] + } + } + } + }, + "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 + } + } +} diff --git a/node_modules/readdirp/node_modules/fill-range/LICENSE b/node_modules/readdirp/node_modules/fill-range/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/fill-range/README.md b/node_modules/readdirp/node_modules/fill-range/README.md new file mode 100644 index 0000000000000..bc1f8a0448e98 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/fill-range/index.js b/node_modules/readdirp/node_modules/fill-range/index.js new file mode 100644 index 0000000000000..294a2edde8f94 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/fill-range/node_modules/extend-shallow/LICENSE b/node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/fill-range/node_modules/extend-shallow/README.md b/node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/README.md new file mode 100644 index 0000000000000..cdc45d4ff7ad0 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/fill-range/node_modules/extend-shallow/index.js b/node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/index.js new file mode 100644 index 0000000000000..92a067fcc489b --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json b/node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json new file mode 100644 index 0000000000000..b42e01c7a79e9 --- /dev/null +++ b/node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json @@ -0,0 +1,56 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "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" + }, + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ] +} \ No newline at end of file diff --git a/node_modules/readdirp/node_modules/fill-range/package.json b/node_modules/readdirp/node_modules/fill-range/package.json new file mode 100644 index 0000000000000..fa17dd214b5db --- /dev/null +++ b/node_modules/readdirp/node_modules/fill-range/package.json @@ -0,0 +1,82 @@ +{ + "name": "fill-range", + "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`", + "version": "4.0.0", + "homepage": "https://github.com/jonschlinkert/fill-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + " (https://github.com/wtgtybhertgeghgtwtg)", + "Edo Rivai (edo.rivai.nl)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)" + ], + "repository": "jonschlinkert/fill-range", + "bugs": { + "url": "https://github.com/jonschlinkert/fill-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^1.0.0", + "gulp-format-md": "^0.1.12", + "minimist": "^1.2.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "alpha", + "alphabetical", + "array", + "bash", + "brace", + "expand", + "expansion", + "fill", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sh" + ], + "verb": { + "related": { + "list": [ + "braces", + "expand-range", + "micromatch", + "to-regex-range" + ] + }, + "toc": true, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/readdirp/node_modules/is-number/LICENSE b/node_modules/readdirp/node_modules/is-number/LICENSE new file mode 100644 index 0000000000000..842218cf09a20 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/is-number/README.md b/node_modules/readdirp/node_modules/is-number/README.md new file mode 100644 index 0000000000000..281165dcea345 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/is-number/index.js b/node_modules/readdirp/node_modules/is-number/index.js new file mode 100644 index 0000000000000..7a2a45bed02f5 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/is-number/node_modules/kind-of/LICENSE b/node_modules/readdirp/node_modules/is-number/node_modules/kind-of/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/is-number/node_modules/kind-of/README.md b/node_modules/readdirp/node_modules/is-number/node_modules/kind-of/README.md new file mode 100644 index 0000000000000..6a9df36d3bd2f --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/is-number/node_modules/kind-of/index.js b/node_modules/readdirp/node_modules/is-number/node_modules/kind-of/index.js new file mode 100644 index 0000000000000..b52c2917feb11 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/is-number/node_modules/kind-of/package.json b/node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json new file mode 100644 index 0000000000000..5de879e1162d0 --- /dev/null +++ b/node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "3.2.2", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "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" + }, + "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" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/readdirp/node_modules/is-number/package.json b/node_modules/readdirp/node_modules/is-number/package.json new file mode 100644 index 0000000000000..8c1f9ab48e72d --- /dev/null +++ b/node_modules/readdirp/node_modules/is-number/package.json @@ -0,0 +1,83 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Charlike Mike Reagent (http://www.tunnckocore.tk)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "benchmarked": "^0.2.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "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" + ] + } +} \ No newline at end of file diff --git a/node_modules/readdirp/node_modules/isobject/LICENSE b/node_modules/readdirp/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..943e71d05511e --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/isobject/README.md b/node_modules/readdirp/node_modules/isobject/README.md new file mode 100644 index 0000000000000..d01feaa40bc13 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/isobject/index.d.ts b/node_modules/readdirp/node_modules/isobject/index.d.ts new file mode 100644 index 0000000000000..55f81c275f150 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/isobject/index.js b/node_modules/readdirp/node_modules/isobject/index.js new file mode 100644 index 0000000000000..2d59958bf4eab --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/isobject/package.json b/node_modules/readdirp/node_modules/isobject/package.json new file mode 100644 index 0000000000000..62aa8c1b2feea --- /dev/null +++ b/node_modules/readdirp/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "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" + ] + } +} diff --git a/node_modules/readdirp/node_modules/kind-of/CHANGELOG.md b/node_modules/readdirp/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000000000..01687d5cbb930 --- /dev/null +++ b/node_modules/readdirp/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# 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.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [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 \ No newline at end of file diff --git a/node_modules/readdirp/node_modules/kind-of/LICENSE b/node_modules/readdirp/node_modules/kind-of/LICENSE new file mode 100644 index 0000000000000..3f2eca18f1bc0 --- /dev/null +++ b/node_modules/readdirp/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/readdirp/node_modules/kind-of/README.md b/node_modules/readdirp/node_modules/kind-of/README.md new file mode 100644 index 0000000000000..0411dc58a2ffd --- /dev/null +++ b/node_modules/readdirp/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# 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/micromatch/is-glob) | [homepage](https://github.com/micromatch/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 a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [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** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 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 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [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.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/readdirp/node_modules/kind-of/index.js b/node_modules/readdirp/node_modules/kind-of/index.js new file mode 100644 index 0000000000000..dfa799b784975 --- /dev/null +++ b/node_modules/readdirp/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 typeof val.constructor === 'function' ? 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/readdirp/node_modules/kind-of/package.json b/node_modules/readdirp/node_modules/kind-of/package.json new file mode 100644 index 0000000000000..5820cad2390f7 --- /dev/null +++ b/node_modules/readdirp/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "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" + ], + "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" + ] + } +} diff --git a/node_modules/readdirp/node_modules/micromatch/CHANGELOG.md b/node_modules/readdirp/node_modules/micromatch/CHANGELOG.md new file mode 100644 index 0000000000000..9d8e5ed094367 --- /dev/null +++ b/node_modules/readdirp/node_modules/micromatch/CHANGELOG.md @@ -0,0 +1,37 @@ +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog][]_): + +- `added`: for new features +- `changed`: for changes in existing functionality +- `deprecated`: for once-stable features removed in upcoming releases +- `removed`: for deprecated features removed in this release +- `fixed`: for any bug fixes +- `bumped`: updated dependencies, only minor or higher will be listed. + +### [3.0.0] - 2017-04-11 + +TODO. There should be no breaking changes. Please report any regressions. I will [reformat these release notes](https://github.com/micromatch/micromatch/pull/76) and add them to the changelog as soon as I have a chance. + +### [1.0.1] - 2016-12-12 + +**Added** + +- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0] - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + + +[Unreleased]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...HEAD +[0.2.0]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog + diff --git a/node_modules/readdirp/node_modules/micromatch/LICENSE b/node_modules/readdirp/node_modules/micromatch/LICENSE new file mode 100755 index 0000000000000..d32ab4426a5f6 --- /dev/null +++ b/node_modules/readdirp/node_modules/micromatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-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/readdirp/node_modules/micromatch/README.md b/node_modules/readdirp/node_modules/micromatch/README.md new file mode 100644 index 0000000000000..5dfa1498a6622 --- /dev/null +++ b/node_modules/readdirp/node_modules/micromatch/README.md @@ -0,0 +1,1150 @@ +# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/micromatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/micromatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/micromatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/micromatch) + +> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
+Details + +- [Install](#install) +- [Quickstart](#quickstart) +- [Why use micromatch?](#why-use-micromatch) + * [Matching features](#matching-features) +- [Switching to micromatch](#switching-to-micromatch) + * [From minimatch](#from-minimatch) + * [From multimatch](#from-multimatch) +- [API](#api) +- [Options](#options) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.cache](#optionscache) + * [options.dot](#optionsdot) + * [options.failglob](#optionsfailglob) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.nobrace](#optionsnobrace) + * [options.nocase](#optionsnocase) + * [options.nodupes](#optionsnodupes) + * [options.noext](#optionsnoext) + * [options.nonegate](#optionsnonegate) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.snapdragon](#optionssnapdragon) + * [options.sourcemap](#optionssourcemap) + * [options.unescape](#optionsunescape) + * [options.unixify](#optionsunixify) +- [Extended globbing](#extended-globbing) + * [extglobs](#extglobs) + * [braces](#braces) + * [regex character classes](#regex-character-classes) + * [regex groups](#regex-groups) + * [POSIX bracket expressions](#posix-bracket-expressions) +- [Notes](#notes) + * [Bash 4.3 parity](#bash-43-parity) + * [Backslashes](#backslashes) +- [Contributing](#contributing) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Latest results](#latest-results) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save micromatch +``` + +## Quickstart + +```js +var mm = require('micromatch'); +mm(list, patterns[, options]); +``` + +The [main export](#micromatch) takes a list of strings and one or more glob patterns: + +```js +console.log(mm(['foo', 'bar', 'qux'], ['f*', 'b*'])); +//=> ['foo', 'bar'] +``` + +Use [.isMatch()](#ismatch) to get true/false: + +```js +console.log(mm.isMatch('foo', 'f*')); +//=> true +``` + +[Switching](#switching-to-micromatch) from minimatch and multimatch is easy! + +## Why use micromatch? + +> micromatch is a [drop-in replacement](#switching-to-micromatch) for minimatch and multimatch + +* Supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) +* Micromatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which provides granular control over the entire conversion process in a way that is easy to understand, reason about, and maintain. +* More consistently accurate matching [than minimatch](https://github.com/yarnpkg/yarn/pull/3339), with more than 36,000 [test assertions](./test) to prove it. +* More complete support for the Bash 4.3 specification than minimatch and multimatch. In fact, micromatch passes _all of the spec tests_ from bash, including some that bash still fails. +* [Faster matching](#benchmarks), from a combination of optimized glob patterns, faster algorithms, and regex caching. +* [Micromatch is safer](https://github.com/micromatch/braces#braces-is-safe), and is not subject to DoS with brace patterns, like minimatch and multimatch. +* More reliable windows support than minimatch and multimatch. + +### Matching features + +* Support for multiple glob patterns (no need for wrappers like multimatch) +* Wildcards (`**`, `*.js`) +* Negation (`'!a/*.js'`, `'*!(b).js']`) +* [extglobs](https://github.com/micromatch/extglob) (`+(x|y)`, `!(a|b)`) +* [POSIX character classes](https://github.com/micromatch/expand-brackets) (`[[:alpha:][:digit:]]`) +* [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`) +* regex character classes (`foo-[1-5].js`) +* regex logical "or" (`foo/(abc|xyz).js`) + +You can mix and match these features to create whatever patterns you need! + +## Switching to micromatch + +There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information. + +### From minimatch + +Use [mm.isMatch()](#ismatch) instead of `minimatch()`: + +```js +mm.isMatch('foo', 'b*'); +//=> false +``` + +Use [mm.match()](#match) instead of `minimatch.match()`: + +```js +mm.match(['foo', 'bar'], 'b*'); +//=> 'bar' +``` + +### From multimatch + +Same signature: + +```js +mm(['foo', 'bar', 'baz'], ['f*', '*z']); +//=> ['foo', 'baz'] +``` + +## API + +### [micromatch](index.js#L41) + +The main function takes a list of strings and one or more glob patterns to use for matching. + +**Params** + +* `list` **{Array}**: A list of strings to match +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var mm = require('micromatch'); +mm(list, patterns[, options]); + +console.log(mm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.match](index.js#L93) + +Similar to the main function, but `pattern` must be a string. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var mm = require('micromatch'); +mm.match(list, pattern[, options]); + +console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); +//=> ['a.a', 'a.aa'] +``` + +### [.isMatch](index.js#L154) + +Returns true if the specified `string` matches the given glob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the string matches the glob pattern. + +**Example** + +```js +var mm = require('micromatch'); +mm.isMatch(string, pattern[, options]); + +console.log(mm.isMatch('a.a', '*.a')); +//=> true +console.log(mm.isMatch('a.b', '*.a')); +//=> false +``` + +### [.some](index.js#L192) + +Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.some(list, patterns[, options]); + +console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L228) + +Returns true if every string in the given `list` matches any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.every(list, patterns[, options]); + +console.log(mm.every('foo.js', ['foo.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.any](index.js#L260) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.any(string, patterns[, options]); + +console.log(mm.any('a.a', ['b.*', '*.a'])); +//=> true +console.log(mm.any('a.a', 'b.*')); +//=> false +``` + +### [.all](index.js#L308) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.all(string, patterns[, options]); + +console.log(mm.all('foo.js', ['foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(mm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.not](index.js#L340) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +var mm = require('micromatch'); +mm.not(list, patterns[, options]); + +console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L376) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var mm = require('micromatch'); +mm.contains(string, pattern[, options]); + +console.log(mm.contains('aa/bb/cc', '*b')); +//=> true +console.log(mm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L432) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +var mm = require('micromatch'); +mm.matchKeys(object, patterns[, options]); + +var obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(mm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.matcher](index.js#L461) + +Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +var mm = require('micromatch'); +mm.matcher(pattern[, options]); + +var isMatch = mm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.capture](index.js#L536) + +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 mm = require('micromatch'); +mm.capture(pattern, string[, options]); + +console.log(mm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(mm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L571) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +var mm = require('micromatch'); +mm.makeRe(pattern[, options]); + +console.log(mm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.braces](index.js#L618) + +Expand the given brace `pattern`. + +**Params** + +* `pattern` **{String}**: String with brace pattern to expand. +* `options` **{Object}**: Any [options](#options) to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options. +* `returns` **{Array}** + +**Example** + +```js +var mm = require('micromatch'); +console.log(mm.braces('foo/{a,b}/bar')); +//=> ['foo/(a|b)/bar'] + +console.log(mm.braces('foo/{a,b}/bar', {expand: true})); +//=> ['foo/(a|b)/bar'] +``` + +### [.create](index.js#L685) + +Parses the given glob `pattern` and returns an array of abstract syntax trees (ASTs), with the compiled `output` and optional source `map` on each AST. + +**Params** + +* `pattern` **{String}**: Glob pattern to parse and compile. +* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed. +* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map. + +**Example** + +```js +var mm = require('micromatch'); +mm.create(pattern[, options]); + +console.log(mm.create('abc/*.js')); +// [{ options: { source: 'string', sourcemap: true }, +// state: {}, +// compilers: +// { ... }, +// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', +// ast: +// { type: 'root', +// errors: [], +// nodes: +// [ ... ], +// dot: false, +// input: 'abc/*.js' }, +// parsingErrors: [], +// map: +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] }, +// position: { line: 1, column: 28 }, +// content: {}, +// files: {}, +// idx: 6 }] +``` + +### [.parse](index.js#L732) + +Parse the given `str` with the given `options`. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an AST + +**Example** + +```js +var mm = require('micromatch'); +mm.parse(pattern[, options]); + +var ast = mm.parse('a/{b,c}/d'); +console.log(ast); +// { type: 'root', +// errors: [], +// input: 'a/{b,c}/d', +// nodes: +// [ { type: 'bos', val: '' }, +// { type: 'text', val: 'a/' }, +// { type: 'brace', +// nodes: +// [ { type: 'brace.open', val: '{' }, +// { type: 'text', val: 'b,c' }, +// { type: 'brace.close', val: '}' } ] }, +// { type: 'text', val: '/d' }, +// { type: 'eos', val: '' } ] } +``` + +### [.compile](index.js#L780) + +Compile the given `ast` or string with the given `options`. + +**Params** + +* `ast` **{Object|String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object that has an `output` property with the compiled string. + +**Example** + +```js +var mm = require('micromatch'); +mm.compile(ast[, options]); + +var ast = mm.parse('a/{b,c}/d'); +console.log(mm.compile(ast)); +// { options: { source: 'string' }, +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// brace: [Function], +// 'brace.open': [Function], +// text: [Function], +// 'brace.close': [Function] }, +// output: [ 'a/(b|c)/d' ], +// ast: +// { ... }, +// parsingErrors: [] } +``` + +### [.clearCache](index.js#L801) + +Clear the regex cache. + +**Example** + +```js +mm.clearCache(); +``` + +## Options + +* [basename](#optionsbasename) +* [bash](#optionsbash) +* [cache](#optionscache) +* [dot](#optionsdot) +* [failglob](#optionsfailglob) +* [ignore](#optionsignore) +* [matchBase](#optionsmatchBase) +* [nobrace](#optionsnobrace) +* [nocase](#optionsnocase) +* [nodupes](#optionsnodupes) +* [noext](#optionsnoext) +* [noglobstar](#optionsnoglobstar) +* [nonull](#optionsnonull) +* [nullglob](#optionsnullglob) +* [snapdragon](#optionssnapdragon) +* [sourcemap](#optionssourcemap) +* [unescape](#optionsunescape) +* [unixify](#optionsunixify) + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +**Type**: `Boolean` + +**Default**: `false` + +**Example** + +```js +mm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as an other star. + +**Type**: `Boolean` + +**Default**: `true` + +**Example** + +```js +var files = ['abc', 'ajz']; +console.log(mm(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(mm(files, '[a-c]*', {bash: false})); +``` + +### options.cache + +Disable regex and function memoization. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + +**Type**: `Boolean` + +**Default**: `false` + +### options.failglob + +Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.ignore + +String or array of glob patterns to match files to ignore. + +**Type**: `String|Array` + +**Default**: `undefined` + +### options.matchBase + +Alias for [options.basename](#options-basename). + +### options.nobrace + +Disable expansion of brace patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nobrace`. + +**Type**: `Boolean` + +**Default**: `undefined` + +See [braces](https://github.com/micromatch/braces) for more information about extended brace expansion. + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.nodupes + +Remove duplicate elements from the result array. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +mm.match(['a/b/c', 'a/b/c'], 'a/b/c'); +//=> ['a/b/c', 'a/b/c'] + +mm.match(['a/b/c', 'a/b/c'], 'a/b/c', {nodupes: true}); +//=> ['abc'] +``` + +### options.noext + +Disable extglob support, so that extglobs are regarded as literal characters. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Examples** + +```js +mm(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)'); +//=> ['a/b', 'a/!(z)'] + +mm(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)', {noext: true}); +//=> ['a/!(z)'] (matches only as literal characters) +``` + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.noglobstar + +Disable matching with globstars (`**`). + +**Type**: `Boolean` + +**Default**: `undefined` + +```js +mm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +mm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.snapdragon + +Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon), to customize parsers or compilers. + +**Type**: `Object` + +**Default**: `undefined` + +### options.sourcemap + +Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + +_(Note that sourcemaps are currently not enabled for brace patterns)_ + +**Examples** + +``` js +var mm = require('micromatch'); +var pattern = '*(*(of*(a)x)z)'; + +var res = mm.create('abc/*.js', {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] } + +var ast = mm.parse('abc/**/*.js'); +var res = mm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/**/*.js' ] } + +var ast = mm.parse(pattern); +var res = mm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,CAAE,CAAE,EAAE,CAAE,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC', +// sourcesContent: [ '*(*(of*(a)x)z)' ] } +``` + +### options.unescape + +Remove backslashes from returned matches. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +mm.match(['abc', 'a\\*c'], 'a\\*c'); +//=> ['a\\*c'] + +mm.match(['abc', 'a\\*c'], 'a\\*c', {unescape: true}); +//=> ['a*c'] +``` + +### options.unixify + +Convert path separators on returned files to posix/unix-style forward slashes. + +**Type**: `Boolean` + +**Default**: `true` on windows, `false` everywhere else + +**Example** + +```js +mm.match(['a\\b\\c'], 'a/**'); +//=> ['a/b/c'] + +mm.match(['a\\b\\c'], {unixify: false}); +//=> ['a\\b\\c'] +``` + +## Extended globbing + +Micromatch also supports extended globbing features. + +### extglobs + +Extended globbing, as described by the bash man page: + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern)` | `(pattern)?` | Matches zero or one occurrence of the given patterns | +| `*(pattern)` | `(pattern)*` | Matches zero or more occurrences of the given patterns | +| `+(pattern)` | `(pattern)+` | Matches one or more occurrences of the given patterns | +| `@(pattern)` | `(pattern)` * | Matches one of the given patterns | +| `!(pattern)` | N/A (equivalent regex is much more complicated) | Matches anything except one of the given patterns | + +* Note that `@` isn't a RegEx character. + +Powered by [extglob](https://github.com/micromatch/extglob). Visit that library for the full range of options or to report extglob related issues. + +### braces + +Brace patterns can be used to match specific ranges or sets of characters. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Visit [braces](https://github.com/micromatch/braces) to see the full range of features and options related to brace expansion, or to create brace matching or expansion related issues. + +### regex character classes + +Given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` + +Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). + +### regex groups + +Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` +* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` +* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` + +As with regex, parens can be nested, so patterns like `((a|b)|c)/b` will work. Although brace expansion might be friendlier to use, depending on preference. + +### POSIX bracket expressions + +POSIX brackets are intended to be more user-friendly than regex character classes. This of course is in the eye of the beholder. + +**Example** + +```js +mm.isMatch('a1', '[[:alpha:][:digit:]]'); +//=> true + +mm.isMatch('a1', '[[:alpha:][:alpha:]]'); +//=> false +``` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about bracket expressions. + +*** + +## Notes + +### Bash 4.3 parity + +Whenever possible matching behavior is based on behavior Bash 4.3, which is mostly consistent with minimatch. + +However, it's suprising how many edge cases and rabbit holes there are with glob matching, and since there is no real glob specification, and micromatch is more accurate than both Bash and minimatch, there are cases where best-guesses were made for behavior. In a few cases where Bash had no answers, we used wildmatch (used by git) as a fallback. + +### Backslashes + +There is an important, notable difference between minimatch and micromatch _in regards to how backslashes are handled_ in glob patterns. + +* Micromatch exclusively and explicitly reserves backslashes for escaping characters in a glob pattern, even on windows. This is consistent with bash behavior. +* Minimatch converts all backslashes to forward slashes, which means you can't use backslashes to escape any characters in your glob patterns. + +We made this decision for micromatch for a couple of reasons: + +* consistency with bash conventions. +* glob patterns are not filepaths. They are a type of [regular language](https://en.wikipedia.org/wiki/Regular_language) that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine. + +**A note about joining paths to globs** + +Note that when you pass something like `path.join('foo', '*')` to micromatch, you are creating a filepath and expecting it to still work as a glob pattern. This causes problems on windows, since the `path.sep` is `\\`. + +In other words, since `\\` is reserved as an escape character in globs, on windows `path.join('foo', '*')` would result in `foo\\*`, which tells micromatch to match `*` as a literal character. This is the same behavior as bash. + +## Contributing + +All contributions are welcome! Please read [the contributing guide](.github/contributing.md) to get started. + +**Bug reports** + +Please create an issue if you encounter a bug or matching behavior that doesn't seem correct. If you find a matching-related issue, please: + +* [research existing issues first](../../issues) (open and closed) +* visit the [GNU Bash documentation](https://www.gnu.org/software/bash/manual/) to see how Bash deals with the pattern +* visit the [minimatch](https://github.com/isaacs/minimatch) documentation to cross-check expected behavior in node.js +* if all else fails, since there is no real specification for globs we will probably need to discuss expected behavior and decide how to resolve it. which means any detail you can provide to help with this discussion would be greatly appreciated. + +**Platform issues** + +It's important to us that micromatch work consistently on all platforms. If you encounter any platform-specific matching or path related issues, please let us know (pull requests are also greatly appreciated). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm run benchmark +``` + +### Latest results + +As of February 18, 2018 (longer bars are better): + +```sh +# braces-globstar-large-list (485691 bytes) + micromatch ██████████████████████████████████████████████████ (517 ops/sec ±0.49%) + minimatch █ (18.92 ops/sec ±0.54%) + multimatch █ (18.94 ops/sec ±0.62%) + + micromatch is faster by an avg. of 2,733% + +# braces-multiple (3362 bytes) + micromatch ██████████████████████████████████████████████████ (33,625 ops/sec ±0.45%) + minimatch (2.92 ops/sec ±3.26%) + multimatch (2.90 ops/sec ±2.76%) + + micromatch is faster by an avg. of 1,156,935% + +# braces-range (727 bytes) + micromatch █████████████████████████████████████████████████ (155,220 ops/sec ±0.56%) + minimatch ██████ (20,186 ops/sec ±1.27%) + multimatch ██████ (19,809 ops/sec ±0.60%) + + micromatch is faster by an avg. of 776% + +# braces-set (2858 bytes) + micromatch █████████████████████████████████████████████████ (24,354 ops/sec ±0.92%) + minimatch █████ (2,566 ops/sec ±0.56%) + multimatch ████ (2,431 ops/sec ±1.25%) + + micromatch is faster by an avg. of 975% + +# globstar-large-list (485686 bytes) + micromatch █████████████████████████████████████████████████ (504 ops/sec ±0.45%) + minimatch ███ (33.36 ops/sec ±1.08%) + multimatch ███ (33.19 ops/sec ±1.35%) + + micromatch is faster by an avg. of 1,514% + +# globstar-long-list (90647 bytes) + micromatch ██████████████████████████████████████████████████ (2,694 ops/sec ±1.08%) + minimatch ████████████████ (870 ops/sec ±1.09%) + multimatch ████████████████ (862 ops/sec ±0.84%) + + micromatch is faster by an avg. of 311% + +# globstar-short-list (182 bytes) + micromatch ██████████████████████████████████████████████████ (328,921 ops/sec ±1.06%) + minimatch █████████ (64,808 ops/sec ±1.42%) + multimatch ████████ (57,991 ops/sec ±2.11%) + + micromatch is faster by an avg. of 536% + +# no-glob (701 bytes) + micromatch █████████████████████████████████████████████████ (415,935 ops/sec ±0.36%) + minimatch ███████████ (92,730 ops/sec ±1.44%) + multimatch █████████ (81,958 ops/sec ±2.13%) + + micromatch is faster by an avg. of 476% + +# star-basename-long (12339 bytes) + micromatch █████████████████████████████████████████████████ (7,963 ops/sec ±0.36%) + minimatch ███████████████████████████████ (5,072 ops/sec ±0.83%) + multimatch ███████████████████████████████ (5,028 ops/sec ±0.40%) + + micromatch is faster by an avg. of 158% + +# star-basename-short (349 bytes) + micromatch ██████████████████████████████████████████████████ (269,552 ops/sec ±0.70%) + minimatch ██████████████████████ (122,457 ops/sec ±1.39%) + multimatch ████████████████████ (110,788 ops/sec ±1.99%) + + micromatch is faster by an avg. of 231% + +# star-folder-long (19207 bytes) + micromatch █████████████████████████████████████████████████ (3,806 ops/sec ±0.38%) + minimatch ████████████████████████████ (2,204 ops/sec ±0.32%) + multimatch ██████████████████████████ (2,020 ops/sec ±1.07%) + + micromatch is faster by an avg. of 180% + +# star-folder-short (551 bytes) + micromatch ██████████████████████████████████████████████████ (249,077 ops/sec ±0.40%) + minimatch ███████████ (59,431 ops/sec ±1.67%) + multimatch ███████████ (55,569 ops/sec ±1.43%) + + micromatch is faster by an avg. of 433% +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+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.") +* [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/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [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`") +* [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/micromatch/nanomatch) | [homepage](https://github.com/micromatch/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)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 457 | [jonschlinkert](https://github.com/jonschlinkert) | +| 12 | [es128](https://github.com/es128) | +| 8 | [doowb](https://github.com/doowb) | +| 3 | [paulmillr](https://github.com/paulmillr) | +| 2 | [TrySound](https://github.com/TrySound) | +| 2 | [MartinKolarik](https://github.com/MartinKolarik) | +| 2 | [charlike-old](https://github.com/charlike-old) | +| 1 | [amilajack](https://github.com/amilajack) | +| 1 | [mrmlnc](https://github.com/mrmlnc) | +| 1 | [devongovett](https://github.com/devongovett) | +| 1 | [DianeLooney](https://github.com/DianeLooney) | +| 1 | [UltCombo](https://github.com/UltCombo) | +| 1 | [tomByrer](https://github.com/tomByrer) | +| 1 | [fidian](https://github.com/fidian) | + +### 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 18, 2018._ \ No newline at end of file diff --git a/node_modules/readdirp/node_modules/micromatch/index.js b/node_modules/readdirp/node_modules/micromatch/index.js new file mode 100644 index 0000000000000..fe02f2cb23f30 --- /dev/null +++ b/node_modules/readdirp/node_modules/micromatch/index.js @@ -0,0 +1,877 @@ +'use strict'; + +/** + * Module dependencies + */ + +var util = require('util'); +var braces = require('braces'); +var toRegex = require('to-regex'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var cache = require('./lib/cache'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var mm = require('micromatch'); + * mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function micromatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return micromatch.match(list, patterns[0], options); + } + + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, micromatch.match(list, pattern.slice(1), options)); + } else { + keep.push.apply(keep, micromatch.match(list, pattern, options)); + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var mm = require('micromatch'); + * mm.match(list, pattern[, options]); + * + * console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +micromatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, micromatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.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 [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = micromatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.isMatch(string, pattern[, options]); + * + * console.log(mm.isMatch('a.a', '*.a')); + * //=> true + * console.log(mm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +micromatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, micromatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the strings in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length === 1) { + return true; + } + } + return false; +}; + +/** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length !== 1) { + return false; + } + } + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var mm = require('micromatch'); + * mm.any(string, patterns[, options]); + * + * console.log(mm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(mm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (micromatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * var mm = require('micromatch'); + * mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + if (typeof patterns === 'string') { + patterns = [patterns]; + } + for (var i = 0; i < patterns.length; i++) { + if (!micromatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +micromatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + var unixify = utils.unixify(opts); + list = utils.arrayify(list).map(unixify); + + var matches = utils.diff(list, micromatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, micromatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +micromatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return micromatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +micromatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var mm = require('micromatch'); + * mm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +micromatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = micromatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var mm = require('micromatch'); + * mm.matcher(pattern[, options]); + * + * var isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +micromatch.matcher = function matcher(pattern, options) { + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = micromatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (micromatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + var fn = test(re); + Object.defineProperty(fn, 'result', { + configurable: true, + enumerable: false, + value: re.result + }); + return fn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * var mm = require('micromatch'); + * mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.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 + */ + +micromatch.capture = function(pattern, str, options) { + var re = micromatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +micromatch.makeRe = function(pattern, options) { + 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 result = micromatch.create(pattern, options); + var ast_array = []; + var output = result.map(function(obj) { + obj.ast.state = obj.state; + ast_array.push(obj.ast); + return obj.output; + }); + + var regex = toRegex(output.join('|'), options); + Object.defineProperty(regex, 'result', { + configurable: true, + enumerable: false, + value: ast_array + }); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Expand the given brace `pattern`. + * + * ```js + * var mm = require('micromatch'); + * console.log(mm.braces('foo/{a,b}/bar')); + * //=> ['foo/(a|b)/bar'] + * + * console.log(mm.braces('foo/{a,b}/bar', {expand: true})); + * //=> ['foo/(a|b)/bar'] + * ``` + * @param {String} `pattern` String with brace pattern to expand. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + +micromatch.braces = function(pattern, options) { + if (typeof pattern !== 'string' && !Array.isArray(pattern)) { + throw new TypeError('expected pattern to be an array or string'); + } + + function expand() { + if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { + return utils.arrayify(pattern); + } + return braces(pattern, options); + } + + return memoize('braces', pattern, options, expand); +}; + +/** + * Proxy to the [micromatch.braces](#method), for parity with + * minimatch. + */ + +micromatch.braceExpand = function(pattern, options) { + var opts = extend({}, options, {expand: true}); + return micromatch.braces(pattern, opts); +}; + +/** + * Parses the given glob `pattern` and returns an array of abstract syntax + * trees (ASTs), with the compiled `output` and optional source `map` on + * each AST. + * + * ```js + * var mm = require('micromatch'); + * mm.create(pattern[, options]); + * + * console.log(mm.create('abc/*.js')); + * // [{ options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 }] + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +micromatch.create = function(pattern, options) { + return memoize('create', pattern, options, function() { + function create(str, opts) { + return micromatch.compile(micromatch.parse(str, opts), opts); + } + + pattern = micromatch.braces(pattern, options); + var len = pattern.length; + var idx = -1; + var res = []; + + while (++idx < len) { + res.push(create(pattern[idx], options)); + } + return res; + }); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.parse(pattern[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +micromatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.compile(ast[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(mm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +micromatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = micromatch.parse(ast, options); + } + + return memoize('compile', ast.input, options, function() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + }); +}; + +/** + * Clear the regex cache. + * + * ```js + * mm.clearCache(); + * ``` + * @api public + */ + +micromatch.clearCache = function() { + micromatch.cache.caches = {}; +}; + +/** + * Returns true if the given value is effectively an empty string + */ + +function isEmptyString(val) { + return String(val) === '' || String(val) === './'; +} + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `micromatch` + */ + +micromatch.compilers = compilers; +micromatch.parsers = parsers; +micromatch.caches = cache.caches; + +/** + * Expose `micromatch` + * @type {Function} + */ + +module.exports = micromatch; diff --git a/node_modules/readdirp/node_modules/micromatch/lib/.DS_Store b/node_modules/readdirp/node_modules/micromatch/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=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^5.0.0", + "gulp-unused": "^0.2.1", + "is-windows": "^1.0.2", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "lintDeps": { + "dependencies": { + "options": { + "lock": { + "snapdragon": "^0.8.1" + } + } + }, + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**" + ] + } + } + } + }, + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "helpers": [ + "./benchmark/helper.js" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "extglob", + "fill-range", + "nanomatch" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "expand-brackets", + "extglob", + "glob-object", + "minimatch", + "multimatch", + "snapdragon" + ] + } +} diff --git a/node_modules/readdirp/package.json b/node_modules/readdirp/package.json new file mode 100644 index 0000000000000..39314a29e6f2c --- /dev/null +++ b/node_modules/readdirp/package.json @@ -0,0 +1,50 @@ +{ + "author": "Thorsten Lorenz (thlorenz.com)", + "name": "readdirp", + "description": "Recursive version of fs.readdir with streaming api.", + "version": "2.2.1", + "homepage": "https://github.com/paulmillr/readdirp", + "repository": { + "type": "git", + "url": "git://github.com/paulmillr/readdirp.git" + }, + "engines": { + "node": ">=0.10" + }, + "files": [ + "readdirp.js", + "stream-api.js" + ], + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "main": "readdirp.js", + "scripts": { + "test-main": "(cd test && set -e; for t in ./*.js; do node $t; done)", + "test-0.10": "nave use 0.10 npm run test-main", + "test-0.12": "nave use 0.12 npm run test-main", + "test-4": "nave use 4.4 npm run test-main", + "test-6": "nave use 6.2 npm run test-main", + "test-all": "npm run test-main && npm run test-0.10 && npm run test-0.12 && npm run test-4 && npm run test-6", + "test": "npm run test-main" + }, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "devDependencies": { + "nave": "^0.5.1", + "proxyquire": "^1.7.9", + "tap": "1.3.2", + "through2": "^2.0.0" + }, + "license": "MIT" +} diff --git a/node_modules/readdirp/readdirp.js b/node_modules/readdirp/readdirp.js new file mode 100644 index 0000000000000..863bd17b899d5 --- /dev/null +++ b/node_modules/readdirp/readdirp.js @@ -0,0 +1,294 @@ +'use strict'; + +var fs = require('graceful-fs') + , path = require('path') + , micromatch = require('micromatch').isMatch + , toString = Object.prototype.toString + ; + + +// Standard helpers +function isFunction (obj) { + return toString.call(obj) === '[object Function]'; +} + +function isString (obj) { + return toString.call(obj) === '[object String]'; +} + +function isUndefined (obj) { + return obj === void 0; +} + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param { Object } opts Options to specify root (start directory), filters and recursion depth + * @param { function } callback1 When callback2 is given calls back for each processed file - function (fileInfo) { ... }, + * when callback2 is not given, it behaves like explained in callback2 + * @param { function } callback2 Calls back once all files have been processed with an array of errors and file infos + * function (err, fileInfos) { ... } + */ +function readdir(opts, callback1, callback2) { + var stream + , handleError + , handleFatalError + , errors = [] + , readdirResult = { + directories: [] + , files: [] + } + , fileProcessed + , allProcessed + , realRoot + , aborted = false + , paused = false + ; + + // If no callbacks were given we will use a streaming interface + if (isUndefined(callback1)) { + var api = require('./stream-api')(); + stream = api.stream; + callback1 = api.processEntry; + callback2 = api.done; + handleError = api.handleError; + handleFatalError = api.handleFatalError; + + stream.on('close', function () { aborted = true; }); + stream.on('pause', function () { paused = true; }); + stream.on('resume', function () { paused = false; }); + } else { + handleError = function (err) { errors.push(err); }; + handleFatalError = function (err) { + handleError(err); + allProcessed(errors, null); + }; + } + + if (isUndefined(opts)){ + handleFatalError(new Error ( + 'Need to pass at least one argument: opts! \n' + + 'https://github.com/paulmillr/readdirp#options' + ) + ); + return stream; + } + + opts.root = opts.root || '.'; + opts.fileFilter = opts.fileFilter || function() { return true; }; + opts.directoryFilter = opts.directoryFilter || function() { return true; }; + opts.depth = typeof opts.depth === 'undefined' ? 999999999 : opts.depth; + opts.entryType = opts.entryType || 'files'; + + var statfn = opts.lstat === true ? fs.lstat.bind(fs) : fs.stat.bind(fs); + + if (isUndefined(callback2)) { + fileProcessed = function() { }; + allProcessed = callback1; + } else { + fileProcessed = callback1; + allProcessed = callback2; + } + + function normalizeFilter (filter) { + + if (isUndefined(filter)) return undefined; + + function isNegated (filters) { + + function negated(f) { + return f.indexOf('!') === 0; + } + + var some = filters.some(negated); + if (!some) { + return false; + } else { + if (filters.every(negated)) { + return true; + } else { + // if we detect illegal filters, bail out immediately + throw new Error( + 'Cannot mix negated with non negated glob filters: ' + filters + '\n' + + 'https://github.com/paulmillr/readdirp#filters' + ); + } + } + } + + // Turn all filters into a function + if (isFunction(filter)) { + + return filter; + + } else if (isString(filter)) { + + return function (entryInfo) { + return micromatch(entryInfo.name, filter.trim()); + }; + + } else if (filter && Array.isArray(filter)) { + + if (filter) filter = filter.map(function (f) { + return f.trim(); + }); + + return isNegated(filter) ? + // use AND to concat multiple negated filters + function (entryInfo) { + return filter.every(function (f) { + return micromatch(entryInfo.name, f); + }); + } + : + // use OR to concat multiple inclusive filters + function (entryInfo) { + return filter.some(function (f) { + return micromatch(entryInfo.name, f); + }); + }; + } + } + + function processDir(currentDir, entries, callProcessed) { + if (aborted) return; + var total = entries.length + , processed = 0 + , entryInfos = [] + ; + + fs.realpath(currentDir, function(err, realCurrentDir) { + if (aborted) return; + if (err) { + handleError(err); + callProcessed(entryInfos); + return; + } + + var relDir = path.relative(realRoot, realCurrentDir); + + if (entries.length === 0) { + callProcessed([]); + } else { + entries.forEach(function (entry) { + + var fullPath = path.join(realCurrentDir, entry) + , relPath = path.join(relDir, entry); + + statfn(fullPath, function (err, stat) { + if (err) { + handleError(err); + } else { + entryInfos.push({ + name : entry + , path : relPath // relative to root + , fullPath : fullPath + + , parentDir : relDir // relative to root + , fullParentDir : realCurrentDir + + , stat : stat + }); + } + processed++; + if (processed === total) callProcessed(entryInfos); + }); + }); + } + }); + } + + function readdirRec(currentDir, depth, callCurrentDirProcessed) { + var args = arguments; + if (aborted) return; + if (paused) { + setImmediate(function () { + readdirRec.apply(null, args); + }) + return; + } + + fs.readdir(currentDir, function (err, entries) { + if (err) { + handleError(err); + callCurrentDirProcessed(); + return; + } + + processDir(currentDir, entries, function(entryInfos) { + + var subdirs = entryInfos + .filter(function (ei) { return ei.stat.isDirectory() && opts.directoryFilter(ei); }); + + subdirs.forEach(function (di) { + if(opts.entryType === 'directories' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(di); + } + readdirResult.directories.push(di); + }); + + entryInfos + .filter(function(ei) { + var isCorrectType = opts.entryType === 'all' ? + !ei.stat.isDirectory() : ei.stat.isFile() || ei.stat.isSymbolicLink(); + return isCorrectType && opts.fileFilter(ei); + }) + .forEach(function (fi) { + if(opts.entryType === 'files' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(fi); + } + readdirResult.files.push(fi); + }); + + var pendingSubdirs = subdirs.length; + + // Be done if no more subfolders exist or we reached the maximum desired depth + if(pendingSubdirs === 0 || depth === opts.depth) { + callCurrentDirProcessed(); + } else { + // recurse into subdirs, keeping track of which ones are done + // and call back once all are processed + subdirs.forEach(function (subdir) { + readdirRec(subdir.fullPath, depth + 1, function () { + pendingSubdirs = pendingSubdirs - 1; + if(pendingSubdirs === 0) { + callCurrentDirProcessed(); + } + }); + }); + } + }); + }); + } + + // Validate and normalize filters + try { + opts.fileFilter = normalizeFilter(opts.fileFilter); + opts.directoryFilter = normalizeFilter(opts.directoryFilter); + } catch (err) { + // if we detect illegal filters, bail out immediately + handleFatalError(err); + return stream; + } + + // If filters were valid get on with the show + fs.realpath(opts.root, function(err, res) { + if (err) { + handleFatalError(err); + return stream; + } + + realRoot = res; + readdirRec(opts.root, 0, function () { + // All errors are collected into the errors array + if (errors.length > 0) { + allProcessed(errors, readdirResult); + } else { + allProcessed(null, readdirResult); + } + }); + }); + + return stream; +} + +module.exports = readdir; diff --git a/node_modules/readdirp/stream-api.js b/node_modules/readdirp/stream-api.js new file mode 100644 index 0000000000000..bffd1a9774119 --- /dev/null +++ b/node_modules/readdirp/stream-api.js @@ -0,0 +1,98 @@ +'use strict'; + +var stream = require('readable-stream'); +var util = require('util'); + +var Readable = stream.Readable; + +module.exports = ReaddirpReadable; + +util.inherits(ReaddirpReadable, Readable); + +function ReaddirpReadable (opts) { + if (!(this instanceof ReaddirpReadable)) return new ReaddirpReadable(opts); + + opts = opts || {}; + + opts.objectMode = true; + Readable.call(this, opts); + + // backpressure not implemented at this point + this.highWaterMark = Infinity; + + this._destroyed = false; + this._paused = false; + this._warnings = []; + this._errors = []; + + this._pauseResumeErrors(); +} + +var proto = ReaddirpReadable.prototype; + +proto._pauseResumeErrors = function () { + var self = this; + self.on('pause', function () { self._paused = true }); + self.on('resume', function () { + if (self._destroyed) return; + self._paused = false; + + self._warnings.forEach(function (err) { self.emit('warn', err) }); + self._warnings.length = 0; + + self._errors.forEach(function (err) { self.emit('error', err) }); + self._errors.length = 0; + }) +} + +// called for each entry +proto._processEntry = function (entry) { + if (this._destroyed) return; + this.push(entry); +} + +proto._read = function () { } + +proto.destroy = function () { + // when stream is destroyed it will emit nothing further, not even errors or warnings + this.push(null); + this.readable = false; + this._destroyed = true; + this.emit('close'); +} + +proto._done = function () { + this.push(null); +} + +// we emit errors and warnings async since we may handle errors like invalid args +// within the initial event loop before any event listeners subscribed +proto._handleError = function (err) { + var self = this; + setImmediate(function () { + if (self._paused) return self._warnings.push(err); + if (!self._destroyed) self.emit('warn', err); + }); +} + +proto._handleFatalError = function (err) { + var self = this; + setImmediate(function () { + if (self._paused) return self._errors.push(err); + if (!self._destroyed) self.emit('error', err); + }); +} + +function createStreamAPI () { + var stream = new ReaddirpReadable(); + + return { + stream : stream + , processEntry : stream._processEntry.bind(stream) + , done : stream._done.bind(stream) + , handleError : stream._handleError.bind(stream) + , handleFatalError : stream._handleFatalError.bind(stream) + }; +} + +module.exports = createStreamAPI; diff --git a/node_modules/regenerator-runtime/README.md b/node_modules/regenerator-runtime/README.md new file mode 100644 index 0000000000000..d93386a30d93f --- /dev/null +++ b/node_modules/regenerator-runtime/README.md @@ -0,0 +1,31 @@ +# regenerator-runtime + +Standalone runtime for +[Regenerator](https://github.com/facebook/regenerator)-compiled generator +and `async` functions. + +To import the runtime as a module (recommended), either of the following +import styles will work: +```js +// CommonJS +const regeneratorRuntime = require("regenerator-runtime"); + +// ECMAScript 2015 +import regeneratorRuntime from "regenerator-runtime"; +``` + +To ensure that `regeneratorRuntime` is defined globally, either of the +following styles will work: +```js +// CommonJS +require("regenerator-runtime/runtime"); + +// ECMAScript 2015 +import "regenerator-runtime/runtime"; +``` + +To get the absolute file system path of `runtime.js`, evaluate the +following expression: +```js +require("regenerator-runtime/path").path +``` diff --git a/node_modules/regenerator-runtime/package.json b/node_modules/regenerator-runtime/package.json new file mode 100644 index 0000000000000..db0539875105d --- /dev/null +++ b/node_modules/regenerator-runtime/package.json @@ -0,0 +1,18 @@ +{ + "name": "regenerator-runtime", + "author": "Ben Newman ", + "description": "Runtime for Regenerator-compiled generator and async functions.", + "version": "0.11.1", + "main": "runtime-module.js", + "keywords": [ + "regenerator", + "runtime", + "generator", + "async" + ], + "repository": { + "type": "git", + "url": "https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime" + }, + "license": "MIT" +} diff --git a/node_modules/regenerator-runtime/path.js b/node_modules/regenerator-runtime/path.js new file mode 100644 index 0000000000000..ced878b884a68 --- /dev/null +++ b/node_modules/regenerator-runtime/path.js @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +exports.path = require("path").join( + __dirname, + "runtime.js" +); diff --git a/node_modules/regenerator-runtime/runtime-module.js b/node_modules/regenerator-runtime/runtime-module.js new file mode 100644 index 0000000000000..ed284317790bf --- /dev/null +++ b/node_modules/regenerator-runtime/runtime-module.js @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = (function() { return this })() || Function("return this")(); + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = require("./runtime"); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} diff --git a/node_modules/regenerator-runtime/runtime.js b/node_modules/regenerator-runtime/runtime.js new file mode 100644 index 0000000000000..22e7b005c29c9 --- /dev/null +++ b/node_modules/regenerator-runtime/runtime.js @@ -0,0 +1,727 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { return this })() || Function("return this")() +); diff --git a/node_modules/regex-cache/LICENSE b/node_modules/regex-cache/LICENSE new file mode 100644 index 0000000000000..c0d7f136277fb --- /dev/null +++ b/node_modules/regex-cache/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/regex-cache/README.md b/node_modules/regex-cache/README.md new file mode 100644 index 0000000000000..8c66014784825 --- /dev/null +++ b/node_modules/regex-cache/README.md @@ -0,0 +1,166 @@ +# regex-cache [![NPM version](https://img.shields.io/npm/v/regex-cache.svg?style=flat)](https://www.npmjs.com/package/regex-cache) [![NPM monthly downloads](https://img.shields.io/npm/dm/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![NPM total downloads](https://img.shields.io/npm/dt/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/regex-cache.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/regex-cache) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/regex-cache.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/regex-cache) + +> Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save regex-cache +``` + +* Read [what this does](#what-this-does). +* See [the benchmarks](#benchmarks) + +## Usage + +Wrap a function like this: + +```js +var cache = require('regex-cache'); +var someRegex = cache(require('some-regex-lib')); +``` + +**Caching a regex** + +If you want to cache a regex after calling `new RegExp()`, or you're requiring a module that returns a regex, wrap it with a function first: + +```js +var cache = require('regex-cache'); + +function yourRegex(str, opts) { + // do stuff to str and opts + return new RegExp(str, opts.flags); +} + +var regex = cache(yourRegex); +``` + +## Recommendations + +### Use this when... + +* **No options are passed** to the function that creates the regex. Regardless of how big or small the regex is, when zero options are passed, caching will be faster than not. +* **A few options are passed**, and the values are primitives. The limited benchmarks I did show that caching is beneficial when up to 8 or 9 options are passed. + +### Do not use this when... + +* **The values of options are not primitives**. When non-primitives must be compared for equality, the time to compare the options is most likely as long or longer than the time to just create a new regex. + +### Example benchmarks + +Performance results, with and without regex-cache: + +```bash +# no args passed (defaults) + with-cache x 8,699,231 ops/sec ±0.86% (93 runs sampled) + without-cache x 2,777,551 ops/sec ±0.63% (95 runs sampled) + +# string and six options passed + with-cache x 1,885,934 ops/sec ±0.80% (93 runs sampled) + without-cache x 1,256,893 ops/sec ±0.65% (97 runs sampled) + +# string only + with-cache x 7,723,256 ops/sec ±0.87% (92 runs sampled) + without-cache x 2,303,060 ops/sec ±0.47% (99 runs sampled) + +# one option passed + with-cache x 4,179,877 ops/sec ±0.53% (100 runs sampled) + without-cache x 2,198,422 ops/sec ±0.47% (95 runs sampled) + +# two options passed + with-cache x 3,256,222 ops/sec ±0.51% (99 runs sampled) + without-cache x 2,121,401 ops/sec ±0.79% (97 runs sampled) + +# six options passed + with-cache x 1,816,018 ops/sec ±1.08% (96 runs sampled) + without-cache x 1,157,176 ops/sec ±0.53% (100 runs sampled) + +# +# diminishing returns happen about here +# + +# ten options passed + with-cache x 1,210,598 ops/sec ±0.56% (92 runs sampled) + without-cache x 1,665,588 ops/sec ±1.07% (100 runs sampled) + +# twelve options passed + with-cache x 1,042,096 ops/sec ±0.68% (92 runs sampled) + without-cache x 1,389,414 ops/sec ±0.68% (97 runs sampled) + +# twenty options passed + with-cache x 661,125 ops/sec ±0.80% (93 runs sampled) + without-cache x 1,208,757 ops/sec ±0.65% (97 runs sampled) + +# +# when non-primitive values are compared +# + +# single value on the options is an object + with-cache x 1,398,313 ops/sec ±1.05% (95 runs sampled) + without-cache x 2,228,281 ops/sec ±0.56% (99 runs sampled) +``` + +## Run benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm run benchmarks +``` + +## What this does + +If you're using `new RegExp('foo')` instead of a regex literal, it's probably because you need to dyamically generate a regex based on user options or some other potentially changing factors. + +When your function creates a string based on user inputs and passes it to the `RegExp` constructor, regex-cache caches the results. The next time the function is called if the key of a cached regex matches the user input (or no input was given), the cached regex is returned, avoiding unnecessary runtime compilation. + +Using the RegExp constructor offers a lot of flexibility, but the runtime compilation comes at a price - it's slow. Not specifically because of the call to the RegExp constructor, but **because you have to build up the string before `new RegExp()` is even called**. + +## About + +### 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) | +| 1 | [MartinKolarik](https://github.com/MartinKolarik) | + +### 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 September 01, 2017._ \ No newline at end of file diff --git a/node_modules/regex-cache/index.js b/node_modules/regex-cache/index.js new file mode 100644 index 0000000000000..df8c423123498 --- /dev/null +++ b/node_modules/regex-cache/index.js @@ -0,0 +1,68 @@ +/*! + * regex-cache + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var equal = require('is-equal-shallow'); +var basic = {}; +var cache = {}; + +/** + * Expose `regexCache` + */ + +module.exports = regexCache; + +/** + * Memoize the results of a call to the new RegExp constructor. + * + * @param {Function} fn [description] + * @param {String} str [description] + * @param {Options} options [description] + * @param {Boolean} nocompare [description] + * @return {RegExp} + */ + +function regexCache(fn, str, opts) { + var key = '_default_', regex, cached; + + if (!str && !opts) { + if (typeof fn !== 'function') { + return fn; + } + return basic[key] || (basic[key] = fn(str)); + } + + var isString = typeof str === 'string'; + if (isString) { + if (!opts) { + return basic[str] || (basic[str] = fn(str)); + } + key = str; + } else { + opts = str; + } + + cached = cache[key]; + if (cached && equal(cached.opts, opts)) { + return cached.regex; + } + + memo(key, opts, (regex = fn(str, opts))); + return regex; +} + +function memo(key, opts, regex) { + cache[key] = {regex: regex, opts: opts}; +} + +/** + * Expose `cache` + */ + +module.exports.cache = cache; +module.exports.basic = basic; diff --git a/node_modules/regex-cache/package.json b/node_modules/regex-cache/package.json new file mode 100644 index 0000000000000..a9072f67bc5e4 --- /dev/null +++ b/node_modules/regex-cache/package.json @@ -0,0 +1,64 @@ +{ + "name": "regex-cache", + "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.", + "version": "0.4.4", + "homepage": "https://github.com/jonschlinkert/regex-cache", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Martin Kolárik (https://kolarik.sk)" + ], + "repository": "jonschlinkert/regex-cache", + "bugs": { + "url": "https://github.com/jonschlinkert/regex-cache/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "benchmarks": "node benchmark" + }, + "dependencies": { + "is-equal-shallow": "^0.1.3" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^0.1.5", + "gulp-format-md": "^0.1.7", + "micromatch": "^2.3.7", + "should": "^8.3.0" + }, + "keywords": [ + "cache", + "expression", + "regex", + "regexp", + "regular", + "regular expression", + "store", + "to-regex" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/regex-not/LICENSE b/node_modules/regex-not/LICENSE new file mode 100644 index 0000000000000..8ee09d911b158 --- /dev/null +++ b/node_modules/regex-not/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/regex-not/README.md b/node_modules/regex-not/README.md new file mode 100644 index 0000000000000..24d00e7ded7b5 --- /dev/null +++ b/node_modules/regex-not/README.md @@ -0,0 +1,133 @@ +# regex-not [![NPM version](https://img.shields.io/npm/v/regex-not.svg?style=flat)](https://www.npmjs.com/package/regex-not) [![NPM monthly downloads](https://img.shields.io/npm/dm/regex-not.svg?style=flat)](https://npmjs.org/package/regex-not) [![NPM total downloads](https://img.shields.io/npm/dt/regex-not.svg?style=flat)](https://npmjs.org/package/regex-not) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/regex-not.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/regex-not) + +> Create a javascript regular expression for matching everything except for the given string. + +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 regex-not +``` + +## Usage + +```js +var not = require('regex-not'); +``` + +The main export is a function that takes a string an options object. + +```js +not(string[, options]); +``` + +**Example** + +```js +var not = require('regex-not'); +console.log(not('foo')); +//=> /^(?:(?!^(?:foo)$).)+$/ +``` + +**Strict matching** + +By default, the returned regex is for strictly (not) matching the exact given pattern (in other words, "match this string if it does NOT _exactly equal_ `foo`"): + +```js +var re = not('foo'); +console.log(re.test('foo')); //=> false +console.log(re.test('bar')); //=> true +console.log(re.test('foobar')); //=> true +console.log(re.test('barfoo')); //=> true +``` + +### .create + +Returns a string to allow you to create your own regex: + +```js +console.log(not.create('foo')); +//=> '(?:(?!^(?:foo)$).)+' +``` + +### Options + +**options.contains** + +You can relax strict matching by setting `options.contains` to true (in other words, "match this string if it does NOT _contain_ `foo`"): + +```js +var re = not('foo'); +console.log(re.test('foo', {contains: true})); //=> false +console.log(re.test('bar', {contains: true})); //=> true +console.log(re.test('foobar', {contains: true})); //=> false +console.log(re.test('barfoo', {contains: true})); //=> 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: + +* [regex-cache](https://www.npmjs.com/package/regex-cache): Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of… [more](https://github.com/jonschlinkert/regex-cache) | [homepage](https://github.com/jonschlinkert/regex-cache "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.") +* [to-regex](https://www.npmjs.com/package/to-regex): Generate a regex from a string or array of strings. | [homepage](https://github.com/jonschlinkert/to-regex "Generate a regex from a string or array of strings.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 9 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [EdwardBetts](https://github.com/EdwardBetts) | + +### 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 19, 2018._ \ No newline at end of file diff --git a/node_modules/regex-not/index.js b/node_modules/regex-not/index.js new file mode 100644 index 0000000000000..02bfed4a87996 --- /dev/null +++ b/node_modules/regex-not/index.js @@ -0,0 +1,72 @@ +'use strict'; + +var extend = require('extend-shallow'); +var safe = require('safe-regex'); + +/** + * The main export is a function that takes a `pattern` string and an `options` object. + * + * ```js + & var not = require('regex-not'); + & console.log(not('foo')); + & //=> /^(?:(?!^(?:foo)$).)*$/ + * ``` + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {RegExp} Converts the given `pattern` to a regex using the specified `options`. + * @api public + */ + +function toRegex(pattern, options) { + return new RegExp(toRegex.create(pattern, options)); +} + +/** + * Create a regex-compatible string from the given `pattern` and `options`. + * + * ```js + & var not = require('regex-not'); + & console.log(not.create('foo')); + & //=> '^(?:(?!^(?:foo)$).)*$' + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {String} + * @api public + */ + +toRegex.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var opts = extend({}, options); + if (opts.contains === true) { + opts.strictNegate = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var endChar = opts.endChar ? opts.endChar : '+'; + var str = pattern; + + if (opts.strictNegate === false) { + str = '(?:(?!(?:' + pattern + ')).)' + endChar; + } else { + str = '(?:(?!^(?:' + pattern + ')$).)' + endChar; + } + + var res = open + str + close; + if (opts.safe === true && safe(res) === false) { + throw new Error('potentially unsafe regular expression: ' + res); + } + + return res; +}; + +/** + * Expose `toRegex` + */ + +module.exports = toRegex; diff --git a/node_modules/regex-not/package.json b/node_modules/regex-not/package.json new file mode 100644 index 0000000000000..0320d5324994d --- /dev/null +++ b/node_modules/regex-not/package.json @@ -0,0 +1,63 @@ +{ + "name": "regex-not", + "description": "Create a javascript regular expression for matching everything except for the given string.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/regex-not", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/regex-not", + "bugs": { + "url": "https://github.com/jonschlinkert/regex-not/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "exec", + "match", + "negate", + "negation", + "not", + "regex", + "regular expression", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "regex-cache", + "to-regex" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/regexp.prototype.flags/.editorconfig b/node_modules/regexp.prototype.flags/.editorconfig new file mode 100644 index 0000000000000..eaa214161f5cd --- /dev/null +++ b/node_modules/regexp.prototype.flags/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/regexp.prototype.flags/.eslintrc b/node_modules/regexp.prototype.flags/.eslintrc new file mode 100644 index 0000000000000..fb009abaed247 --- /dev/null +++ b/node_modules/regexp.prototype.flags/.eslintrc @@ -0,0 +1,20 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": [2, "allow-null"], + "id-length": 0, + "no-invalid-this": "off", + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + }, + }, + ], +} diff --git a/node_modules/regexp.prototype.flags/.nycrc b/node_modules/regexp.prototype.flags/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/regexp.prototype.flags/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/regexp.prototype.flags/CHANGELOG.md b/node_modules/regexp.prototype.flags/CHANGELOG.md new file mode 100644 index 0000000000000..267dbb90aad73 --- /dev/null +++ b/node_modules/regexp.prototype.flags/CHANGELOG.md @@ -0,0 +1,211 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.5.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.5.0...v1.5.1) - 2023-09-12 + +### Commits + +- [Refactor] use `set-function-name` [`1384147`](https://github.com/es-shims/RegExp.prototype.flags/commit/13841474baf5700de8e3f65fae3670ad1b233483) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `available-regexp-flags`, `tape` [`07bf9a2`](https://github.com/es-shims/RegExp.prototype.flags/commit/07bf9a2c354cc41379b01fe5c383233adaaccf0e) +- [Dev Deps] add missing `npmignore` dep [`8ca9dfe`](https://github.com/es-shims/RegExp.prototype.flags/commit/8ca9dfe4da31ef74ee48a4dcf62692eebb8f8fdd) + +## [v1.5.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.3...v1.5.0) - 2023-04-18 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`f7438ad`](https://github.com/es-shims/RegExp.prototype.flags/commit/f7438ad3728128b99daaeb1d3133a40d906d3621) +- [New] add `unicodeSets`/`v` flag [`f922170`](https://github.com/es-shims/RegExp.prototype.flags/commit/f92217039c9c86a61421ce69594e93a546721397) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `available-regexp-flags`, `object-inspect`, `tape` [`1203078`](https://github.com/es-shims/RegExp.prototype.flags/commit/12030785e6beb1f06c406a4731714012d93867e2) +- [actions] update rebase action to use reusable workflow [`c562ea2`](https://github.com/es-shims/RegExp.prototype.flags/commit/c562ea20c27442ff30ce65091a313b5e49ae8515) +- [Dev Deps] update `aud`, `object-inspect`, `tape` [`f3ae811`](https://github.com/es-shims/RegExp.prototype.flags/commit/f3ae81109dd08b200dce8bd52c183bc44662c3b4) +- [Deps] update `define-properties`, `functions-have-names` [`2d0476e`](https://github.com/es-shims/RegExp.prototype.flags/commit/2d0476e5eba1e4a9b786f169f3be96c2f5a192b2) +- [Tests] use `for-each` instead of `foreach` [`d9f30da`](https://github.com/es-shims/RegExp.prototype.flags/commit/d9f30dab65ff0185a8688c6e62dc1fe650879cc0) +- [Deps] update `define-properties` [`81c1c20`](https://github.com/es-shims/RegExp.prototype.flags/commit/81c1c2012070c1f4480a9ab55bc0cff206152603) + +## [v1.4.3](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.2...v1.4.3) - 2022-04-14 + +### Commits + +- [Fix] when shimmed, name must be `get flags` [`fcefd00`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcefd0039177e9cbcb2ed842d353131ace7a3377) + +## [v1.4.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.1...v1.4.2) - 2022-04-12 + +### Commits + +- [Fix] ensure `hasIndices` is patched properly, and getter order is correct [`a1af45a`](https://github.com/es-shims/RegExp.prototype.flags/commit/a1af45a8a6f7305b097b83f96ee9fc45abb3e733) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`24f5a0c`](https://github.com/es-shims/RegExp.prototype.flags/commit/24f5a0c84f2e7d263ae0e2008def870afd6d5a4f) + +## [v1.4.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.0...v1.4.1) - 2022-01-13 + +### Commits + +- [Fix] `polyfill`: do not throw in a descriptorless environment [`e2d24e7`](https://github.com/es-shims/RegExp.prototype.flags/commit/e2d24e707a44d958a0b6d3a114effb2f2b475337) + +## [v1.4.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.2...v1.4.0) - 2022-01-13 + +### Commits + +- [Tests] use `available-regexp-flags` [`95af246`](https://github.com/es-shims/RegExp.prototype.flags/commit/95af2463f1373282087528f8566e20ffae26c3db) +- [New] add `hasIndices`/`d` flag [`89959ca`](https://github.com/es-shims/RegExp.prototype.flags/commit/89959ca1128ea48dcd0ec1416355264425fa3bc5) + +## [v1.3.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.1...v1.3.2) - 2022-01-13 + +### Commits + +- [actions] reuse common workflows [`6665b5d`](https://github.com/es-shims/RegExp.prototype.flags/commit/6665b5db7c45ce6b987d08ebaf6d2767eec95b94) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`babce94`](https://github.com/es-shims/RegExp.prototype.flags/commit/babce94b5ca96e93e74e384c0a01295943677a3f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `object-inspect`, `safe-publish-latest`, `tape` [`52132d9`](https://github.com/es-shims/RegExp.prototype.flags/commit/52132d9f3df904864d4cf3fd44892ee563aee524) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c16687c`](https://github.com/es-shims/RegExp.prototype.flags/commit/c16687c118d374d8997a8d885467507bf943b4bc) +- [actions] update codecov uploader [`0a3c904`](https://github.com/es-shims/RegExp.prototype.flags/commit/0a3c904a9fd1247b3b8e0fb6b451b3fbe97735bd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`3fce7f2`](https://github.com/es-shims/RegExp.prototype.flags/commit/3fce7f27c753440003675d03ae9a7ecfa6a74d30) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`75ca498`](https://github.com/es-shims/RegExp.prototype.flags/commit/75ca49889349fc42e51ea79b2ec7a1996fb3eb18) +- [actions] update workflows [`300f321`](https://github.com/es-shims/RegExp.prototype.flags/commit/300f321984526066656bec791f0bb3861b33cfbc) +- [meta] better `eccheck` command [`5f735ab`](https://github.com/es-shims/RegExp.prototype.flags/commit/5f735ab1b1c87dbd05c0096249160587f166cd51) +- [Dev Deps] update `eslint`, `tape` [`3059637`](https://github.com/es-shims/RegExp.prototype.flags/commit/3059637210eb5c9fa97160ec2f0aea1d1d724eb7) +- [actions] update workflows` [`dbd8ab4`](https://github.com/es-shims/RegExp.prototype.flags/commit/dbd8ab49fa2196dd74791107825c43e4481cdfd2) +- [meta] use `prepublishOnly` script for npm 7+ [`5cc8652`](https://github.com/es-shims/RegExp.prototype.flags/commit/5cc86524a41bf358b6701bcf46e480f0e3e470b4) +- [Fix] use polyfill, not implementation, in main export [`15ab4b8`](https://github.com/es-shims/RegExp.prototype.flags/commit/15ab4b85f3904e48664e26394dc12765ed666da4) +- [meta] remove `audit-level` config, which breaks npm 7 installs [`1cb98ae`](https://github.com/es-shims/RegExp.prototype.flags/commit/1cb98aed731e73d11df5ed3b853b371d35a69f5a) + +## [v1.3.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.0...v1.3.1) - 2021-01-15 + +### Commits + +- [Tests] run `nyc` on all tests; use `tape` runner; add full es-shims test suite [`047a1e8`](https://github.com/es-shims/RegExp.prototype.flags/commit/047a1e8ff250220254b0e9598d962a56c8ec3ffc) +- [Tests] migrate tests to Github Actions [`e4e391f`](https://github.com/es-shims/RegExp.prototype.flags/commit/e4e391fd3e6f057172994ad0c33ca128568c0b06) +- [meta] use `auto-changelog` for changelog [`afbcd06`](https://github.com/es-shims/RegExp.prototype.flags/commit/afbcd06402e97e975af797e2c1375e35e22e90f2) +- [actions] add Require Allow Edits workflow [`0db5d50`](https://github.com/es-shims/RegExp.prototype.flags/commit/0db5d50cdf59e3e5529024af4f8ce05829edc06d) +- [meta] do not publish github action workflow files [`53f2902`](https://github.com/es-shims/RegExp.prototype.flags/commit/53f29020e5a1f517e91b8cf226ed6bc97eadc090) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `aud` [`05f2a85`](https://github.com/es-shims/RegExp.prototype.flags/commit/05f2a851869069c7911176809028be8491465f86) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2a197b8`](https://github.com/es-shims/RegExp.prototype.flags/commit/2a197b84916f094946c5cad56ef8e7bb7e8f12ac) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`e40bd37`](https://github.com/es-shims/RegExp.prototype.flags/commit/e40bd37de9bb756672832a6c994652965d09b9ae) +- [Refactor] use `call-bind` instead of `es-abstract` [`e6eac90`](https://github.com/es-shims/RegExp.prototype.flags/commit/e6eac9052ebdb4bc28cb83b5d3017a4ed74fe3f1) +- [Deps] update `es-abstract` [`f198075`](https://github.com/es-shims/RegExp.prototype.flags/commit/f198075d6fc075e0d98967af98a512742e6e7e4f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2d21727`](https://github.com/es-shims/RegExp.prototype.flags/commit/2d217275d78214b82c7f5cacca85ca2308df83f1) +- [Deps] update `es-abstract` [`7e7ddc6`](https://github.com/es-shims/RegExp.prototype.flags/commit/7e7ddc66174256f6688a857b09c9a02bafcf4866) + +## [v1.3.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.2.0...v1.3.0) - 2019-12-14 + +### Commits + +- [Tests] remove `jscs` [`4a09ab4`](https://github.com/es-shims/RegExp.prototype.flags/commit/4a09ab467f62065a1718b0dcc50f7818b5400ab6) +- [Tests] use shared travis-ci configs [`8afa6a9`](https://github.com/es-shims/RegExp.prototype.flags/commit/8afa6a99fd35c19fb49ba630fd17159a5da2a34e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `has`, `tape` [`13a9fc9`](https://github.com/es-shims/RegExp.prototype.flags/commit/13a9fc9d6bc2600681eb3f638668beccf80b843c) +- [Refactor] use `callBind` helper from `es-abstract` [`c3a3727`](https://github.com/es-shims/RegExp.prototype.flags/commit/c3a37276764d99c1e4f7e9467ad636fce8c92c58) +- [actions] add automatic rebasing / merge commit blocking [`51e3f93`](https://github.com/es-shims/RegExp.prototype.flags/commit/51e3f9366d15a07edaf532884948ce74b6827125) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`7e1ee50`](https://github.com/es-shims/RegExp.prototype.flags/commit/7e1ee505df374867c2c04d500aa1c36265161b6f) +- [meta] add `funding` field [`c99cbec`](https://github.com/es-shims/RegExp.prototype.flags/commit/c99cbec1af9b0e0be42e82f164adacf2e1bdee16) +- [New] add `auto` entry point [`1e53e85`](https://github.com/es-shims/RegExp.prototype.flags/commit/1e53e854f663472e74dd0350e0c095df9c2b9c7b) +- [Tests] use `eclint` instead of `editorconfig-tools` [`8600bfe`](https://github.com/es-shims/RegExp.prototype.flags/commit/8600bfed42ab8d294463df482874c344fc079f82) +- [Deps] update `define-properties` [`ad221fa`](https://github.com/es-shims/RegExp.prototype.flags/commit/ad221fa2a26a9c2bc8d274b689cf7a626b58f4e9) + +## [v1.2.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.1.1...v1.2.0) - 2017-10-24 + +### Commits + +- [Tests] up to `node` `v8.8`, `v7.10`, `v6.11`, `v4.8`; improve matrix; use `nvm install-latest-npm` so new npm doesn’t break old node [`5a9653d`](https://github.com/es-shims/RegExp.prototype.flags/commit/5a9653d1904eb8ad8baffe43cd065b6f36013e5a) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`; add `has` [`556de86`](https://github.com/es-shims/RegExp.prototype.flags/commit/556de8632bbe7a23279717f7d0b6ee841514fbe1) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`726772c`](https://github.com/es-shims/RegExp.prototype.flags/commit/726772c054a499ab7680823c4bd8fa9b048d9420) +- [New] add support for `dotAll` regex flag. [`fcbd64f`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcbd64f84fd974d98384bdb093bf25656eb72e8f) +- [Dev Deps] update `eslint`, `jscs`, `nsp`, `tape`, `@ljharb/eslint-config`, `@es-shims/api` [`0272934`](https://github.com/es-shims/RegExp.prototype.flags/commit/02729344addadc105b9c5e12d90cca85a75d16d6) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`e4cd264`](https://github.com/es-shims/RegExp.prototype.flags/commit/e4cd264f4afa33ff865325b04791de95696e3ae4) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@es-shims/api` [`baf5169`](https://github.com/es-shims/RegExp.prototype.flags/commit/baf51698ac00b31b6a4a6d5646a183a409ad1118) +- [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config` [`97cea15`](https://github.com/es-shims/RegExp.prototype.flags/commit/97cea152c20bb0e63e9c5111780f7b4af5d1a0e8) +- [Dev Deps] update `tape`, `discs`, `eslint`, `@ljharb/eslint-config` [`b6872f4`](https://github.com/es-shims/RegExp.prototype.flags/commit/b6872f44c833f6f7faf63881657208b6cd43ef49) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`14702cc`](https://github.com/es-shims/RegExp.prototype.flags/commit/14702ccd050029d4e6ea2e59d0912e6bfc16ffc0) +- [Dev Deps] update `jscs`, `@es-shims/api` [`cd060a6`](https://github.com/es-shims/RegExp.prototype.flags/commit/cd060a650db019be5244e1c1b77a29f6d79c89db) +- [Tests] up to `node` `v6.2`, `v5.11` [`14638bd`](https://github.com/es-shims/RegExp.prototype.flags/commit/14638bdbd62d6b6a7c89efb8ec57a7815032b4bb) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`b0a5ffb`](https://github.com/es-shims/RegExp.prototype.flags/commit/b0a5ffb25a76783053652e0d7f835e354f9b29b6) +- [Tests] npm run silently [`35804d4`](https://github.com/es-shims/RegExp.prototype.flags/commit/35804d45dd7f57faab923aaab914e6390813e700) +- [Tests] up to `node` `v5.9`, `v4.4` [`e0fe80d`](https://github.com/es-shims/RegExp.prototype.flags/commit/e0fe80d96783820444d6dea1e6b5739032a50c1b) +- [Tests] up to `node` `v5.7`, `v4.3` [`9739c42`](https://github.com/es-shims/RegExp.prototype.flags/commit/9739c422523571cc439d73a9ecaf5dc2e2643bec) +- [Dev Deps] update `jscs` [`4aa1699`](https://github.com/es-shims/RegExp.prototype.flags/commit/4aa1699a0582b7739f14c6cd8d5ae1a4515bd604) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `@ljharb/eslint-config` [`8bc5e6b`](https://github.com/es-shims/RegExp.prototype.flags/commit/8bc5e6ba5befc8f399e00f3c2d064519457fb57c) +- [Tests] fix npm upgrades on older nodes [`ae00bb9`](https://github.com/es-shims/RegExp.prototype.flags/commit/ae00bb9d979605f41fc598156b5c590923ac8184) +- Only apps should have lockfiles. [`6d14965`](https://github.com/es-shims/RegExp.prototype.flags/commit/6d1496550a962ea8525fb7b62dc4ac99d9513a6d) +- [Tests] use pretest/posttest for better organization [`0520cfd`](https://github.com/es-shims/RegExp.prototype.flags/commit/0520cfda23835fb5bff038a6e5cc530b0ce66985) +- [Tests] up to `node` `v5.5` [`810f62b`](https://github.com/es-shims/RegExp.prototype.flags/commit/810f62b6d2418e843b7c2c225841e9305dbc01ee) +- [Tests] on `node` `v5.3` [`f839662`](https://github.com/es-shims/RegExp.prototype.flags/commit/f839662887cbb1a5e472a9302185355b431c85c1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`78ecaa5`](https://github.com/es-shims/RegExp.prototype.flags/commit/78ecaa5b203a07f76505824f77ce1e5d60d8b0ca) +- [Tests] up to `node` `v5.2` [`c04d762`](https://github.com/es-shims/RegExp.prototype.flags/commit/c04d762a8c09ab544df14c14521f32dac3f67823) +- [Tests] up to `node` `v5.0` [`7c0d5b9`](https://github.com/es-shims/RegExp.prototype.flags/commit/7c0d5b944d9ba30f38227d0750109d582be254e2) +- [Tests] on `node` `v5.10` [`40ddafd`](https://github.com/es-shims/RegExp.prototype.flags/commit/40ddafd83e2e1c959ee8ba24cb296559f2545a0c) +- [Deps] update `define-properties` [`98ea89d`](https://github.com/es-shims/RegExp.prototype.flags/commit/98ea89dc9c41b81b84d4071105048687dab0660e) + +## [v1.1.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.1.0...v1.1.1) - 2015-08-16 + +### Commits + +- [Fix] cover the case where there is no descriptor on the prototype [`67014c3`](https://github.com/es-shims/RegExp.prototype.flags/commit/67014c35a93c76e28c4ab5cd3e5a54f7f40c2ddf) + +## [v1.1.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.0.1...v1.1.0) - 2015-08-16 + +### Commits + +- Update `jscs`, `eslint`; use my personal shared `eslint` config. [`37ca379`](https://github.com/es-shims/RegExp.prototype.flags/commit/37ca379bc72620fa6785b0a9ca791b160328c236) +- Update `eslint`, `tape`, `editorconfig-tools`, `nsp` [`cb92d6e`](https://github.com/es-shims/RegExp.prototype.flags/commit/cb92d6e8a8c1df5f00a226e11a78f38c6f7c3055) +- Implement the [es-shim API](es-shims/api). [`15eb821`](https://github.com/es-shims/RegExp.prototype.flags/commit/15eb821be2771e03a1341a08483513702118b45c) +- Refactoring to reduce complexity. [`aeb4785`](https://github.com/es-shims/RegExp.prototype.flags/commit/aeb47854f6b00355702104066c63f6eed38b5e81) +- Move implementation to `implementation.js` [`a698925`](https://github.com/es-shims/RegExp.prototype.flags/commit/a698925b4c1c78cd1ed4315b9deb5bb1707d5203) +- Update `eslint`, `jscs` [`277a4a1`](https://github.com/es-shims/RegExp.prototype.flags/commit/277a4a15e663eb823b63743b84645158b9bb9a43) +- Update `nsp`, `eslint` [`c9f3866`](https://github.com/es-shims/RegExp.prototype.flags/commit/c9f3866e25b52050f6bfe3fd0de8849de0271ea4) +- Update `tape`, `eslint` [`a08795b`](https://github.com/es-shims/RegExp.prototype.flags/commit/a08795b688b186fa5a2ec207358d81c16a07d30d) +- Make some things a bit more robust. [`450abb4`](https://github.com/es-shims/RegExp.prototype.flags/commit/450abb48974f10bfd2d9478e7ea1b9d87f004fb9) +- Update `eslint` [`25d898f`](https://github.com/es-shims/RegExp.prototype.flags/commit/25d898f62719b26fea5f9245be141103d4ec58cd) +- Test on latest two `io.js` versions. [`2e17ca3`](https://github.com/es-shims/RegExp.prototype.flags/commit/2e17ca304e12fb5071a091706a4d559b3eac968a) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`4a2a548`](https://github.com/es-shims/RegExp.prototype.flags/commit/4a2a5480c50f30814000684462a8a3b44c87ae2e) +- Update `eslint` [`64df4e0`](https://github.com/es-shims/RegExp.prototype.flags/commit/64df4e0a2d0e2901b57652e30913db797dc0829b) +- Update `eslint` [`ac05ae5`](https://github.com/es-shims/RegExp.prototype.flags/commit/ac05ae509a4a70d107820a749ea6f02784fc41eb) +- Clean up `supportsDescriptors` check. [`e44d0de`](https://github.com/es-shims/RegExp.prototype.flags/commit/e44d0dec9c8415ff9a911b8806e1d245d6919a11) +- [Dev Deps] Update `jscs` [`8741758`](https://github.com/es-shims/RegExp.prototype.flags/commit/87417588f52f1176fc37d7c32221aa85f749aa34) +- Update `tape`, `jscs`, `nsp`, `eslint` [`db1f658`](https://github.com/es-shims/RegExp.prototype.flags/commit/db1f6584b18cc035ef3b5aec556f54e0ee8c639d) +- Test on `io.js` `v2.3` [`18c948f`](https://github.com/es-shims/RegExp.prototype.flags/commit/18c948f033c87ab2657a0395052cbec531c40900) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`c37e79f`](https://github.com/es-shims/RegExp.prototype.flags/commit/c37e79f380d87a226a6cdaa5f09f832f5dc21b7d) +- Update `tape`, `jscs`, `eslint` [`4b652bf`](https://github.com/es-shims/RegExp.prototype.flags/commit/4b652bf5f2f0e36a15227d0b4048de91ee6c4433) +- [Dev Deps] Update `tape`, `eslint` [`29d4ac0`](https://github.com/es-shims/RegExp.prototype.flags/commit/29d4ac0bea16c6a9f611cb15baccd30449f30a91) +- Test up to `io.js` `v2.1` [`9f9e342`](https://github.com/es-shims/RegExp.prototype.flags/commit/9f9e34295ced1b288dea08e0a66dffd2bc03ff8b) +- Update `covert`, `jscs` [`c98f3b4`](https://github.com/es-shims/RegExp.prototype.flags/commit/c98f3b47f01f317e8a589486dfaee482c66b8b64) +- Update `jscs` [`9e5e220`](https://github.com/es-shims/RegExp.prototype.flags/commit/9e5e220be6ec5d5b9b658235287e35bded580b06) +- [Dev Deps] update `tape` [`cdd3af2`](https://github.com/es-shims/RegExp.prototype.flags/commit/cdd3af21507b01aa524f8b87f158dfc8a8153c85) +- [Dev Deps] update `tape` [`d42d0bf`](https://github.com/es-shims/RegExp.prototype.flags/commit/d42d0bf28f8da2cb47fff49283a07a693f8cb626) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a5e7453`](https://github.com/es-shims/RegExp.prototype.flags/commit/a5e745375c01e9f90ff632c55a5b44b6ada38217) +- Update `tape` [`2a675ec`](https://github.com/es-shims/RegExp.prototype.flags/commit/2a675ec707a9d89aea403d0b9a723ea531e50c2d) +- Test on `io.js` `v2.5` [`448cbdb`](https://github.com/es-shims/RegExp.prototype.flags/commit/448cbdb7df47e52677daea4e0c41e892ad8770e4) +- Test on `io.js` `v2.4` [`948e511`](https://github.com/es-shims/RegExp.prototype.flags/commit/948e51129c01147ffe4dedc3a7d4980128d0cf73) +- Test on `io.js` `v2.2` [`4793278`](https://github.com/es-shims/RegExp.prototype.flags/commit/4793278f5aca187e36b42b08fc1388d8021400e2) +- Update `eslint` [`0f463da`](https://github.com/es-shims/RegExp.prototype.flags/commit/0f463daa14a193ed94b16c46832074d63e861c91) +- Update `eslint` [`5a16967`](https://github.com/es-shims/RegExp.prototype.flags/commit/5a16967db71bb8a24c81a27ee366f0b02b663e34) +- Test on `io.js` `v3.0` [`7ba8706`](https://github.com/es-shims/RegExp.prototype.flags/commit/7ba87064bc8520d34a9560bea8e366d70c93dbbb) +- Test on `iojs-v1.2` [`b521e09`](https://github.com/es-shims/RegExp.prototype.flags/commit/b521e099b7de48cfbdd6860265eb5e972d2859a5) + +## [v1.0.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.0.0...v1.0.1) - 2014-12-13 + +### Merged + +- Match the spec properly: throw when not an object; make getter generic. [`#3`](https://github.com/es-shims/RegExp.prototype.flags/pull/3) + +### Fixed + +- Match the spec properly [`#1`](https://github.com/es-shims/RegExp.prototype.flags/issues/1) + +### Commits + +- Speed up the “is object” check in case of `null` or `undefined` [`77137f9`](https://github.com/es-shims/RegExp.prototype.flags/commit/77137f99449c9b6583cdfda295a00b832dfd45f3) + +## v1.0.0 - 2014-12-10 + +### Commits + +- Adding dotfiles [`313812e`](https://github.com/es-shims/RegExp.prototype.flags/commit/313812e1d8ff42a13dbc8689f2e719324c46c9ca) +- Tests [`625a042`](https://github.com/es-shims/RegExp.prototype.flags/commit/625a042220a3152b49608fb6f187f67bff02b6fb) +- Add package.json [`8b98257`](https://github.com/es-shims/RegExp.prototype.flags/commit/8b98257f900d0a73c8eb3805b9b01999e05e880a) +- Adding the README [`884798b`](https://github.com/es-shims/RegExp.prototype.flags/commit/884798b710d5a85bc6d9a6879f509766e2e57c0e) +- Implementation. [`4186cc9`](https://github.com/es-shims/RegExp.prototype.flags/commit/4186cc9d9a7533f78d88be976f0a8a2757604fc5) +- Adding LICENSE and CHANGELOG [`f87fa81`](https://github.com/es-shims/RegExp.prototype.flags/commit/f87fa8126cc6c39747fbe0dc6cb40ca0ff77fbbc) +- Fixing README URLs [`b821703`](https://github.com/es-shims/RegExp.prototype.flags/commit/b821703d5e5b01ee4f526f15c8e525645cf95ef7) +- Clean up dependencies; update `tape`, `jscs`, `nsp` [`0e13fc1`](https://github.com/es-shims/RegExp.prototype.flags/commit/0e13fc12df09f3a7ac30116ef13bba820c220730) +- Initial commit. [`8a9e35e`](https://github.com/es-shims/RegExp.prototype.flags/commit/8a9e35e15f65c9640e64ee14fab190a60993efaa) diff --git a/node_modules/regexp.prototype.flags/LICENSE b/node_modules/regexp.prototype.flags/LICENSE new file mode 100644 index 0000000000000..e5956a86be2f2 --- /dev/null +++ b/node_modules/regexp.prototype.flags/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (C) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/regexp.prototype.flags/README.md b/node_modules/regexp.prototype.flags/README.md new file mode 100644 index 0000000000000..77e151e2177f2 --- /dev/null +++ b/node_modules/regexp.prototype.flags/README.md @@ -0,0 +1,54 @@ +RegExp.prototype.flags [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An ES6 spec-compliant `RegExp.prototype.flags` shim. Invoke its "shim" method to shim RegExp.prototype.flags if it is unavailable. +*Note*: `RegExp#flags` requires a true ES5 environment - specifically, one with ES5 getters. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags). + +Most common usage: +```js +var flags = require('regexp.prototype.flags'); + +assert(flags(/a/) === ''); +assert(flags(new RegExp('a') === ''); +assert(flags(/a/mig) === 'gim'); +assert(flags(new RegExp('a', 'mig')) === 'gim'); + +if (!RegExp.prototype.flags) { + flags.shim(); +} + +assert(flags(/a/) === /a/.flags); +assert(flags(new RegExp('a') === new RegExp('a').flags); +assert(flags(/a/mig) === /a/mig.flags); +assert(flags(new RegExp('a', 'mig')) === new RegExp('a', 'mig').flags); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/regexp.prototype.flags +[npm-version-svg]: http://versionbadg.es/es-shims/RegExp.prototype.flags.svg +[travis-svg]: https://travis-ci.org/es-shims/RegExp.prototype.flags.svg +[travis-url]: https://travis-ci.org/es-shims/RegExp.prototype.flags +[deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags.svg +[deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags +[dev-deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags#info=devDependencies +[testling-svg]: https://ci.testling.com/es-shims/RegExp.prototype.flags.png +[testling-url]: https://ci.testling.com/es-shims/RegExp.prototype.flags +[npm-badge-png]: https://nodei.co/npm/regexp.prototype.flags.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/regexp.prototype.flags.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/regexp.prototype.flags.svg +[downloads-url]: http://npm-stat.com/charts.html?package=regexp.prototype.flags diff --git a/node_modules/regexp.prototype.flags/auto.js b/node_modules/regexp.prototype.flags/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/regexp.prototype.flags/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/regexp.prototype.flags/implementation.js b/node_modules/regexp.prototype.flags/implementation.js new file mode 100644 index 0000000000000..c724b95dbf5c9 --- /dev/null +++ b/node_modules/regexp.prototype.flags/implementation.js @@ -0,0 +1,39 @@ +'use strict'; + +var setFunctionName = require('set-function-name'); + +var $Object = Object; +var $TypeError = TypeError; + +module.exports = setFunctionName(function flags() { + if (this != null && this !== $Object(this)) { + throw new $TypeError('RegExp.prototype.flags getter called on non-object'); + } + var result = ''; + if (this.hasIndices) { + result += 'd'; + } + if (this.global) { + result += 'g'; + } + if (this.ignoreCase) { + result += 'i'; + } + if (this.multiline) { + result += 'm'; + } + if (this.dotAll) { + result += 's'; + } + if (this.unicode) { + result += 'u'; + } + if (this.unicodeSets) { + result += 'v'; + } + if (this.sticky) { + result += 'y'; + } + return result; +}, 'get flags', true); + diff --git a/node_modules/regexp.prototype.flags/index.js b/node_modules/regexp.prototype.flags/index.js new file mode 100644 index 0000000000000..d6054c766d086 --- /dev/null +++ b/node_modules/regexp.prototype.flags/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var flagsBound = callBind(getPolyfill()); + +define(flagsBound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = flagsBound; diff --git a/node_modules/regexp.prototype.flags/package.json b/node_modules/regexp.prototype.flags/package.json new file mode 100644 index 0000000000000..4171bad4102e8 --- /dev/null +++ b/node_modules/regexp.prototype.flags/package.json @@ -0,0 +1,101 @@ +{ + "name": "regexp.prototype.flags", + "version": "1.5.1", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES6 spec-compliant RegExp.prototype.flags shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/RegExp.prototype.flags.git" + }, + "keywords": [ + "RegExp.prototype.flags", + "regex", + "regular expression", + "ES6", + "shim", + "flag", + "flags", + "regexp", + "RegExp#flags", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "available-regexp-flags": "^1.0.2", + "covert": "^1.1.1", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "has": "^1.0.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/regexp.prototype.flags/polyfill.js b/node_modules/regexp.prototype.flags/polyfill.js new file mode 100644 index 0000000000000..2ea3dac469c96 --- /dev/null +++ b/node_modules/regexp.prototype.flags/polyfill.js @@ -0,0 +1,36 @@ +'use strict'; + +var implementation = require('./implementation'); + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var $gOPD = Object.getOwnPropertyDescriptor; + +module.exports = function getPolyfill() { + if (supportsDescriptors && (/a/mig).flags === 'gim') { + var descriptor = $gOPD(RegExp.prototype, 'flags'); + if ( + descriptor + && typeof descriptor.get === 'function' + && typeof RegExp.prototype.dotAll === 'boolean' + && typeof RegExp.prototype.hasIndices === 'boolean' + ) { + /* eslint getter-return: 0 */ + var calls = ''; + var o = {}; + Object.defineProperty(o, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(o, 'sticky', { + get: function () { + calls += 'y'; + } + }); + if (calls === 'dy') { + return descriptor.get; + } + } + } + return implementation; +}; diff --git a/node_modules/regexp.prototype.flags/shim.js b/node_modules/regexp.prototype.flags/shim.js new file mode 100644 index 0000000000000..3ec77c14ff3bf --- /dev/null +++ b/node_modules/regexp.prototype.flags/shim.js @@ -0,0 +1,26 @@ +'use strict'; + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var getPolyfill = require('./polyfill'); +var gOPD = Object.getOwnPropertyDescriptor; +var defineProperty = Object.defineProperty; +var TypeErr = TypeError; +var getProto = Object.getPrototypeOf; +var regex = /a/; + +module.exports = function shimFlags() { + if (!supportsDescriptors || !getProto) { + throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); + } + var polyfill = getPolyfill(); + var proto = getProto(regex); + var descriptor = gOPD(proto, 'flags'); + if (!descriptor || descriptor.get !== polyfill) { + defineProperty(proto, 'flags', { + configurable: true, + enumerable: false, + get: polyfill + }); + } + return polyfill; +}; diff --git a/node_modules/regexp.prototype.flags/test/implementation.js b/node_modules/regexp.prototype.flags/test/implementation.js new file mode 100644 index 0000000000000..1e3a7141659f2 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var flags = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { flags.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flags.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(flags), t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/index.js b/node_modules/regexp.prototype.flags/test/index.js new file mode 100644 index 0000000000000..10d10713361ad --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var flags = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { flags(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flags(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(flags, t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/shimmed.js b/node_modules/regexp.prototype.flags/test/shimmed.js new file mode 100644 index 0000000000000..059e0e17de6ec --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/shimmed.js @@ -0,0 +1,48 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); + +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); +var hasStrictMode = require('has-strict-mode')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags'); + + t.equal(descriptor.get.length, 0, 'RegExp#flags getter has a length of 0'); + + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(descriptor.get.name, functionsHaveConfigurableNames ? 'get flags' : 'flags', 'RegExp#flags getter has name "get flags" (or "flags" if function names are not configurable)'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(RegExp.prototype, 'flags'), 'RegExp#flags is not enumerable'); + et.end(); + }); + + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + st['throws'](function () { return descriptor.get.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return descriptor.get.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + t.test('has the correct descriptor', function (st) { + st.equal(descriptor.configurable, true); + st.equal(descriptor.enumerable, false); + st.equal(typeof descriptor.get, 'function'); + st.equal(descriptor.set, undefined); + st.end(); + }); + + runTests(callBind(descriptor.get), t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/tests.js b/node_modules/regexp.prototype.flags/test/tests.js new file mode 100644 index 0000000000000..adcfd02625f71 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/tests.js @@ -0,0 +1,143 @@ +'use strict'; + +var has = require('has'); +var inspect = require('object-inspect'); +var supportsDescriptors = require('define-properties').supportsDescriptors; + +var forEach = require('for-each'); +var availableFlags = require('available-regexp-flags'); +var regexProperties = require('available-regexp-flags/properties'); + +var sortedFlags = availableFlags.slice().sort(function (a, b) { return a.localeCompare(b); }).join(''); + +var getRegexLiteral = function (stringRegex) { + try { + // eslint-disable-next-line no-new-func + return Function('return ' + stringRegex + ';')(); + } catch (e) { /**/ } + return null; +}; + +module.exports = function runTests(flags, t) { + t.equal(flags(/a/g), 'g', 'flags(/a/g) !== "g"'); + t.equal(flags(/a/gmi), 'gim', 'flags(/a/gmi) !== "gim"'); + t.equal(flags(new RegExp('a', 'gmi')), 'gim', 'flags(new RegExp("a", "gmi")) !== "gim"'); + t.equal(flags(/a/), '', 'flags(/a/) !== ""'); + t.equal(flags(new RegExp('a')), '', 'flags(new RegExp("a")) !== ""'); + + forEach(availableFlags, function (flag) { + var property = regexProperties[flag]; + t.test(property + ' flag', function (st) { + st.equal(flags(getRegexLiteral('/a/' + flag)), flag, 'flags(/a/' + flag + ') !== ' + inspect(flag)); + st.equal(flags(new RegExp('a', flag)), flag, 'flags(new RegExp("a", ' + inspect(flag) + ')) !== ' + inspect(flag)); + st.end(); + }); + }); + + t.test('sorting', function (st) { + st.equal(flags(/a/gim), 'gim', 'flags(/a/gim) !== "gim"'); + st.equal(flags(/a/mig), 'gim', 'flags(/a/mig) !== "gim"'); + st.equal(flags(/a/mgi), 'gim', 'flags(/a/mgi) !== "gim"'); + if (has(RegExp.prototype, 'sticky')) { + st.equal(flags(getRegexLiteral('/a/gyim')), 'gimy', 'flags(/a/gyim) !== "gimy"'); + } + if (has(RegExp.prototype, 'unicode')) { + st.equal(flags(getRegexLiteral('/a/ugmi')), 'gimu', 'flags(/a/ugmi) !== "gimu"'); + } + if (has(RegExp.prototype, 'dotAll')) { + st.equal(flags(getRegexLiteral('/a/sgmi')), 'gims', 'flags(/a/sgmi) !== "gims"'); + } + + var randomFlags = availableFlags.slice().sort(function () { return Math.random() > 0.5 ? 1 : -1; }).join('').replace('v', ''); + st.equal( + flags(getRegexLiteral('/a/' + randomFlags)), + sortedFlags.replace('v', ''), + 'random: flags(/a/' + randomFlags + ') === ' + inspect(sortedFlags) + ); + + st.end(); + }); + + t.test('basic examples', function (st) { + st.equal(flags(/a/g), 'g', '(/a/g).flags !== "g"'); + st.equal(flags(/a/gmi), 'gim', '(/a/gmi).flags !== "gim"'); + st.equal(flags(new RegExp('a', 'gmi')), 'gim', 'new RegExp("a", "gmi").flags !== "gim"'); + st.equal(flags(/a/), '', '(/a/).flags !== ""'); + st.equal(flags(new RegExp('a')), '', 'new RegExp("a").flags !== ""'); + + st.end(); + }); + + t.test('generic flags', function (st) { + st.equal(flags({}), ''); + st.equal(flags({ ignoreCase: true }), 'i'); + st.equal(flags({ dotAll: 1, global: 0, sticky: 1, unicode: 1 }), 'suy'); + st.equal(flags({ __proto__: { multiline: true } }), 'm'); + + var obj = {}; + forEach(availableFlags, function (flag) { + if (flag !== 'v') { + obj[regexProperties[flag]] = true; + } + }); + st.equal(flags(obj), sortedFlags.replace('v', ''), 'an object with every available flag: ' + sortedFlags); + + st.end(); + }); + + t.test('throws properly', function (st) { + var nonObjects = ['', false, true, 42, NaN, null, undefined]; + st.plan(nonObjects.length); + var throwsOnNonObject = function (nonObject) { + st['throws'](flags.bind(null, nonObject), TypeError, inspect(nonObject) + ' is not an Object'); + }; + nonObjects.forEach(throwsOnNonObject); + }); + + t.test('getters', { skip: !supportsDescriptors }, function (st) { + /* eslint getter-return: 0 */ + var calls = ''; + var re = {}; + Object.defineProperty(re, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(re, 'global', { + get: function () { + calls += 'g'; + } + }); + Object.defineProperty(re, 'ignoreCase', { + get: function () { + calls += 'i'; + } + }); + Object.defineProperty(re, 'multiline', { + get: function () { + calls += 'm'; + } + }); + Object.defineProperty(re, 'dotAll', { + get: function () { + calls += 's'; + } + }); + Object.defineProperty(re, 'unicode', { + get: function () { + calls += 'u'; + } + }); + Object.defineProperty(re, 'sticky', { + get: function () { + calls += 'y'; + } + }); + + flags(re); + + st.equal(calls, 'dgimsuy', 'getters are called in expected order'); + + st.end(); + }); +}; diff --git a/node_modules/remove-trailing-separator/history.md b/node_modules/remove-trailing-separator/history.md new file mode 100644 index 0000000000000..e15e8a462cb39 --- /dev/null +++ b/node_modules/remove-trailing-separator/history.md @@ -0,0 +1,17 @@ +## History + +### 1.1.0 - 16th Aug 2017 + +- [f4576e3](https://github.com/darsain/remove-trailing-separator/commit/f4576e3638c39b794998b533fffb27854dcbee01) Implement faster slash slicing + +### 1.0.2 - 07th Jun 2017 + +- [8e13ecb](https://github.com/darsain/remove-trailing-separator/commit/8e13ecbfd7b9f5fdf97c5d5ff923e4718b874e31) ES5 compatibility + +### 1.0.1 - 25th Sep 2016 + +- [b78606d](https://github.com/darsain/remove-trailing-separator/commit/af90b4e153a4527894741af6c7005acaeb78606d) Remove backslash only on win32 systems + +### 1.0.0 - 24th Sep 2016 + +Initial release. diff --git a/node_modules/remove-trailing-separator/index.js b/node_modules/remove-trailing-separator/index.js new file mode 100644 index 0000000000000..512306b8886f2 --- /dev/null +++ b/node_modules/remove-trailing-separator/index.js @@ -0,0 +1,17 @@ +var isWin = process.platform === 'win32'; + +module.exports = function (str) { + var i = str.length - 1; + if (i < 2) { + return str; + } + while (isSeparator(str, i)) { + i--; + } + return str.substr(0, i + 1); +}; + +function isSeparator(str, i) { + var char = str[i]; + return i > 0 && (char === '/' || (isWin && char === '\\')); +} diff --git a/node_modules/remove-trailing-separator/license b/node_modules/remove-trailing-separator/license new file mode 100644 index 0000000000000..a169aff772547 --- /dev/null +++ b/node_modules/remove-trailing-separator/license @@ -0,0 +1,3 @@ +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. \ No newline at end of file diff --git a/node_modules/remove-trailing-separator/package.json b/node_modules/remove-trailing-separator/package.json new file mode 100644 index 0000000000000..47ef27a2e021e --- /dev/null +++ b/node_modules/remove-trailing-separator/package.json @@ -0,0 +1,37 @@ +{ + "name": "remove-trailing-separator", + "version": "1.1.0", + "description": "Removes separators from the end of the string.", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "lint": "xo", + "pretest": "npm run lint", + "test": "nyc ava", + "report": "nyc report --reporter=html" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/darsain/remove-trailing-separator.git" + }, + "keywords": [ + "remove", + "strip", + "trailing", + "separator" + ], + "author": "darsain", + "license": "ISC", + "bugs": { + "url": "https://github.com/darsain/remove-trailing-separator/issues" + }, + "homepage": "https://github.com/darsain/remove-trailing-separator#readme", + "devDependencies": { + "ava": "^0.16.0", + "coveralls": "^2.11.14", + "nyc": "^8.3.0", + "xo": "^0.16.0" + } +} diff --git a/node_modules/remove-trailing-separator/readme.md b/node_modules/remove-trailing-separator/readme.md new file mode 100644 index 0000000000000..747086af8766e --- /dev/null +++ b/node_modules/remove-trailing-separator/readme.md @@ -0,0 +1,51 @@ +# remove-trailing-separator + +[![NPM version][npm-img]][npm-url] [![Build Status: Linux][travis-img]][travis-url] [![Build Status: Windows][appveyor-img]][appveyor-url] [![Coverage Status][coveralls-img]][coveralls-url] + +Removes all separators from the end of a string. + +## Install + +``` +npm install remove-trailing-separator +``` + +## Examples + +```js +const removeTrailingSeparator = require('remove-trailing-separator'); + +removeTrailingSeparator('/foo/bar/') // '/foo/bar' +removeTrailingSeparator('/foo/bar///') // '/foo/bar' + +// leaves only/last separator +removeTrailingSeparator('/') // '/' +removeTrailingSeparator('///') // '/' + +// returns empty string +removeTrailingSeparator('') // '' +``` + +## Notable backslash, or win32 separator behavior + +`\` is considered a separator only on WIN32 systems. All POSIX compliant systems +see backslash as a valid file name character, so it would break POSIX compliance +to remove it there. + +In practice, this means that this code will return different things depending on +what system it runs on: + +```js +removeTrailingSeparator('\\foo\\') +// UNIX => '\\foo\\' +// WIN32 => '\\foo' +``` + +[npm-url]: https://npmjs.org/package/remove-trailing-separator +[npm-img]: https://badge.fury.io/js/remove-trailing-separator.svg +[travis-url]: https://travis-ci.org/darsain/remove-trailing-separator +[travis-img]: https://travis-ci.org/darsain/remove-trailing-separator.svg?branch=master +[appveyor-url]: https://ci.appveyor.com/project/darsain/remove-trailing-separator/branch/master +[appveyor-img]: https://ci.appveyor.com/api/projects/status/wvg9a93rrq95n2xl/branch/master?svg=true +[coveralls-url]: https://coveralls.io/github/darsain/remove-trailing-separator?branch=master +[coveralls-img]: https://coveralls.io/repos/github/darsain/remove-trailing-separator/badge.svg?branch=master diff --git a/node_modules/repeat-element/LICENSE b/node_modules/repeat-element/LICENSE new file mode 100644 index 0000000000000..7cccaf9e345e5 --- /dev/null +++ b/node_modules/repeat-element/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present, 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/repeat-element/README.md b/node_modules/repeat-element/README.md new file mode 100644 index 0000000000000..6006418b33677 --- /dev/null +++ b/node_modules/repeat-element/README.md @@ -0,0 +1,99 @@ +# repeat-element [![NPM version](https://img.shields.io/npm/v/repeat-element.svg?style=flat)](https://www.npmjs.com/package/repeat-element) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-element.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-element) + +> Create an array by repeating the given value n times. + +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 repeat-element +``` + +## Usage + +```js +const repeat = require('repeat-element'); + +repeat('a', 5); +//=> ['a', 'a', 'a', 'a', 'a'] + +repeat('a', 1); +//=> ['a'] + +repeat('a', 0); +//=> [] + +repeat(null, 5) +//» [ null, null, null, null, null ] + +repeat({some: 'object'}, 5) +//» [ { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' } ] + +repeat(5, 5) +//» [ 5, 5, 5, 5, 5 ] +``` + +## 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 +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [LinusU](https://github.com/LinusU) | +| 1 | [architectcodes](https://github.com/architectcodes) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/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 August 19, 2018._ \ No newline at end of file diff --git a/node_modules/repeat-element/index.js b/node_modules/repeat-element/index.js new file mode 100644 index 0000000000000..dde8a27fa1cc3 --- /dev/null +++ b/node_modules/repeat-element/index.js @@ -0,0 +1,22 @@ +/*! + * repeat-element + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +module.exports = function repeat(ele, num) { + if (Array.prototype.fill) { + return new Array(num).fill(ele); + } + + var arr = new Array(num); + + for (var i = 0; i < num; i++) { + arr[i] = ele; + } + + return arr; +}; diff --git a/node_modules/repeat-element/package.json b/node_modules/repeat-element/package.json new file mode 100644 index 0000000000000..537055f4c4ea1 --- /dev/null +++ b/node_modules/repeat-element/package.json @@ -0,0 +1,49 @@ +{ + "name": "repeat-element", + "description": "Create an array by repeating the given value n times.", + "version": "1.1.4", + "homepage": "https://github.com/jonschlinkert/repeat-element", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/repeat-element", + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-element/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.4.1", + "glob": "^7.1.2", + "gulp-format-md": "^1.0.0", + "minimist": "^1.2.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "array", + "element", + "repeat", + "string" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/repeat-string/LICENSE b/node_modules/repeat-string/LICENSE new file mode 100644 index 0000000000000..39245ac1c6061 --- /dev/null +++ b/node_modules/repeat-string/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/repeat-string/README.md b/node_modules/repeat-string/README.md new file mode 100644 index 0000000000000..aaa5e91c7a7f9 --- /dev/null +++ b/node_modules/repeat-string/README.md @@ -0,0 +1,136 @@ +# repeat-string [![NPM version](https://img.shields.io/npm/v/repeat-string.svg?style=flat)](https://www.npmjs.com/package/repeat-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-string) + +> Repeat the given string n times. Fastest implementation for repeating a string. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save repeat-string +``` + +## Usage + +### [repeat](index.js#L41) + +Repeat the given `string` the specified `number` of times. + +**Example:** + +**Example** + +```js +var repeat = require('repeat-string'); +repeat('A', 5); +//=> AAAAA +``` + +**Params** + +* `string` **{String}**: The string to repeat +* `number` **{Number}**: The number of times to repeat the string +* `returns` **{String}**: Repeated string + +## Benchmarks + +Repeat string is significantly faster than the native method (which is itself faster than [repeating](https://github.com/sindresorhus/repeating)): + +```sh +# 2x +repeat-string █████████████████████████ (26,953,977 ops/sec) +repeating █████████ (9,855,695 ops/sec) +native ██████████████████ (19,453,895 ops/sec) + +# 3x +repeat-string █████████████████████████ (19,445,252 ops/sec) +repeating ███████████ (8,661,565 ops/sec) +native ████████████████████ (16,020,598 ops/sec) + +# 10x +repeat-string █████████████████████████ (23,792,521 ops/sec) +repeating █████████ (8,571,332 ops/sec) +native ███████████████ (14,582,955 ops/sec) + +# 50x +repeat-string █████████████████████████ (23,640,179 ops/sec) +repeating █████ (5,505,509 ops/sec) +native ██████████ (10,085,557 ops/sec) + +# 250x +repeat-string █████████████████████████ (23,489,618 ops/sec) +repeating ████ (3,962,937 ops/sec) +native ████████ (7,724,892 ops/sec) + +# 2000x +repeat-string █████████████████████████ (20,315,172 ops/sec) +repeating ████ (3,297,079 ops/sec) +native ███████ (6,203,331 ops/sec) + +# 20000x +repeat-string █████████████████████████ (23,382,915 ops/sec) +repeating ███ (2,980,058 ops/sec) +native █████ (5,578,808 ops/sec) +``` + +**Run the benchmarks** + +Install dev dependencies: + +```sh +npm i -d && node benchmark +``` + +## About + +### Related projects + +[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.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 51 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [LinusU](https://github.com/LinusU) | +| 2 | [tbusser](https://github.com/tbusser) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wooorm](https://github.com/wooorm) | + +### 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](http://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/repeat-string/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 23, 2016._ \ No newline at end of file diff --git a/node_modules/repeat-string/index.js b/node_modules/repeat-string/index.js new file mode 100644 index 0000000000000..4459afd8016e3 --- /dev/null +++ b/node_modules/repeat-string/index.js @@ -0,0 +1,70 @@ +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Results cache + */ + +var res = ''; +var cache; + +/** + * Expose `repeat` + */ + +module.exports = repeat; + +/** + * Repeat the given `string` the specified `number` + * of times. + * + * **Example:** + * + * ```js + * var repeat = require('repeat-string'); + * repeat('A', 5); + * //=> AAAAA + * ``` + * + * @param {String} `string` The string to repeat + * @param {Number} `number` The number of times to repeat the string + * @return {String} Repeated string + * @api public + */ + +function repeat(str, num) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + // cover common, quick use cases + if (num === 1) return str; + if (num === 2) return str + str; + + var max = str.length * num; + if (cache !== str || typeof cache === 'undefined') { + cache = str; + res = ''; + } else if (res.length >= max) { + return res.substr(0, max); + } + + while (max > res.length && num > 1) { + if (num & 1) { + res += str; + } + + num >>= 1; + str += str; + } + + res += str; + res = res.substr(0, max); + return res; +} diff --git a/node_modules/repeat-string/package.json b/node_modules/repeat-string/package.json new file mode 100644 index 0000000000000..09f889299b668 --- /dev/null +++ b/node_modules/repeat-string/package.json @@ -0,0 +1,77 @@ +{ + "name": "repeat-string", + "description": "Repeat the given string n times. Fastest implementation for repeating a string.", + "version": "1.6.1", + "homepage": "https://github.com/jonschlinkert/repeat-string", + "author": "Jon Schlinkert (http://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://github.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Linus Unnebäck (http://linus.unnebäck.se)", + "Thijs Busser (http://tbusser.net)", + "Titus (wooorm.com)" + ], + "repository": "jonschlinkert/repeat-string", + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-string/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^0.2.5", + "gulp-format-md": "^0.1.11", + "isobject": "^2.1.0", + "mocha": "^3.1.2", + "repeating": "^3.0.0", + "text-table": "^0.2.0", + "yargs-parser": "^4.0.2" + }, + "keywords": [ + "fast", + "fastest", + "fill", + "left", + "left-pad", + "multiple", + "pad", + "padding", + "repeat", + "repeating", + "repetition", + "right", + "right-pad", + "string", + "times" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "repeat-element" + ] + }, + "helpers": [ + "./benchmark/helper.js" + ], + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/resolve-url/.jshintrc b/node_modules/resolve-url/.jshintrc new file mode 100644 index 0000000000000..aaf335801c0a2 --- /dev/null +++ b/node_modules/resolve-url/.jshintrc @@ -0,0 +1,44 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": false, + "eqeqeq": true, + "es3": true, + "forin": true, + "immed": false, + "indent": false, + "latedef": "nofunc", + "newcap": false, + "noarg": true, + "noempty": true, + "nonew": false, + "plusplus": false, + "quotmark": false, + "undef": true, + "unused": "vars", + "strict": false, + "trailing": true, + "maxparams": 5, + "maxdepth": false, + "maxstatements": false, + "maxcomplexity": false, + "maxlen": 100, + + "asi": true, + "expr": true, + "globalstrict": true, + "smarttabs": true, + "sub": true, + + "node": true, + "browser": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/node_modules/resolve-url/LICENSE b/node_modules/resolve-url/LICENSE new file mode 100644 index 0000000000000..0595be36716d7 --- /dev/null +++ b/node_modules/resolve-url/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/resolve-url/bower.json b/node_modules/resolve-url/bower.json new file mode 100644 index 0000000000000..31aa6f4ea750a --- /dev/null +++ b/node_modules/resolve-url/bower.json @@ -0,0 +1,15 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "authors": ["Simon Lydell"], + "license": "MIT", + "main": "resolve-url.js", + "keywords": [ + "resolve", + "url" + ], + "ignore": [ + ".*" + ] +} diff --git a/node_modules/resolve-url/changelog.md b/node_modules/resolve-url/changelog.md new file mode 100644 index 0000000000000..2a4a6304ca58b --- /dev/null +++ b/node_modules/resolve-url/changelog.md @@ -0,0 +1,15 @@ +### Version 0.2.1 (2014-02-25) ### + +- Fix edge case when (accidentally) supplying only one argument, and that + argument happens to be a falsy value such as `undefined` or `null`. + + +### Version 0.2.0 (2014-02-24) ### + +- Disallow passing 0 arguments. It’s weird and inconsistent between browsers. + (Backwards incompatible change.) + + +### Version 0.1.0 (2014-02-23) ### + +- Initial release. diff --git a/node_modules/resolve-url/component.json b/node_modules/resolve-url/component.json new file mode 100644 index 0000000000000..f37cf005546fe --- /dev/null +++ b/node_modules/resolve-url/component.json @@ -0,0 +1,15 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "license": "MIT", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "main": "resolve-url.js", + "repo": "lydell/resolve-url", + "keywords": [ + "resolve", + "url" + ], + "scripts": [ + "resolve-url.js" + ] +} diff --git a/node_modules/resolve-url/package.json b/node_modules/resolve-url/package.json new file mode 100644 index 0000000000000..94423663327bd --- /dev/null +++ b/node_modules/resolve-url/package.json @@ -0,0 +1,34 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "author": "Simon Lydell", + "license": "MIT", + "main": "resolve-url.js", + "repository": "lydell/resolve-url", + "keywords": [ + "resolve", + "url" + ], + "scripts": { + "test": "jshint resolve-url.js test/ && testling -u" + }, + "devDependencies": { + "testling": "~1.6.0", + "jshint": "~2.4.3", + "tape": "~2.5.0" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "chrome/latest", + "firefox/latest", + "opera/12", + "opera/latest", + "safari/5", + "iphone/6", + "android-browser/4" + ] + } +} diff --git a/node_modules/resolve-url/readme.md b/node_modules/resolve-url/readme.md new file mode 100644 index 0000000000000..edfff7357c8e0 --- /dev/null +++ b/node_modules/resolve-url/readme.md @@ -0,0 +1,83 @@ +Overview +======== + +[![browser support](https://ci.testling.com/lydell/resolve-url.png)](https://ci.testling.com/lydell/resolve-url) + +Like Node.js’ [`path.resolve`]/[`url.resolve`] for the browser. + +```js +var resolveUrl = require("resolve-url") + +window.location +// https://example.com/articles/resolving-urls/edit + +resolveUrl("remove") +// https://example.com/articles/resolving-urls/remove + +resolveUrl("/static/scripts/app.js") +// https://example.com/static/scripts/app.js + +// Imagine /static/scripts/app.js contains `//# sourceMappingURL=../source-maps/app.js.map` +resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map") +// https://example.com/static/source-maps/app.js.map + +resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee") +// https://example.com/static/coffee/app.coffee + +resolveUrl("//cdn.example.com/jquery.js") +// https://cdn.example.com/jquery.js + +resolveUrl("http://foo.org/") +// http://foo.org/ +``` + + +Installation +============ + +- `npm install resolve-url` +- `bower install resolve-url` +- `component install lydell/resolve-url` + +Works with CommonJS, AMD and browser globals, through UMD. + + +Usage +===== + +### `resolveUrl(...urls)` ### + +Pass one or more urls. Resolves the last one to an absolute url, using the +previous ones and `window.location`. + +It’s like starting out on `window.location`, and then clicking links with the +urls as `href` attributes in order, from left to right. + +Unlike Node.js’ [`path.resolve`], this function always goes through all of the +arguments, from left to right. `path.resolve` goes from right to left and only +in the worst case goes through them all. Should that matter. + +Actually, the function is _really_ like clicking a lot of links in series: An +actual `` gets its `href` attribute set for each url! This means that the +url resolution of the browser is used, which makes this module really +light-weight. + +Also note that this functions deals with urls, not paths, so in that respect it +has more in common with Node.js’ [`url.resolve`]. But the arguments are more +like [`path.resolve`]. + +[`path.resolve`]: http://nodejs.org/api/path.html#path_path_resolve_from_to +[`url.resolve`]: http://nodejs.org/api/url.html#url_url_resolve_from_to + + +Tests +===== + +Run `npm test`, which lints the code and then gives you a link to open in a +browser of choice (using `testling`). + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/node_modules/resolve-url/resolve-url.js b/node_modules/resolve-url/resolve-url.js new file mode 100644 index 0000000000000..19e8d040ec60b --- /dev/null +++ b/node_modules/resolve-url/resolve-url.js @@ -0,0 +1,47 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory) + } else if (typeof exports === "object") { + module.exports = factory() + } else { + root.resolveUrl = factory() + } +}(this, function() { + + function resolveUrl(/* ...urls */) { + var numUrls = arguments.length + + if (numUrls === 0) { + throw new Error("resolveUrl requires at least one argument; got none.") + } + + var base = document.createElement("base") + base.href = arguments[0] + + if (numUrls === 1) { + return base.href + } + + var head = document.getElementsByTagName("head")[0] + head.insertBefore(base, head.firstChild) + + var a = document.createElement("a") + var resolved + + for (var index = 1; index < numUrls; index++) { + a.href = arguments[index] + resolved = a.href + base.href = resolved + } + + head.removeChild(base) + + return resolved + } + + return resolveUrl + +})); diff --git a/node_modules/resolve-url/test/resolve-url.js b/node_modules/resolve-url/test/resolve-url.js new file mode 100644 index 0000000000000..18532edd32496 --- /dev/null +++ b/node_modules/resolve-url/test/resolve-url.js @@ -0,0 +1,70 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var test = require("tape") + +var resolveUrl = require("../") + +"use strict" + +test("resolveUrl", function(t) { + + t.plan(7) + + t.equal(typeof resolveUrl, "function", "is a function") + + t.equal( + resolveUrl("https://example.com/"), + "https://example.com/" + ) + + var loc = "https://example.com/articles/resolving-urls/edit" + + t.equal( + resolveUrl(loc, "remove"), + "https://example.com/articles/resolving-urls/remove" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js"), + "https://example.com/static/scripts/app.js" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map"), + "https://example.com/static/source-maps/app.js.map" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee"), + "https://example.com/static/coffee/app.coffee" + ) + + t.equal( + resolveUrl(loc, "//cdn.example.com/jquery.js"), + "https://cdn.example.com/jquery.js" + ) + +}) + +test("edge cases", function(t) { + + t.plan(4) + + t["throws"](resolveUrl, /at least one argument/, "throws with no arguments") + + var accidentallyUndefined + var result + t.doesNotThrow( + function() { result = resolveUrl(accidentallyUndefined) }, + "undefined is still an argument" + ) + t.ok(result.match(/\/undefined$/), "undefined is stringified") + + t.equal( + resolveUrl("http://foo.org/test", undefined, {}, ["a/b"], null), + "http://foo.org/a/null", + "arguments are stringified" + ) + +}) diff --git a/node_modules/resolve/.editorconfig b/node_modules/resolve/.editorconfig new file mode 100644 index 0000000000000..d63f0bb6cdfb9 --- /dev/null +++ b/node_modules/resolve/.editorconfig @@ -0,0 +1,37 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 200 + +[*.js] +block_comment_start = /* +block_comment = * +block_comment_end = */ + +[*.yml] +indent_size = 1 + +[package.json] +indent_style = tab + +[lib/core.json] +indent_style = tab + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[{*.json,Makefile}] +max_line_length = off + +[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*] +indent_style = off +indent_size = off +max_line_length = off +insert_final_newline = off diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc new file mode 100644 index 0000000000000..ad05dd8c2ec56 --- /dev/null +++ b/node_modules/resolve/.eslintrc @@ -0,0 +1,65 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "dot-notation": [2, { "allowKeywords": true }], + "func-name-matching": 0, + "func-style": 0, + "global-require": 1, + "id-length": [2, { "min": 1, "max": 40 }], + "max-lines": [2, 350], + "max-lines-per-function": 0, + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-shadow": 0, + "no-use-before-define": 0, + "sort-keys": 0, + }, + "overrides": [ + { + "files": "bin/**", + "rules": { + "no-process-exit": "off", + }, + }, + { + "files": "example/**", + "rules": { + "no-console": 0, + }, + }, + { + "files": "test/resolver/nested_symlinks/mylib/*.js", + "rules": { + "no-throw-literal": 0, + }, + }, + { + "files": "test/**", + "parserOptions": { + "ecmaVersion": 5, + "allowReserved": false, + }, + "rules": { + "dot-notation": [2, { "allowPattern": "throws" }], + "max-lines": 0, + "max-lines-per-function": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + }, + }, + ], + + "ignorePatterns": [ + "./test/resolver/malformed_package_json/package.json", + ], +} diff --git a/node_modules/resolve/.github/FUNDING.yml b/node_modules/resolve/.github/FUNDING.yml new file mode 100644 index 0000000000000..d9c0595545966 --- /dev/null +++ b/node_modules/resolve/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/resolve +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE new file mode 100644 index 0000000000000..ff4fce28af33a --- /dev/null +++ b/node_modules/resolve/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/resolve/SECURITY.md b/node_modules/resolve/SECURITY.md new file mode 100644 index 0000000000000..82e4285adc628 --- /dev/null +++ b/node_modules/resolve/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/resolve/async.js b/node_modules/resolve/async.js new file mode 100644 index 0000000000000..f38c5813ebd04 --- /dev/null +++ b/node_modules/resolve/async.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/async'); diff --git a/node_modules/resolve/bin/resolve b/node_modules/resolve/bin/resolve new file mode 100755 index 0000000000000..21d1a87eec1fe --- /dev/null +++ b/node_modules/resolve/bin/resolve @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); +var fs = require('fs'); + +if ( + String(process.env.npm_lifecycle_script).slice(0, 8) !== 'resolve ' + && ( + !process.argv + || process.argv.length < 2 + || (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino) + || (process.env.npm_lifecycle_event !== 'npx' && process.env._ && fs.realpathSync(path.resolve(process.env._)) !== __filename) + ) +) { + console.error('Error: `resolve` must be run directly as an executable'); + process.exit(1); +} + +var supportsPreserveSymlinkFlag = require('supports-preserve-symlinks-flag'); + +var preserveSymlinks = false; +for (var i = 2; i < process.argv.length; i += 1) { + if (process.argv[i].slice(0, 2) === '--') { + if (supportsPreserveSymlinkFlag && process.argv[i] === '--preserve-symlinks') { + preserveSymlinks = true; + } else if (process.argv[i].length > 2) { + console.error('Unknown argument ' + process.argv[i].replace(/[=].*$/, '')); + process.exit(2); + } + process.argv.splice(i, 1); + i -= 1; + if (process.argv[i] === '--') { break; } // eslint-disable-line no-restricted-syntax + } +} + +if (process.argv.length < 3) { + console.error('Error: `resolve` expects a specifier'); + process.exit(2); +} + +var resolve = require('../'); + +var result = resolve.sync(process.argv[2], { + basedir: process.cwd(), + preserveSymlinks: preserveSymlinks +}); + +console.log(result); diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js new file mode 100644 index 0000000000000..20e65dc281dba --- /dev/null +++ b/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js new file mode 100644 index 0000000000000..54b2cc1004223 --- /dev/null +++ b/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js new file mode 100644 index 0000000000000..125d814642359 --- /dev/null +++ b/node_modules/resolve/index.js @@ -0,0 +1,6 @@ +var async = require('./lib/async'); +async.core = require('./lib/core'); +async.isCore = require('./lib/is-core'); +async.sync = require('./lib/sync'); + +module.exports = async; diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js new file mode 100644 index 0000000000000..60d2555fc3bd0 --- /dev/null +++ b/node_modules/resolve/lib/async.js @@ -0,0 +1,329 @@ +var fs = require('fs'); +var getHomedir = require('./homedir'); +var path = require('path'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); +var isCore = require('is-core-module'); + +var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultIsDir = function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultRealpath = function realpath(x, cb) { + realpathFS(x, function (realpathErr, realPath) { + if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr); + else cb(null, realpathErr ? x : realPath); + }); +}; + +var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) { + if (opts && opts.preserveSymlinks === false) { + realpath(x, cb); + } else { + cb(null, x); + } +}; + +var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolve(x, options, callback) { + var cb = callback; + var opts = options; + if (typeof options === 'function') { + cb = opts; + opts = {}; + } + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + opts = normalizeOptions(x, opts); + + var isFile = opts.isFile || defaultIsFile; + var isDirectory = opts.isDirectory || defaultIsDir; + var readFile = opts.readFile || fs.readFile; + var realpath = opts.realpath || defaultRealpath; + var readPackage = opts.readPackage || defaultReadPackage; + if (opts.readFile && opts.readPackage) { + var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.'); + return process.nextTick(function () { + cb(conflictErr); + }); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = path.resolve(basedir); + + maybeRealpath( + realpath, + absoluteStart, + opts, + function (err, realStart) { + if (err) cb(err); + else init(realStart); + } + ); + + var res; + function init(basedir) { + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + res = path.resolve(basedir, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + if ((/\/$/).test(x) && res === basedir) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else if (includeCoreModules && isCore(x)) { + return cb(null, x); + } else loadNodeModules(x, basedir, function (err, n, pkg) { + if (err) cb(err); + else if (n) { + return maybeRealpath(realpath, n, opts, function (err, realN) { + if (err) { + cb(err); + } else { + cb(null, realN, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function onfile(err, m, pkg) { + if (err) cb(err); + else if (m) cb(null, m, pkg); + else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err); + else if (d) { + maybeRealpath(realpath, d, opts, function (err, realD) { + if (err) { + cb(err); + } else { + cb(null, realD, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + + var pkg = loadPackage; + if (pkg) onpkg(null, pkg); + else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load( + [''].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); + } + isFile(file, onex); + } + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return cb(null); + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); + + maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return loadpkg(path.dirname(dir), cb); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + cb(null, pkg, dir); + }); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return cb(unwrapErr); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) return cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + return cb(mainError); + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + isDirectory(path.dirname(dir), isdir); + + function isdir(err, isdir) { + if (err) return cb(err); + if (!isdir) return processDirs(cb, dirs.slice(1)); + loadAsFile(dir, opts.package, onfile); + } + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(dir, opts.package, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + function loadNodeModules(x, start, cb) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + processDirs( + cb, + packageIterator ? packageIterator(x, start, thunk, opts) : thunk() + ); + } +}; diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js new file mode 100644 index 0000000000000..b14a2804ae828 --- /dev/null +++ b/node_modules/resolve/lib/caller.js @@ -0,0 +1,8 @@ +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js new file mode 100644 index 0000000000000..57b048f1386ff --- /dev/null +++ b/node_modules/resolve/lib/core.js @@ -0,0 +1,12 @@ +'use strict'; + +var isCoreModule = require('is-core-module'); +var data = require('./core.json'); + +var core = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = isCoreModule(mod); + } +} +module.exports = core; diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json new file mode 100644 index 0000000000000..3cda693d7d0fd --- /dev/null +++ b/node_modules/resolve/lib/core.json @@ -0,0 +1,158 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "test/reporters": ">= 19.9 && < 20.2", + "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], + "node:test": [">= 16.17 && < 17", ">= 18"], + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], + "node:wasi": [">= 18.17 && < 19", ">= 20"], + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/resolve/lib/homedir.js b/node_modules/resolve/lib/homedir.js new file mode 100644 index 0000000000000..5ffdf73bb336a --- /dev/null +++ b/node_modules/resolve/lib/homedir.js @@ -0,0 +1,24 @@ +'use strict'; + +var os = require('os'); + +// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js + +module.exports = os.homedir || function homedir() { + var home = process.env.HOME; + var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; + + if (process.platform === 'win32') { + return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens + } + + return home || null; +}; diff --git a/node_modules/resolve/lib/is-core.js b/node_modules/resolve/lib/is-core.js new file mode 100644 index 0000000000000..537f5c782ffe5 --- /dev/null +++ b/node_modules/resolve/lib/is-core.js @@ -0,0 +1,5 @@ +var isCoreModule = require('is-core-module'); + +module.exports = function isCore(x) { + return isCoreModule(x); +}; diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js new file mode 100644 index 0000000000000..1cff0107b5862 --- /dev/null +++ b/node_modules/resolve/lib/node-modules-paths.js @@ -0,0 +1,42 @@ +var path = require('path'); +var parse = path.parse || require('path-parse'); // eslint-disable-line global-require + +var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { + var prefix = '/'; + if ((/^([A-Za-z]:)/).test(absoluteStart)) { + prefix = ''; + } else if ((/^\\\\/).test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } + + return paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.resolve(prefix, aPath, moduleDir); + })); + }, []); +}; + +module.exports = function nodeModulesPaths(start, opts, request) { + var modules = opts && opts.moduleDirectory + ? [].concat(opts.moduleDirectory) + : ['node_modules']; + + if (opts && typeof opts.paths === 'function') { + return opts.paths( + request, + start, + function () { return getNodeModulesDirs(start, modules); }, + opts + ); + } + + var dirs = getNodeModulesDirs(start, modules); + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; diff --git a/node_modules/resolve/lib/normalize-options.js b/node_modules/resolve/lib/normalize-options.js new file mode 100644 index 0000000000000..4b56904eaea72 --- /dev/null +++ b/node_modules/resolve/lib/normalize-options.js @@ -0,0 +1,10 @@ +module.exports = function (x, opts) { + /** + * This file is purposefully a passthrough. It's expected that third-party + * environments will override it at runtime in order to inject special logic + * into `resolve` (by manipulating the options). One such example is the PnP + * code path in Yarn. + */ + + return opts || {}; +}; diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js new file mode 100644 index 0000000000000..0b6cd58d44b1c --- /dev/null +++ b/node_modules/resolve/lib/sync.js @@ -0,0 +1,208 @@ +var isCore = require('is-core-module'); +var fs = require('fs'); +var path = require('path'); +var getHomedir = require('./homedir'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); + +var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file) { + try { + var stat = fs.statSync(file, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && (stat.isFile() || stat.isFIFO()); +}; + +var defaultIsDir = function isDirectory(dir) { + try { + var stat = fs.statSync(dir, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && stat.isDirectory(); +}; + +var defaultRealpathSync = function realpathSync(x) { + try { + return realpathFS(x); + } catch (realpathErr) { + if (realpathErr.code !== 'ENOENT') { + throw realpathErr; + } + } + return x; +}; + +var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) { + if (opts && opts.preserveSymlinks === false) { + return realpathSync(x); + } + return x; +}; + +var defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolveSync(x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + var opts = normalizeOptions(x, options); + + var isFile = opts.isFile || defaultIsFile; + var readFileSync = opts.readFileSync || fs.readFileSync; + var isDirectory = opts.isDirectory || defaultIsDir; + var realpathSync = opts.realpathSync || defaultRealpathSync; + var readPackageSync = opts.readPackageSync || defaultReadPackageSync; + if (opts.readFileSync && opts.readPackageSync) { + throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.'); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts); + + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + var res = path.resolve(absoluteStart, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return maybeRealpathSync(realpathSync, m, opts); + } else if (includeCoreModules && isCore(x)) { + return x; + } else { + var n = loadNodeModulesSync(x, absoluteStart); + if (n) return maybeRealpathSync(realpathSync, n, opts); + } + + var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + var pkg = loadpkg(path.dirname(x)); + + if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { + var rfile = path.relative(pkg.dir, x); + var r = opts.pathFilter(pkg.pkg, x, rfile); + if (r) { + x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign + } + } + + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadpkg(dir) { + if (dir === '' || dir === '/') return; + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return; + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; + + var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json'); + + if (!isFile(pkgfile)) { + return loadpkg(path.dirname(dir)); + } + + var pkg = readPackageSync(readFileSync, pkgfile); + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment + } + + return { pkg: pkg, dir: dir }; + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json'); + if (isFile(pkgfile)) { + try { + var pkg = readPackageSync(readFileSync, pkgfile); + } catch (e) {} + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + throw mainError; + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + try { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } catch (e) {} + } + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk(); + + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + if (isDirectory(path.dirname(dir))) { + var m = loadAsFileSync(dir); + if (m) return m; + var n = loadAsDirectorySync(dir); + if (n) return n; + } + } + } +}; diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json new file mode 100644 index 0000000000000..537388dfd1786 --- /dev/null +++ b/node_modules/resolve/package.json @@ -0,0 +1,72 @@ +{ + "name": "resolve", + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "version": "1.22.8", + "repository": { + "type": "git", + "url": "git://github.com/browserify/resolve.git" + }, + "bin": { + "resolve": "./bin/resolve" + }, + "main": "index.js", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated && cp node_modules/is-core-module/core.json ./lib/ ||:", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", + "tests-only": "tape test/*.js", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "npm run test:multirepo && aud --production", + "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "array.prototype.map": "^1.0.6", + "aud": "^2.0.3", + "copy-dir": "^1.3.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mkdirp": "^0.5.5", + "mv": "^2.1.1", + "npmignore": "^0.3.0", + "object-keys": "^1.1.1", + "rimraf": "^2.7.1", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.1", + "tap": "0.4.13", + "tape": "^5.7.0", + "tmp": "^0.0.31" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "appveyor.yml", + "test/resolver/malformed_package_json" + ] + } +} diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown new file mode 100644 index 0000000000000..ad34d60dd5777 --- /dev/null +++ b/node_modules/resolve/readme.markdown @@ -0,0 +1,301 @@ +# resolve [![Version Badge][2]][1] + +implements the [node `require.resolve()` algorithm](https://nodejs.org/api/modules.html#modules_all_together) such that you can `require.resolve()` on behalf of a file asynchronously and synchronously + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +# example + +asynchronously resolve: + +```js +var resolve = require('resolve/async'); // or, require('resolve') +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +```js +var resolve = require('resolve/sync'); // or, `require('resolve').sync +var res = resolve('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +```js +var resolve = require('resolve'); +var async = require('resolve/async'); +var sync = require('resolve/sync'); +``` + +For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values: + +- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module +- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory +- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string) + +## resolve(id, opts={}, cb) + +Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - `package.json` data applicable to the module being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.isDirectory - function to asynchronously test whether a file exists and is a directory + +* opts.realpath - function to asynchronously resolve a potential symlink to its real path + +* `opts.readPackage(readFile, pkgfile, cb)` - function to asynchronously read and parse a package.json file + * readFile - the passed `opts.readFile` or `fs.readFile` if not specified + * pkgfile - path to package.json + * cb - callback + +* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * pkgfile - path to package.json + * dir - directory that contains package.json + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFile: fs.readFile, + isFile: function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + isDirectory: function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + realpath: function realpath(file, cb) { + var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + realpath(file, function (realPathErr, realPath) { + if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); + else cb(null, realPathErr ? file : realPath); + }); + }, + readPackage: function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +## resolve.sync(id, opts) + +Synchronously resolve the module path string `id`, returning the result and +throwing an error when `id` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFileSync - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* opts.isDirectory - function to synchronously test whether a file exists and is a directory + +* opts.realpathSync - function to synchronously resolve a potential symlink to its real path + +* `opts.readPackageSync(readFileSync, pkgfile)` - function to synchronously read and parse a package.json file + * readFileSync - the passed `opts.readFileSync` or `fs.readFileSync` if not specified + * pkgfile - path to package.json + +* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * dir - directory that contains package.json (Note: the second argument will change to "pkgfile" in v2) + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFileSync: fs.readFileSync, + isFile: function isFile(file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); + }, + isDirectory: function isDirectory(dir) { + try { + var stat = fs.statSync(dir); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isDirectory(); + }, + realpathSync: function realpathSync(file) { + try { + var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + return realpath(file); + } catch (realPathErr) { + if (realPathErr.code !== 'ENOENT') { + throw realPathErr; + } + } + return file; + }, + readPackageSync: function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +# install + +With [npm](https://npmjs.org) do: + +```sh +npm install resolve +``` + +# license + +MIT + +[1]: https://npmjs.org/package/resolve +[2]: https://versionbadg.es/browserify/resolve.svg +[5]: https://david-dm.org/browserify/resolve.svg +[6]: https://david-dm.org/browserify/resolve +[7]: https://david-dm.org/browserify/resolve/dev-status.svg +[8]: https://david-dm.org/browserify/resolve#info=devDependencies +[11]: https://nodei.co/npm/resolve.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/resolve.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/resolve.svg +[downloads-url]: https://npm-stat.com/charts.html?package=resolve +[codecov-image]: https://codecov.io/gh/browserify/resolve/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/browserify/resolve/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/resolve +[actions-url]: https://github.com/browserify/resolve/actions diff --git a/node_modules/resolve/sync.js b/node_modules/resolve/sync.js new file mode 100644 index 0000000000000..cd0ee040177e9 --- /dev/null +++ b/node_modules/resolve/sync.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/sync'); diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js new file mode 100644 index 0000000000000..a477adc5ce2a4 --- /dev/null +++ b/node_modules/resolve/test/core.js @@ -0,0 +1,88 @@ +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); + +var resolve = require('../'); + +var brokenNode = semver.satisfies(process.version, '11.11 - 11.13'); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(resolve.isCore('fs')); + st.ok(resolve.isCore('net')); + st.ok(resolve.isCore('http')); + + st.ok(!resolve.isCore('seq')); + st.ok(!resolve.isCore('../')); + + st.ok(!resolve.isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(resolve.core); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + // note: this must be require, not require.resolve, due to https://github.com/nodejs/node/issues/43274 + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + t.comment(mod + ': ' + resolve.core[mod]); + if (resolve.core[mod]) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else if (brokenNode) { + st.ok(true, 'this version of node is broken: attempting to require things that fail to resolve breaks "home_paths" tests'); + } else { + st.throws(requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !resolve.core.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) { + var libs = require('module').builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + var blacklist = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (blacklist.indexOf(mod) === -1) { + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + } + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js new file mode 100644 index 0000000000000..30806659be2ef --- /dev/null +++ b/node_modules/resolve/test/dotdot.js @@ -0,0 +1,29 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('dotdot', function (t) { + t.plan(4); + var dir = path.join(__dirname, '/dotdot/abc'); + + resolve('..', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'dotdot/index.js')); + }); + + resolve('.', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('dotdot sync', function (t) { + t.plan(2); + var dir = path.join(__dirname, '/dotdot/abc'); + + var a = resolve.sync('..', { basedir: dir }); + t.equal(a, path.join(__dirname, 'dotdot/index.js')); + + var b = resolve.sync('.', { basedir: dir }); + t.equal(b, path.join(dir, 'index.js')); +}); diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js new file mode 100644 index 0000000000000..67f2534ebf90d --- /dev/null +++ b/node_modules/resolve/test/dotdot/abc/index.js @@ -0,0 +1,2 @@ +var x = require('..'); +console.log(x); diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js new file mode 100644 index 0000000000000..643f9fcc6a6a7 --- /dev/null +++ b/node_modules/resolve/test/dotdot/index.js @@ -0,0 +1 @@ +module.exports = 'whatever'; diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js new file mode 100644 index 0000000000000..5f2141a67267b --- /dev/null +++ b/node_modules/resolve/test/faulty_basedir.js @@ -0,0 +1,29 @@ +var test = require('tape'); +var path = require('path'); +var resolve = require('../'); + +test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { + t.plan(1); + + var resolverDir = 'C:\\a\\b\\c\\d'; + + resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(!!err, true); + }); +}); + +test('non-existent basedir should not throw when preserveSymlinks is false', function (t) { + t.plan(2); + + var opts = { + basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'), + preserveSymlinks: false + }; + + var module = './dotdot/abc'; + + resolve(module, opts, function (err, res) { + t.equal(err.code, 'MODULE_NOT_FOUND'); + t.equal(res, undefined); + }); +}); diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js new file mode 100644 index 0000000000000..8f8cccdb2f59f --- /dev/null +++ b/node_modules/resolve/test/filter.js @@ -0,0 +1,34 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + resolve('./baz', { + basedir: dir, + packageFilter: function (pkg, pkgfile) { + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = [pkg, pkgfile]; + return pkg; + } + }, function (err, res, pkg) { + if (err) t.fail(err); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(pkg, packageData, 'first packageFilter argument is "pkg"'); + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + var packageFile = packageFilterArgs[1]; + t.equal( + packageFile, + path.join(dir, 'baz/package.json'), + 'second packageFilter argument is "pkgfile"' + ); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js new file mode 100644 index 0000000000000..8a43b9818973d --- /dev/null +++ b/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,33 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + var res = resolve.sync('./baz', { + basedir: dir, + // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility + packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef + return pkg; + } + }); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + if (!'is 1.x') { // eslint-disable-line no-constant-condition + var packageFile = packageFilterArgs[1]; + t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct'); + } + + var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition + // eslint-disable-next-line no-constant-condition + t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"'); + + t.end(); +}); diff --git a/node_modules/resolve/test/home_paths.js b/node_modules/resolve/test/home_paths.js new file mode 100644 index 0000000000000..3b8c9b32c87bd --- /dev/null +++ b/node_modules/resolve/test/home_paths.js @@ -0,0 +1,127 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../async'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazPkg = { name: 'baz', main: 'quux.js' }; + var dotMainPkg = { main: 'index' }; + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + var dotSlashMainPkg = { main: 'index' }; + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('dot_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_main`'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + s2t.deepEqual(pkg, dotMainPkg); + }); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(3); + + resolve('dot_slash_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_slash_main`'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + s2t.deepEqual(pkg, dotSlashMainPkg); + }); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('baz', function (err, res, pkg) { + s2t.error(err, 'no error resolving `baz`'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + s2t.deepEqual(pkg, bazPkg); + }); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/home_paths_sync.js b/node_modules/resolve/test/home_paths_sync.js new file mode 100644 index 0000000000000..5d2c56fd35d0a --- /dev/null +++ b/node_modules/resolve/test/home_paths_sync.js @@ -0,0 +1,114 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../sync'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_main'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_slash_main'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('baz'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js new file mode 100644 index 0000000000000..6116275498895 --- /dev/null +++ b/node_modules/resolve/test/mock.js @@ -0,0 +1,315 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock from package', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, file)); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[file]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('mock package from package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('symlinked', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + cb(null, resolved); + return; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + cb(null, path.join(dir, 'symlinked', base)); + } else { + cb(null, path.join(resolved, 'symlinked')); + } + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); +}); + +test('readPackage', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + t.test('with readFile', function (st) { + st.plan(3); + + resolve('bar', opts('/foo'), function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + st.equal(pkg && pkg.main, './baz.js'); + }); + }); + + var readPackage = function (readFile, file, cb) { + var barPackage = path.join('bar', 'package.json'); + if (file.slice(-barPackage.length) === barPackage) { + cb(null, { main: './something-else.js' }); + } else { + cb(null, JSON.parse(files[path.resolve(file)])); + } + }; + + t.test('with readPackage', function (st) { + st.plan(3); + + var options = opts('/foo'); + delete options.readFile; + options.readPackage = readPackage; + resolve('bar', options, function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/something-else.js')); + st.equal(pkg && pkg.main, './something-else.js'); + }); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackage = readPackage; + resolve('bar', options, function (err) { + st.throws(function () { throw err; }, TypeError, 'errors when both readFile and readPackage are provided'); + }); + }); +}); diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js new file mode 100644 index 0000000000000..c5a7e2a98030d --- /dev/null +++ b/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,214 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); +}); + +test('symlinked', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + return resolved; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + return path.join(dir, 'symlinked', base); + } + return path.join(resolved, 'symlinked'); + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); +}); + +test('readPackageSync', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir, useReadPackage) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: useReadPackage ? null : function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + t.test('with readFile', function (st) { + st.plan(1); + + st.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); + }); + + var readPackageSync = function (readFileSync, file) { + if (file.indexOf(path.join('bar', 'package.json')) >= 0) { + return { main: './something-else.js' }; + } + return JSON.parse(files[path.resolve(file)]); + }; + + t.test('with readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + delete options.readFileSync; + options.readPackageSync = readPackageSync; + + st.equal( + resolve.sync('bar', options), + path.resolve('/foo/node_modules/bar/something-else.js') + ); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackageSync = readPackageSync; + st.throws( + function () { resolve.sync('bar', options); }, + TypeError, + 'errors when both readFile and readPackage are provided' + ); + }); +}); + diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js new file mode 100644 index 0000000000000..b50e5bb1751d6 --- /dev/null +++ b/node_modules/resolve/test/module_dir.js @@ -0,0 +1,56 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('moduleDirectory strings', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'module_dir'); + var xopts = { + basedir: dir, + moduleDirectory: 'xmodules' + }; + resolve('aaa', xopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var yopts = { + basedir: dir, + moduleDirectory: 'ymodules' + }; + resolve('aaa', yopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); +}); + +test('moduleDirectory array', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'module_dir'); + var aopts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('aaa', aopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var bopts = { + basedir: dir, + moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] + }; + resolve('aaa', bopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); + + var copts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('bbb', copts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); + }); +}); diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js new file mode 100644 index 0000000000000..dd7cf7b2d022d --- /dev/null +++ b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x * 100; }; diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js new file mode 100644 index 0000000000000..ef2d4d4bf76e6 --- /dev/null +++ b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x + 100; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js new file mode 100644 index 0000000000000..e8ba629936a7a --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js @@ -0,0 +1 @@ +module.exports = function (n) { return n * 111; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json new file mode 100644 index 0000000000000..c13b8cf6acfd3 --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -0,0 +1,3 @@ +{ + "main": "main.js" +} diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js new file mode 100644 index 0000000000000..675441db2ced7 --- /dev/null +++ b/node_modules/resolve/test/node-modules-paths.js @@ -0,0 +1,143 @@ +var test = require('tape'); +var path = require('path'); +var parse = path.parse || require('path-parse'); +var keys = require('object-keys'); + +var nodeModulesPaths = require('../lib/node-modules-paths'); + +var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { + var moduleDirs = [].concat(moduleDirectories || 'node_modules'); + if (paths) { + for (var k = 0; k < paths.length; ++k) { + moduleDirs.push(path.basename(paths[k])); + } + } + + var foundModuleDirs = {}; + var uniqueDirs = {}; + var parsedDirs = {}; + for (var i = 0; i < dirs.length; ++i) { + var parsed = parse(dirs[i]); + if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } + foundModuleDirs[parsed.base] += 1; + parsedDirs[parsed.dir] = true; + uniqueDirs[dirs[i]] = true; + } + t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); + var foundModuleDirNames = keys(foundModuleDirs); + t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found'); + t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); + + var counts = {}; + for (var j = 0; j < foundModuleDirNames.length; ++j) { + counts[foundModuleDirs[j]] = true; + } + t.equal(keys(counts).length, 1, 'all found module directories had the same count'); +}; + +test('node-modules-paths', function (t) { + t.test('no options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('empty options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, {}); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('with paths=array option', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var dirs = nodeModulesPaths(start, { paths: paths }); + + verifyDirs(t, start, dirs, null, paths); + + t.end(); + }); + + t.test('with paths=function option', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request)); + }; + + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg'); + + verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]); + + t.end(); + }); + + t.test('with paths=function skipping node modules resolution', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return []; + }; + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }); + t.deepEqual(dirs, [], 'no node_modules was computed'); + t.end(); + }); + + t.test('with moduleDirectory option', function (t) { + var start = path.join(__dirname, 'resolver'); + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory); + + t.end(); + }); + + t.test('with 1 moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory, paths); + + t.end(); + }); + + t.test('with 1+ moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectories = ['not node modules', 'other modules']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + verifyDirs(t, start, dirs, moduleDirectories, paths); + + t.end(); + }); + + t.test('combine paths correctly on Windows', function (t) { + var start = 'C:\\Users\\username\\myProject\\src'; + var paths = []; + var moduleDirectories = ['node_modules', start]; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); + + t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) { + var start = '/Users/username/git/myProject/src'; + var paths = []; + var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js new file mode 100644 index 0000000000000..e463d6c8c313b --- /dev/null +++ b/node_modules/resolve/test/node_path.js @@ -0,0 +1,70 @@ +var fs = require('fs'); +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('$NODE_PATH', function (t) { + t.plan(8); + + var isDir = function (dir, cb) { + if (dir === '/node_path' || dir === 'node_path/x') { + return cb(null, true); + } + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + + resolve('aaa', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves'); + }); + + resolve('bbb', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves'); + }); + + resolve('ccc', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves'); + }); + + // ensure that relative paths still resolve against the regular `node_modules` correctly + resolve('tap', { + paths: [ + 'node_path' + ], + basedir: path.join(__dirname, 'node_path/x'), + isDirectory: isDir + }, function (err, res) { + var root = require('tap/package.json').main; // eslint-disable-line global-require + t.error(err); + t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves'); + }); +}); diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js new file mode 100644 index 0000000000000..ad70d0bb03f6f --- /dev/null +++ b/node_modules/resolve/test/node_path/x/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'A'; diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js new file mode 100644 index 0000000000000..a64132e4c7e52 --- /dev/null +++ b/node_modules/resolve/test/node_path/x/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'C'; diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js new file mode 100644 index 0000000000000..4d0f32e243681 --- /dev/null +++ b/node_modules/resolve/test/node_path/y/bbb/index.js @@ -0,0 +1 @@ +module.exports = 'B'; diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js new file mode 100644 index 0000000000000..793315e846687 --- /dev/null +++ b/node_modules/resolve/test/node_path/y/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'CY'; diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js new file mode 100644 index 0000000000000..ef63c40f9393d --- /dev/null +++ b/node_modules/resolve/test/nonstring.js @@ -0,0 +1,9 @@ +var test = require('tape'); +var resolve = require('../'); + +test('nonstring', function (t) { + t.plan(1); + resolve(555, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js new file mode 100644 index 0000000000000..16519aeae51c4 --- /dev/null +++ b/node_modules/resolve/test/pathfilter.js @@ -0,0 +1,75 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); + +var pathFilterFactory = function (t) { + return function (pkg, x, remainder) { + t.equal(pkg.version, '1.2.3'); + t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); + t.equal(remainder, 'ref'); + return 'alt'; + }; +}; + +test('#62: deep module references and the pathFilter', function (t) { + t.test('deep/ref.js', function (st) { + st.plan(3); + + resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { + if (err) st.fail(err); + + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + var res = resolve.sync('deep/ref', { basedir: resolverDir }); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + t.test('deep/deeper/ref', function (st) { + st.plan(4); + + resolve( + 'deep/deeper/ref', + { basedir: resolverDir }, + function (err, res, pkg) { + if (err) t.fail(err); + st.notEqual(pkg, undefined); + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + } + ); + + var res = resolve.sync( + 'deep/deeper/ref', + { basedir: resolverDir } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + }); + + t.test('deep/ref alt', function (st) { + st.plan(8); + + var pathFilter = pathFilterFactory(st); + + var res = resolve.sync( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + + resolve( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter }, + function (err, res, pkg) { + if (err) st.fail(err); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + st.end(); + } + ); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js new file mode 100644 index 0000000000000..2febb598fbc06 --- /dev/null +++ b/node_modules/resolve/test/precedence.js @@ -0,0 +1,23 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('precedence', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'precedence/aaa'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg.name, 'resolve'); + }); +}); + +test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string + t.plan(1); + var dir = path.join(__dirname, 'precedence/bbb'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js new file mode 100644 index 0000000000000..b83a3e7ad98d1 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa.js @@ -0,0 +1 @@ +module.exports = 'wtf'; diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js new file mode 100644 index 0000000000000..e0f8f6abf72f7 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'okok'; diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js new file mode 100644 index 0000000000000..93542a965e0ea --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/main.js @@ -0,0 +1 @@ +console.log(require('./')); diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js new file mode 100644 index 0000000000000..2298f47fdd16d --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb.js @@ -0,0 +1 @@ +module.exports = '>_<'; diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js new file mode 100644 index 0000000000000..716b81d4bd463 --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb/main.js @@ -0,0 +1 @@ +console.log(require('./')); // should throw diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js new file mode 100644 index 0000000000000..df8211af3af3d --- /dev/null +++ b/node_modules/resolve/test/resolver.js @@ -0,0 +1,597 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); +var resolve = require('../'); +var async = require('../async'); + +test('`./async` entry point', function (t) { + t.equal(resolve, async, '`./async` entry point is the same as `main`'); + t.end(); +}); + +test('async foo', function (t) { + t.plan(12); + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.main, 'resolver'); + }); + + resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg.main, 'resolver'); + }); + + resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + }); + + resolve('foo', { basedir: dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'"); + }); +}); + +test('bar', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'resolver'); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg.main, 'bar'); + }); +}); + +test('baz', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./baz', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); + + resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(24); + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + resolve('./grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'biz'); + }); + + resolve('./garply', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, 'grux'); + }); + + resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'tiv'); + }); + + resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); +}); + +test('quux', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/quux'); + + resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo/index.js')); + t.equal(pkg.main, 'quux'); + }); +}); + +test('normalize', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + resolve('../grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg, undefined); + }); +}); + +test('cup', function (t) { + t.plan(5); + var dir = path.join(__dirname, 'resolver'); + + resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup.coffee', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'"); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'resolver'); + + resolve('./mug', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'mug.js')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, '/mug.coffee')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + t.equal(res, path.join(dir, '/mug.js')); + }); +}); + +test('other path', function (t) { + t.plan(6); + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/root.js')); + }); + + resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); + }); + + resolve('root', { basedir: dir }, function (err, res) { + t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('path iterator', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'baz/quux.js')); + t.equal(pkg && pkg.name, 'baz'); + }); +}); + +test('incorrect main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('missing index', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + resolve('./missing_index', { basedir: resolverDir }, function (err, res, pkg) { + t.ok(err instanceof Error); + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('missing main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./missing_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('null main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./null_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('main: false', function (t) { + t.plan(2); + + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + resolve('./false_main', { basedir: basedir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal( + res, + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + t.deepEqual(pkg, { + name: 'false_main', + main: false + }); + }); +}); + +test('without basedir', function (t) { + t.plan(1); + + var dir = path.join(__dirname, 'resolver/without_basedir'); + var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require + + tester(t, function (err, res, pkg) { + if (err) { + t.fail(err); + } else { + t.equal(res, path.join(dir, 'node_modules/mymodule.js')); + } + }); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo.js')); + }); + + resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); + + resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('async: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.plan(1); + resolve('./' + testFile, function (err, res, pkg) { + if (err) t.fail(err); + st.equal(res, __filename, 'sanity check'); + }); + }); + + t.test('with a fake directory', function (st) { + st.plan(4); + + resolve('./' + testFile + '/blah', function (err, res, pkg) { + st.ok(err, 'there is an error'); + st.notOk(res, 'no result'); + + st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + err && err.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + st.end(); + }); + }); + + t.end(); +}); + +test('async dot main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('async dot slash main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_slash_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('not a directory', function (t) { + t.plan(6); + var path = './foo'; + resolve(path, { basedir: __filename }, function (err, res, pkg) { + t.ok(err, 'a non-directory errors'); + t.equal(arguments.length, 1); + t.equal(res, undefined); + t.equal(pkg, undefined); + + t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\''); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + t.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + t.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('browser field in package.json', function (t) { + t.plan(3); + + var dir = path.join(__dirname, 'resolver'); + resolve( + './browser_field', + { + basedir: dir, + packageFilter: function packageFilter(pkg) { + if (pkg.browser) { + pkg.main = pkg.browser; // eslint-disable-line no-param-reassign + delete pkg.browser; // eslint-disable-line no-param-reassign + } + return pkg; + } + }, + function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.equal(pkg && pkg.main, 'b'); + t.equal(pkg && pkg.browser, undefined); + } + ); +}); + +test('absolute paths', function (t) { + t.plan(4); + + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + resolve(__filename, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file resolves' + ); + }); + resolve(extensionless, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file resolves' + ); + }); + resolve(__filename, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file with a basedir resolves' + ); + }); + resolve(extensionless, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + }); +}); + +var malformedDir = path.join(__dirname, 'resolver/malformed_package_json'); +test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) { + /* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */ + t.plan( + (3 * 3) // 3 sets of 3 assertions in the final callback + + 2 // 1 readPackage call with malformed package.json + ); + + var basedir = malformedDir; + var expected = path.join(basedir, 'index.js'); + + resolve('./index.js', { basedir: basedir }, function (err, res, pkg) { + t.error(err, 'no error'); + t.equal(res, expected, 'malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument'); + }); + + resolve( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + }, + function (err, res, pkg) { + t.error(err, 'with packageFilter: no error'); + t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argument'); + } + ); + + resolve( + './index.js', + { + basedir: basedir, + readPackage: function (readFile, pkgfile, cb) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + readFile(pkgfile, function (err, result) { + try { + cb(null, JSON.parse(result)); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackage: malformed package.json parses as a syntax error'); + cb(null); + } + }); + } + }, + function (err, res, pkg) { + t.error(err, 'with readPackage: no error'); + t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argument'); + } + ); +}); diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 0000000000000..2f77720b8672a --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,4 @@ +{ + "name": "baz", + "main": "quux.js" +} diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 0000000000000..bd816eaba4ca3 --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/resolve/test/resolver/browser_field/a.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/resolve/test/resolver/browser_field/b.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json new file mode 100644 index 0000000000000..bf406f0830f8a --- /dev/null +++ b/node_modules/resolve/test/resolver/browser_field/package.json @@ -0,0 +1,5 @@ +{ + "name": "browser_field", + "main": "a", + "browser": "b" +} diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 0000000000000..8b137891791fe --- /dev/null +++ b/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/resolve/test/resolver/dot_main/index.js new file mode 100644 index 0000000000000..bd816eaba4ca3 --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json new file mode 100644 index 0000000000000..d7f4fc8079f60 --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "." +} diff --git a/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/resolve/test/resolver/dot_slash_main/index.js new file mode 100644 index 0000000000000..bd816eaba4ca3 --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json new file mode 100644 index 0000000000000..f51287b9d1e73 --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "./" +} diff --git a/node_modules/resolve/test/resolver/false_main/index.js b/node_modules/resolve/test/resolver/false_main/index.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/false_main/package.json b/node_modules/resolve/test/resolver/false_main/package.json new file mode 100644 index 0000000000000..a7416c0c7aa4a --- /dev/null +++ b/node_modules/resolve/test/resolver/false_main/package.json @@ -0,0 +1,4 @@ +{ + "name": "false_main", + "main": false +} diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 0000000000000..bd816eaba4ca3 --- /dev/null +++ b/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js new file mode 100644 index 0000000000000..bc1fb0a6f4ede --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/index.js @@ -0,0 +1,2 @@ +// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json new file mode 100644 index 0000000000000..b7188041763f8 --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "wrong.js" +} diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json new file mode 100644 index 0000000000000..0590748642ae2 --- /dev/null +++ b/node_modules/resolve/test/resolver/invalid_main/package.json @@ -0,0 +1,7 @@ +{ + "name": "invalid_main", + "main": [ + "why is this a thing", + "srsly omg wtf" + ] +} diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/multirepo/lerna.json b/node_modules/resolve/test/resolver/multirepo/lerna.json new file mode 100644 index 0000000000000..d6707ca0cd64d --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/lerna.json @@ -0,0 +1,6 @@ +{ + "packages": [ + "packages/*" + ], + "version": "0.0.0" +} diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json new file mode 100644 index 0000000000000..4391d392ea276 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/package.json @@ -0,0 +1,20 @@ +{ + "name": "ljharb-monorepo-symlink-test", + "private": true, + "version": "0.0.0", + "description": "", + "main": "index.js", + "scripts": { + "postinstall": "lerna bootstrap", + "test": "node packages/package-a" + }, + "author": "", + "license": "MIT", + "dependencies": { + "jquery": "^3.3.1", + "resolve": "../../../" + }, + "devDependencies": { + "lerna": "^3.4.3" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js new file mode 100644 index 0000000000000..8875a32df0ffc --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var assert = require('assert'); +var path = require('path'); +var resolve = require('resolve'); + +var basedir = __dirname + '/node_modules/@my-scope/package-b'; + +var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js'); + +/* + * preserveSymlinks === false + * will search NPM package from + * - packages/package-b/node_modules + * - packages/node_modules + * - node_modules + */ +assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected); +assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected); + +/* + * preserveSymlinks === true + * will search NPM package from + * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules + * - packages/package-a/node_modules/@my-scope/packages/node_modules + * - packages/package-a/node_modules/@my-scope/node_modules + * - packages/package-a/node_modules/node_modules + * - packages/package-a/node_modules + * - packages/node_modules + * - node_modules + */ +assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected); +assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected); + +console.log(' * all monorepo paths successfully resolved through symlinks'); diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json new file mode 100644 index 0000000000000..204de51e05878 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json @@ -0,0 +1,14 @@ +{ + "name": "@my-scope/package-a", + "version": "0.0.0", + "private": true, + "description": "", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1" + }, + "dependencies": { + "@my-scope/package-b": "^0.0.0" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json new file mode 100644 index 0000000000000..f57c3b5f5e454 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json @@ -0,0 +1,14 @@ +{ + "name": "@my-scope/package-b", + "private": true, + "version": "0.0.0", + "description": "", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1" + }, + "dependencies": { + "@my-scope/package-a": "^0.0.0" + } +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js new file mode 100644 index 0000000000000..9b4846a82a77b --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js @@ -0,0 +1,26 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b; +var c; + +var test = function test() { + console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); + console.log(b, ': preserveSymlinks true'); + console.log(c, ': preserveSymlinks false'); + + if (a !== b && a !== c) { + throw 'async: no match'; + } + console.log('async: success! a matched either b or c\n'); +}; + +require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) { + if (err) { throw err; } + b = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); +require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) { + if (err) { throw err; } + c = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); + diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json new file mode 100644 index 0000000000000..acfe9e9517720 --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json @@ -0,0 +1,15 @@ +{ + "name": "mylib", + "version": "0.0.0", + "description": "", + "private": true, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "buffer": "*" + } +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js new file mode 100644 index 0000000000000..3283efc2ec81f --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js @@ -0,0 +1,12 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); +var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); + +console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); +console.log(b, ': preserveSymlinks true'); +console.log(c, ': preserveSymlinks false'); + +if (a !== b && a !== c) { + throw 'sync: no match'; +} +console.log('sync: success! a matched either b or c\n'); diff --git a/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js new file mode 100644 index 0000000000000..bd816eaba4ca3 --- /dev/null +++ b/node_modules/resolve/test/resolver/quux/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js new file mode 100644 index 0000000000000..888cae37af95c --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js new file mode 100644 index 0000000000000..bd816eaba4ca3 --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/resolver/symlinked/package/bar.js b/node_modules/resolve/test/resolver/symlinked/package/bar.js new file mode 100644 index 0000000000000..cb1c2c01e753b --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/bar.js @@ -0,0 +1 @@ +module.exports = 'bar'; diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json new file mode 100644 index 0000000000000..8e1b585914a7b --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/package.json @@ -0,0 +1,3 @@ +{ + "main": "bar.js" +} \ No newline at end of file diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js new file mode 100644 index 0000000000000..5b31975be69da --- /dev/null +++ b/node_modules/resolve/test/resolver/without_basedir/main.js @@ -0,0 +1,5 @@ +var resolve = require('../../../'); + +module.exports = function (t, cb) { + resolve('mymodule', null, cb); +}; diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 0000000000000..a6df8ced4682a --- /dev/null +++ b/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,730 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); + +var resolve = require('../'); +var sync = require('../sync'); + +var requireResolveSupportsPaths = require.resolve.length > 1 + && !(/^v12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794 + +var requireResolveDefaultPathsBroken = (/^v8\.9\.|^v9\.[01]\.0|^v9\.2\./).test(process.version); +// broken in node v8.9.x, v9.0, v9.1, v9.2.x. see https://github.com/nodejs/node/pull/17113 + +test('`./sync` entry point', function (t) { + t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`'); + t.end(); +}); + +test('foo', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./foo', { basedir: dir }), + path.join(dir, 'foo.js'), + './foo' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: dir }), + require.resolve('./foo', { paths: [dir] }), + './foo: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + path.join(dir, 'foo.js'), + './foo.js' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + require.resolve('./foo.js', { paths: [dir] }), + './foo.js: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }), + path.join(dir, 'foo.js') + ); + + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }); + + // Test that filename is reported as the "from" value when passed. + t.throws( + function () { + resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') }); + }, + { + name: 'Error', + message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'" + } + ); + + t.end(); +}); + +test('bar', function (t) { + var dir = path.join(__dirname, 'resolver'); + + var basedir = path.join(dir, 'bar'); + + t.equal( + resolve.sync('foo', { basedir: basedir }), + path.join(dir, 'bar/node_modules/foo/index.js'), + 'foo in bar' + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('foo', { basedir: basedir }), + require.resolve('foo', { paths: [basedir] }), + 'foo in bar: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('baz', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./baz', { basedir: dir }), + path.join(dir, 'baz/quux.js'), + './baz' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./baz', { basedir: dir }), + require.resolve('./baz', { paths: [dir] }), + './baz: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('biz', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + t.equal( + resolve.sync('./grux', { basedir: dir }), + path.join(dir, 'grux/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./grux', { basedir: dir }), + require.resolve('./grux', { paths: [dir] }), + './grux: resolve.sync === require.resolve' + ); + } + + var tivDir = path.join(dir, 'grux'); + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + path.join(dir, 'tiv/index.js') + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + require.resolve('tiv', { paths: [tivDir] }), + 'tiv: resolve.sync === require.resolve' + ); + } + + var gruxDir = path.join(dir, 'tiv'); + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + path.join(dir, 'grux/index.js') + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + require.resolve('grux', { paths: [gruxDir] }), + 'grux: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('normalize', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + t.equal( + resolve.sync('../grux', { basedir: dir }), + path.join(dir, 'index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('../grux', { basedir: dir }), + require.resolve('../grux', { paths: [dir] }), + '../grux: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('cup', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'cup.coffee'), + './cup -> ./cup.coffee' + ); + + t.equal( + resolve.sync('./cup.coffee', { basedir: dir }), + path.join(dir, 'cup.coffee'), + './cup.coffee' + ); + + t.throws(function () { + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js'] + }); + }); + + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./cup.coffee', { basedir: dir, extensions: ['.js', '.coffee'] }), + require.resolve('./cup.coffee', { paths: [dir] }), + './cup.coffee: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('mug', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./mug', { basedir: dir }), + path.join(dir, 'mug.js'), + './mug -> ./mug.js' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./mug', { basedir: dir }), + require.resolve('./mug', { paths: [dir] }), + './mug: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.coffee', '.js'] + }), + path.join(dir, 'mug.coffee'), + './mug -> ./mug.coffee' + ); + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'mug.js'), + './mug -> ./mug.js' + ); + + t.end(); +}); + +test('other path', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + t.equal( + resolve.sync('root', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/root.js') + ); + + t.equal( + resolve.sync('lib/other-lib', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/lib/other-lib.js') + ); + + t.throws(function () { + resolve.sync('root', { basedir: dir }); + }); + + t.throws(function () { + resolve.sync('zzz', { + basedir: dir, + paths: [otherDir] + }); + }); + + t.end(); +}); + +test('path iterator', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + t.equal( + resolve.sync('baz', { packageIterator: exactIterator }), + path.join(resolverDir, 'baz/quux.js') + ); + + t.end(); +}); + +test('incorrect main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + path.join(dir, 'index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + require.resolve('./incorrect_main', { paths: [resolverDir] }), + './incorrect_main: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('missing index', function (t) { + t.plan(requireResolveSupportsPaths ? 2 : 1); + + var resolverDir = path.join(__dirname, 'resolver'); + try { + resolve.sync('./missing_index', { basedir: resolverDir }); + t.fail('did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + require.resolve('./missing_index', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } +}); + +test('missing main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('null main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('main: false', function (t) { + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + require.resolve('./false_main', { paths: [basedir] }), + '`"main": false`: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +var stubStatSync = function stubStatSync(fn) { + var statSync = fs.statSync; + try { + fs.statSync = function () { + throw new EvalError('Unknown Error'); + }; + return fn(); + } finally { + fs.statSync = statSync; + } +}; + +test('#79 - re-throw non ENOENT errors from stat', function (t) { + var dir = path.join(__dirname, 'resolver'); + + stubStatSync(function () { + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }, /Unknown Error/); + }); + + t.end(); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names'); + + t.equal( + resolve.sync('./foo', { basedir: basedir }), + path.join(dir, 'same_names/foo.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: basedir }), + require.resolve('./foo', { paths: [basedir] }), + './foo: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + require.resolve('./foo/', { paths: [basedir] }), + './foo/: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names/foo'); + + t.equal( + resolve.sync('./', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + './' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./', { basedir: basedir }), + require.resolve('./', { paths: [basedir] }), + './: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('.', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + '.' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('.', { basedir: basedir }), + require.resolve('.', { paths: [basedir] }), + '.: resolve.sync === require.resolve', + { todo: true } + ); + } + + t.end(); +}); + +test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.equal( + resolve.sync('./' + testFile), + __filename, + 'sanity check' + ); + st.equal( + resolve.sync('./' + testFile), + require.resolve('./' + testFile), + 'sanity check: resolve.sync === require.resolve' + ); + + st.end(); + }); + + t.test('with a fake directory', function (st) { + function run() { return resolve.sync('./' + testFile + '/blah'); } + + st.throws(run, 'throws an error'); + + try { + run(); + } catch (e) { + st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + e.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + } + + st.end(); + }); + + t.end(); +}); + +test('sync dot main', function (t) { + var start = new Date(); + + t.equal( + resolve.sync('./resolver/dot_main'), + path.join(__dirname, 'resolver/dot_main/index.js'), + './resolver/dot_main' + ); + t.equal( + resolve.sync('./resolver/dot_main'), + require.resolve('./resolver/dot_main'), + './resolver/dot_main: resolve.sync === require.resolve' + ); + + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + + t.end(); +}); + +test('sync dot slash main', function (t) { + var start = new Date(); + + t.equal( + resolve.sync('./resolver/dot_slash_main'), + path.join(__dirname, 'resolver/dot_slash_main/index.js') + ); + t.equal( + resolve.sync('./resolver/dot_slash_main'), + require.resolve('./resolver/dot_slash_main'), + './resolver/dot_slash_main: resolve.sync === require.resolve' + ); + + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + + t.end(); +}); + +test('not a directory', function (t) { + var path = './foo'; + try { + resolve.sync(path, { basedir: __filename }); + t.fail(); + } catch (err) { + t.ok(err, 'a non-directory errors'); + t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'"); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + } + t.end(); +}); + +test('non-string "main" field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + try { + var result = resolve.sync('./invalid_main', { basedir: dir }); + t.equal(result, undefined, 'result should not exist'); + t.fail('should not get here'); + } catch (err) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + } + t.end(); +}); + +test('non-string "main" field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + try { + var result = resolve.sync('./invalid_main', { basedir: dir }); + t.equal(result, undefined, 'result should not exist'); + t.fail('should not get here'); + } catch (err) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + } + t.end(); +}); + +test('browser field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + var res = resolve.sync('./browser_field', { + basedir: dir, + packageFilter: function packageFilter(pkg) { + if (pkg.browser) { + pkg.main = pkg.browser; // eslint-disable-line no-param-reassign + delete pkg.browser; // eslint-disable-line no-param-reassign + } + return pkg; + } + }); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.end(); +}); + +test('absolute paths', function (t) { + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + t.equal( + resolve.sync(__filename), + __filename, + 'absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(extensionless), + __filename, + 'extensionless absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + __filename, + 'absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + require.resolve(__filename, { paths: [process.cwd()] }), + 'absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + require.resolve(extensionless, { paths: [process.cwd()] }), + 'extensionless absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +var malformedDir = path.join(__dirname, 'resolver/malformed_package_json'); +test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) { + t.plan(5 + (requireResolveSupportsPaths ? 1 : 0)); + + var basedir = malformedDir; + var expected = path.join(basedir, 'index.js'); + + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + expected, + 'malformed package.json is silently ignored' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + require.resolve('./index.js', { paths: [basedir] }), + 'malformed package.json: resolve.sync === require.resolve' + ); + } + + var res1 = resolve.sync( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + } + ); + + t.equal( + res1, + expected, + 'with packageFilter: malformed package.json is silently ignored' + ); + + var res2 = resolve.sync( + './index.js', + { + basedir: basedir, + readPackageSync: function (readFileSync, pkgfile) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + var result = String(readFileSync(pkgfile)); + try { + return JSON.parse(result); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error'); + } + } + } + ); + + t.equal( + res2, + expected, + 'with readPackageSync: malformed package.json is silently ignored' + ); +}); diff --git a/node_modules/resolve/test/shadowed_core.js b/node_modules/resolve/test/shadowed_core.js new file mode 100644 index 0000000000000..3a5f4fcff728f --- /dev/null +++ b/node_modules/resolve/test/shadowed_core.js @@ -0,0 +1,54 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('shadowed core modules still return core module', function (t) { + t.plan(2); + + resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { + t.ifError(err); + t.equal(res, 'util'); + }); +}); + +test('shadowed core modules still return core module [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') }); + + t.equal(res, 'util'); +}); + +test('shadowed core modules return shadow when appending `/`', function (t) { + t.plan(2); + + resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); + }); +}); + +test('shadowed core modules return shadow when appending `/` [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') }); + + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); +}); + +test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) { + t.plan(2); + + resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); + }); +}); + +test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }); + + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); +}); diff --git a/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js new file mode 100644 index 0000000000000..b7b8450a9ef23 --- /dev/null +++ b/node_modules/resolve/test/subdirs.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('subdirs', function (t) { + t.plan(2); + + var dir = path.join(__dirname, '/subdirs'); + resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); + }); +}); diff --git a/node_modules/resolve/test/symlinks.js b/node_modules/resolve/test/symlinks.js new file mode 100644 index 0000000000000..35f881afb8c7e --- /dev/null +++ b/node_modules/resolve/test/symlinks.js @@ -0,0 +1,176 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); +var map = require('array.prototype.map'); +var resolve = require('../'); + +var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); +var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package'); +var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a'); +var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a'); +try { + fs.unlinkSync(symlinkDir); +} catch (err) {} +try { + fs.unlinkSync(packageDir); +} catch (err) {} +try { + fs.unlinkSync(modADir); +} catch (err) {} +try { + fs.unlinkSync(symlinkModADir); +} catch (err) {} + +try { + fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); +} +try { + fs.symlinkSync('../../package', packageDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction'); +} +try { + fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction'); +} + +test('symlink', function (t) { + t.plan(2); + + resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) { + t.error(err); + t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); + }); +}); + +test('sync symlink when preserveSymlinks = true', function (t) { + t.plan(4); + + resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) { + t.ok(err, 'there is an error'); + t.notOk(res, 'no result'); + + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + t.equal( + err && err.message, + 'Cannot find module \'foo\' from \'' + symlinkDir + '\'', + 'can not find nonexistent module' + ); + }); +}); + +test('sync symlink', function (t) { + var start = new Date(); + t.doesNotThrow(function () { + t.equal( + resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), + path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js') + ); + }); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); +}); + +test('sync symlink when preserveSymlinks = true', function (t) { + t.throws(function () { + resolve.sync('foo', { basedir: symlinkDir }); + }, /Cannot find module 'foo'/); + t.end(); +}); + +test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false }); + + t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + t.end(); +}); + +test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + t.plan(2); + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) { + t.notOk(err, 'no error'); + t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + }); +}); + +test('packageFilter', function (t) { + function relative(x) { + return path.relative(__dirname, x); + } + + function testPackageFilter(preserveSymlinks) { + return function (st) { + st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition + + var destMain = 'symlinks/dest/node_modules/mod-a/index.js'; + var destPkg = 'symlinks/dest/node_modules/mod-a/package.json'; + var sourceMain = 'symlinks/source/node_modules/mod-a/index.js'; + var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json'; + var destDir = path.join(__dirname, 'symlinks', 'dest'); + + /* eslint multiline-comment-style: 0 */ + /* v2.x will restore these tests + var packageFilterPath = []; + var actualPath = resolve.sync('mod-a', { + basedir: destDir, + preserveSymlinks: preserveSymlinks, + packageFilter: function (pkg, pkgfile, dir) { + packageFilterPath.push(pkgfile); + } + }); + st.equal( + relative(actualPath), + path.normalize(preserveSymlinks ? destMain : sourceMain), + 'sync: actual path is correct' + ); + st.deepEqual( + map(packageFilterPath, relative), + map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize), + 'sync: packageFilter pkgfile arg is correct' + ); + */ + + var asyncPackageFilterPath = []; + resolve( + 'mod-a', + { + basedir: destDir, + preserveSymlinks: preserveSymlinks, + packageFilter: function (pkg, pkgfile) { + asyncPackageFilterPath.push(pkgfile); + } + }, + function (err, actualPath) { + st.error(err, 'no error'); + st.equal( + relative(actualPath), + path.normalize(preserveSymlinks ? destMain : sourceMain), + 'async: actual path is correct' + ); + st.deepEqual( + map(asyncPackageFilterPath, relative), + map( + preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg], + path.normalize + ), + 'async: packageFilter pkgfile arg is correct' + ); + } + ); + }; + } + + t.test('preserveSymlinks: false', testPackageFilter(false)); + + t.test('preserveSymlinks: true', testPackageFilter(true)); + + t.end(); +}); diff --git a/node_modules/ret/LICENSE b/node_modules/ret/LICENSE new file mode 100644 index 0000000000000..b351ee8e96663 --- /dev/null +++ b/node_modules/ret/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011 by Roly Fentanes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/ret/README.md b/node_modules/ret/README.md new file mode 100644 index 0000000000000..28563e16d854a --- /dev/null +++ b/node_modules/ret/README.md @@ -0,0 +1,183 @@ +# Regular Expression Tokenizer + +Tokenizes strings that represent a regular expressions. + +[![Build Status](https://secure.travis-ci.org/fent/ret.js.svg)](http://travis-ci.org/fent/ret.js) +[![Dependency Status](https://david-dm.org/fent/ret.js.svg)](https://david-dm.org/fent/ret.js) +[![codecov](https://codecov.io/gh/fent/ret.js/branch/master/graph/badge.svg)](https://codecov.io/gh/fent/ret.js) + +# Usage + +```js +var ret = require('ret'); + +var tokens = ret(/foo|bar/.source); +``` + +`tokens` will contain the following object + +```js +{ + "type": ret.types.ROOT + "options": [ + [ { "type": ret.types.CHAR, "value", 102 }, + { "type": ret.types.CHAR, "value", 111 }, + { "type": ret.types.CHAR, "value", 111 } ], + [ { "type": ret.types.CHAR, "value", 98 }, + { "type": ret.types.CHAR, "value", 97 }, + { "type": ret.types.CHAR, "value", 114 } ] + ] +} +``` + +# Token Types + +`ret.types` is a collection of the various token types exported by ret. + +### ROOT + +Only used in the root of the regexp. This is needed due to the posibility of the root containing a pipe `|` character. In that case, the token will have an `options` key that will be an array of arrays of tokens. If not, it will contain a `stack` key that is an array of tokens. + +```js +{ + "type": ret.types.ROOT, + "stack": [token1, token2...], +} +``` + +```js +{ + "type": ret.types.ROOT, + "options" [ + [token1, token2...], + [othertoken1, othertoken2...] + ... + ], +} +``` + +### GROUP + +Groups contain tokens that are inside of a parenthesis. If the group begins with `?` followed by another character, it's a special type of group. A ':' tells the group not to be remembered when `exec` is used. '=' means the previous token matches only if followed by this group, and '!' means the previous token matches only if NOT followed. + +Like root, it can contain an `options` key instead of `stack` if there is a pipe. + +```js +{ + "type": ret.types.GROUP, + "remember" true, + "followedBy": false, + "notFollowedBy": false, + "stack": [token1, token2...], +} +``` + +```js +{ + "type": ret.types.GROUP, + "remember" true, + "followedBy": false, + "notFollowedBy": false, + "options" [ + [token1, token2...], + [othertoken1, othertoken2...] + ... + ], +} +``` + +### POSITION + +`\b`, `\B`, `^`, and `$` specify positions in the regexp. + +```js +{ + "type": ret.types.POSITION, + "value": "^", +} +``` + +### SET + +Contains a key `set` specifying what tokens are allowed and a key `not` specifying if the set should be negated. A set can contain other sets, ranges, and characters. + +```js +{ + "type": ret.types.SET, + "set": [token1, token2...], + "not": false, +} +``` + +### RANGE + +Used in set tokens to specify a character range. `from` and `to` are character codes. + +```js +{ + "type": ret.types.RANGE, + "from": 97, + "to": 122, +} +``` + +### REPETITION + +```js +{ + "type": ret.types.REPETITION, + "min": 0, + "max": Infinity, + "value": token, +} +``` + +### REFERENCE + +References a group token. `value` is 1-9. + +```js +{ + "type": ret.types.REFERENCE, + "value": 1, +} +``` + +### CHAR + +Represents a single character token. `value` is the character code. This might seem a bit cluttering instead of concatenating characters together. But since repetition tokens only repeat the last token and not the last clause like the pipe, it's simpler to do it this way. + +```js +{ + "type": ret.types.CHAR, + "value": 123, +} +``` + +## Errors + +ret.js will throw errors if given a string with an invalid regular expression. All possible errors are + +* Invalid group. When a group with an immediate `?` character is followed by an invalid character. It can only be followed by `!`, `=`, or `:`. Example: `/(?_abc)/` +* Nothing to repeat. Thrown when a repetitional token is used as the first token in the current clause, as in right in the beginning of the regexp or group, or right after a pipe. Example: `/foo|?bar/`, `/{1,3}foo|bar/`, `/foo(+bar)/` +* Unmatched ). A group was not opened, but was closed. Example: `/hello)2u/` +* Unterminated group. A group was not closed. Example: `/(1(23)4/` +* Unterminated character class. A custom character set was not closed. Example: `/[abc/` + + +# Install + + npm install ret + + +# Tests + +Tests are written with [vows](http://vowsjs.org/) + +```bash +npm test +``` + +# License + +MIT diff --git a/node_modules/ret/lib/index.js b/node_modules/ret/lib/index.js new file mode 100644 index 0000000000000..0e151c39bad29 --- /dev/null +++ b/node_modules/ret/lib/index.js @@ -0,0 +1,282 @@ +var util = require('./util'); +var types = require('./types'); +var sets = require('./sets'); +var positions = require('./positions'); + + +module.exports = function(regexpStr) { + var i = 0, l, c, + start = { type: types.ROOT, stack: []}, + + // Keep track of last clause/group and stack. + lastGroup = start, + last = start.stack, + groupStack = []; + + + var repeatErr = function(i) { + util.error(regexpStr, 'Nothing to repeat at column ' + (i - 1)); + }; + + // Decode a few escaped characters. + var str = util.strToChars(regexpStr); + l = str.length; + + // Iterate through each character in string. + while (i < l) { + c = str[i++]; + + switch (c) { + // Handle escaped characters, inclues a few sets. + case '\\': + c = str[i++]; + + switch (c) { + case 'b': + last.push(positions.wordBoundary()); + break; + + case 'B': + last.push(positions.nonWordBoundary()); + break; + + case 'w': + last.push(sets.words()); + break; + + case 'W': + last.push(sets.notWords()); + break; + + case 'd': + last.push(sets.ints()); + break; + + case 'D': + last.push(sets.notInts()); + break; + + case 's': + last.push(sets.whitespace()); + break; + + case 'S': + last.push(sets.notWhitespace()); + break; + + default: + // Check if c is integer. + // In which case it's a reference. + if (/\d/.test(c)) { + last.push({ type: types.REFERENCE, value: parseInt(c, 10) }); + + // Escaped character. + } else { + last.push({ type: types.CHAR, value: c.charCodeAt(0) }); + } + } + + break; + + + // Positionals. + case '^': + last.push(positions.begin()); + break; + + case '$': + last.push(positions.end()); + break; + + + // Handle custom sets. + case '[': + // Check if this class is 'anti' i.e. [^abc]. + var not; + if (str[i] === '^') { + not = true; + i++; + } else { + not = false; + } + + // Get all the characters in class. + var classTokens = util.tokenizeClass(str.slice(i), regexpStr); + + // Increase index by length of class. + i += classTokens[1]; + last.push({ + type: types.SET, + set: classTokens[0], + not: not, + }); + + break; + + + // Class of any character except \n. + case '.': + last.push(sets.anyChar()); + break; + + + // Push group onto stack. + case '(': + // Create group. + var group = { + type: types.GROUP, + stack: [], + remember: true, + }; + + c = str[i]; + + // If if this is a special kind of group. + if (c === '?') { + c = str[i + 1]; + i += 2; + + // Match if followed by. + if (c === '=') { + group.followedBy = true; + + // Match if not followed by. + } else if (c === '!') { + group.notFollowedBy = true; + + } else if (c !== ':') { + util.error(regexpStr, + 'Invalid group, character \'' + c + + '\' after \'?\' at column ' + (i - 1)); + } + + group.remember = false; + } + + // Insert subgroup into current group stack. + last.push(group); + + // Remember the current group for when the group closes. + groupStack.push(lastGroup); + + // Make this new group the current group. + lastGroup = group; + last = group.stack; + break; + + + // Pop group out of stack. + case ')': + if (groupStack.length === 0) { + util.error(regexpStr, 'Unmatched ) at column ' + (i - 1)); + } + lastGroup = groupStack.pop(); + + // Check if this group has a PIPE. + // To get back the correct last stack. + last = lastGroup.options ? + lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack; + break; + + + // Use pipe character to give more choices. + case '|': + // Create array where options are if this is the first PIPE + // in this clause. + if (!lastGroup.options) { + lastGroup.options = [lastGroup.stack]; + delete lastGroup.stack; + } + + // Create a new stack and add to options for rest of clause. + var stack = []; + lastGroup.options.push(stack); + last = stack; + break; + + + // Repetition. + // For every repetition, remove last element from last stack + // then insert back a RANGE object. + // This design is chosen because there could be more than + // one repetition symbols in a regex i.e. `a?+{2,3}`. + case '{': + var rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max; + if (rs !== null) { + if (last.length === 0) { + repeatErr(i); + } + min = parseInt(rs[1], 10); + max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min; + i += rs[0].length; + + last.push({ + type: types.REPETITION, + min: min, + max: max, + value: last.pop(), + }); + } else { + last.push({ + type: types.CHAR, + value: 123, + }); + } + break; + + case '?': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: 1, + value: last.pop(), + }); + break; + + case '+': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 1, + max: Infinity, + value: last.pop(), + }); + break; + + case '*': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: Infinity, + value: last.pop(), + }); + break; + + + // Default is a character that is not `\[](){}?+*^$`. + default: + last.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + } + + } + + // Check if any groups have not been closed. + if (groupStack.length !== 0) { + util.error(regexpStr, 'Unterminated group'); + } + + return start; +}; + +module.exports.types = types; diff --git a/node_modules/ret/lib/positions.js b/node_modules/ret/lib/positions.js new file mode 100644 index 0000000000000..80677ee5d6a13 --- /dev/null +++ b/node_modules/ret/lib/positions.js @@ -0,0 +1,17 @@ +var types = require('./types'); + +exports.wordBoundary = function() { + return { type: types.POSITION, value: 'b' }; +}; + +exports.nonWordBoundary = function() { + return { type: types.POSITION, value: 'B' }; +}; + +exports.begin = function() { + return { type: types.POSITION, value: '^' }; +}; + +exports.end = function() { + return { type: types.POSITION, value: '$' }; +}; diff --git a/node_modules/ret/lib/sets.js b/node_modules/ret/lib/sets.js new file mode 100644 index 0000000000000..5fb6be5d17e9b --- /dev/null +++ b/node_modules/ret/lib/sets.js @@ -0,0 +1,82 @@ +var types = require('./types'); + +var INTS = function() { + return [{ type: types.RANGE , from: 48, to: 57 }]; +}; + +var WORDS = function() { + return [ + { type: types.CHAR, value: 95 }, + { type: types.RANGE, from: 97, to: 122 }, + { type: types.RANGE, from: 65, to: 90 } + ].concat(INTS()); +}; + +var WHITESPACE = function() { + return [ + { type: types.CHAR, value: 9 }, + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 11 }, + { type: types.CHAR, value: 12 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 32 }, + { type: types.CHAR, value: 160 }, + { type: types.CHAR, value: 5760 }, + { type: types.CHAR, value: 6158 }, + { type: types.CHAR, value: 8192 }, + { type: types.CHAR, value: 8193 }, + { type: types.CHAR, value: 8194 }, + { type: types.CHAR, value: 8195 }, + { type: types.CHAR, value: 8196 }, + { type: types.CHAR, value: 8197 }, + { type: types.CHAR, value: 8198 }, + { type: types.CHAR, value: 8199 }, + { type: types.CHAR, value: 8200 }, + { type: types.CHAR, value: 8201 }, + { type: types.CHAR, value: 8202 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + { type: types.CHAR, value: 8239 }, + { type: types.CHAR, value: 8287 }, + { type: types.CHAR, value: 12288 }, + { type: types.CHAR, value: 65279 } + ]; +}; + +var NOTANYCHAR = function() { + return [ + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + ]; +}; + +// Predefined class objects. +exports.words = function() { + return { type: types.SET, set: WORDS(), not: false }; +}; + +exports.notWords = function() { + return { type: types.SET, set: WORDS(), not: true }; +}; + +exports.ints = function() { + return { type: types.SET, set: INTS(), not: false }; +}; + +exports.notInts = function() { + return { type: types.SET, set: INTS(), not: true }; +}; + +exports.whitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: false }; +}; + +exports.notWhitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: true }; +}; + +exports.anyChar = function() { + return { type: types.SET, set: NOTANYCHAR(), not: true }; +}; diff --git a/node_modules/ret/lib/types.js b/node_modules/ret/lib/types.js new file mode 100644 index 0000000000000..9484145123a0a --- /dev/null +++ b/node_modules/ret/lib/types.js @@ -0,0 +1,10 @@ +module.exports = { + ROOT : 0, + GROUP : 1, + POSITION : 2, + SET : 3, + RANGE : 4, + REPETITION : 5, + REFERENCE : 6, + CHAR : 7, +}; diff --git a/node_modules/ret/lib/util.js b/node_modules/ret/lib/util.js new file mode 100644 index 0000000000000..97d8cf5164428 --- /dev/null +++ b/node_modules/ret/lib/util.js @@ -0,0 +1,111 @@ +var types = require('./types'); +var sets = require('./sets'); + + +// All of these are private and only used by randexp. +// It's assumed that they will always be called with the correct input. + +var CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?'; +var SLSH = { '0': 0, 't': 9, 'n': 10, 'v': 11, 'f': 12, 'r': 13 }; + +/** + * Finds character representations in str and convert all to + * their respective characters + * + * @param {String} str + * @return {String} + */ +exports.strToChars = function(str) { + /* jshint maxlen: false */ + var chars_regex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; + str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) { + if (lbs) { + return s; + } + + var code = b ? 8 : + a16 ? parseInt(a16, 16) : + b16 ? parseInt(b16, 16) : + c8 ? parseInt(c8, 8) : + dctrl ? CTRL.indexOf(dctrl) : + SLSH[eslsh]; + + var c = String.fromCharCode(code); + + // Escape special regex characters. + if (/[\[\]{}\^$.|?*+()]/.test(c)) { + c = '\\' + c; + } + + return c; + }); + + return str; +}; + + +/** + * turns class into tokens + * reads str until it encounters a ] not preceeded by a \ + * + * @param {String} str + * @param {String} regexpStr + * @return {Array., Number>} + */ +exports.tokenizeClass = function(str, regexpStr) { + /* jshint maxlen: false */ + var tokens = []; + var regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g; + var rs, c; + + + while ((rs = regexp.exec(str)) != null) { + if (rs[1]) { + tokens.push(sets.words()); + + } else if (rs[2]) { + tokens.push(sets.ints()); + + } else if (rs[3]) { + tokens.push(sets.whitespace()); + + } else if (rs[4]) { + tokens.push(sets.notWords()); + + } else if (rs[5]) { + tokens.push(sets.notInts()); + + } else if (rs[6]) { + tokens.push(sets.notWhitespace()); + + } else if (rs[7]) { + tokens.push({ + type: types.RANGE, + from: (rs[8] || rs[9]).charCodeAt(0), + to: rs[10].charCodeAt(0), + }); + + } else if (c = rs[12]) { + tokens.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + + } else { + return [tokens, regexp.lastIndex]; + } + } + + exports.error(regexpStr, 'Unterminated character class'); +}; + + +/** + * Shortcut to throw errors. + * + * @param {String} regexp + * @param {String} msg + */ +exports.error = function(regexp, msg) { + throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg); +}; diff --git a/node_modules/ret/package.json b/node_modules/ret/package.json new file mode 100644 index 0000000000000..2fde9a44e733f --- /dev/null +++ b/node_modules/ret/package.json @@ -0,0 +1,35 @@ +{ + "name": "ret", + "description": "Tokenizes a string that represents a regular expression.", + "keywords": [ + "regex", + "regexp", + "regular expression", + "parser", + "tokenizer" + ], + "version": "0.1.15", + "repository": { + "type": "git", + "url": "git://github.com/fent/ret.js.git" + }, + "author": "Roly Fentanes (https://github.com/fent)", + "main": "./lib/index.js", + "files": [ + "lib" + ], + "scripts": { + "test": "istanbul cover vows -- --spec test/*-test.js" + }, + "directories": { + "lib": "./lib" + }, + "devDependencies": { + "istanbul": "*", + "vows": "*" + }, + "engines": { + "node": ">=0.12" + }, + "license": "MIT" +} diff --git a/node_modules/right-align/LICENSE b/node_modules/right-align/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/right-align/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/right-align/README.md b/node_modules/right-align/README.md new file mode 100644 index 0000000000000..3abdfb3a7dc6b --- /dev/null +++ b/node_modules/right-align/README.md @@ -0,0 +1,77 @@ +# right-align [![NPM version](https://badge.fury.io/js/right-align.svg)](http://badge.fury.io/js/right-align) + +> Right-align the text in a string. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i right-align --save +``` + +## Usage + +```js +var rightAlign = require('right-align'); +rightAlign(string); +``` + +**Example** + +If used on the following: + +``` +Lorem ipsum dolor sit amet, +consectetur adipiscing +elit, sed do eiusmod tempor incididunt +ut labore et dolore +magna aliqua. Ut enim ad minim +veniam, quis +``` + +The result would be: + +``` + Lorem ipsum dolor sit amet, + consectetur adipiscing +elit, sed do eiusmod tempor incididunt + ut labore et dolore + magna aliqua. Ut enim ad minim + veniam, quis +``` + +## Related projects + +* [align-text](https://github.com/jonschlinkert/align-text): Align the text in a string. +* [center-align](https://github.com/jonschlinkert/center-align): Center-align the text in a string. +* [justify](https://github.com/bahamas10/node-justify): Left or right (or both) justify text using a custom width and character +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [repeat-element](https://github.com/jonschlinkert/repeat-element): Create an array by repeating the given value n times. +* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. + +## 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/right-align/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 June 09, 2015._ diff --git a/node_modules/right-align/index.js b/node_modules/right-align/index.js new file mode 100644 index 0000000000000..ad54f5f1c25b4 --- /dev/null +++ b/node_modules/right-align/index.js @@ -0,0 +1,16 @@ +/*! + * right-align + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var align = require('align-text'); + +module.exports = function rightAlign(val) { + return align(val, function (len, longest) { + return longest - len; + }); +}; diff --git a/node_modules/right-align/package.json b/node_modules/right-align/package.json new file mode 100644 index 0000000000000..fe20d26d21310 --- /dev/null +++ b/node_modules/right-align/package.json @@ -0,0 +1,45 @@ +{ + "name": "right-align", + "description": "Right-align the text in a string.", + "version": "0.1.3", + "homepage": "https://github.com/jonschlinkert/right-align", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/right-align.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/right-align/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "align-text": "^0.1.1" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "align", + "align-center", + "center", + "center-align", + "right", + "right-align", + "text", + "typography" + ] +} diff --git a/node_modules/safe-array-concat/.eslintrc b/node_modules/safe-array-concat/.eslintrc new file mode 100644 index 0000000000000..fc909f1ef09d0 --- /dev/null +++ b/node_modules/safe-array-concat/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "max-lines-per-function": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/safe-array-concat/.github/FUNDING.yml b/node_modules/safe-array-concat/.github/FUNDING.yml new file mode 100644 index 0000000000000..bbd94cdb9d0f1 --- /dev/null +++ b/node_modules/safe-array-concat/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/safe-array-concat +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/safe-array-concat/.nycrc b/node_modules/safe-array-concat/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/safe-array-concat/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/safe-array-concat/CHANGELOG.md b/node_modules/safe-array-concat/CHANGELOG.md new file mode 100644 index 0000000000000..11715fa850690 --- /dev/null +++ b/node_modules/safe-array-concat/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/ljharb/safe-array-concat/compare/v1.0.0...v1.0.1) - 2023-09-05 + +### Fixed + +- [Perf] set `Symbol.isConcatSpreadable` only when required [`#2`](https://github.com/ljharb/safe-array-concat/issues/2) + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`c0791b0`](https://github.com/ljharb/safe-array-concat/commit/c0791b00b74e70113921c32d4d1fd494b7e8f555) +- [Deps] update `get-intrinsic` [`7d07ae6`](https://github.com/ljharb/safe-array-concat/commit/7d07ae69d512bb3b6fb2131f1c824b5ffd85af9f) + +## v1.0.0 - 2023-04-20 + +### Commits + +- Initial implementation, tests, readme [`31b8e70`](https://github.com/ljharb/safe-array-concat/commit/31b8e709bbba4b01ebc51cc15cdcc7012fe58341) +- Initial commit [`83d38c6`](https://github.com/ljharb/safe-array-concat/commit/83d38c6f4cde453063393482d9129b134d403d0a) +- npm init [`516fdc2`](https://github.com/ljharb/safe-array-concat/commit/516fdc2bef306ec13f98b1f1b49c929b5308907f) +- Only apps should have lockfiles [`9cfa07b`](https://github.com/ljharb/safe-array-concat/commit/9cfa07b9112107b5ba22c74baca8cb80934a09f2) diff --git a/node_modules/safe-array-concat/LICENSE b/node_modules/safe-array-concat/LICENSE new file mode 100644 index 0000000000000..b4213ac640ad5 --- /dev/null +++ b/node_modules/safe-array-concat/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/safe-array-concat/README.md b/node_modules/safe-array-concat/README.md new file mode 100644 index 0000000000000..c7e1d4514461e --- /dev/null +++ b/node_modules/safe-array-concat/README.md @@ -0,0 +1,53 @@ +# safe-array-concat [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable + +## Getting started + +```sh +npm install --save safe-array-concat +``` + +## Usage/Examples + +```js +var safeConcat = require('safe-array-concat'); +var assert = require('assert'); + +assert.deepEqual([].concat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with normal concat'); +assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with safe concat'); + +String.prototype[Symbol.isConcatSpreadable] = true; +assert.deepEqual([].concat('foo', Object('bar')), ['foo', 'b', 'a', 'r'], 'spreadable String objects are spread with normal concat!!!'); +assert.deepEqual(safeConcat('foo', Object('bar')), ['foo', Object('bar')], 'spreadable String objects are not spread with safe concat'); + +Array.prototype[Symbol.isConcatSpreadable] = false; +assert.deepEqual([].concat([1, 2], 3, [[4]]), [[], [1, 2], 3, [[4]]], 'non-concat-spreadable arrays do not spread with normal concat!!!'); +assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'non-concat-spreadable arrays still spread with safe concat'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/safe-array-concat +[npm-version-svg]: https://versionbadg.es/ljharb/safe-array-concat.svg +[deps-svg]: https://david-dm.org/ljharb/safe-array-concat.svg +[deps-url]: https://david-dm.org/ljharb/safe-array-concat +[dev-deps-svg]: https://david-dm.org/ljharb/safe-array-concat/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/safe-array-concat#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/safe-array-concat.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/safe-array-concat.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/safe-array-concat.svg +[downloads-url]: https://npm-stat.com/charts.html?package=safe-array-concat +[codecov-image]: https://codecov.io/gh/ljharb/safe-array-concat/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/safe-array-concat/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-array-concat +[actions-url]: https://github.com/ljharb/safe-array-concat/actions diff --git a/node_modules/safe-array-concat/index.js b/node_modules/safe-array-concat/index.js new file mode 100644 index 0000000000000..ca446450f428f --- /dev/null +++ b/node_modules/safe-array-concat/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $concat = GetIntrinsic('%Array.prototype.concat%'); + +var callBind = require('call-bind'); + +var callBound = require('call-bind/callBound'); +var $slice = callBound('Array.prototype.slice'); + +var hasSymbols = require('has-symbols/shams')(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; + +var empty = []; +var $concatApply = isConcatSpreadable ? callBind.apply($concat, empty) : null; +var $concatCall = isConcatSpreadable ? null : callBind($concat, empty); + +var isArray = isConcatSpreadable ? require('isarray') : null; + +module.exports = isConcatSpreadable + // eslint-disable-next-line no-unused-vars + ? function safeArrayConcat(item) { + for (var i = 0; i < arguments.length; i += 1) { + var arg = arguments[i]; + if (arg && typeof arg === 'object' && typeof arg[isConcatSpreadable] === 'boolean') { + if (!empty[isConcatSpreadable]) { + empty[isConcatSpreadable] = true; + } + var arr = isArray(arg) ? $slice(arg) : [arg]; + arr[isConcatSpreadable] = true; // shadow the property. TODO: use [[Define]] + arguments[i] = arr; + } + } + return $concatApply(arguments); + } + : $concatCall; diff --git a/node_modules/safe-array-concat/node_modules/isarray/LICENSE b/node_modules/safe-array-concat/node_modules/isarray/LICENSE new file mode 100644 index 0000000000000..de3226673c387 --- /dev/null +++ b/node_modules/safe-array-concat/node_modules/isarray/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/safe-array-concat/node_modules/isarray/README.md b/node_modules/safe-array-concat/node_modules/isarray/README.md new file mode 100644 index 0000000000000..3e160b2b7619f --- /dev/null +++ b/node_modules/safe-array-concat/node_modules/isarray/README.md @@ -0,0 +1,38 @@ + +# isarray + +`Array#isArray` for older browsers and deprecated Node.js versions. + +[![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) + +__Just use Array.isArray directly__, unless you need to support those older versions. + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](https://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/node-browserify). + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! diff --git a/node_modules/safe-array-concat/node_modules/isarray/index.js b/node_modules/safe-array-concat/node_modules/isarray/index.js new file mode 100644 index 0000000000000..a57f63495943a --- /dev/null +++ b/node_modules/safe-array-concat/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/safe-array-concat/node_modules/isarray/package.json b/node_modules/safe-array-concat/node_modules/isarray/package.json new file mode 100644 index 0000000000000..fb0e89be34337 --- /dev/null +++ b/node_modules/safe-array-concat/node_modules/isarray/package.json @@ -0,0 +1,48 @@ +{ + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "2.0.5", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", + "files": [ + "index.js" + ], + "dependencies": {}, + "devDependencies": { + "tape": "~2.13.4" + }, + "keywords": [ + "browser", + "isarray", + "array" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "scripts": { + "test": "tape test.js" + } +} diff --git a/node_modules/safe-array-concat/package.json b/node_modules/safe-array-concat/package.json new file mode 100644 index 0000000000000..b48f046dd1412 --- /dev/null +++ b/node_modules/safe-array-concat/package.json @@ -0,0 +1,78 @@ +{ + "name": "safe-array-concat", + "version": "1.0.1", + "description": "`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "lint": "eslint --ext=js,mjs .", + "postlint": "evalmd README.md", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "nyc tape test", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "keywords": [ + "safe", + "Array", + "concat", + "push", + "isConcatSpreadable" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/safe-array-concat.git" + }, + "bugs": { + "url": "https://github.com/ljharb/safe-array-concat/issues" + }, + "homepage": "https://github.com/ljharb/safe-array-concat#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">=0.4" + } +} diff --git a/node_modules/safe-array-concat/test/index.js b/node_modules/safe-array-concat/test/index.js new file mode 100644 index 0000000000000..2e4f18dded18b --- /dev/null +++ b/node_modules/safe-array-concat/test/index.js @@ -0,0 +1,89 @@ +'use strict'; + +var test = require('tape'); +var mockProperty = require('mock-property'); +var hasSymbols = require('has-symbols/shams')(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; +var species = hasSymbols && Symbol.species; + +var boundFnsHaveConfigurableLengths = Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(function () {}.bind(), 'length').configurable; + +var safeConcat = require('../'); + +test('safe-array-concat', function (t) { + t.equal(typeof safeConcat, 'function', 'is a function'); + t.equal( + safeConcat.length, + boundFnsHaveConfigurableLengths ? 1 : 0, + 'has a length of ' + (boundFnsHaveConfigurableLengths ? 1 : '0 (function lengths are not configurable)'), + 'length is as expected' + ); + + t.deepEqual( + safeConcat([1, 2], [3, 4], 'foo', 5, 6, [[7]]), + [1, 2, 3, 4, 'foo', 5, 6, [7]], + 'works with flat and nested arrays' + ); + + t.deepEqual( + safeConcat(undefined, 1, 2), + [undefined, 1, 2], + 'first item as undefined is not the concat receiver, which would throw via ToObject' + ); + t.deepEqual( + safeConcat(null, 1, 2), + [null, 1, 2], + 'first item as null is not the concat receiver, which would throw via ToObject' + ); + + var arr = [1, 2]; + arr.constructor = function C() { + return { args: arguments }; + }; + t.deepEqual( + safeConcat(arr, 3, 4), + [1, 2, 3, 4], + 'first item as an array with a nonArray .constructor; ignores constructor' + ); + + t.test('has Symbol.species', { skip: !species }, function (st) { + var speciesArr = [1, 2]; + speciesArr.constructor = {}; + speciesArr.constructor[species] = function Species() { + return { args: arguments }; + }; + + st.deepEqual( + safeConcat(speciesArr, 3, 4), + [1, 2, 3, 4], + 'first item as an array with a .constructor object with a Symbol.species; ignores constructor and species' + ); + + st.end(); + }); + + t.test('has isConcatSpreadable', { skip: !isConcatSpreadable }, function (st) { + st.teardown(mockProperty(String.prototype, isConcatSpreadable, { value: true })); + + var nonSpreadable = [1, 2]; + nonSpreadable[isConcatSpreadable] = false; + + st.deepEqual( + safeConcat(nonSpreadable, 3, 4, 'foo', Object('bar')), + [1, 2, 3, 4, 'foo', Object('bar')], + 'a non-concat-spreadable array is spreaded, and a concat-spreadable String is not spreaded' + ); + + st.teardown(mockProperty(Array.prototype, isConcatSpreadable, { value: false })); + + st.deepEqual( + safeConcat([1, 2], 3, 4, 'foo', Object('bar')), + [1, 2, 3, 4, 'foo', Object('bar')], + 'all arrays marked non-concat-spreadable are still spreaded, and a concat-spreadable String is not spreaded' + ); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE new file mode 100644 index 0000000000000..0c068ceecbd48 --- /dev/null +++ b/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/safe-buffer/README.md b/node_modules/safe-buffer/README.md new file mode 100644 index 0000000000000..e9a81afd0406f --- /dev/null +++ b/node_modules/safe-buffer/README.md @@ -0,0 +1,584 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts new file mode 100644 index 0000000000000..e9fed809a5ab5 --- /dev/null +++ b/node_modules/safe-buffer/index.d.ts @@ -0,0 +1,187 @@ +declare module "safe-buffer" { + export class Buffer { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + } +} \ No newline at end of file diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js new file mode 100644 index 0000000000000..22438dabbbcee --- /dev/null +++ b/node_modules/safe-buffer/index.js @@ -0,0 +1,62 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json new file mode 100644 index 0000000000000..623fbc3f6b0c4 --- /dev/null +++ b/node_modules/safe-buffer/package.json @@ -0,0 +1,37 @@ +{ + "name": "safe-buffer", + "description": "Safer Node.js Buffer API", + "version": "5.1.2", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + } +} diff --git a/node_modules/safe-regex-test/.eslintrc b/node_modules/safe-regex-test/.eslintrc new file mode 100644 index 0000000000000..ff89be3cc8eed --- /dev/null +++ b/node_modules/safe-regex-test/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + }, +} diff --git a/node_modules/safe-regex-test/.github/FUNDING.yml b/node_modules/safe-regex-test/.github/FUNDING.yml new file mode 100644 index 0000000000000..ef4a2679821bd --- /dev/null +++ b/node_modules/safe-regex-test/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/safe-regex-test +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/safe-regex-test/CHANGELOG.md b/node_modules/safe-regex-test/CHANGELOG.md new file mode 100644 index 0000000000000..e3107aafc7143 --- /dev/null +++ b/node_modules/safe-regex-test/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-09-22 + +### Commits + +- Initial implementation, tests, readme [`0273e9f`](https://github.com/ljharb/safe-regex-test/commit/0273e9f96f4b09df413523f4faacc8ae9ac5e6cb) +- Initial commit [`b6c1edf`](https://github.com/ljharb/safe-regex-test/commit/b6c1edf740e6105fb71c34c1c69fadd837e8f7ab) +- npm init [`c7f5765`](https://github.com/ljharb/safe-regex-test/commit/c7f576580607b16458b5a16e6bfa3b639e49c6bd) +- Only apps should have lockfiles [`1162bf0`](https://github.com/ljharb/safe-regex-test/commit/1162bf011835040f7e2c9936734294b2d98536bf) diff --git a/node_modules/safe-regex-test/LICENSE b/node_modules/safe-regex-test/LICENSE new file mode 100644 index 0000000000000..6abfe1434ebd5 --- /dev/null +++ b/node_modules/safe-regex-test/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/safe-regex-test/README.md b/node_modules/safe-regex-test/README.md new file mode 100644 index 0000000000000..6e1162f2e96e8 --- /dev/null +++ b/node_modules/safe-regex-test/README.md @@ -0,0 +1,42 @@ +# safe-regex-test [![Version Badge][npm-version-svg]][package-url] + +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Give a regex, get a robust predicate function that tests it against a string. This will work even if `RegExp.prototype` is altered later. + +## Getting started + +```sh +npm install --save safe-regex-test +``` + +## Usage/Examples + +```js +var regexTester = require('safe-regex-test'); +var assert = require('assert'); + +var tester = regexTester('a'); +assert.ok(tester('a')); +assert.notOk(tester('b')); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/safe-regex-test +[npm-version-svg]: https://versionbadg.es/ljharb/safe-regex-test.svg +[deps-svg]: https://david-dm.org/ljharb/safe-regex-test.svg +[deps-url]: https://david-dm.org/ljharb/safe-regex-test +[dev-deps-svg]: https://david-dm.org/ljharb/safe-regex-test/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/safe-regex-test#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/safe-regex-test.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/safe-regex-test.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/safe-regex-test.svg +[downloads-url]: https://npm-stat.com/charts.html?package=safe-regex-test diff --git a/node_modules/safe-regex-test/index.js b/node_modules/safe-regex-test/index.js new file mode 100644 index 0000000000000..19ad8db309752 --- /dev/null +++ b/node_modules/safe-regex-test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var GetIntrinsic = require('get-intrinsic'); +var isRegex = require('is-regex'); + +var $exec = callBound('RegExp.prototype.exec'); +var $TypeError = GetIntrinsic('%TypeError%'); + +module.exports = function regexTester(regex) { + if (!isRegex(regex)) { + throw new $TypeError('`regex` must be a RegExp'); + } + return function test(s) { + return $exec(regex, s) !== null; + }; +}; diff --git a/node_modules/safe-regex-test/package.json b/node_modules/safe-regex-test/package.json new file mode 100644 index 0000000000000..e0dcfbe0078d1 --- /dev/null +++ b/node_modules/safe-regex-test/package.json @@ -0,0 +1,75 @@ +{ + "name": "safe-regex-test", + "version": "1.0.0", + "description": "Give a regex, get a robust predicate function that tests it against a string.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "lint": "eslint --ext=js,mjs .", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "tape test", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/safe-regex-test.git" + }, + "keywords": [ + "regex", + "regexp", + "test", + "tester", + "safe", + "robust", + "exec" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/safe-regex-test/issues" + }, + "homepage": "https://github.com/ljharb/safe-regex-test#readme", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/safe-regex-test/test/index.js b/node_modules/safe-regex-test/test/index.js new file mode 100644 index 0000000000000..a2e1f9d91925d --- /dev/null +++ b/node_modules/safe-regex-test/test/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var regexTester = require('../'); + +test('regex tester', function (t) { + t.equal(typeof regexTester, 'function', 'is a function'); + + t.test('non-regexes', function (st) { + forEach(v.primitives.concat(v.objects), function (val) { + st['throws']( + function () { regexTester(val); }, + TypeError, + inspect(val) + ' is not a regex' + ); + }); + + st.end(); + }); + + t.test('regexes', function (st) { + var tester = regexTester(/a/); + + st.equal(typeof tester, 'function', 'returns a function'); + st.equal(tester('a'), true, 'returns true for a match'); + st.equal(tester('b'), false, 'returns false for a non-match'); + st.equal(tester('a'), true, 'returns true for a match again'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/safe-regex/.travis.yml b/node_modules/safe-regex/.travis.yml new file mode 100644 index 0000000000000..cc4dba29d959a --- /dev/null +++ b/node_modules/safe-regex/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/safe-regex/LICENSE b/node_modules/safe-regex/LICENSE new file mode 100644 index 0000000000000..ee27ba4b4412b --- /dev/null +++ b/node_modules/safe-regex/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/safe-regex/example/safe.js b/node_modules/safe-regex/example/safe.js new file mode 100644 index 0000000000000..f486f592ce7be --- /dev/null +++ b/node_modules/safe-regex/example/safe.js @@ -0,0 +1,3 @@ +var safe = require('../'); +var regex = process.argv.slice(2).join(' '); +console.log(safe(regex)); diff --git a/node_modules/safe-regex/index.js b/node_modules/safe-regex/index.js new file mode 100644 index 0000000000000..488f5014d973d --- /dev/null +++ b/node_modules/safe-regex/index.js @@ -0,0 +1,43 @@ +var parse = require('ret'); +var types = parse.types; + +module.exports = function (re, opts) { + if (!opts) opts = {}; + var replimit = opts.limit === undefined ? 25 : opts.limit; + + if (isRegExp(re)) re = re.source; + else if (typeof re !== 'string') re = String(re); + + try { re = parse(re) } + catch (err) { return false } + + var reps = 0; + return (function walk (node, starHeight) { + if (node.type === types.REPETITION) { + starHeight ++; + reps ++; + if (starHeight > 1) return false; + if (reps > replimit) return false; + } + + if (node.options) { + for (var i = 0, len = node.options.length; i < len; i++) { + var ok = walk({ stack: node.options[i] }, starHeight); + if (!ok) return false; + } + } + var stack = node.stack || (node.value && node.value.stack); + if (!stack) return true; + + for (var i = 0; i < stack.length; i++) { + var ok = walk(stack[i], starHeight); + if (!ok) return false; + } + + return true; + })(re, 0); +}; + +function isRegExp (x) { + return {}.toString.call(x) === '[object RegExp]'; +} diff --git a/node_modules/safe-regex/package.json b/node_modules/safe-regex/package.json new file mode 100644 index 0000000000000..0dd631b54cdf2 --- /dev/null +++ b/node_modules/safe-regex/package.json @@ -0,0 +1,43 @@ +{ + "name": "safe-regex", + "version": "1.1.0", + "description": "detect possibly catastrophic, exponential-time regular expressions", + "main": "index.js", + "dependencies": { + "ret": "~0.1.10" + }, + "devDependencies": { + "tape": "^3.5.0" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8", "ie/9", "ie/10", + "firefox/latest", + "chrome/latest", + "opera/latest", + "safari/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/safe-regex.git" + }, + "homepage": "https://github.com/substack/safe-regex", + "keywords": [ + "catastrophic", + "exponential", + "regex", + "safe", + "sandbox" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/node_modules/safe-regex/readme.markdown b/node_modules/safe-regex/readme.markdown new file mode 100644 index 0000000000000..83673ac3d83a0 --- /dev/null +++ b/node_modules/safe-regex/readme.markdown @@ -0,0 +1,65 @@ +# safe-regex + +detect potentially +[catastrophic](http://regular-expressions.mobi/catastrophic.html) +[exponential-time](http://perlgeek.de/blog-en/perl-tips/in-search-of-an-exponetial-regexp.html) +regular expressions by limiting the +[star height](https://en.wikipedia.org/wiki/Star_height) to 1 + +WARNING: This module merely *seems* to work given all the catastrophic regular +expressions I could find scouring the internet, but I don't have enough of a +background in automata to be absolutely sure that this module will catch all +exponential-time cases. + +[![browser support](https://ci.testling.com/substack/safe-regex.png)](https://ci.testling.com/substack/safe-regex) + +[![build status](https://secure.travis-ci.org/substack/safe-regex.png)](http://travis-ci.org/substack/safe-regex) + +# example + +``` js +var safe = require('safe-regex'); +var regex = process.argv.slice(2).join(' '); +console.log(safe(regex)); +``` + +``` +$ node safe.js '(x+x+)+y' +false +$ node safe.js '(beep|boop)*' +true +$ node safe.js '(a+){10}' +false +$ node safe.js '\blocation\s*:[^:\n]+\b(Oakland|San Francisco)\b' +true +``` + +# methods + +``` js +var safe = require('safe-regex') +``` + +## var ok = safe(re, opts={}) + +Return a boolean `ok` whether or not the regex `re` is safe and not possibly +catastrophic. + +`re` can be a `RegExp` object or just a string. + +If the `re` is a string and is an invalid regex, returns `false`. + +* `opts.limit` - maximum number of allowed repetitions in the entire regex. +Default: `25`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install safe-regex +``` + +# license + +MIT diff --git a/node_modules/safe-regex/test/regex.js b/node_modules/safe-regex/test/regex.js new file mode 100644 index 0000000000000..0bda8504536e7 --- /dev/null +++ b/node_modules/safe-regex/test/regex.js @@ -0,0 +1,50 @@ +var safe = require('../'); +var test = require('tape'); + +var good = [ + /\bOakland\b/, + /\b(Oakland|San Francisco)\b/i, + /^\d+1337\d+$/i, + /^\d+(1337|404)\d+$/i, + /^\d+(1337|404)*\d+$/i, + RegExp(Array(26).join('a?') + Array(26).join('a')), +]; + +test('safe regex', function (t) { + t.plan(good.length); + good.forEach(function (re) { + t.equal(safe(re), true); + }); +}); + + +var bad = [ + /^(a?){25}(a){25}$/, + RegExp(Array(27).join('a?') + Array(27).join('a')), + /(x+x+)+y/, + /foo|(x+x+)+y/, + /(a+){10}y/, + /(a+){2}y/, + /(.*){1,32000}[bc]/ +]; + +test('unsafe regex', function (t) { + t.plan(bad.length); + bad.forEach(function (re) { + t.equal(safe(re), false); + }); +}); + +var invalid = [ + '*Oakland*', + 'hey(yoo))', + 'abcde(?>hellow)', + '[abc' +]; + +test('invalid regex', function (t) { + t.plan(invalid.length); + invalid.forEach(function (re) { + t.equal(safe(re), false); + }); +}); diff --git a/node_modules/semver/LICENSE b/node_modules/semver/LICENSE new file mode 100644 index 0000000000000..19129e315fe59 --- /dev/null +++ b/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md new file mode 100644 index 0000000000000..f8dfa5a0df5fc --- /dev/null +++ b/node_modules/semver/README.md @@ -0,0 +1,412 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install --save semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/semver/bin/semver b/node_modules/semver/bin/semver new file mode 100755 index 0000000000000..801e77f1303c1 --- /dev/null +++ b/node_modules/semver/bin/semver @@ -0,0 +1,160 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json new file mode 100644 index 0000000000000..db035e97d9820 --- /dev/null +++ b/node_modules/semver/package.json @@ -0,0 +1,38 @@ +{ + "name": "semver", + "version": "5.7.2", + "description": "The semantic version parser used by npm.", + "main": "semver.js", + "scripts": { + "test": "tap test/ --100 --timeout=30", + "lint": "echo linting disabled", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap test/ --100 --timeout=30", + "posttest": "npm run lint" + }, + "devDependencies": { + "@npmcli/template-oss": "4.17.0", + "tap": "^12.7.0" + }, + "license": "ISC", + "repository": { + "type": "git", + "url": "https://github.com/npm/node-semver.git" + }, + "bin": { + "semver": "./bin/semver" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "author": "GitHub Inc.", + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "content": "./scripts/template-oss", + "version": "4.17.0" + } +} diff --git a/node_modules/semver/range.bnf b/node_modules/semver/range.bnf new file mode 100644 index 0000000000000..d4c6ae0d76c9a --- /dev/null +++ b/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js new file mode 100644 index 0000000000000..dcb68334150b2 --- /dev/null +++ b/node_modules/semver/semver.js @@ -0,0 +1,1525 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + +// The actual regexps go on exports.re +var re = exports.re = [] +var safeRe = exports.safeRe = [] +var src = exports.src = [] +var R = 0 + +var LETTERDASHNUMBER = '[a-zA-Z0-9-]' + +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +var safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] + +function makeSafeRe (value) { + for (var i = 0; i < safeRegexReplacements.length; i++) { + var token = safeRegexReplacements[i][0] + var max = safeRegexReplacements[i][1] + value = value + .split(token + '*').join(token + '{0,' + max + '}') + .split(token + '+').join(token + '{1,' + max + '}') + } + return value +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '\\d+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +safeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +safeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +safeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + + // Replace all greedy whitespace to prevent regex dos issues. These regex are + // used internally via the safeRe object since all inputs in this library get + // normalized first to trim and collapse all extra whitespace. The original + // regexes are exported for userland consumption and lower level usage. A + // future breaking change could export the safer regex only with a note that + // all input should have extra whitespace removed. + safeRe[i] = new RegExp(makeSafeRe(src[i])) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? safeRe[LOOSE] : safeRe[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + comp = comp.trim().split(/\s+/).join(' ') + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First reduce all whitespace as much as possible so we do not have to rely + // on potentially slow regexes like \s*. This is then stored and used for + // future error messages as well. + this.raw = range + .trim() + .split(/\s+/) + .join(' ') + + // First, split based on boolean or || + this.set = this.raw.split('||').map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + this.raw) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, safeRe[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(safeRe[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(safeRe[CARETTRIM], caretTrimReplace) + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(safeRe[STAR], '') +} + +// This function is passed to string.replace(safeRe[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(safeRe[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} diff --git a/node_modules/set-function-length/.eslintrc b/node_modules/set-function-length/.eslintrc new file mode 100644 index 0000000000000..7cff50717edb2 --- /dev/null +++ b/node_modules/set-function-length/.eslintrc @@ -0,0 +1,27 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic" + ], + }], + "no-extra-parens": "off", + }, + + "overrides": [ + { + "files": ["test/**/*.js"], + "rules": { + "id-length": "off", + "max-lines-per-function": "off", + "multiline-comment-style": "off", + "no-empty-function": "off", + }, + }, + ], +} diff --git a/node_modules/set-function-length/.github/FUNDING.yml b/node_modules/set-function-length/.github/FUNDING.yml new file mode 100644 index 0000000000000..92feb6f9bc406 --- /dev/null +++ b/node_modules/set-function-length/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/set-function-name +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/set-function-length/.nycrc b/node_modules/set-function-length/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/set-function-length/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/set-function-length/CHANGELOG.md b/node_modules/set-function-length/CHANGELOG.md new file mode 100644 index 0000000000000..9539676fe3338 --- /dev/null +++ b/node_modules/set-function-length/CHANGELOG.md @@ -0,0 +1,41 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.1](https://github.com/ljharb/set-function-length/compare/v1.1.0...v1.1.1) - 2023-10-19 + +### Fixed + +- [Fix] move `define-data-property` to runtime deps [`#2`](https://github.com/ljharb/set-function-length/issues/2) + +### Commits + +- [Dev Deps] update `object-inspect`; add missing `call-bind` [`5aecf79`](https://github.com/ljharb/set-function-length/commit/5aecf79e7d6400957a5d9bd9ac20d4528908ca18) + +## [v1.1.0](https://github.com/ljharb/set-function-length/compare/v1.0.1...v1.1.0) - 2023-10-13 + +### Commits + +- [New] add `env` entry point [`475c87a`](https://github.com/ljharb/set-function-length/commit/475c87aa2f59b700aaed589d980624ec596acdcb) +- [Tests] add coverage with `nyc` [`14f0bf8`](https://github.com/ljharb/set-function-length/commit/14f0bf8c145ae60bf14a026420a06bb7be132c36) +- [eslint] fix linting failure [`fb516f9`](https://github.com/ljharb/set-function-length/commit/fb516f93c664057138c53559ef63c8622a093335) +- [Deps] update `define-data-property` [`d727e7c`](https://github.com/ljharb/set-function-length/commit/d727e7c6c9a40d7bf26797694e500ea68741feea) + +## [v1.0.1](https://github.com/ljharb/set-function-length/compare/v1.0.0...v1.0.1) - 2023-10-12 + +### Commits + +- [Refactor] use `get-intrinsic`, since it‘s in the dep graph anyways [`278a954`](https://github.com/ljharb/set-function-length/commit/278a954a06cd849051c569ff7aee56df6798933e) +- [meta] add `exports` [`72acfe5`](https://github.com/ljharb/set-function-length/commit/72acfe5a0310071fb205a72caba5ecbab24336a0) + +## v1.0.0 - 2023-10-12 + +### Commits + +- Initial implementation, tests, readme [`fce14e1`](https://github.com/ljharb/set-function-length/commit/fce14e17586460e4f294405173be72b6ffdf7e5f) +- Initial commit [`ca7ba85`](https://github.com/ljharb/set-function-length/commit/ca7ba857c7c283f9d26e21f14e71cd388f2cb722) +- npm init [`6a7e493`](https://github.com/ljharb/set-function-length/commit/6a7e493927736cebcaf5c1a84e69b8e6b7b744d8) +- Only apps should have lockfiles [`d2bf6c4`](https://github.com/ljharb/set-function-length/commit/d2bf6c43de8a51b02a0aa53e8d62cb50c4a2b0da) diff --git a/node_modules/set-function-length/LICENSE b/node_modules/set-function-length/LICENSE new file mode 100644 index 0000000000000..0314929078de8 --- /dev/null +++ b/node_modules/set-function-length/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband 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/set-function-length/README.md b/node_modules/set-function-length/README.md new file mode 100644 index 0000000000000..15e3ac4b1ef6a --- /dev/null +++ b/node_modules/set-function-length/README.md @@ -0,0 +1,56 @@ +# set-function-length [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Set a function’s length. + +Arguments: + - `fn`: the function + - `length`: the new length. Must be an integer between 0 and 2**32. + - `loose`: Optional. If true, and the length fails to be set, do not throw. Default false. + +Returns `fn`. + +## Usage + +```javascript +var setFunctionLength = require('set-function-length'); +var assert = require('assert'); + +function zero() {} +function one(_) {} +function two(_, __) {} + +assert.equal(zero.length, 0); +assert.equal(one.length, 1); +assert.equal(two.length, 2); + +assert.equal(setFunctionLength(zero, 10), zero); +assert.equal(setFunctionLength(one, 11), one); +assert.equal(setFunctionLength(two, 12), two); + +assert.equal(zero.length, 10); +assert.equal(one.length, 11); +assert.equal(two.length, 12); +``` + +[package-url]: https://npmjs.org/package/set-function-length +[npm-version-svg]: https://versionbadg.es/ljharb/set-function-length.svg +[deps-svg]: https://david-dm.org/ljharb/set-function-length.svg +[deps-url]: https://david-dm.org/ljharb/set-function-length +[dev-deps-svg]: https://david-dm.org/ljharb/set-function-length/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/set-function-length#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/set-function-length.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/set-function-length.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/set-function-length.svg +[downloads-url]: https://npm-stat.com/charts.html?package=set-function-length +[codecov-image]: https://codecov.io/gh/ljharb/set-function-length/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/set-function-length/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-function-length +[actions-url]: https://github.com/ljharb/set-function-length/actions diff --git a/node_modules/set-function-length/env.js b/node_modules/set-function-length/env.js new file mode 100644 index 0000000000000..80c09116a9ac6 --- /dev/null +++ b/node_modules/set-function-length/env.js @@ -0,0 +1,19 @@ +'use strict'; + +var gOPD = require('gopd'); + +var functionsHaveConfigurableLengths = gOPD && gOPD(function () {}, 'length').configurable; + +var functionsHaveWritableLengths = gOPD && gOPD(function () {}, 'length').writable; + +var boundFnsHaveConfigurableLengths = gOPD && gOPD(function () {}.bind(), 'length').configurable; + +var boundFnsHaveWritableLengths = gOPD && gOPD(function () {}.bind(), 'length').writable; + +module.exports = { + __proto__: null, + boundFnsHaveConfigurableLengths: boundFnsHaveConfigurableLengths, + boundFnsHaveWritableLengths: boundFnsHaveWritableLengths, + functionsHaveConfigurableLengths: functionsHaveConfigurableLengths, + functionsHaveWritableLengths: functionsHaveWritableLengths +}; diff --git a/node_modules/set-function-length/index.js b/node_modules/set-function-length/index.js new file mode 100644 index 0000000000000..7a31688e9bb5b --- /dev/null +++ b/node_modules/set-function-length/index.js @@ -0,0 +1,41 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var gOPD = require('gopd'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $floor = GetIntrinsic('%Math.floor%'); + +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(fn, 'length', length, true, true); + } else { + define(fn, 'length', length); + } + } + return fn; +}; diff --git a/node_modules/set-function-length/package.json b/node_modules/set-function-length/package.json new file mode 100644 index 0000000000000..fdc2cb6101536 --- /dev/null +++ b/node_modules/set-function-length/package.json @@ -0,0 +1,84 @@ +{ + "name": "set-function-length", + "version": "1.1.1", + "description": "Set a function's length property", + "main": "index.js", + "exports": { + ".": "./index.js", + "./env": "./env.js", + "./package.json": "./package.json" + }, + "directories": { + "test": "test" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/set-function-length.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "set", + "function", + "length", + "function.length" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/set-function-length/issues" + }, + "homepage": "https://github.com/ljharb/set-function-length#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "call-bind": "^1.0.4", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1" + }, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } +} diff --git a/node_modules/set-function-name/.eslintrc b/node_modules/set-function-name/.eslintrc new file mode 100644 index 0000000000000..6fb12893fe8dc --- /dev/null +++ b/node_modules/set-function-name/.eslintrc @@ -0,0 +1,20 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + }, + + "overrides": [ + { + "files": ["test/**/*.js"], + "rules": { + "id-length": "off", + "multiline-comment-style": "off", + "no-empty-function": "off", + }, + }, + ], +} diff --git a/node_modules/set-function-name/.github/FUNDING.yml b/node_modules/set-function-name/.github/FUNDING.yml new file mode 100644 index 0000000000000..92feb6f9bc406 --- /dev/null +++ b/node_modules/set-function-name/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/set-function-name +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/set-function-name/CHANGELOG.md b/node_modules/set-function-name/CHANGELOG.md new file mode 100644 index 0000000000000..209a2df88ede0 --- /dev/null +++ b/node_modules/set-function-name/CHANGELOG.md @@ -0,0 +1,39 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.1](https://github.com/jfsiii/set-function-name/compare/v2.0.0...v2.0.1) - 2023-09-13 + +### Commits + +- [Fix] move `functions-have-names` to runtime deps [`db2eda8`](https://github.com/jfsiii/set-function-name/commit/db2eda8da4c8aecfad01739000bbd63d04a8e8cf) + +## [v2.0.0](https://github.com/jfsiii/set-function-name/compare/v1.0.0...v2.0.0) - 2023-09-12 + +### Commits + +- [eslint] add `npm run lint` [`23e1fcd`](https://github.com/jfsiii/set-function-name/commit/23e1fcd85b64b864cb8f7e894da78d540e72923a) +- [actions] add reused GHA [`525127e`](https://github.com/jfsiii/set-function-name/commit/525127e08bdb35b0d44f565492456c7d1d5923fc) +- [meta] add `.gitignore` [`aa3abdf`](https://github.com/jfsiii/set-function-name/commit/aa3abdfa6af18adf70281352905dd69ef8b2c66f) +- [Tests] switch tests to use tape; add posttest [`8ad6d30`](https://github.com/jfsiii/set-function-name/commit/8ad6d30c61f78d2f9beec156ba7f1c4c3741c593) +- [readme] add readme [`732c46c`](https://github.com/jfsiii/set-function-name/commit/732c46c05e0fa6843dbc85b3af1e9c9bf22e7bf9) +- [New] add optional `loose` argument [`f5e4771`](https://github.com/jfsiii/set-function-name/commit/f5e4771266c95567d87f6dc2cff94c986bc7e074) +- [meta] relicense package to MIT; fix repo URLs [`13948f8`](https://github.com/jfsiii/set-function-name/commit/13948f8bb4ec8a25b67332d8de232ad0c0dc4e6d) +- [meta] add `auto-changelog` [`7ab201c`](https://github.com/jfsiii/set-function-name/commit/7ab201c0d83d464664cc4588acad0d0f75926679) +- [Breaking] throw if a non-function is provided [`cf6fc8f`](https://github.com/jfsiii/set-function-name/commit/cf6fc8f3396d58aa8c32a83375cbf57d933d7e79) +- [Breaking] drop UMD, just use CJS [`47abfe8`](https://github.com/jfsiii/set-function-name/commit/47abfe89abfaa72f71e0a77a52a5ff2b7377e11a) +- [Refactor] use `define-data-property` and `has-property-descriptors` [`9921c2b`](https://github.com/jfsiii/set-function-name/commit/9921c2b64c571255084aefaa02660314609e8ea0) +- [meta] use `npmignore` to autogenerate an npmignore file [`c5dbe4f`](https://github.com/jfsiii/set-function-name/commit/c5dbe4f4c44298596338432e2ac9946a10c98edd) +- Only apps should have lockfiles [`98bbfa1`](https://github.com/jfsiii/set-function-name/commit/98bbfa145387f318152a6b792bd69aca3c544813) +- [meta] add `safe-publish-latest` [`8916cd8`](https://github.com/jfsiii/set-function-name/commit/8916cd8f5549dceee31f06d35a76e2f9d4933a8b) +- [meta] add `engines` [`2427c8e`](https://github.com/jfsiii/set-function-name/commit/2427c8e2499f378c9ff3d92c7d544c771ca810df) + +## v1.0.0 - 2017-09-14 + +### Commits + +- Initial commit. Including tests. [`f26a1f2`](https://github.com/jfsiii/set-function-name/commit/f26a1f2c69a70dad5049b1daa08eae5f6acd9a1e) +- add .npmignore to ignore test directory [`9cac96f`](https://github.com/jfsiii/set-function-name/commit/9cac96fd9e98f25883be6e727ac32356522a5d69) diff --git a/node_modules/set-function-name/LICENSE b/node_modules/set-function-name/LICENSE new file mode 100644 index 0000000000000..0314929078de8 --- /dev/null +++ b/node_modules/set-function-name/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband 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/set-function-name/README.md b/node_modules/set-function-name/README.md new file mode 100644 index 0000000000000..b1612dd353e1d --- /dev/null +++ b/node_modules/set-function-name/README.md @@ -0,0 +1,61 @@ +# set-function-name [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Set a function’s name. + +Arguments: + - `fn`: the function + - `name`: the new name + - `loose`: Optional. If true, and the name fails to be set, do not throw. Default false. + +Returns `fn`. + +## Usage + +```javascript +var setFunctionName = require('set-function-name'); +var assert = require('assert'); + +const obj = { + concise() {}, + arrow: () => {}, + named: function named() {}, + anon: function () {}, +}; +assert.equal(obj.concise.name, 'concise'); +assert.equal(obj.arrow.name, 'arrow'); +assert.equal(obj.named.name, 'named'); +assert.equal(obj.anon.name, 'anon'); + +assert.equal(setFunctionName(obj.concise, 'brief'), obj.concise); +assert.equal(setFunctionName(obj.arrow, 'pointy'), obj.arrow); +assert.equal(setFunctionName(obj.named, ''), obj.named); +assert.equal(setFunctionName(obj.anon, 'anonymous'), obj.anon); + +assert.equal(obj.concise.name, 'brief'); +assert.equal(obj.arrow.name, 'pointy'); +assert.equal(obj.named.name, ''); +assert.equal(obj.anon.name, 'anonymous'); +``` + +[package-url]: https://npmjs.org/package/set-function-name +[npm-version-svg]: https://versionbadg.es/ljharb/set-function-name.svg +[deps-svg]: https://david-dm.org/ljharb/set-function-name.svg +[deps-url]: https://david-dm.org/ljharb/set-function-name +[dev-deps-svg]: https://david-dm.org/ljharb/set-function-name/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/set-function-name#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/set-function-name.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/set-function-name.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/set-function-name.svg +[downloads-url]: https://npm-stat.com/charts.html?package=set-function-name +[codecov-image]: https://codecov.io/gh/ljharb/set-function-name/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/set-function-name/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-function-name +[actions-url]: https://github.com/ljharb/set-function-name/actions diff --git a/node_modules/set-function-name/index.js b/node_modules/set-function-name/index.js new file mode 100644 index 0000000000000..2b4e21911934a --- /dev/null +++ b/node_modules/set-function-name/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +var $TypeError = TypeError; + +module.exports = function setFunctionName(fn, name) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + var loose = arguments.length > 2 && !!arguments[2]; + if (!loose || functionsHaveConfigurableNames) { + if (hasDescriptors) { + define(fn, 'name', name, true, true); + } else { + define(fn, 'name', name); + } + } + return fn; +}; diff --git a/node_modules/set-function-name/package.json b/node_modules/set-function-name/package.json new file mode 100644 index 0000000000000..ff52fadc0a828 --- /dev/null +++ b/node_modules/set-function-name/package.json @@ -0,0 +1,80 @@ +{ + "name": "set-function-name", + "version": "2.0.1", + "description": "Set a function's name property", + "main": "index.js", + "directories": { + "test": "test" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=js,mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/set-function-name.git" + }, + "keywords": [ + "set", + "assign", + "function", + "name", + "function.name" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/set-function-name/issues" + }, + "homepage": "https://github.com/ljharb/set-function-name#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "function.prototype.name": "^1.1.6", + "in-publish": "^2.0.1", + "make-arrow-function": "^1.2.0", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } +} diff --git a/node_modules/set-value/LICENSE b/node_modules/set-value/LICENSE new file mode 100644 index 0000000000000..d734237bdedc6 --- /dev/null +++ b/node_modules/set-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/set-value/README.md b/node_modules/set-value/README.md new file mode 100644 index 0000000000000..e336d744e5383 --- /dev/null +++ b/node_modules/set-value/README.md @@ -0,0 +1,150 @@ +# set-value [![NPM version](https://img.shields.io/npm/v/set-value.svg?style=flat)](https://www.npmjs.com/package/set-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![NPM total downloads](https://img.shields.io/npm/dt/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/set-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/set-value) + +> Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save set-value +``` + +## Usage + +```js +var set = require('set-value'); +set(object, prop, value); +``` + +### Params + +* `object` **{object}**: The object to set `value` on +* `prop` **{string}**: The property to set. Dot-notation may be used. +* `value` **{any}**: The value to set on `object[prop]` + +## Examples + +Updates and returns the given object: + +```js +var obj = {}; +set(obj, 'a.b.c', 'd'); +console.log(obj); +//=> { a: { b: { c: 'd' } } } +``` + +### Escaping + +**Escaping with backslashes** + +Prevent set-value from splitting on a dot by prefixing it with backslashes: + +```js +console.log(set({}, 'a\\.b.c', 'd')); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, 'a\\.b\\.c', 'd')); +//=> { 'a.b.c': 'd' } +``` + +**Escaping with double-quotes or single-quotes** + +Wrap double or single quotes around the string, or part of the string, that should not be split by set-value: + +```js +console.log(set({}, '"a.b".c', 'd')); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, "'a.b'.c", "d")); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, '"this/is/a/.file.path"', 'd')); +//=> { 'this/is/a/file.path': 'd' } +``` + +### Bracket support + +set-value does not split inside brackets or braces: + +```js +console.log(set({}, '[a.b].c', 'd')); +//=> { '[a.b]': { c: 'd' } } + +console.log(set({}, "(a.b).c", "d")); +//=> { '(a.b)': { c: 'd' } } + +console.log(set({}, ".c", "d")); +//=> { '': { c: 'd' } } + +console.log(set({}, "{a..b}.c", "d")); +//=> { '{a..b}': { c: 'd' } } +``` + +## History + +### v2.0.0 + +* Adds support for escaping with double or single quotes. See [escaping](#escaping) for examples. +* Will no longer split inside brackets or braces. See [bracket support](#bracket-support) for examples. + +If there are any regressions please create a [bug report](../../issues/new). Thanks! + +## About + +### Related projects + +* [assign-value](https://www.npmjs.com/package/assign-value): Assign a value or extend a deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/assign-value) | [homepage](https://github.com/jonschlinkert/assign-value "Assign a value or extend a deeply nested property of an object using object path notation.") +* [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.") +* [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.") +* [merge-value](https://www.npmjs.com/package/merge-value): Similar to assign-value but deeply merges object values or nested values using object path/dot notation. | [homepage](https://github.com/jonschlinkert/merge-value "Similar to assign-value but deeply merges object values or nested values using object path/dot notation.") +* [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://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.") +* [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.") +* [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.") +* [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** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [vadimdemedes](https://github.com/vadimdemedes) | +| 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 June 21, 2017._ \ No newline at end of file diff --git a/node_modules/set-value/index.js b/node_modules/set-value/index.js new file mode 100644 index 0000000000000..0b32e8fab48cf --- /dev/null +++ b/node_modules/set-value/index.js @@ -0,0 +1,55 @@ +/*! + * set-value + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var split = require('split-string'); +var extend = require('extend-shallow'); +var isPlainObject = require('is-plain-object'); +var isObject = require('is-extendable'); + +module.exports = function(obj, prop, val) { + if (!isObject(obj)) { + return obj; + } + + if (Array.isArray(prop)) { + prop = [].concat.apply([], prop).join('.'); + } + + if (typeof prop !== 'string') { + return obj; + } + + var keys = split(prop, {sep: '.', brackets: true}).filter(isValidKey); + var len = keys.length; + var idx = -1; + var current = obj; + + while (++idx < len) { + var key = keys[idx]; + if (idx !== len - 1) { + if (!isObject(current[key])) { + current[key] = {}; + } + current = current[key]; + continue; + } + + if (isPlainObject(current[key]) && isPlainObject(val)) { + current[key] = extend({}, current[key], val); + } else { + current[key] = val; + } + } + + return obj; +}; + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +} diff --git a/node_modules/set-value/node_modules/extend-shallow/LICENSE b/node_modules/set-value/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/set-value/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/set-value/node_modules/extend-shallow/README.md b/node_modules/set-value/node_modules/extend-shallow/README.md new file mode 100644 index 0000000000000..cdc45d4ff7ad0 --- /dev/null +++ b/node_modules/set-value/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/set-value/node_modules/extend-shallow/index.js b/node_modules/set-value/node_modules/extend-shallow/index.js new file mode 100644 index 0000000000000..92a067fcc489b --- /dev/null +++ b/node_modules/set-value/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/set-value/node_modules/extend-shallow/package.json b/node_modules/set-value/node_modules/extend-shallow/package.json new file mode 100644 index 0000000000000..b42e01c7a79e9 --- /dev/null +++ b/node_modules/set-value/node_modules/extend-shallow/package.json @@ -0,0 +1,56 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "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" + }, + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ] +} \ No newline at end of file diff --git a/node_modules/set-value/package.json b/node_modules/set-value/package.json new file mode 100644 index 0000000000000..736db34c1e3de --- /dev/null +++ b/node_modules/set-value/package.json @@ -0,0 +1,79 @@ +{ + "name": "set-value", + "description": "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/set-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)", + "Vadim Demedes (https://vadimdemedes.com)" + ], + "repository": "jonschlinkert/set-value", + "bugs": { + "url": "https://github.com/jonschlinkert/set-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.2" + }, + "keywords": [ + "get", + "has", + "hasown", + "key", + "keys", + "nested", + "notation", + "object", + "prop", + "properties", + "property", + "props", + "set", + "value", + "values" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assign-value", + "get-value", + "has-value", + "merge-value", + "omit-value", + "set-value", + "union-value", + "unset-value" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/shell-quote/.eslintrc b/node_modules/shell-quote/.eslintrc new file mode 100644 index 0000000000000..9569d518cba61 --- /dev/null +++ b/node_modules/shell-quote/.eslintrc @@ -0,0 +1,30 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": 1, + "func-style": [2, "declaration"], + "max-depth": 0, + "max-lines-per-function": 0, + "max-statements": 0, + "multiline-comment-style": 0, + "no-negated-condition": 1, + "no-param-reassign": 1, + "no-lonely-if": 1, + "no-shadow": 1, + "no-template-curly-in-string": 0, + }, + + "overrides": [ + { + "files": "example/**", + "rules": { + "no-console": 0, + }, + }, + ], +} diff --git a/node_modules/shell-quote/.github/FUNDING.yml b/node_modules/shell-quote/.github/FUNDING.yml new file mode 100644 index 0000000000000..0b6b6b4d55a38 --- /dev/null +++ b/node_modules/shell-quote/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/shell-quote +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/shell-quote/.nycrc b/node_modules/shell-quote/.nycrc new file mode 100644 index 0000000000000..55c3d29367a42 --- /dev/null +++ b/node_modules/shell-quote/.nycrc @@ -0,0 +1,14 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "example", + "test" + ] +} diff --git a/node_modules/shell-quote/CHANGELOG.md b/node_modules/shell-quote/CHANGELOG.md new file mode 100644 index 0000000000000..324c1951bfa32 --- /dev/null +++ b/node_modules/shell-quote/CHANGELOG.md @@ -0,0 +1,279 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.8.1](https://github.com/ljharb/shell-quote/compare/v1.8.0...v1.8.1) - 2023-04-07 + +### Fixed + +- [Fix] `parse`: preserve whitespace in comments [`#6`](https://github.com/ljharb/shell-quote/issues/6) +- [Fix] properly support the `escape` option [`#5`](https://github.com/ljharb/shell-quote/issues/5) + +### Commits + +- [Refactor] `parse`: hoist `getVar` to module level [`b42ac73`](https://github.com/ljharb/shell-quote/commit/b42ac73e39e566cfc355a4addc4bd2df2652556c) +- [Refactor] hoist some vars to module level [`8f0c5c3`](https://github.com/ljharb/shell-quote/commit/8f0c5c3c9df3a10e32f1972636675af6fffef998) +- [Refactor] `parse`: use `slice` over `substr`, cache some values [`fcb2e1a`](https://github.com/ljharb/shell-quote/commit/fcb2e1acd5312a1a1a4e6c66ec688aab383023b5) +- [Refactor] `parse`: a bit of cleanup [`6780ec5`](https://github.com/ljharb/shell-quote/commit/6780ec5194e36e2a696bfbaaf85169682a333321) +- [Refactor] `parse`: tweak the regex to not match nothing [`227d474`](https://github.com/ljharb/shell-quote/commit/227d4742a006e81ec3fde1eee103731a6f7ea920) +- [Tests] increase coverage [`a66de94`](https://github.com/ljharb/shell-quote/commit/a66de943555e49fbb1b657cbe3c5b2c703ae507d) +- [Refactor] `parse`: avoid shadowing a function arg [`1d58679`](https://github.com/ljharb/shell-quote/commit/1d5867907ecbf553556fe6ad790b6d6658aedba3) + +## [v1.8.0](https://github.com/ljharb/shell-quote/compare/v1.7.4...v1.8.0) - 2023-01-30 + +### Commits + +- [New] extract `parse` and `quote` to their own deep imports [`553fdfc`](https://github.com/ljharb/shell-quote/commit/553fdfc32cc41b4c2f77e061b6957703958ca575) +- [Tests] add `nyc` coverage [`fd7ddcd`](https://github.com/ljharb/shell-quote/commit/fd7ddcdd84bfef064c6d9a06b055a95531b26897) +- [New] Add support for here strings (`<<<`) [`9802fb3`](https://github.com/ljharb/shell-quote/commit/9802fb37c7946e18c672b81122520dc296bde271) +- [New] `parse`: Add syntax support for duplicating input file descriptors [`216b198`](https://github.com/ljharb/shell-quote/commit/216b19894f76b14d164c4c5a68f05a51b06336c4) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`85f8e31`](https://github.com/ljharb/shell-quote/commit/85f8e31dd80e1dde63d58204b653e497a53857e6) +- [Tests] add `evalmd` [`c5549fc`](https://github.com/ljharb/shell-quote/commit/c5549fcd82d70046bdc2b1c34184ae9f9d0191f9) +- [actions] update checkout action [`62e9b49`](https://github.com/ljharb/shell-quote/commit/62e9b4958cfa2f9009b7069076612fe33528c1fb) + +## [v1.7.4](https://github.com/ljharb/shell-quote/compare/1.7.3...v1.7.4) - 2022-10-12 + +### Merged + +- Add node_modules to .gitignore [`#48`](https://github.com/ljharb/shell-quote/pull/48) + +### Commits + +- [eslint] fix indentation and whitespace [`aaa9d1f`](https://github.com/ljharb/shell-quote/commit/aaa9d1f65bf3445e6af1efaa4a8f8c13a21aa593) +- [eslint] additional cleanup [`397cb62`](https://github.com/ljharb/shell-quote/commit/397cb628f3d96e4e47763147c0d6074997a13880) +- [meta] add `auto-changelog` [`497fca5`](https://github.com/ljharb/shell-quote/commit/497fca509af3b7d6daaba459bad1f45ac0af3ff1) +- [actions] add reusable workflows [`4763c36`](https://github.com/ljharb/shell-quote/commit/4763c36274c5881a2d141ce9f2b17b7d1d95e8cd) +- [eslint] add eslint [`6ee1437`](https://github.com/ljharb/shell-quote/commit/6ee1437df1b10a79bdf2aaa04f2bacc9f420dc15) +- [readme] rename, add badges [`7eb5134`](https://github.com/ljharb/shell-quote/commit/7eb513483d931602452ec572ed456714148acd2b) +- [meta] update URLs [`67381b6`](https://github.com/ljharb/shell-quote/commit/67381b61fa95e57819333463f491428747893186) +- [meta] create FUNDING.yml; add `funding` in package.json [`8641572`](https://github.com/ljharb/shell-quote/commit/86415722d875578adf1f95f9e649ba42c805bc32) +- [meta] use `npmignore` to autogenerate an npmignore file [`2e2007a`](https://github.com/ljharb/shell-quote/commit/2e2007a393f90bf079fc556a921120b3508c4fc3) +- Only apps should have lockfiles [`f97411e`](https://github.com/ljharb/shell-quote/commit/f97411ef4d2f183200fc8a28beca9faf9b08a640) +- [Dev Deps] update `tape` [`051f608`](https://github.com/ljharb/shell-quote/commit/051f60857ad5035280208abdc348bf5ba42a6254) +- [meta] add `safe-publish-latest` [`18cadf9`](https://github.com/ljharb/shell-quote/commit/18cadf95357392fcd78ea8619956fd41eed62649) +- [Tests] add `aud` in `posttest` [`dc1cc12`](https://github.com/ljharb/shell-quote/commit/dc1cc12b956ccd93d58aaaad263bee7d50576d27) + + + +## 1.7.3 +* Fix a security issue where the regex for windows drive letters allowed some shell meta-characters +to escape the quoting rules. (CVE-2021-42740) + +## 1.7.2 +* Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. ([144e1c2](https://github.com/ljharb/shell-quote/commit/144e1c20cd57549a414c827fb3032e60b7b8721c)) + +## 1.7.1 +* Fix `$` being removed when not part of an environment variable name. ([@Adman](https://github.com/Admin) in [#32](https://github.com/ljharb/shell-quote/pull/32)) + +## 1.7.0 +* Add support for parsing `>>` and `>&` redirection operators. ([@forivall](https://github.com/forivall) in [#16](https://github.com/ljharb/shell-quote/pull/16)) +* Add support for parsing `<(` process substitution operator. ([@cuonglm](https://github.com/cuonglm) in [#15](https://github.com/ljharb/shell-quote/pull/15)) + +## 1.6.3 +* Fix Windows path quoting problems. ([@dy](https://github.com/dy) in [#34](https://github.com/ljharb/shell-quote/pull/34)) + +## [v1.6.2](https://github.com/ljharb/shell-quote/compare/1.6.1...v1.6.2) - 2019-08-13 + +### Merged + +- Use native JSON and Array methods [`#21`](https://github.com/ljharb/shell-quote/pull/21) + +### Commits + +- fix whitespace [`72fb5a8`](https://github.com/ljharb/shell-quote/commit/72fb5a8ce29b4f67f28302af33c217b58f92e260) +- Disable package-lock.json [`d450577`](https://github.com/ljharb/shell-quote/commit/d4505770b2a4251af2da8e177385c5e0456a83b6) + +## [1.6.1](https://github.com/ljharb/shell-quote/compare/1.6.0...1.6.1) - 2016-06-17 + +### Commits + +- Fix some more escaping for .quote() [`ace52f4`](https://github.com/ljharb/shell-quote/commit/ace52f4c8717b370b301a3db3a4727db26e309ad) +- Fix escaping for greater than and less than [`70e9eb2`](https://github.com/ljharb/shell-quote/commit/70e9eb2a854eb56a3dfa255be12610a722bbe080) + +## [1.6.0](https://github.com/ljharb/shell-quote/compare/1.5.0...1.6.0) - 2016-04-23 + +### Commits + +- add comment parsing feature [`b8b5c31`](https://github.com/ljharb/shell-quote/commit/b8b5c31c16a15aa4ab26c8f23d362a24b9fa57c4) + +## [1.5.0](https://github.com/ljharb/shell-quote/compare/1.4.3...1.5.0) - 2016-03-16 + +### Commits + +- add escape option to .parse [`4d400e7`](https://github.com/ljharb/shell-quote/commit/4d400e773be448c320b6dc9b2eb1323d7a3461ca) + +## [1.4.3](https://github.com/ljharb/shell-quote/compare/1.4.2...1.4.3) - 2015-03-07 + +### Commits + +- Fix quote() with special chars [`811b5a0`](https://github.com/ljharb/shell-quote/commit/811b5a0aff79f347db245edcf88750977c111844) + +## [1.4.2](https://github.com/ljharb/shell-quote/compare/1.4.1...1.4.2) - 2014-07-20 + +### Commits + +- Handle non-strings when quoting [`d435827`](https://github.com/ljharb/shell-quote/commit/d43582741c5599807249c28722487aa86bb16f06) +- falseys ok [`22dbd94`](https://github.com/ljharb/shell-quote/commit/22dbd9492c372038d439d6ec08c6288ca5fa3c10) +- all the falseys test [`c99dca5`](https://github.com/ljharb/shell-quote/commit/c99dca59dca64743877a0411d299ce669f0a2d1d) + +## [1.4.1](https://github.com/ljharb/shell-quote/compare/1.4.0...1.4.1) - 2013-12-24 + +### Commits + +- es5 shims [`00dc6ab`](https://github.com/ljharb/shell-quote/commit/00dc6abfdd2f3ff2908616dbe7b6584bbf1b0e24) +- separate shim file to get the coverage up [`e29a216`](https://github.com/ljharb/shell-quote/commit/e29a2167319913af3f26603bc33938bb9be1d74d) +- use array-{filter,map,reduce} [`97a2fc9`](https://github.com/ljharb/shell-quote/commit/97a2fc9c92917343a33662b3705860e4f2044730) +- add testling badge [`44c98b1`](https://github.com/ljharb/shell-quote/commit/44c98b1e341d348ce9b5b4d78bb4d26345e868ea) +- upgrade tape [`3fc22d3`](https://github.com/ljharb/shell-quote/commit/3fc22d3d38592e6fc3b3308cc73a282d641bad34) + +## [1.4.0](https://github.com/ljharb/shell-quote/compare/1.3.3...1.4.0) - 2013-10-17 + +### Merged + +- Add MIT LICENSE file [`#6`](https://github.com/ljharb/shell-quote/pull/6) + +### Commits + +- Rewrite parser as a character based scanner [`c7ca9a2`](https://github.com/ljharb/shell-quote/commit/c7ca9a200350c02fb86c4222b63f15b54a0a0226) +- Add tests for glob patterns [`3418892`](https://github.com/ljharb/shell-quote/commit/3418892031b126197302eb57cc92a729b740fac6) +- Update algo description [`e1442cf`](https://github.com/ljharb/shell-quote/commit/e1442cfe0521497b59a8204eb1e4d6c4202d42b9) +- Fix test case for backslash in double quotes [`89bc550`](https://github.com/ljharb/shell-quote/commit/89bc5500711643e87fe93dd1bde0e8745c34d733) +- Add failing tests for crazy quoting tricks [`58a5e48`](https://github.com/ljharb/shell-quote/commit/58a5e4800a62fdc3e980feae1e6c6b15c812f0cb) + +## [1.3.3](https://github.com/ljharb/shell-quote/compare/1.3.2...1.3.3) - 2013-06-24 + +### Commits + +- failing set test with an env cb [`9fb2096`](https://github.com/ljharb/shell-quote/commit/9fb20968b407c590745a982d2a562960e952142d) +- remove the broken special case [`f9a0ee5`](https://github.com/ljharb/shell-quote/commit/f9a0ee574f9d5e5d5b382f55da960c23eb7d44c5) + +## [1.3.2](https://github.com/ljharb/shell-quote/compare/1.3.1...1.3.2) - 2013-06-24 + +### Commits + +- tests for setting env vars [`f44b039`](https://github.com/ljharb/shell-quote/commit/f44b03906c60598470676edcabea79c4f7488407) +- fixed the parse test, broke the op tests [`74d6686`](https://github.com/ljharb/shell-quote/commit/74d66863615a60fcb222d2279991cff3a89ff015) +- factored out single and double quote regex [`de9e0a5`](https://github.com/ljharb/shell-quote/commit/de9e0a5081156e5483b5df24878c7414f90ec67e) +- updated set env test, already passes [`7d5636b`](https://github.com/ljharb/shell-quote/commit/7d5636bec5e76ff542712e07643b09c597d20b21) +- ops fixed [`2b4e1b1`](https://github.com/ljharb/shell-quote/commit/2b4e1b1fb63519456c7850d365e1ffe5fa5972b2) +- passing all tests [`44177e3`](https://github.com/ljharb/shell-quote/commit/44177e3dcbd96dfa331483eba0abbfb0291c130f) +- backreferences in negated capture groups don't actually work [`e189d9d`](https://github.com/ljharb/shell-quote/commit/e189d9d5910c6ecc7d564309ca9e110062f9589e) +- another crazy ridiculous passing parse test [`d1beb6b`](https://github.com/ljharb/shell-quote/commit/d1beb6b32ec7ad8752b305834a21c800cae74a95) +- failing test for quoted whitespace and nested quotes [`9a4c11c`](https://github.com/ljharb/shell-quote/commit/9a4c11cba0f61762aaa7887591d78fe7e965cf65) +- failing test for quotes embedded inside barewords [`d997384`](https://github.com/ljharb/shell-quote/commit/d997384018ce107ab8e12aa5b8d8359c2f77128b) + +## [1.3.1](https://github.com/ljharb/shell-quote/compare/1.3.0...1.3.1) - 2013-05-13 + +### Commits + +- pass objects through [`f9c0514`](https://github.com/ljharb/shell-quote/commit/f9c0514abbdf8ba16fafb68736863d14b39015ef) + +## [1.3.0](https://github.com/ljharb/shell-quote/compare/1.2.0...1.3.0) - 2013-05-13 + +### Commits + +- hacky tokenizer is much simpler [`7e91b18`](https://github.com/ljharb/shell-quote/commit/7e91b18d1cf3fffd6a9c5f69d785f200c0c81b66) +- nearly passing with a clunky state env parser, array issues [`d6d6416`](https://github.com/ljharb/shell-quote/commit/d6d64160f2fc8a23018410ffe84ab7f1b0c4fa02) +- test for functional env expansion [`666395f`](https://github.com/ljharb/shell-quote/commit/666395f9f195241c6077f242dc4f2851bed95f8d) +- upgrade travis versions, tape [`f6f8bd6`](https://github.com/ljharb/shell-quote/commit/f6f8bd6026375d44d40c7f2e1fead43d006be211) +- 1.3.0, document env() lookups [`041c5da`](https://github.com/ljharb/shell-quote/commit/041c5da88800b4e15f0ed023049050b11b623a23) +- first half of functional env() works [`7a0cf79`](https://github.com/ljharb/shell-quote/commit/7a0cf79987fbdcc00d8f36c6dc164d22db963d23) +- env() objects even work inside quote strings [`16139f5`](https://github.com/ljharb/shell-quote/commit/16139f52bf7a2beb7e1ca9b61b93a9ea598b0f1a) +- another check just to make sure env() works [`914a1a9`](https://github.com/ljharb/shell-quote/commit/914a1a9ec55cd76bedfed4086c35866733128036) + +## [1.2.0](https://github.com/ljharb/shell-quote/compare/1.1.0...1.2.0) - 2013-05-13 + +### Commits + +- failing test for special shell parameter env vars [`728862a`](https://github.com/ljharb/shell-quote/commit/728862a6ff246754083da5cf22322caf914ae990) +- add the special vars to the replace regex but the chunker breaks on them [`d1ff82a`](https://github.com/ljharb/shell-quote/commit/d1ff82a07c44cb53ab909b61833296f38257eabd) +- fixed the env test, everything is fine [`a45897f`](https://github.com/ljharb/shell-quote/commit/a45897f53ba184a77bc762c63777b95590a83962) + +## [1.1.0](https://github.com/ljharb/shell-quote/compare/1.0.0...1.1.0) - 2013-05-13 + +### Commits + +- quote all ops objects [`ac7be63`](https://github.com/ljharb/shell-quote/commit/ac7be63574e1da48bc6f495aee363d31863222c3) +- test for parsed ops objects in quote() [`59fb71b`](https://github.com/ljharb/shell-quote/commit/59fb71b39c53b83306d015bec62fc93667745f75) +- another test for op object quoting [`5819a31`](https://github.com/ljharb/shell-quote/commit/5819a31a19c34967dcb7bd1719250ed2aa480583) + +## [1.0.0](https://github.com/ljharb/shell-quote/compare/0.1.1...1.0.0) - 2013-05-13 + +### Commits + +- document ops, op example [`a6381e6`](https://github.com/ljharb/shell-quote/commit/a6381e612361148a8433c6ec4891aabc4649cb40) +- some more passing double-char op tests [`fbc6e5c`](https://github.com/ljharb/shell-quote/commit/fbc6e5c40858ef4ea4d69651ac8fdf6c0c780eed) +- failing test for | and & ops [`d817736`](https://github.com/ljharb/shell-quote/commit/d81773643cbc2e25576884d606165dc87e8bbfac) +- labeled regex states [`8c008b2`](https://github.com/ljharb/shell-quote/commit/8c008b223e6174d6bec098251527053e5cc1f30c) +- refactored the chunker regex into a string [`0331c7f`](https://github.com/ljharb/shell-quote/commit/0331c7f63077fda116b3c73540b71880538a4391) +- simple failing double-char op test [`e51fa90`](https://github.com/ljharb/shell-quote/commit/e51fa90f854063a408e8c1645b385c1ed42c72c6) +- failing expanded single-op tests for ; and () [`710bb24`](https://github.com/ljharb/shell-quote/commit/710bb243f23d4a55158688b71cb56b67f66ea99f) +- now passing all the single-char op tests [`e3e9ac1`](https://github.com/ljharb/shell-quote/commit/e3e9ac17ef02300bad7f4faefee5c7a993b3bc97) +- using the control ops directly from the docs [`f535987`](https://github.com/ljharb/shell-quote/commit/f53598732ba606c7bca66fd7d55d809544c452cf) +- first part of op parsing works [`e6f9199`](https://github.com/ljharb/shell-quote/commit/e6f91991fe437eae6b7e4f571843b3d48c746aeb) +- failing redirect tests [`cb94c10`](https://github.com/ljharb/shell-quote/commit/cb94c105a4e32fac2d356b956f53aff999ae88e8) +- another double-char op test just to be sure [`5cf1bf2`](https://github.com/ljharb/shell-quote/commit/5cf1bf29e3324a6cc1e40c01c4529b28ca0b47a5) +- 1.0.0 for ops [`17a40ed`](https://github.com/ljharb/shell-quote/commit/17a40edb3cd7a0f1c44be2be5ddd412c8ca2b7ca) +- adding redirect <> ops to CONTROL makes the tests pass [`48b1eb9`](https://github.com/ljharb/shell-quote/commit/48b1eb97cfa306659de66bd29615051a3644b9ce) +- double-char op test now passing [`3998b0f`](https://github.com/ljharb/shell-quote/commit/3998b0f9ecb32883f8eb3be31110a84d276ac764) +- using the meta chars directly from the docs [`b009ef6`](https://github.com/ljharb/shell-quote/commit/b009ef6d04eb1cc57d66cf3670d24e03fa0fc6bd) +- the spec says tabs are also allowed [`2adb373`](https://github.com/ljharb/shell-quote/commit/2adb37366bdfae198ce61e4658e513d3e0bc98fa) +- op test completely passing [`20a0147`](https://github.com/ljharb/shell-quote/commit/20a01475741d9fba801bbd2b0c1a5f215dc9cec4) + +## [0.1.1](https://github.com/ljharb/shell-quote/compare/0.1.0...0.1.1) - 2013-04-17 + +### Commits + +- Return empty list when parsing an empty (or whitespace-only) string [`1475717`](https://github.com/ljharb/shell-quote/commit/14757177ead209f5ae3c9d4a3020fba9f522725f) + +## [0.1.0](https://github.com/ljharb/shell-quote/compare/0.0.1...0.1.0) - 2013-04-14 + +### Commits + +- externalize the regex declaration [`37d6058`](https://github.com/ljharb/shell-quote/commit/37d60580a4a4656ff836c4a2ecdd7282705ffd27) +- modernize the readme [`24106f5`](https://github.com/ljharb/shell-quote/commit/24106f5c81ab83bddb2bf735cad60e99e1494dcf) +- factor out interpolation [`1b21b01`](https://github.com/ljharb/shell-quote/commit/1b21b018e01392d2c74e53136f8fa0ca838d7643) +- half the env tests are working with basic interpolation [`5891471`](https://github.com/ljharb/shell-quote/commit/589147176be93834bad7fcee83bd255e35c14adc) +- env parse example [`5757c42`](https://github.com/ljharb/shell-quote/commit/5757c4256a4cbaeaabd3d8cd91c7e19109329067) +- failing tests for unimplemented env interpolation [`590534a`](https://github.com/ljharb/shell-quote/commit/590534ae8eced91974a4be8f2b6bc7dcb53e3211) +- denormalize the interpolate logic to make room for special cases [`c669d2e`](https://github.com/ljharb/shell-quote/commit/c669d2e8b84e0eb0dde1798eae7c37a21dc5b7a1) +- cleaner implementation recursing on the double quote case [`adae66f`](https://github.com/ljharb/shell-quote/commit/adae66f47cf11bb7a686c98059436f496d881955) +- one test was wrong, checking for pre escapes [`42b5f83`](https://github.com/ljharb/shell-quote/commit/42b5f8355196d5f2a2c40178576a5d37167e8cb2) +- finally passing all the tests [`efa4084`](https://github.com/ljharb/shell-quote/commit/efa408481db33993fce2a1dd3c15ffac0203fe4c) +- one more test passing with quote recursion [`e9537b9`](https://github.com/ljharb/shell-quote/commit/e9537b943d89535b38c0777c210b5aa9780349b2) +- use tape everywhere [`ed0c1c6`](https://github.com/ljharb/shell-quote/commit/ed0c1c6ae383998874002ae9aa452505c266d630) +- some extra metacharacter tests just to be sure [`a6782ae`](https://github.com/ljharb/shell-quote/commit/a6782aeb931221a459f9cebc371c2311ad680992) +- minor fix to an env test [`601b340`](https://github.com/ljharb/shell-quote/commit/601b3406e7012da97771b0ed538288ddb12d9af8) +- document parse env [`cc0efba`](https://github.com/ljharb/shell-quote/commit/cc0efba0bce75aaab1ead72e81470154a71ec525) +- better parse recursion to capture the containing quotes [`8467961`](https://github.com/ljharb/shell-quote/commit/84679611fd5843777d3d94f157a7b6efe11097ca) +- now just 2 tests failing with a subtle regex reordering [`5448a02`](https://github.com/ljharb/shell-quote/commit/5448a02d356722ec8ef57db2e075e10566e2dcdb) +- pass another test by using "" as the undefined [`46e6cf4`](https://github.com/ljharb/shell-quote/commit/46e6cf4b974e1cec0601e81a0dc2820dc849f775) +- fixed a failing env test [`17d1fda`](https://github.com/ljharb/shell-quote/commit/17d1fdac759e7a94ffc6edc26af27769d30e53bb) +- actually the test was wrong, module works fine [`9d7b727`](https://github.com/ljharb/shell-quote/commit/9d7b727f2911692cffe03e7792b5defad3dd75d2) +- another test to be even more sure [`5afd47b`](https://github.com/ljharb/shell-quote/commit/5afd47ba563d4c1bb7966695e100f63da4b65915) +- failing test for: echo "foo = \"foo\"" [`8dbb280`](https://github.com/ljharb/shell-quote/commit/8dbb2803136a2f7643e7e66b2d6b95f9adfbfd41) + +## [0.0.1](https://github.com/ljharb/shell-quote/compare/0.0.0...0.0.1) - 2012-05-18 + +### Commits + +- fixed unescaped metachars and bump [`5ce339f`](https://github.com/ljharb/shell-quote/commit/5ce339feeaf971a5172fe58faa3ac5f90bdfe8b5) +- failing test for unescaped metachars [`a315125`](https://github.com/ljharb/shell-quote/commit/a315125a0742b01799c89469efd20821540694f6) +- fix for escaped spaces [`669b616`](https://github.com/ljharb/shell-quote/commit/669b61610aad3e6f47e8c043e1635dcc4b5ce375) +- failing test for escaped space [`c6ff3dc`](https://github.com/ljharb/shell-quote/commit/c6ff3dc6811816a667e55a69ec09bffa52f5ee0a) + +## 0.0.0 - 2012-05-18 + +### Commits + +- readme with examples [`6373c0f`](https://github.com/ljharb/shell-quote/commit/6373c0f56de87702a61063ffae354e2bb989de91) +- package.json [`bc27efa`](https://github.com/ljharb/shell-quote/commit/bc27efa033709ede8483bb6ec0f182dcb2b87061) +- passing the parse test [`69c0f85`](https://github.com/ljharb/shell-quote/commit/69c0f8529825d3fdc700e81d32b75378cef47994) +- crazy initial thing [`d6469c9`](https://github.com/ljharb/shell-quote/commit/d6469c95adf0172adc65c4adab04910486368ee7) +- passing quote tests [`e1d6695`](https://github.com/ljharb/shell-quote/commit/e1d669503f0f159068deb45f14ba3a4bf77e90f0) +- failing parse test [`980aa58`](https://github.com/ljharb/shell-quote/commit/980aa585937d049b152b5e7b08c1e068faaaf378) +- using travis [`1c72261`](https://github.com/ljharb/shell-quote/commit/1c72261f45002744fac3fecec3f0395924d66717) +- expand more escape sequences in parse() [`8b2224c`](https://github.com/ljharb/shell-quote/commit/8b2224c465ef70d2320985c57dc0b8ee1c0a3664) diff --git a/node_modules/shell-quote/LICENSE b/node_modules/shell-quote/LICENSE new file mode 100644 index 0000000000000..3d59c73309d33 --- /dev/null +++ b/node_modules/shell-quote/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 James Halliday (mail@substack.net) + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/shell-quote/README.md b/node_modules/shell-quote/README.md new file mode 100644 index 0000000000000..6b545c53523fb --- /dev/null +++ b/node_modules/shell-quote/README.md @@ -0,0 +1,161 @@ +# shell-quote [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Parse and quote shell commands. + +# example + +## quote + +``` js +var quote = require('shell-quote/quote'); +var s = quote([ 'a', 'b c d', '$f', '"g"' ]); +console.log(s); +``` + +output + +``` +a 'b c d' \$f '"g"' +``` + +## parse + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('a "b c" \\$def \'it\\\'s great\''); +console.dir(xs); +``` + +output + +``` +[ 'a', 'b c', '\\$def', 'it\'s great' ] +``` + +## parse with an environment variable + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('beep --boop="$PWD"', { PWD: '/home/robot' }); +console.dir(xs); +``` + +output + +``` +[ 'beep', '--boop=/home/robot' ] +``` + +## parse with custom escape character + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('beep ^--boop="$PWD"', { PWD: '/home/robot' }, { escape: '^' }); +console.dir(xs); +``` + +output + +``` +[ 'beep --boop=/home/robot' ] +``` + +## parsing shell operators + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('beep || boop > /byte'); +console.dir(xs); +``` + +output: + +``` +[ 'beep', { op: '||' }, 'boop', { op: '>' }, '/byte' ] +``` + +## parsing shell comment + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('beep > boop # > kaboom'); +console.dir(xs); +``` + +output: + +``` +[ 'beep', { op: '>' }, 'boop', { comment: '> kaboom' } ] +``` + +# methods + +``` js +var quote = require('shell-quote/quote'); +var parse = require('shell-quote/parse'); +``` + +## quote(args) + +Return a quoted string for the array `args` suitable for using in shell +commands. + +## parse(cmd, env={}) + +Return an array of arguments from the quoted string `cmd`. + +Interpolate embedded bash-style `$VARNAME` and `${VARNAME}` variables with +the `env` object which like bash will replace undefined variables with `""`. + +`env` is usually an object but it can also be a function to perform lookups. +When `env(key)` returns a string, its result will be output just like `env[key]` +would. When `env(key)` returns an object, it will be inserted into the result +array like the operator objects. + +When a bash operator is encountered, the element in the array with be an object +with an `"op"` key set to the operator string. For example: + +``` +'beep || boop > /byte' +``` + +parses as: + +``` +[ 'beep', { op: '||' }, 'boop', { op: '>' }, '/byte' ] +``` + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install shell-quote +``` + +# license + +MIT + +[package-url]: https://npmjs.org/package/shell-quote +[npm-version-svg]: https://versionbadg.es/ljharb/shell-quote.svg +[deps-svg]: https://david-dm.org/ljharb/shell-quote.svg +[deps-url]: https://david-dm.org/ljharb/shell-quote +[dev-deps-svg]: https://david-dm.org/ljharb/shell-quote/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/shell-quote#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/shell-quote.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/shell-quote.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/shell-quote.svg +[downloads-url]: https://npm-stat.com/charts.html?package=shell-quote +[codecov-image]: https://codecov.io/gh/ljharb/shell-quote/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/shell-quote/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/shell-quote +[actions-url]: https://github.com/ljharb/shell-quote/actions diff --git a/node_modules/shell-quote/example/env.js b/node_modules/shell-quote/example/env.js new file mode 100644 index 0000000000000..1493afc25a690 --- /dev/null +++ b/node_modules/shell-quote/example/env.js @@ -0,0 +1,5 @@ +'use strict'; + +var parse = require('../').parse; +var xs = parse('beep --boop="$PWD"', { PWD: '/home/robot' }); +console.dir(xs); diff --git a/node_modules/shell-quote/example/op.js b/node_modules/shell-quote/example/op.js new file mode 100644 index 0000000000000..82ebf656484a4 --- /dev/null +++ b/node_modules/shell-quote/example/op.js @@ -0,0 +1,5 @@ +'use strict'; + +var parse = require('../').parse; +var xs = parse('beep || boop > /byte'); +console.dir(xs); diff --git a/node_modules/shell-quote/example/parse.js b/node_modules/shell-quote/example/parse.js new file mode 100644 index 0000000000000..36e675868e11b --- /dev/null +++ b/node_modules/shell-quote/example/parse.js @@ -0,0 +1,5 @@ +'use strict'; + +var parse = require('../').parse; +var xs = parse('a "b c" \\$def \'it\\\'s great\''); +console.dir(xs); diff --git a/node_modules/shell-quote/example/quote.js b/node_modules/shell-quote/example/quote.js new file mode 100644 index 0000000000000..91c3d20d4650e --- /dev/null +++ b/node_modules/shell-quote/example/quote.js @@ -0,0 +1,5 @@ +'use strict'; + +var quote = require('../').quote; +var s = quote(['a', 'b c d', '$f', '"g"']); +console.log(s); diff --git a/node_modules/shell-quote/index.js b/node_modules/shell-quote/index.js new file mode 100644 index 0000000000000..28fb42d258b77 --- /dev/null +++ b/node_modules/shell-quote/index.js @@ -0,0 +1,4 @@ +'use strict'; + +exports.quote = require('./quote'); +exports.parse = require('./parse'); diff --git a/node_modules/shell-quote/package.json b/node_modules/shell-quote/package.json new file mode 100644 index 0000000000000..641127ea5bbf7 --- /dev/null +++ b/node_modules/shell-quote/package.json @@ -0,0 +1,66 @@ +{ + "name": "shell-quote", + "description": "quote and parse shell commands", + "version": "1.8.1", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "bugs": "https://github.com/ljharb/shell-quote/issues", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.1", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "homepage": "https://github.com/ljharb/shell-quote", + "keywords": [ + "command", + "parse", + "quote", + "shell" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "http://github.com/ljharb/shell-quote.git" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "1.7.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/shell-quote/parse.js b/node_modules/shell-quote/parse.js new file mode 100644 index 0000000000000..71d2eea42fef3 --- /dev/null +++ b/node_modules/shell-quote/parse.js @@ -0,0 +1,226 @@ +'use strict'; + +// '<(' is process substitution operator and +// can be parsed the same as control operator +var CONTROL = '(?:' + [ + '\\|\\|', + '\\&\\&', + ';;', + '\\|\\&', + '\\<\\(', + '\\<\\<\\<', + '>>', + '>\\&', + '<\\&', + '[&;()|<>]' +].join('|') + ')'; +var controlRE = new RegExp('^' + CONTROL + '$'); +var META = '|&;()<> \\t'; +var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"'; +var DOUBLE_QUOTE = '\'((\\\\\'|[^\'])*?)\''; +var hash = /^#$/; + +var SQ = "'"; +var DQ = '"'; +var DS = '$'; + +var TOKEN = ''; +var mult = 0x100000000; // Math.pow(16, 8); +for (var i = 0; i < 4; i++) { + TOKEN += (mult * Math.random()).toString(16); +} +var startsWithToken = new RegExp('^' + TOKEN); + +function matchAll(s, r) { + var origIndex = r.lastIndex; + + var matches = []; + var matchObj; + + while ((matchObj = r.exec(s))) { + matches.push(matchObj); + if (r.lastIndex === matchObj.index) { + r.lastIndex += 1; + } + } + + r.lastIndex = origIndex; + + return matches; +} + +function getVar(env, pre, key) { + var r = typeof env === 'function' ? env(key) : env[key]; + if (typeof r === 'undefined' && key != '') { + r = ''; + } else if (typeof r === 'undefined') { + r = '$'; + } + + if (typeof r === 'object') { + return pre + TOKEN + JSON.stringify(r) + TOKEN; + } + return pre + r; +} + +function parseInternal(string, env, opts) { + if (!opts) { + opts = {}; + } + var BS = opts.escape || '\\'; + var BAREWORD = '(\\' + BS + '[\'"' + META + ']|[^\\s\'"' + META + '])+'; + + var chunker = new RegExp([ + '(' + CONTROL + ')', // control chars + '(' + BAREWORD + '|' + SINGLE_QUOTE + '|' + DOUBLE_QUOTE + ')+' + ].join('|'), 'g'); + + var matches = matchAll(string, chunker); + + if (matches.length === 0) { + return []; + } + if (!env) { + env = {}; + } + + var commented = false; + + return matches.map(function (match) { + var s = match[0]; + if (!s || commented) { + return void undefined; + } + if (controlRE.test(s)) { + return { op: s }; + } + + // Hand-written scanner/parser for Bash quoting rules: + // + // 1. inside single quotes, all characters are printed literally. + // 2. inside double quotes, all characters are printed literally + // except variables prefixed by '$' and backslashes followed by + // either a double quote or another backslash. + // 3. outside of any quotes, backslashes are treated as escape + // characters and not printed (unless they are themselves escaped) + // 4. quote context can switch mid-token if there is no whitespace + // between the two quote contexts (e.g. all'one'"token" parses as + // "allonetoken") + var quote = false; + var esc = false; + var out = ''; + var isGlob = false; + var i; + + function parseEnvVar() { + i += 1; + var varend; + var varname; + var char = s.charAt(i); + + if (char === '{') { + i += 1; + if (s.charAt(i) === '}') { + throw new Error('Bad substitution: ' + s.slice(i - 2, i + 1)); + } + varend = s.indexOf('}', i); + if (varend < 0) { + throw new Error('Bad substitution: ' + s.slice(i)); + } + varname = s.slice(i, varend); + i = varend; + } else if ((/[*@#?$!_-]/).test(char)) { + varname = char; + i += 1; + } else { + var slicedFromI = s.slice(i); + varend = slicedFromI.match(/[^\w\d_]/); + if (!varend) { + varname = slicedFromI; + i = s.length; + } else { + varname = slicedFromI.slice(0, varend.index); + i += varend.index - 1; + } + } + return getVar(env, '', varname); + } + + for (i = 0; i < s.length; i++) { + var c = s.charAt(i); + isGlob = isGlob || (!quote && (c === '*' || c === '?')); + if (esc) { + out += c; + esc = false; + } else if (quote) { + if (c === quote) { + quote = false; + } else if (quote == SQ) { + out += c; + } else { // Double quote + if (c === BS) { + i += 1; + c = s.charAt(i); + if (c === DQ || c === BS || c === DS) { + out += c; + } else { + out += BS + c; + } + } else if (c === DS) { + out += parseEnvVar(); + } else { + out += c; + } + } + } else if (c === DQ || c === SQ) { + quote = c; + } else if (controlRE.test(c)) { + return { op: s }; + } else if (hash.test(c)) { + commented = true; + var commentObj = { comment: string.slice(match.index + i + 1) }; + if (out.length) { + return [out, commentObj]; + } + return [commentObj]; + } else if (c === BS) { + esc = true; + } else if (c === DS) { + out += parseEnvVar(); + } else { + out += c; + } + } + + if (isGlob) { + return { op: 'glob', pattern: out }; + } + + return out; + }).reduce(function (prev, arg) { // finalize parsed arguments + // TODO: replace this whole reduce with a concat + return typeof arg === 'undefined' ? prev : prev.concat(arg); + }, []); +} + +module.exports = function parse(s, env, opts) { + var mapped = parseInternal(s, env, opts); + if (typeof env !== 'function') { + return mapped; + } + return mapped.reduce(function (acc, s) { + if (typeof s === 'object') { + return acc.concat(s); + } + var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g')); + if (xs.length === 1) { + return acc.concat(xs[0]); + } + return acc.concat(xs.filter(Boolean).map(function (x) { + if (startsWithToken.test(x)) { + return JSON.parse(x.split(TOKEN)[1]); + } + return x; + })); + }, []); +}; diff --git a/node_modules/shell-quote/quote.js b/node_modules/shell-quote/quote.js new file mode 100644 index 0000000000000..afbccf0332e83 --- /dev/null +++ b/node_modules/shell-quote/quote.js @@ -0,0 +1,16 @@ +'use strict'; + +module.exports = function quote(xs) { + return xs.map(function (s) { + if (s && typeof s === 'object') { + return s.op.replace(/(.)/g, '\\$1'); + } + if ((/["\s]/).test(s) && !(/'/).test(s)) { + return "'" + s.replace(/(['\\])/g, '\\$1') + "'"; + } + if ((/["'\s]/).test(s)) { + return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"'; + } + return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2'); + }).join(' '); +}; diff --git a/node_modules/shell-quote/security.md b/node_modules/shell-quote/security.md new file mode 100644 index 0000000000000..dc864139dbe30 --- /dev/null +++ b/node_modules/shell-quote/security.md @@ -0,0 +1,11 @@ +# Security Policy + +## Supported Versions + +Only the latest major version is supported at any given time. + +## Reporting a Vulnerability + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/shell-quote/test/comment.js b/node_modules/shell-quote/test/comment.js new file mode 100644 index 0000000000000..fb15d5cb989f6 --- /dev/null +++ b/node_modules/shell-quote/test/comment.js @@ -0,0 +1,16 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +test('comment', function (t) { + t.same(parse('beep#boop'), ['beep', { comment: 'boop' }]); + t.same(parse('beep #boop'), ['beep', { comment: 'boop' }]); + t.same(parse('beep # boop'), ['beep', { comment: ' boop' }]); + t.same(parse('beep # > boop'), ['beep', { comment: ' > boop' }]); + t.same(parse('beep # "> boop"'), ['beep', { comment: ' "> boop"' }]); + t.same(parse('beep "#"'), ['beep', '#']); + t.same(parse('beep #"#"#'), ['beep', { comment: '"#"#' }]); + t.same(parse('beep > boop # > foo'), ['beep', { op: '>' }, 'boop', { comment: ' > foo' }]); + t.end(); +}); diff --git a/node_modules/shell-quote/test/env.js b/node_modules/shell-quote/test/env.js new file mode 100644 index 0000000000000..4cc0a515cfafd --- /dev/null +++ b/node_modules/shell-quote/test/env.js @@ -0,0 +1,52 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +test('expand environment variables', function (t) { + t.same(parse('a $XYZ c', { XYZ: 'b' }), ['a', 'b', 'c']); + t.same(parse('a${XYZ}c', { XYZ: 'b' }), ['abc']); + t.same(parse('a${XYZ}c $XYZ', { XYZ: 'b' }), ['abc', 'b']); + t.same(parse('"-$X-$Y-"', { X: 'a', Y: 'b' }), ['-a-b-']); + t.same(parse("'-$X-$Y-'", { X: 'a', Y: 'b' }), ['-$X-$Y-']); + t.same(parse('qrs"$zzz"wxy', { zzz: 'tuv' }), ['qrstuvwxy']); + t.same(parse("qrs'$zzz'wxy", { zzz: 'tuv' }), ['qrs$zzzwxy']); + t.same(parse('qrs${zzz}wxy'), ['qrswxy']); + t.same(parse('qrs$wxy $'), ['qrs', '$']); + t.same(parse('grep "xy$"'), ['grep', 'xy$']); + t.same(parse('ab$x', { x: 'c' }), ['abc']); + t.same(parse('ab\\$x', { x: 'c' }), ['ab$x']); + t.same(parse('ab${x}def', { x: 'c' }), ['abcdef']); + t.same(parse('ab\\${x}def', { x: 'c' }), ['ab${x}def']); + t.same(parse('"ab\\${x}def"', { x: 'c' }), ['ab${x}def']); + + t.end(); +}); + +test('expand environment variables within here-strings', function (t) { + t.same(parse('a <<< $x', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']); + t.same(parse('a <<< ${x}', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']); + t.same(parse('a <<< "$x"', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']); + t.same(parse('a <<< "${x}"', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']); + + t.end(); +}); + +test('environment variables with metacharacters', function (t) { + t.same(parse('a $XYZ c', { XYZ: '"b"' }), ['a', '"b"', 'c']); + t.same(parse('a $XYZ c', { XYZ: '$X', X: 5 }), ['a', '$X', 'c']); + t.same(parse('a"$XYZ"c', { XYZ: "'xyz'" }), ["a'xyz'c"]); + + t.end(); +}); + +test('special shell parameters', function (t) { + var chars = '*@#?-$!0_'.split(''); + t.plan(chars.length); + + chars.forEach(function (c) { + var env = {}; + env[c] = 'xxx'; + t.same(parse('a $' + c + ' c', env), ['a', 'xxx', 'c']); + }); +}); diff --git a/node_modules/shell-quote/test/env_fn.js b/node_modules/shell-quote/test/env_fn.js new file mode 100644 index 0000000000000..968e9120ca348 --- /dev/null +++ b/node_modules/shell-quote/test/env_fn.js @@ -0,0 +1,21 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +function getEnv() { + return 'xxx'; +} + +function getEnvObj() { + return { op: '@@' }; +} + +test('functional env expansion', function (t) { + t.plan(4); + + t.same(parse('a $XYZ c', getEnv), ['a', 'xxx', 'c']); + t.same(parse('a $XYZ c', getEnvObj), ['a', { op: '@@' }, 'c']); + t.same(parse('a${XYZ}c', getEnvObj), ['a', { op: '@@' }, 'c']); + t.same(parse('"a $XYZ c"', getEnvObj), ['a ', { op: '@@' }, ' c']); +}); diff --git a/node_modules/shell-quote/test/op.js b/node_modules/shell-quote/test/op.js new file mode 100644 index 0000000000000..38d37576547ae --- /dev/null +++ b/node_modules/shell-quote/test/op.js @@ -0,0 +1,102 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +test('single operators', function (t) { + t.same(parse('beep | boop'), ['beep', { op: '|' }, 'boop']); + t.same(parse('beep|boop'), ['beep', { op: '|' }, 'boop']); + t.same(parse('beep \\| boop'), ['beep', '|', 'boop']); + t.same(parse('beep "|boop"'), ['beep', '|boop']); + + t.same(parse('echo zing &'), ['echo', 'zing', { op: '&' }]); + t.same(parse('echo zing&'), ['echo', 'zing', { op: '&' }]); + t.same(parse('echo zing\\&'), ['echo', 'zing&']); + t.same(parse('echo "zing\\&"'), ['echo', 'zing\\&']); + + t.same(parse('beep;boop'), ['beep', { op: ';' }, 'boop']); + t.same(parse('(beep;boop)'), [ + { op: '(' }, 'beep', { op: ';' }, 'boop', { op: ')' } + ]); + + t.same(parse('beep>boop'), ['beep', { op: '>' }, 'boop']); + t.same(parse('beep 2>boop'), ['beep', '2', { op: '>' }, 'boop']); + t.same(parse('beep>blip'), + ['beep', { op: ';;' }, 'boop', { op: '|&' }, 'byte', { op: '>>' }, 'blip'] + ); + + t.same(parse('beep 2>&1'), ['beep', '2', { op: '>&' }, '1']); + + t.same( + parse('beep<(boop)'), + ['beep', { op: '<(' }, 'boop', { op: ')' }] + ); + t.same( + parse('beep<<(boop)'), + ['beep', { op: '<' }, { op: '<(' }, 'boop', { op: ')' }] + ); + + t.end(); +}); + +test('duplicating input file descriptors', function (t) { + // duplicating stdout to file descriptor 3 + t.same(parse('beep 3<&1'), ['beep', '3', { op: '<&' }, '1']); + + // duplicating stdout to file descriptor 0, i.e. stdin + t.same(parse('beep <&1'), ['beep', { op: '<&' }, '1']); + + // closes stdin + t.same(parse('beep <&-'), ['beep', { op: '<&' }, '-']); + + t.end(); +}); + +test('here strings', function (t) { + t.same(parse('cat <<< "hello world"'), ['cat', { op: '<<<' }, 'hello world']); + t.same(parse('cat <<< hello'), ['cat', { op: '<<<' }, 'hello']); + t.same(parse('cat<<<;{}']), '\\>\\<\\;\\{\\}'); + t.equal(quote(['a', 1, true, false]), 'a 1 true false'); + t.equal(quote(['a', 1, null, undefined]), 'a 1 null undefined'); + t.equal(quote(['a\\x']), 'a\\\\x'); + t.end(); +}); + +test('quote ops', function (t) { + t.equal(quote(['a', { op: '|' }, 'b']), 'a \\| b'); + t.equal( + quote(['a', { op: '&&' }, 'b', { op: ';' }, 'c']), + 'a \\&\\& b \\; c' + ); + t.end(); +}); + +test('quote windows paths', { skip: 'breaking change, disabled until 2.x' }, function (t) { + var path = 'C:\\projects\\node-shell-quote\\index.js'; + + t.equal(quote([path, 'b', 'c d']), 'C:\\projects\\node-shell-quote\\index.js b \'c d\''); + + t.end(); +}); + +test("chars for windows paths don't break out", function (t) { + var x = '`:\\a\\b'; + t.equal(quote([x]), '\\`\\:\\\\a\\\\b'); + t.end(); +}); diff --git a/node_modules/shell-quote/test/set.js b/node_modules/shell-quote/test/set.js new file mode 100644 index 0000000000000..9694538ad82c5 --- /dev/null +++ b/node_modules/shell-quote/test/set.js @@ -0,0 +1,31 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +test('set env vars', function (t) { + t.same( + parse('ABC=444 x y z'), + ['ABC=444', 'x', 'y', 'z'] + ); + t.same( + parse('ABC=3\\ 4\\ 5 x y z'), + ['ABC=3 4 5', 'x', 'y', 'z'] + ); + t.same( + parse('X="7 8 9" printx'), + ['X=7 8 9', 'printx'] + ); + t.same( + parse('X="7 8 9"; printx'), + ['X=7 8 9', { op: ';' }, 'printx'] + ); + t.same( + parse('X="7 8 9"; printx', function () { + t.fail('should not have matched any keys'); + }), + ['X=7 8 9', { op: ';' }, 'printx'] + ); + + t.end(); +}); diff --git a/node_modules/side-channel/.eslintignore b/node_modules/side-channel/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/side-channel/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/side-channel/.eslintrc b/node_modules/side-channel/.eslintrc new file mode 100644 index 0000000000000..850ac1fa80ca9 --- /dev/null +++ b/node_modules/side-channel/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-lines-per-function": 0, + "max-params": 0, + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + }, +} diff --git a/node_modules/side-channel/.github/FUNDING.yml b/node_modules/side-channel/.github/FUNDING.yml new file mode 100644 index 0000000000000..2a94840c6ee50 --- /dev/null +++ b/node_modules/side-channel/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/side-channel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/side-channel/.nycrc b/node_modules/side-channel/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/side-channel/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/side-channel/CHANGELOG.md b/node_modules/side-channel/CHANGELOG.md new file mode 100644 index 0000000000000..a3d161fac7fe9 --- /dev/null +++ b/node_modules/side-channel/CHANGELOG.md @@ -0,0 +1,65 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/ljharb/side-channel/compare/v1.0.3...v1.0.4) - 2020-12-29 + +### Commits + +- [Tests] migrate tests to Github Actions [`10909cb`](https://github.com/ljharb/side-channel/commit/10909cbf8ce9c0bf96f604cf13d7ffd5a22c2d40) +- [Refactor] Use a linked list rather than an array, and move accessed nodes to the beginning [`195613f`](https://github.com/ljharb/side-channel/commit/195613f28b5c1e6072ef0b61b5beebaf2b6a304e) +- [meta] do not publish github action workflow files [`290ec29`](https://github.com/ljharb/side-channel/commit/290ec29cd21a60585145b4a7237ec55228c52c27) +- [Tests] run `nyc` on all tests; use `tape` runner [`ea6d030`](https://github.com/ljharb/side-channel/commit/ea6d030ff3fe6be2eca39e859d644c51ecd88869) +- [actions] add "Allow Edits" workflow [`d464d8f`](https://github.com/ljharb/side-channel/commit/d464d8fe52b5eddf1504a0ed97f0941a90f32c15) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`02daca8`](https://github.com/ljharb/side-channel/commit/02daca87c6809821c97be468d1afa2f5ef447383) +- [Refactor] use `call-bind` and `get-intrinsic` instead of `es-abstract` [`e09d481`](https://github.com/ljharb/side-channel/commit/e09d481528452ebafa5cdeae1af665c35aa2deee) +- [Deps] update `object.assign` [`ee83aa8`](https://github.com/ljharb/side-channel/commit/ee83aa81df313b5e46319a63adb05cf0c179079a) +- [actions] update rebase action to use checkout v2 [`7726b0b`](https://github.com/ljharb/side-channel/commit/7726b0b058b632fccea709f58960871defaaa9d7) + +## [v1.0.3](https://github.com/ljharb/side-channel/compare/v1.0.2...v1.0.3) - 2020-08-23 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`1f10561`](https://github.com/ljharb/side-channel/commit/1f105611ef3acf32dec8032ae5c0baa5e56bb868) +- [Deps] update `es-abstract`, `object-inspect` [`bc20159`](https://github.com/ljharb/side-channel/commit/bc201597949a505e37cef9eaf24c7010831e6f03) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`b9b2b22`](https://github.com/ljharb/side-channel/commit/b9b2b225f9e0ea72a6ec2b89348f0bd690bc9ed1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7055ab4`](https://github.com/ljharb/side-channel/commit/7055ab4de0860606efd2003674a74f1fe6ebc07e) +- [Dev Deps] update `auto-changelog`; add `aud` [`d278c37`](https://github.com/ljharb/side-channel/commit/d278c37d08227be4f84aa769fcd919e73feeba40) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`3bcf982`](https://github.com/ljharb/side-channel/commit/3bcf982faa122745b39c33ce83d32fdf003741c6) +- [Tests] only audit prod deps [`18d01c4`](https://github.com/ljharb/side-channel/commit/18d01c4015b82a3d75044c4d5ba7917b2eac01ec) +- [Deps] update `es-abstract` [`6ab096d`](https://github.com/ljharb/side-channel/commit/6ab096d9de2b482cf5e0717e34e212f5b2b9bc9a) +- [Dev Deps] update `tape` [`9dc174c`](https://github.com/ljharb/side-channel/commit/9dc174cc651dfd300b4b72da936a0a7eda5f9452) +- [Deps] update `es-abstract` [`431d0f0`](https://github.com/ljharb/side-channel/commit/431d0f0ff11fbd2ae6f3115582a356d3a1cfce82) +- [Deps] update `es-abstract` [`49869fd`](https://github.com/ljharb/side-channel/commit/49869fd323bf4453f0ba515c0fb265cf5ab7b932) +- [meta] Add package.json to package's exports [`77d9cdc`](https://github.com/ljharb/side-channel/commit/77d9cdceb2a9e47700074f2ae0c0a202e7dac0d4) + +## [v1.0.2](https://github.com/ljharb/side-channel/compare/v1.0.1...v1.0.2) - 2019-12-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`4a526df`](https://github.com/ljharb/side-channel/commit/4a526df44e4701566ed001ec78546193f818b082) +- [Deps] update `es-abstract` [`d4f6e62`](https://github.com/ljharb/side-channel/commit/d4f6e629b6fb93a07415db7f30d3c90fd7f264fe) + +## [v1.0.1](https://github.com/ljharb/side-channel/compare/v1.0.0...v1.0.1) - 2019-12-01 + +### Commits + +- [Fix] add missing "exports" [`d212907`](https://github.com/ljharb/side-channel/commit/d2129073abf0701a5343bf28aa2145617604dc2e) + +## v1.0.0 - 2019-12-01 + +### Commits + +- Initial implementation [`dbebd3a`](https://github.com/ljharb/side-channel/commit/dbebd3a4b5ed64242f9a6810efe7c4214cd8cde4) +- Initial tests [`73bdefe`](https://github.com/ljharb/side-channel/commit/73bdefe568c9076cf8c0b8719bc2141aec0e19b8) +- Initial commit [`43c03e1`](https://github.com/ljharb/side-channel/commit/43c03e1c2849ec50a87b7a5cd76238a62b0b8770) +- npm init [`5c090a7`](https://github.com/ljharb/side-channel/commit/5c090a765d66a5527d9889b89aeff78dee91348c) +- [meta] add `auto-changelog` [`a5c4e56`](https://github.com/ljharb/side-channel/commit/a5c4e5675ec02d5eb4d84b4243aeea2a1d38fbec) +- [actions] add automatic rebasing / merge commit blocking [`bab1683`](https://github.com/ljharb/side-channel/commit/bab1683d8f9754b086e94397699fdc645e0d7077) +- [meta] add `funding` field; create FUNDING.yml [`63d7aea`](https://github.com/ljharb/side-channel/commit/63d7aeaf34f5650650ae97ca4b9fae685bd0937c) +- [Tests] add `npm run lint` [`46a5a81`](https://github.com/ljharb/side-channel/commit/46a5a81705cd2664f83df232c01dbbf2ee952885) +- Only apps should have lockfiles [`8b16b03`](https://github.com/ljharb/side-channel/commit/8b16b0305f00895d90c4e2e5773c854cfea0e448) +- [meta] add `safe-publish-latest` [`2f098ef`](https://github.com/ljharb/side-channel/commit/2f098ef092a39399cfe548b19a1fc03c2fd2f490) diff --git a/node_modules/side-channel/LICENSE b/node_modules/side-channel/LICENSE new file mode 100644 index 0000000000000..3900dd7e2ffe6 --- /dev/null +++ b/node_modules/side-channel/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/side-channel/README.md b/node_modules/side-channel/README.md new file mode 100644 index 0000000000000..7fa4f0680fe0c --- /dev/null +++ b/node_modules/side-channel/README.md @@ -0,0 +1,2 @@ +# side-channel +Store information about any JS value in a side channel. Uses WeakMap if available. diff --git a/node_modules/side-channel/index.js b/node_modules/side-channel/index.js new file mode 100644 index 0000000000000..f1c48264f08a8 --- /dev/null +++ b/node_modules/side-channel/index.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var inspect = require('object-inspect'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $WeakMap = GetIntrinsic('%WeakMap%', true); +var $Map = GetIntrinsic('%Map%', true); + +var $weakMapGet = callBound('WeakMap.prototype.get', true); +var $weakMapSet = callBound('WeakMap.prototype.set', true); +var $weakMapHas = callBound('WeakMap.prototype.has', true); +var $mapGet = callBound('Map.prototype.get', true); +var $mapSet = callBound('Map.prototype.set', true); +var $mapHas = callBound('Map.prototype.has', true); + +/* + * This function traverses the list returning the node corresponding to the + * given key. + * + * That node is also moved to the head of the list, so that if it's accessed + * again we don't need to traverse the whole list. By doing so, all the recently + * used nodes can be accessed relatively quickly. + */ +var listGetNode = function (list, key) { // eslint-disable-line consistent-return + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; // eslint-disable-line no-param-reassign + return curr; + } + } +}; + +var listGet = function (objects, key) { + var node = listGetNode(objects, key); + return node && node.value; +}; +var listSet = function (objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + // Prepend the new node to the beginning of the list + objects.next = { // eslint-disable-line no-param-reassign + key: key, + next: objects.next, + value: value + }; + } +}; +var listHas = function (objects, key) { + return !!listGetNode(objects, key); +}; + +module.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function (key) { + if (!channel.has(key)) { + throw new $TypeError('Side channel does not contain ' + inspect(key)); + } + }, + get: function (key) { // eslint-disable-line consistent-return + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapGet($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listGet($o, key); + } + } + }, + has: function (key) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapHas($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listHas($o, key); + } + } + return false; + }, + set: function (key, value) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } else { + if (!$o) { + /* + * Initialize the linked list as an empty node, so that we don't have + * to special-case handling of the first node: we can always refer to + * it as (previous node).next, instead of something like (list).head + */ + $o = { key: {}, next: null }; + } + listSet($o, key, value); + } + } + }; + return channel; +}; diff --git a/node_modules/side-channel/package.json b/node_modules/side-channel/package.json new file mode 100644 index 0000000000000..a3e33f661c947 --- /dev/null +++ b/node_modules/side-channel/package.json @@ -0,0 +1,67 @@ +{ + "name": "side-channel", + "version": "1.0.4", + "description": "Store information about any JS value in a side channel. Uses WeakMap if available.", + "main": "index.js", + "exports": { + "./package.json": "./package.json", + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ] + }, + "scripts": { + "prepublish": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/side-channel.git" + }, + "keywords": [ + "weakmap", + "map", + "side", + "channel", + "metadata" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/side-channel/issues" + }, + "homepage": "https://github.com/ljharb/side-channel#readme", + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.16.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.0.1" + }, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/side-channel/test/index.js b/node_modules/side-channel/test/index.js new file mode 100644 index 0000000000000..3b92ef7eb3a5f --- /dev/null +++ b/node_modules/side-channel/test/index.js @@ -0,0 +1,78 @@ +'use strict'; + +var test = require('tape'); + +var getSideChannel = require('../'); + +test('export', function (t) { + t.equal(typeof getSideChannel, 'function', 'is a function'); + t.equal(getSideChannel.length, 0, 'takes no arguments'); + + var channel = getSideChannel(); + t.ok(channel, 'is truthy'); + t.equal(typeof channel, 'object', 'is an object'); + + t.end(); +}); + +test('assert', function (t) { + var channel = getSideChannel(); + t['throws']( + function () { channel.assert({}); }, + TypeError, + 'nonexistent value throws' + ); + + var o = {}; + channel.set(o, 'data'); + t.doesNotThrow(function () { channel.assert(o); }, 'existent value noops'); + + t.end(); +}); + +test('has', function (t) { + var channel = getSideChannel(); + var o = []; + + t.equal(channel.has(o), false, 'nonexistent value yields false'); + + channel.set(o, 'foo'); + t.equal(channel.has(o), true, 'existent value yields true'); + + t.end(); +}); + +test('get', function (t) { + var channel = getSideChannel(); + var o = {}; + t.equal(channel.get(o), undefined, 'nonexistent value yields undefined'); + + var data = {}; + channel.set(o, data); + t.equal(channel.get(o), data, '"get" yields data set by "set"'); + + t.end(); +}); + +test('set', function (t) { + var channel = getSideChannel(); + var o = function () {}; + t.equal(channel.get(o), undefined, 'value not set'); + + channel.set(o, 42); + t.equal(channel.get(o), 42, 'value was set'); + + channel.set(o, Infinity); + t.equal(channel.get(o), Infinity, 'value was set again'); + + var o2 = {}; + channel.set(o2, 17); + t.equal(channel.get(o), Infinity, 'o is not modified'); + t.equal(channel.get(o2), 17, 'o2 is set'); + + channel.set(o, 14); + t.equal(channel.get(o), 14, 'o is modified'); + t.equal(channel.get(o2), 17, 'o2 is not modified'); + + t.end(); +}); diff --git a/node_modules/snapdragon-node/LICENSE b/node_modules/snapdragon-node/LICENSE new file mode 100644 index 0000000000000..9a1c856759fb0 --- /dev/null +++ b/node_modules/snapdragon-node/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 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/snapdragon-node/README.md b/node_modules/snapdragon-node/README.md new file mode 100644 index 0000000000000..2300a3cd75fc5 --- /dev/null +++ b/node_modules/snapdragon-node/README.md @@ -0,0 +1,453 @@ +# snapdragon-node [![NPM version](https://img.shields.io/npm/v/snapdragon-node.svg?style=flat)](https://www.npmjs.com/package/snapdragon-node) [![NPM monthly downloads](https://img.shields.io/npm/dm/snapdragon-node.svg?style=flat)](https://npmjs.org/package/snapdragon-node) [![NPM total downloads](https://img.shields.io/npm/dt/snapdragon-node.svg?style=flat)](https://npmjs.org/package/snapdragon-node) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon-node.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/snapdragon-node) + +> Snapdragon utility for creating a new AST node in custom code, such as plugins. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon-node +``` + +## Usage + +With [snapdragon](https://github.com/jonschlinkert/snapdragon) v0.9.0 and higher you can use `this.node()` to create a new `Node`, whenever it makes sense. + +```js +var Node = require('snapdragon-node'); +var Snapdragon = require('snapdragon'); +var snapdragon = new Snapdragon(); + +// example usage inside a parser visitor function +snapdragon.parser.set('foo', function() { + // get the current "start" position + var pos = this.position(); + + // returns the match if regex matches the substring + // at the current position on `parser.input` + var match = this.match(/foo/); + if (match) { + // call "pos" on the node, to set the start and end + // positions, and return the node to push it onto the AST + // (snapdragon will push the node onto the correct + // nodes array, based on the stack) + return pos(new Node({type: 'bar', val: match[0]})); + } +}); +``` + +## API + +### [Node](index.js#L22) + +Create a new AST `Node` with the given `val` and `type`. + +**Params** + +* `val` **{String|Object}**: Pass a matched substring, or an object to merge onto the node. +* `type` **{String}**: The node type to use when `val` is a string. +* `returns` **{Object}**: node instance + +**Example** + +```js +var node = new Node('*', 'Star'); +var node = new Node({type: 'star', val: '*'}); +``` + +### [.isNode](index.js#L61) + +Returns true if the given value is a node. + +**Params** + +* `node` **{Object}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(Node.isNode(node)); //=> true +console.log(Node.isNode({})); //=> false +``` + +### [.define](index.js#L80) + +Define a non-enumberable property on the node instance. Useful for adding properties that shouldn't be extended or visible during debugging. + +**Params** + +* `name` **{String}** +* `val` **{any}** +* `returns` **{Object}**: returns the node instance + +**Example** + +```js +var node = new Node(); +node.define('foo', 'something non-enumerable'); +``` + +### [.isEmpty](index.js#L100) + +Returns true if `node.val` is an empty string, or `node.nodes` does not contain any non-empty text nodes. + +**Params** + +* `fn` **{Function}**: (optional) Filter function that is called on `node` and/or child nodes. `isEmpty` will return false immediately when the filter function returns false on any nodes. +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'text'}); +node.isEmpty(); //=> true +node.val = 'foo'; +node.isEmpty(); //=> false +``` + +### [.push](index.js#L118) + +Given node `foo` and node `bar`, push node `bar` onto `foo.nodes`, and set `foo` as `bar.parent`. + +**Params** + +* `node` **{Object}** +* `returns` **{Number}**: Returns the length of `node.nodes` + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.push(bar); +``` + +### [.unshift](index.js#L140) + +Given node `foo` and node `bar`, unshift node `bar` onto `foo.nodes`, and set `foo` as `bar.parent`. + +**Params** + +* `node` **{Object}** +* `returns` **{Number}**: Returns the length of `node.nodes` + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.unshift(bar); +``` + +### [.pop](index.js#L167) + +Pop a node from `node.nodes`. + +* `returns` **{Number}**: Returns the popped `node` + +**Example** + +```js +var node = new Node({type: 'foo'}); +node.push(new Node({type: 'a'})); +node.push(new Node({type: 'b'})); +node.push(new Node({type: 'c'})); +node.push(new Node({type: 'd'})); +console.log(node.nodes.length); +//=> 4 +node.pop(); +console.log(node.nodes.length); +//=> 3 +``` + +### [.shift](index.js#L190) + +Shift a node from `node.nodes`. + +* `returns` **{Object}**: Returns the shifted `node` + +**Example** + +```js +var node = new Node({type: 'foo'}); +node.push(new Node({type: 'a'})); +node.push(new Node({type: 'b'})); +node.push(new Node({type: 'c'})); +node.push(new Node({type: 'd'})); +console.log(node.nodes.length); +//=> 4 +node.shift(); +console.log(node.nodes.length); +//=> 3 +``` + +### [.remove](index.js#L205) + +Remove `node` from `node.nodes`. + +**Params** + +* `node` **{Object}** +* `returns` **{Object}**: Returns the removed node. + +**Example** + +```js +node.remove(childNode); +``` + +### [.find](index.js#L231) + +Get the first child node from `node.nodes` that matches the given `type`. If `type` is a number, the child node at that index is returned. + +**Params** + +* `type` **{String}** +* `returns` **{Object}**: Returns a child node or undefined. + +**Example** + +```js +var child = node.find(1); //<= index of the node to get +var child = node.find('foo'); //<= node.type of a child node +var child = node.find(/^(foo|bar)$/); //<= regex to match node.type +var child = node.find(['foo', 'bar']); //<= array of node.type(s) +``` + +### [.isType](index.js#L249) + +Return true if the node is the given `type`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'bar'}); +cosole.log(node.isType('foo')); // false +cosole.log(node.isType(/^(foo|bar)$/)); // true +cosole.log(node.isType(['foo', 'bar'])); // true +``` + +### [.hasType](index.js#L270) + +Return true if the `node.nodes` has the given `type`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.push(bar); + +cosole.log(foo.hasType('qux')); // false +cosole.log(foo.hasType(/^(qux|bar)$/)); // true +cosole.log(foo.hasType(['qux', 'bar'])); // true +``` + +* `returns` **{Array}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(bar.siblings.length) // 2 +console.log(baz.siblings.length) // 2 +``` + +* `returns` **{Number}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.unshift(qux); + +console.log(bar.index) // 1 +console.log(baz.index) // 2 +console.log(qux.index) // 0 +``` + +* `returns` **{Object}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(baz.prev.type) // 'bar' +``` + +* `returns` **{Object}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(bar.siblings.length) // 2 +console.log(baz.siblings.length) // 2 +``` + +* `returns` **{Object}**: The first node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.first.type) // 'bar' +``` + +* `returns` **{Object}**: The last node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.last.type) // 'qux' +``` + +* `returns` **{Object}**: The last node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.last.type) // 'qux' +``` + +## Release history + +Changelog entries are classified using the following labels from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes + +Custom labels used in this changelog: + +* `dependencies`: bumps dependencies +* `housekeeping`: code re-organization, minor edits, or other changes that don't fit in one of the other categories. + +### [2.0.0] - 2017-05-01 + +**Changed** + +* `.unshiftNode` was renamed to [.unshift](#unshift) +* `.pushNode` was renamed to [.push](#push) +* `.getNode` was renamed to [.find](#find) + +**Added** + +* [.isNode](#isNode) +* [.isEmpty](#isEmpty) +* [.pop](#pop) +* [.shift](#shift) +* [.remove](#remove) + +### [0.1.0] + +First release. + +## About + +### Related projects + +* [breakdance](https://www.npmjs.com/package/breakdance): Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy… [more](http://breakdance.io) | [homepage](http://breakdance.io "Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy to use. It's time for your markup to get down.") +* [snapdragon-capture](https://www.npmjs.com/package/snapdragon-capture): Snapdragon plugin that adds a capture method to the parser instance. | [homepage](https://github.com/jonschlinkert/snapdragon-capture "Snapdragon plugin that adds a capture method to the parser instance.") +* [snapdragon-cheerio](https://www.npmjs.com/package/snapdragon-cheerio): Snapdragon plugin for converting a cheerio AST to a snapdragon AST. | [homepage](https://github.com/jonschlinkert/snapdragon-cheerio "Snapdragon plugin for converting a cheerio AST to a snapdragon AST.") +* [snapdragon-util](https://www.npmjs.com/package/snapdragon-util): Utilities for the snapdragon parser/compiler. | [homepage](https://github.com/jonschlinkert/snapdragon-util "Utilities for the snapdragon parser/compiler.") +* [snapdragon](https://www.npmjs.com/package/snapdragon): Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map… [more](https://github.com/jonschlinkert/snapdragon) | [homepage](https://github.com/jonschlinkert/snapdragon "Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map support.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### 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 25, 2017._ \ No newline at end of file diff --git a/node_modules/snapdragon-node/index.js b/node_modules/snapdragon-node/index.js new file mode 100644 index 0000000000000..0f66ff5a4fc57 --- /dev/null +++ b/node_modules/snapdragon-node/index.js @@ -0,0 +1,492 @@ +'use strict'; + +var isObject = require('isobject'); +var define = require('define-property'); +var utils = require('snapdragon-util'); +var ownNames; + +/** + * Create a new AST `Node` with the given `val` and `type`. + * + * ```js + * var node = new Node('*', 'Star'); + * var node = new Node({type: 'star', val: '*'}); + * ``` + * @name Node + * @param {String|Object} `val` Pass a matched substring, or an object to merge onto the node. + * @param {String} `type` The node type to use when `val` is a string. + * @return {Object} node instance + * @api public + */ + +function Node(val, type, parent) { + if (typeof type !== 'string') { + parent = type; + type = null; + } + + define(this, 'parent', parent); + define(this, 'isNode', true); + define(this, 'expect', null); + + if (typeof type !== 'string' && isObject(val)) { + lazyKeys(); + var keys = Object.keys(val); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (ownNames.indexOf(key) === -1) { + this[key] = val[key]; + } + } + } else { + this.type = type; + this.val = val; + } +} + +/** + * Returns true if the given value is a node. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(Node.isNode(node)); //=> true + * console.log(Node.isNode({})); //=> false + * ``` + * @param {Object} `node` + * @returns {Boolean} + * @api public + */ + +Node.isNode = function(node) { + return utils.isNode(node); +}; + +/** + * Define a non-enumberable property on the node instance. + * Useful for adding properties that shouldn't be extended + * or visible during debugging. + * + * ```js + * var node = new Node(); + * node.define('foo', 'something non-enumerable'); + * ``` + * @param {String} `name` + * @param {any} `val` + * @return {Object} returns the node instance + * @api public + */ + +Node.prototype.define = function(name, val) { + define(this, name, val); + return this; +}; + +/** + * Returns true if `node.val` is an empty string, or `node.nodes` does + * not contain any non-empty text nodes. + * + * ```js + * var node = new Node({type: 'text'}); + * node.isEmpty(); //=> true + * node.val = 'foo'; + * node.isEmpty(); //=> false + * ``` + * @param {Function} `fn` (optional) Filter function that is called on `node` and/or child nodes. `isEmpty` will return false immediately when the filter function returns false on any nodes. + * @return {Boolean} + * @api public + */ + +Node.prototype.isEmpty = function(fn) { + return utils.isEmpty(this, fn); +}; + +/** + * Given node `foo` and node `bar`, push node `bar` onto `foo.nodes`, and + * set `foo` as `bar.parent`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.push(bar); + * ``` + * @param {Object} `node` + * @return {Number} Returns the length of `node.nodes` + * @api public + */ + +Node.prototype.push = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + define(node, 'parent', this); + + this.nodes = this.nodes || []; + return this.nodes.push(node); +}; + +/** + * Given node `foo` and node `bar`, unshift node `bar` onto `foo.nodes`, and + * set `foo` as `bar.parent`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.unshift(bar); + * ``` + * @param {Object} `node` + * @return {Number} Returns the length of `node.nodes` + * @api public + */ + +Node.prototype.unshift = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + define(node, 'parent', this); + + this.nodes = this.nodes || []; + return this.nodes.unshift(node); +}; + +/** + * Pop a node from `node.nodes`. + * + * ```js + * var node = new Node({type: 'foo'}); + * node.push(new Node({type: 'a'})); + * node.push(new Node({type: 'b'})); + * node.push(new Node({type: 'c'})); + * node.push(new Node({type: 'd'})); + * console.log(node.nodes.length); + * //=> 4 + * node.pop(); + * console.log(node.nodes.length); + * //=> 3 + * ``` + * @return {Number} Returns the popped `node` + * @api public + */ + +Node.prototype.pop = function() { + return this.nodes && this.nodes.pop(); +}; + +/** + * Shift a node from `node.nodes`. + * + * ```js + * var node = new Node({type: 'foo'}); + * node.push(new Node({type: 'a'})); + * node.push(new Node({type: 'b'})); + * node.push(new Node({type: 'c'})); + * node.push(new Node({type: 'd'})); + * console.log(node.nodes.length); + * //=> 4 + * node.shift(); + * console.log(node.nodes.length); + * //=> 3 + * ``` + * @return {Object} Returns the shifted `node` + * @api public + */ + +Node.prototype.shift = function() { + return this.nodes && this.nodes.shift(); +}; + +/** + * Remove `node` from `node.nodes`. + * + * ```js + * node.remove(childNode); + * ``` + * @param {Object} `node` + * @return {Object} Returns the removed node. + * @api public + */ + +Node.prototype.remove = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + this.nodes = this.nodes || []; + var idx = node.index; + if (idx !== -1) { + node.index = -1; + return this.nodes.splice(idx, 1); + } + return null; +}; + +/** + * Get the first child node from `node.nodes` that matches the given `type`. + * If `type` is a number, the child node at that index is returned. + * + * ```js + * var child = node.find(1); //<= index of the node to get + * var child = node.find('foo'); //<= node.type of a child node + * var child = node.find(/^(foo|bar)$/); //<= regex to match node.type + * var child = node.find(['foo', 'bar']); //<= array of node.type(s) + * ``` + * @param {String} `type` + * @return {Object} Returns a child node or undefined. + * @api public + */ + +Node.prototype.find = function(type) { + return utils.findNode(this.nodes, type); +}; + +/** + * Return true if the node is the given `type`. + * + * ```js + * var node = new Node({type: 'bar'}); + * cosole.log(node.isType('foo')); // false + * cosole.log(node.isType(/^(foo|bar)$/)); // true + * cosole.log(node.isType(['foo', 'bar'])); // true + * ``` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +Node.prototype.isType = function(type) { + return utils.isType(this, type); +}; + +/** + * Return true if the `node.nodes` has the given `type`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.push(bar); + * + * cosole.log(foo.hasType('qux')); // false + * cosole.log(foo.hasType(/^(qux|bar)$/)); // true + * cosole.log(foo.hasType(['qux', 'bar'])); // true + * ``` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +Node.prototype.hasType = function(type) { + return utils.hasType(this, type); +}; + +/** + * Get the siblings array, or `null` if it doesn't exist. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(bar.siblings.length) // 2 + * console.log(baz.siblings.length) // 2 + * ``` + * @return {Array} + * @api public + */ + +Object.defineProperty(Node.prototype, 'siblings', { + set: function() { + throw new Error('node.siblings is a getter and cannot be defined'); + }, + get: function() { + return this.parent ? this.parent.nodes : null; + } +}); + +/** + * Get the node's current index from `node.parent.nodes`. + * This should always be correct, even when the parent adds nodes. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.unshift(qux); + * + * console.log(bar.index) // 1 + * console.log(baz.index) // 2 + * console.log(qux.index) // 0 + * ``` + * @return {Number} + * @api public + */ + +Object.defineProperty(Node.prototype, 'index', { + set: function(index) { + define(this, 'idx', index); + }, + get: function() { + if (!Array.isArray(this.siblings)) { + return -1; + } + var tok = this.idx !== -1 ? this.siblings[this.idx] : null; + if (tok !== this) { + this.idx = this.siblings.indexOf(this); + } + return this.idx; + } +}); + +/** + * Get the previous node from the siblings array or `null`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(baz.prev.type) // 'bar' + * ``` + * @return {Object} + * @api public + */ + +Object.defineProperty(Node.prototype, 'prev', { + set: function() { + throw new Error('node.prev is a getter and cannot be defined'); + }, + get: function() { + if (Array.isArray(this.siblings)) { + return this.siblings[this.index - 1] || this.parent.prev; + } + return null; + } +}); + +/** + * Get the siblings array, or `null` if it doesn't exist. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(bar.siblings.length) // 2 + * console.log(baz.siblings.length) // 2 + * ``` + * @return {Object} + * @api public + */ + +Object.defineProperty(Node.prototype, 'next', { + set: function() { + throw new Error('node.next is a getter and cannot be defined'); + }, + get: function() { + if (Array.isArray(this.siblings)) { + return this.siblings[this.index + 1] || this.parent.next; + } + return null; + } +}); + +/** + * Get the first node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.first.type) // 'bar' + * ``` + * @return {Object} The first node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'first', { + get: function() { + return this.nodes ? this.nodes[0] : null; + } +}); + +/** + * Get the last node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.last.type) // 'qux' + * ``` + * @return {Object} The last node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'last', { + get: function() { + return this.nodes ? utils.last(this.nodes) : null; + } +}); + +/** + * Get the last node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.last.type) // 'qux' + * ``` + * @return {Object} The last node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'scope', { + get: function() { + if (this.isScope !== true) { + return this.parent ? this.parent.scope : this; + } + return this; + } +}); + +/** + * Get own property names from Node prototype, but only the + * first time `Node` is instantiated + */ + +function lazyKeys() { + if (!ownNames) { + ownNames = Object.getOwnPropertyNames(Node.prototype); + } +} + +/** + * Simplified assertion. Throws an error is `val` is falsey. + */ + +function assert(val, message) { + if (!val) throw new Error(message); +} + +/** + * Expose `Node` + */ + +exports = module.exports = Node; diff --git a/node_modules/snapdragon-node/node_modules/define-property/LICENSE b/node_modules/snapdragon-node/node_modules/define-property/LICENSE new file mode 100644 index 0000000000000..ec85897eb167c --- /dev/null +++ b/node_modules/snapdragon-node/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/snapdragon-node/node_modules/define-property/README.md b/node_modules/snapdragon-node/node_modules/define-property/README.md new file mode 100644 index 0000000000000..2f1af05f3c439 --- /dev/null +++ b/node_modules/snapdragon-node/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/snapdragon-node/node_modules/define-property/index.js b/node_modules/snapdragon-node/node_modules/define-property/index.js new file mode 100644 index 0000000000000..27c19ebf6d0e0 --- /dev/null +++ b/node_modules/snapdragon-node/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/snapdragon-node/node_modules/define-property/package.json b/node_modules/snapdragon-node/node_modules/define-property/package.json new file mode 100644 index 0000000000000..e0ab1ca0066c5 --- /dev/null +++ b/node_modules/snapdragon-node/node_modules/define-property/package.json @@ -0,0 +1,62 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "extend-shallow", + "merge-deep", + "assign-deep", + "mixin-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/snapdragon-node/node_modules/isobject/LICENSE b/node_modules/snapdragon-node/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..943e71d05511e --- /dev/null +++ b/node_modules/snapdragon-node/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/snapdragon-node/node_modules/isobject/README.md b/node_modules/snapdragon-node/node_modules/isobject/README.md new file mode 100644 index 0000000000000..d01feaa40bc13 --- /dev/null +++ b/node_modules/snapdragon-node/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/snapdragon-node/node_modules/isobject/index.d.ts b/node_modules/snapdragon-node/node_modules/isobject/index.d.ts new file mode 100644 index 0000000000000..55f81c275f150 --- /dev/null +++ b/node_modules/snapdragon-node/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/snapdragon-node/node_modules/isobject/index.js b/node_modules/snapdragon-node/node_modules/isobject/index.js new file mode 100644 index 0000000000000..2d59958bf4eab --- /dev/null +++ b/node_modules/snapdragon-node/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/snapdragon-node/node_modules/isobject/package.json b/node_modules/snapdragon-node/node_modules/isobject/package.json new file mode 100644 index 0000000000000..62aa8c1b2feea --- /dev/null +++ b/node_modules/snapdragon-node/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "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" + ] + } +} diff --git a/node_modules/snapdragon-node/package.json b/node_modules/snapdragon-node/package.json new file mode 100644 index 0000000000000..2ca8023745440 --- /dev/null +++ b/node_modules/snapdragon-node/package.json @@ -0,0 +1,76 @@ +{ + "name": "snapdragon-node", + "description": "Snapdragon utility for creating a new AST node in custom code, such as plugins.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/snapdragon-node", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/snapdragon-node", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon-node/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^4.0.0", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.2", + "gulp-mocha": "^3.0.1", + "mocha": "^3.4.2", + "snapdragon": "^0.11.0" + }, + "keywords": [ + "ast", + "compile", + "compiler", + "convert", + "node", + "parse", + "parser", + "plugin", + "render", + "snapdragon", + "snapdragonplugin", + "token", + "transform" + ], + "verb": { + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "breakdance", + "snapdragon", + "snapdragon-capture", + "snapdragon-cheerio", + "snapdragon-util" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/snapdragon-util/LICENSE b/node_modules/snapdragon-util/LICENSE new file mode 100644 index 0000000000000..9a1c856759fb0 --- /dev/null +++ b/node_modules/snapdragon-util/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 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/snapdragon-util/README.md b/node_modules/snapdragon-util/README.md new file mode 100644 index 0000000000000..b654e023d233f --- /dev/null +++ b/node_modules/snapdragon-util/README.md @@ -0,0 +1,807 @@ +# snapdragon-util [![NPM version](https://img.shields.io/npm/v/snapdragon-util.svg?style=flat)](https://www.npmjs.com/package/snapdragon-util) [![NPM monthly downloads](https://img.shields.io/npm/dm/snapdragon-util.svg?style=flat)](https://npmjs.org/package/snapdragon-util) [![NPM total downloads](https://img.shields.io/npm/dt/snapdragon-util.svg?style=flat)](https://npmjs.org/package/snapdragon-util) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon-util.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/snapdragon-util) + +> Utilities for the snapdragon parser/compiler. + +
+Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [API](#api) +- [Release history](#release-history) + * [[3.0.0] - 2017-05-01](#300---2017-05-01) + * [[0.1.0]](#010) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon-util +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add snapdragon-util +``` + +## Usage + +```js +var util = require('snapdragon-util'); +``` + +## API + +### [.isNode](index.js#L21) + +Returns true if the given value is a node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(utils.isNode(node)); //=> true +console.log(utils.isNode({})); //=> false +``` + +### [.noop](index.js#L37) + +Emit an empty string for the given `node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +// do nothing for beginning-of-string +snapdragon.compiler.set('bos', utils.noop); +``` + +### [.identity](index.js#L53) + +Appdend `node.val` to `compiler.output`, exactly as it was created by the parser. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +snapdragon.compiler.set('text', utils.identity); +``` + +### [.append](index.js#L76) + +Previously named `.emit`, this method appends the given `val` to `compiler.output` for the given node. Useful when you know what value should be appended advance, regardless of the actual value of `node.val`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Function}**: Returns a compiler middleware function. + +**Example** + +```js +snapdragon.compiler + .set('i', function(node) { + this.mapVisit(node); + }) + .set('i.open', utils.append('')) + .set('i.close', utils.append('')) +``` + +### [.toNoop](index.js#L99) + +Used in compiler middleware, this onverts an AST node into an empty `text` node and deletes `node.nodes` if it exists. The advantage of this method is that, as opposed to completely removing the node, indices will not need to be re-calculated in sibling nodes, and nothing is appended to the output. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `nodes` **{Array}**: Optionally pass a new `nodes` value, to replace the existing `node.nodes` array. + +**Example** + +```js +utils.toNoop(node); +// convert `node.nodes` to the given value instead of deleting it +utils.toNoop(node, []); +``` + +### [.visit](index.js#L128) + +Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon automatically calls registered compilers, this allows you to pass a visitor function. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `fn` **{Function}** +* `returns` **{Object}**: returns the node after recursively visiting all child nodes. + +**Example** + +```js +snapdragon.compiler.set('i', function(node) { + utils.visit(node, function(childNode) { + // do stuff with "childNode" + return childNode; + }); +}); +``` + +### [.mapVisit](index.js#L155) + +Map [visit](#visit) the given `fn` over `node.nodes`. This is called by [visit](#visit), use this method if you do not want `fn` to be called on the first node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `options` **{Object}** +* `fn` **{Function}** +* `returns` **{Object}**: returns the node + +**Example** + +```js +snapdragon.compiler.set('i', function(node) { + utils.mapVisit(node, function(childNode) { + // do stuff with "childNode" + return childNode; + }); +}); +``` + +### [.addOpen](index.js#L194) + +Unshift an `*.open` node onto `node.nodes`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the created opening node. + +**Example** + +```js +var Node = require('snapdragon-node'); +snapdragon.parser.set('brace', function(node) { + var match = this.match(/^{/); + if (match) { + var parent = new Node({type: 'brace'}); + utils.addOpen(parent, Node); + console.log(parent.nodes[0]): + // { type: 'brace.open', val: '' }; + + // push the parent "brace" node onto the stack + this.push(parent); + + // return the parent node, so it's also added to the AST + return brace; + } +}); +``` + +### [.addClose](index.js#L244) + +Push a `*.close` node onto `node.nodes`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the created closing node. + +**Example** + +```js +var Node = require('snapdragon-node'); +snapdragon.parser.set('brace', function(node) { + var match = this.match(/^}/); + if (match) { + var parent = this.parent(); + if (parent.type !== 'brace') { + throw new Error('missing opening: ' + '}'); + } + + utils.addClose(parent, Node); + console.log(parent.nodes[parent.nodes.length - 1]): + // { type: 'brace.close', val: '' }; + + // no need to return a node, since the parent + // was already added to the AST + return; + } +}); +``` + +### [.wrapNodes](index.js#L274) + +Wraps the given `node` with `*.open` and `*.close` nodes. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the node + +### [.pushNode](index.js#L299) + +Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Object}**: Returns the child node + +**Example** + +```js +var parent = new Node({type: 'foo'}); +var node = new Node({type: 'bar'}); +utils.pushNode(parent, node); +console.log(parent.nodes[0].type) // 'bar' +console.log(node.parent.type) // 'foo' +``` + +### [.unshiftNode](index.js#L325) + +Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +var parent = new Node({type: 'foo'}); +var node = new Node({type: 'bar'}); +utils.unshiftNode(parent, node); +console.log(parent.nodes[0].type) // 'bar' +console.log(node.parent.type) // 'foo' +``` + +### [.popNode](index.js#L354) + +Pop the last `node` off of `parent.nodes`. The advantage of using this method is that it checks for `node.nodes` and works with any version of `snapdragon-node`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Number|Undefined}**: Returns the length of `node.nodes` or undefined. + +**Example** + +```js +var parent = new Node({type: 'foo'}); +utils.pushNode(parent, new Node({type: 'foo'})); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.popNode(parent); +console.log(parent.nodes.length); //=> 2 +``` + +### [.shiftNode](index.js#L382) + +Shift the first `node` off of `parent.nodes`. The advantage of using this method is that it checks for `node.nodes` and works with any version of `snapdragon-node`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Number|Undefined}**: Returns the length of `node.nodes` or undefined. + +**Example** + +```js +var parent = new Node({type: 'foo'}); +utils.pushNode(parent, new Node({type: 'foo'})); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.shiftNode(parent); +console.log(parent.nodes.length); //=> 2 +``` + +### [.removeNode](index.js#L409) + +Remove the specified `node` from `parent.nodes`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Object|undefined}**: Returns the removed node, if successful, or undefined if it does not exist on `parent.nodes`. + +**Example** + +```js +var parent = new Node({type: 'abc'}); +var foo = new Node({type: 'foo'}); +utils.pushNode(parent, foo); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.removeNode(parent, foo); +console.log(parent.nodes.length); //=> 2 +``` + +### [.isType](index.js#L443) + +Returns true if `node.type` matches the given `type`. Throws a `TypeError` if `node` is not an instance of `Node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(utils.isType(node, 'foo')); // false +console.log(utils.isType(node, 'bar')); // true +``` + +### [.hasType](index.js#L486) + +Returns true if the given `node` has the given `type` in `node.nodes`. Throws a `TypeError` if `node` is not an instance of `Node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'bar'}), + new Node({type: 'baz'}) + ] +}); +console.log(utils.hasType(node, 'xyz')); // false +console.log(utils.hasType(node, 'baz')); // true +``` + +### [.firstOfType](index.js#L519) + +Returns the first node from `node.nodes` of the given `type` + +**Params** + +* `nodes` **{Array}** +* `type` **{String}** +* `returns` **{Object|undefined}**: Returns the first matching node or undefined. + +**Example** + +```js +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'text', val: 'abc'}), + new Node({type: 'text', val: 'xyz'}) + ] +}); + +var textNode = utils.firstOfType(node.nodes, 'text'); +console.log(textNode.val); +//=> 'abc' +``` + +### [.findNode](index.js#L556) + +Returns the node at the specified index, or the first node of the given `type` from `node.nodes`. + +**Params** + +* `nodes` **{Array}** +* `type` **{String|Number}**: Node type or index. +* `returns` **{Object}**: Returns a node or undefined. + +**Example** + +```js +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'text', val: 'abc'}), + new Node({type: 'text', val: 'xyz'}) + ] +}); + +var nodeOne = utils.findNode(node.nodes, 'text'); +console.log(nodeOne.val); +//=> 'abc' + +var nodeTwo = utils.findNode(node.nodes, 1); +console.log(nodeTwo.val); +//=> 'xyz' +``` + +### [.isOpen](index.js#L584) + +Returns true if the given node is an "*.open" node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); + +console.log(utils.isOpen(brace)); // false +console.log(utils.isOpen(open)); // true +console.log(utils.isOpen(close)); // false +``` + +### [.isClose](index.js#L607) + +Returns true if the given node is a "*.close" node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); + +console.log(utils.isClose(brace)); // false +console.log(utils.isClose(open)); // false +console.log(utils.isClose(close)); // true +``` + +### [.hasOpen](index.js#L633) + +Returns true if `node.nodes` **has** an `.open` node + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var open = new Node({type: 'brace.open'}); +console.log(utils.hasOpen(brace)); // false + +brace.pushNode(open); +console.log(utils.hasOpen(brace)); // true +``` + +### [.hasClose](index.js#L663) + +Returns true if `node.nodes` **has** a `.close` node + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var close = new Node({type: 'brace.close'}); +console.log(utils.hasClose(brace)); // false + +brace.pushNode(close); +console.log(utils.hasClose(brace)); // true +``` + +### [.hasOpenAndClose](index.js#L697) + +Returns true if `node.nodes` has both `.open` and `.close` nodes + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); +console.log(utils.hasOpen(brace)); // false +console.log(utils.hasClose(brace)); // false + +brace.pushNode(open); +brace.pushNode(close); +console.log(utils.hasOpen(brace)); // true +console.log(utils.hasClose(brace)); // true +``` + +### [.addType](index.js#L719) + +Push the given `node` onto the `state.inside` array for the given type. This array is used as a specialized "stack" for only the given `node.type`. + +**Params** + +* `state` **{Object}**: The `compiler.state` object or custom state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Array}**: Returns the `state.inside` stack for the given type. + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +utils.addType(state, node); +console.log(state.inside); +//=> { brace: [{type: 'brace'}] } +``` + +### [.removeType](index.js#L759) + +Remove the given `node` from the `state.inside` array for the given type. This array is used as a specialized "stack" for only the given `node.type`. + +**Params** + +* `state` **{Object}**: The `compiler.state` object or custom state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Array}**: Returns the `state.inside` stack for the given type. + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +utils.addType(state, node); +console.log(state.inside); +//=> { brace: [{type: 'brace'}] } +utils.removeType(state, node); +//=> { brace: [] } +``` + +### [.isEmpty](index.js#L788) + +Returns true if `node.val` is an empty string, or `node.nodes` does not contain any non-empty text nodes. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `fn` **{Function}** +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'text'}); +utils.isEmpty(node); //=> true +node.val = 'foo'; +utils.isEmpty(node); //=> false +``` + +### [.isInsideType](index.js#L833) + +Returns true if the `state.inside` stack for the given type exists and has one or more nodes on it. + +**Params** + +* `state` **{Object}** +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +console.log(utils.isInsideType(state, 'brace')); //=> false +utils.addType(state, node); +console.log(utils.isInsideType(state, 'brace')); //=> true +utils.removeType(state, node); +console.log(utils.isInsideType(state, 'brace')); //=> false +``` + +### [.isInside](index.js#L867) + +Returns true if `node` is either a child or grand-child of the given `type`, or `state.inside[type]` is a non-empty array. + +**Params** + +* `state` **{Object}**: Either the `compiler.state` object, if it exists, or a user-supplied state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}**: The `node.type` to check for. +* `returns` **{Boolean}** + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +console.log(utils.isInside(state, open, 'brace')); //=> false +utils.pushNode(node, open); +console.log(utils.isInside(state, open, 'brace')); //=> true +``` + +### [.last](index.js#L915) + +Get the last `n` element from the given `array`. Used for getting +a node from `node.nodes.` + +**Params** + +* `array` **{Array}** +* `n` **{Number}** +* `returns` **{undefined}** + +### [.arrayify](index.js#L935) + +Cast the given `val` to an array. + +**Params** + +* `val` **{any}** +* `returns` **{Array}** + +**Example** + +```js +console.log(utils.arraify('')); +//=> [] +console.log(utils.arraify('foo')); +//=> ['foo'] +console.log(utils.arraify(['foo'])); +//=> ['foo'] +``` + +### [.stringify](index.js#L948) + +Convert the given `val` to a string by joining with `,`. Useful +for creating a cheerio/CSS/DOM-style selector from a list of strings. + +**Params** + +* `val` **{any}** +* `returns` **{Array}** + +### [.trim](index.js#L961) + +Ensure that the given value is a string and call `.trim()` on it, +or return an empty string. + +**Params** + +* `str` **{String}** +* `returns` **{String}** + +## Release history + +Changelog entries are classified using the following labels from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes + +Custom labels used in this changelog: + +* `dependencies`: bumps dependencies +* `housekeeping`: code re-organization, minor edits, or other changes that don't fit in one of the other categories. + +### [3.0.0] - 2017-05-01 + +**Changed** + +* `.emit` was renamed to [.append](#append) +* `.addNode` was renamed to [.pushNode](#pushNode) +* `.getNode` was renamed to [.findNode](#findNode) +* `.isEmptyNodes` was renamed to [.isEmpty](#isEmpty): also now works with `node.nodes` and/or `node.val` + +**Added** + +* [.identity](#identity) +* [.removeNode](#removeNode) +* [.shiftNode](#shiftNode) +* [.popNode](#popNode) + +### [0.1.0] + +First release. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### 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 01, 2017._ \ No newline at end of file diff --git a/node_modules/snapdragon-util/index.js b/node_modules/snapdragon-util/index.js new file mode 100644 index 0000000000000..68a030ec15165 --- /dev/null +++ b/node_modules/snapdragon-util/index.js @@ -0,0 +1,1019 @@ +'use strict'; + +var typeOf = require('kind-of'); +var utils = module.exports; + +/** + * Returns true if the given value is a node. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(utils.isNode(node)); //=> true + * console.log(utils.isNode({})); //=> false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {Boolean} + * @api public + */ + +utils.isNode = function(node) { + return typeOf(node) === 'object' && node.isNode === true; +}; + +/** + * Emit an empty string for the given `node`. + * + * ```js + * // do nothing for beginning-of-string + * snapdragon.compiler.set('bos', utils.noop); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {undefined} + * @api public + */ + +utils.noop = function(node) { + append(this, '', node); +}; + +/** + * Appdend `node.val` to `compiler.output`, exactly as it was created + * by the parser. + * + * ```js + * snapdragon.compiler.set('text', utils.identity); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {undefined} + * @api public + */ + +utils.identity = function(node) { + append(this, node.val, node); +}; + +/** + * Previously named `.emit`, this method appends the given `val` + * to `compiler.output` for the given node. Useful when you know + * what value should be appended advance, regardless of the actual + * value of `node.val`. + * + * ```js + * snapdragon.compiler + * .set('i', function(node) { + * this.mapVisit(node); + * }) + * .set('i.open', utils.append('')) + * .set('i.close', utils.append('')) + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {Function} Returns a compiler middleware function. + * @api public + */ + +utils.append = function(val) { + return function(node) { + append(this, val, node); + }; +}; + +/** + * Used in compiler middleware, this onverts an AST node into + * an empty `text` node and deletes `node.nodes` if it exists. + * The advantage of this method is that, as opposed to completely + * removing the node, indices will not need to be re-calculated + * in sibling nodes, and nothing is appended to the output. + * + * ```js + * utils.toNoop(node); + * // convert `node.nodes` to the given value instead of deleting it + * utils.toNoop(node, []); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Array} `nodes` Optionally pass a new `nodes` value, to replace the existing `node.nodes` array. + * @api public + */ + +utils.toNoop = function(node, nodes) { + if (nodes) { + node.nodes = nodes; + } else { + delete node.nodes; + node.type = 'text'; + node.val = ''; + } +}; + +/** + * Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon + * automatically calls registered compilers, this allows you to pass a visitor + * function. + * + * ```js + * snapdragon.compiler.set('i', function(node) { + * utils.visit(node, function(childNode) { + * // do stuff with "childNode" + * return childNode; + * }); + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `fn` + * @return {Object} returns the node after recursively visiting all child nodes. + * @api public + */ + +utils.visit = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(fn), 'expected a visitor function'); + fn(node); + return node.nodes ? utils.mapVisit(node, fn) : node; +}; + +/** + * Map [visit](#visit) the given `fn` over `node.nodes`. This is called by + * [visit](#visit), use this method if you do not want `fn` to be called on + * the first node. + * + * ```js + * snapdragon.compiler.set('i', function(node) { + * utils.mapVisit(node, function(childNode) { + * // do stuff with "childNode" + * return childNode; + * }); + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Object} `options` + * @param {Function} `fn` + * @return {Object} returns the node + * @api public + */ + +utils.mapVisit = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isArray(node.nodes), 'expected node.nodes to be an array'); + assert(isFunction(fn), 'expected a visitor function'); + + for (var i = 0; i < node.nodes.length; i++) { + utils.visit(node.nodes[i], fn); + } + return node; +}; + +/** + * Unshift an `*.open` node onto `node.nodes`. + * + * ```js + * var Node = require('snapdragon-node'); + * snapdragon.parser.set('brace', function(node) { + * var match = this.match(/^{/); + * if (match) { + * var parent = new Node({type: 'brace'}); + * utils.addOpen(parent, Node); + * console.log(parent.nodes[0]): + * // { type: 'brace.open', val: '' }; + * + * // push the parent "brace" node onto the stack + * this.push(parent); + * + * // return the parent node, so it's also added to the AST + * return brace; + * } + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the created opening node. + * @api public + */ + +utils.addOpen = function(node, Node, val, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + if (typeof val === 'function') { + filter = val; + val = ''; + } + + if (typeof filter === 'function' && !filter(node)) return; + var open = new Node({ type: node.type + '.open', val: val}); + var unshift = node.unshift || node.unshiftNode; + if (typeof unshift === 'function') { + unshift.call(node, open); + } else { + utils.unshiftNode(node, open); + } + return open; +}; + +/** + * Push a `*.close` node onto `node.nodes`. + * + * ```js + * var Node = require('snapdragon-node'); + * snapdragon.parser.set('brace', function(node) { + * var match = this.match(/^}/); + * if (match) { + * var parent = this.parent(); + * if (parent.type !== 'brace') { + * throw new Error('missing opening: ' + '}'); + * } + * + * utils.addClose(parent, Node); + * console.log(parent.nodes[parent.nodes.length - 1]): + * // { type: 'brace.close', val: '' }; + * + * // no need to return a node, since the parent + * // was already added to the AST + * return; + * } + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the created closing node. + * @api public + */ + +utils.addClose = function(node, Node, val, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + if (typeof val === 'function') { + filter = val; + val = ''; + } + + if (typeof filter === 'function' && !filter(node)) return; + var close = new Node({ type: node.type + '.close', val: val}); + var push = node.push || node.pushNode; + if (typeof push === 'function') { + push.call(node, close); + } else { + utils.pushNode(node, close); + } + return close; +}; + +/** + * Wraps the given `node` with `*.open` and `*.close` nodes. + * + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the node + * @api public + */ + +utils.wrapNodes = function(node, Node, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + utils.addOpen(node, Node, filter); + utils.addClose(node, Node, filter); + return node; +}; + +/** + * Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent. + * + * ```js + * var parent = new Node({type: 'foo'}); + * var node = new Node({type: 'bar'}); + * utils.pushNode(parent, node); + * console.log(parent.nodes[0].type) // 'bar' + * console.log(node.parent.type) // 'foo' + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Object} Returns the child node + * @api public + */ + +utils.pushNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + node.define('parent', parent); + parent.nodes = parent.nodes || []; + parent.nodes.push(node); + return node; +}; + +/** + * Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent. + * + * ```js + * var parent = new Node({type: 'foo'}); + * var node = new Node({type: 'bar'}); + * utils.unshiftNode(parent, node); + * console.log(parent.nodes[0].type) // 'bar' + * console.log(node.parent.type) // 'foo' + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {undefined} + * @api public + */ + +utils.unshiftNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + node.define('parent', parent); + parent.nodes = parent.nodes || []; + parent.nodes.unshift(node); +}; + +/** + * Pop the last `node` off of `parent.nodes`. The advantage of + * using this method is that it checks for `node.nodes` and works + * with any version of `snapdragon-node`. + * + * ```js + * var parent = new Node({type: 'foo'}); + * utils.pushNode(parent, new Node({type: 'foo'})); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.popNode(parent); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Number|Undefined} Returns the length of `node.nodes` or undefined. + * @api public + */ + +utils.popNode = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (typeof node.pop === 'function') { + return node.pop(); + } + return node.nodes && node.nodes.pop(); +}; + +/** + * Shift the first `node` off of `parent.nodes`. The advantage of + * using this method is that it checks for `node.nodes` and works + * with any version of `snapdragon-node`. + * + * ```js + * var parent = new Node({type: 'foo'}); + * utils.pushNode(parent, new Node({type: 'foo'})); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.shiftNode(parent); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Number|Undefined} Returns the length of `node.nodes` or undefined. + * @api public + */ + +utils.shiftNode = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (typeof node.shift === 'function') { + return node.shift(); + } + return node.nodes && node.nodes.shift(); +}; + +/** + * Remove the specified `node` from `parent.nodes`. + * + * ```js + * var parent = new Node({type: 'abc'}); + * var foo = new Node({type: 'foo'}); + * utils.pushNode(parent, foo); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.removeNode(parent, foo); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Object|undefined} Returns the removed node, if successful, or undefined if it does not exist on `parent.nodes`. + * @api public + */ + +utils.removeNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent.node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + if (!parent.nodes) { + return null; + } + + if (typeof parent.remove === 'function') { + return parent.remove(node); + } + + var idx = parent.nodes.indexOf(node); + if (idx !== -1) { + return parent.nodes.splice(idx, 1); + } +}; + +/** + * Returns true if `node.type` matches the given `type`. Throws a + * `TypeError` if `node` is not an instance of `Node`. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(utils.isType(node, 'foo')); // false + * console.log(utils.isType(node, 'bar')); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.isType = function(node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + switch (typeOf(type)) { + case 'array': + var types = type.slice(); + for (var i = 0; i < types.length; i++) { + if (utils.isType(node, types[i])) { + return true; + } + } + return false; + case 'string': + return node.type === type; + case 'regexp': + return type.test(node.type); + default: { + throw new TypeError('expected "type" to be an array, string or regexp'); + } + } +}; + +/** + * Returns true if the given `node` has the given `type` in `node.nodes`. + * Throws a `TypeError` if `node` is not an instance of `Node`. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'bar'}), + * new Node({type: 'baz'}) + * ] + * }); + * console.log(utils.hasType(node, 'xyz')); // false + * console.log(utils.hasType(node, 'baz')); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.hasType = function(node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (!Array.isArray(node.nodes)) return false; + for (var i = 0; i < node.nodes.length; i++) { + if (utils.isType(node.nodes[i], type)) { + return true; + } + } + return false; +}; + +/** + * Returns the first node from `node.nodes` of the given `type` + * + * ```js + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'text', val: 'abc'}), + * new Node({type: 'text', val: 'xyz'}) + * ] + * }); + * + * var textNode = utils.firstOfType(node.nodes, 'text'); + * console.log(textNode.val); + * //=> 'abc' + * ``` + * @param {Array} `nodes` + * @param {String} `type` + * @return {Object|undefined} Returns the first matching node or undefined. + * @api public + */ + +utils.firstOfType = function(nodes, type) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + if (utils.isType(node, type)) { + return node; + } + } +}; + +/** + * Returns the node at the specified index, or the first node of the + * given `type` from `node.nodes`. + * + * ```js + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'text', val: 'abc'}), + * new Node({type: 'text', val: 'xyz'}) + * ] + * }); + * + * var nodeOne = utils.findNode(node.nodes, 'text'); + * console.log(nodeOne.val); + * //=> 'abc' + * + * var nodeTwo = utils.findNode(node.nodes, 1); + * console.log(nodeTwo.val); + * //=> 'xyz' + * ``` + * + * @param {Array} `nodes` + * @param {String|Number} `type` Node type or index. + * @return {Object} Returns a node or undefined. + * @api public + */ + +utils.findNode = function(nodes, type) { + if (!Array.isArray(nodes)) { + return null; + } + if (typeof type === 'number') { + return nodes[type]; + } + return utils.firstOfType(nodes, type); +}; + +/** + * Returns true if the given node is an "*.open" node. + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * + * console.log(utils.isOpen(brace)); // false + * console.log(utils.isOpen(open)); // true + * console.log(utils.isOpen(close)); // false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.isOpen = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + return node.type.slice(-5) === '.open'; +}; + +/** + * Returns true if the given node is a "*.close" node. + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * + * console.log(utils.isClose(brace)); // false + * console.log(utils.isClose(open)); // false + * console.log(utils.isClose(close)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.isClose = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + return node.type.slice(-6) === '.close'; +}; + +/** + * Returns true if `node.nodes` **has** an `.open` node + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var open = new Node({type: 'brace.open'}); + * console.log(utils.hasOpen(brace)); // false + * + * brace.pushNode(open); + * console.log(utils.hasOpen(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasOpen = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + var first = node.first || node.nodes ? node.nodes[0] : null; + if (utils.isNode(first)) { + return first.type === node.type + '.open'; + } + return false; +}; + +/** + * Returns true if `node.nodes` **has** a `.close` node + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var close = new Node({type: 'brace.close'}); + * console.log(utils.hasClose(brace)); // false + * + * brace.pushNode(close); + * console.log(utils.hasClose(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasClose = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + var last = node.last || node.nodes ? node.nodes[node.nodes.length - 1] : null; + if (utils.isNode(last)) { + return last.type === node.type + '.close'; + } + return false; +}; + +/** + * Returns true if `node.nodes` has both `.open` and `.close` nodes + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * console.log(utils.hasOpen(brace)); // false + * console.log(utils.hasClose(brace)); // false + * + * brace.pushNode(open); + * brace.pushNode(close); + * console.log(utils.hasOpen(brace)); // true + * console.log(utils.hasClose(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasOpenAndClose = function(node) { + return utils.hasOpen(node) && utils.hasClose(node); +}; + +/** + * Push the given `node` onto the `state.inside` array for the + * given type. This array is used as a specialized "stack" for + * only the given `node.type`. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * utils.addType(state, node); + * console.log(state.inside); + * //=> { brace: [{type: 'brace'}] } + * ``` + * @param {Object} `state` The `compiler.state` object or custom state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Array} Returns the `state.inside` stack for the given type. + * @api public + */ + +utils.addType = function(state, node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + var type = node.parent + ? node.parent.type + : node.type.replace(/\.open$/, ''); + + if (!state.hasOwnProperty('inside')) { + state.inside = {}; + } + if (!state.inside.hasOwnProperty(type)) { + state.inside[type] = []; + } + + var arr = state.inside[type]; + arr.push(node); + return arr; +}; + +/** + * Remove the given `node` from the `state.inside` array for the + * given type. This array is used as a specialized "stack" for + * only the given `node.type`. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * utils.addType(state, node); + * console.log(state.inside); + * //=> { brace: [{type: 'brace'}] } + * utils.removeType(state, node); + * //=> { brace: [] } + * ``` + * @param {Object} `state` The `compiler.state` object or custom state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Array} Returns the `state.inside` stack for the given type. + * @api public + */ + +utils.removeType = function(state, node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + var type = node.parent + ? node.parent.type + : node.type.replace(/\.close$/, ''); + + if (state.inside.hasOwnProperty(type)) { + return state.inside[type].pop(); + } +}; + +/** + * Returns true if `node.val` is an empty string, or `node.nodes` does + * not contain any non-empty text nodes. + * + * ```js + * var node = new Node({type: 'text'}); + * utils.isEmpty(node); //=> true + * node.val = 'foo'; + * utils.isEmpty(node); //=> false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `fn` + * @return {Boolean} + * @api public + */ + +utils.isEmpty = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + if (!Array.isArray(node.nodes)) { + if (node.type !== 'text') { + return true; + } + if (typeof fn === 'function') { + return fn(node, node.parent); + } + return !utils.trim(node.val); + } + + for (var i = 0; i < node.nodes.length; i++) { + var child = node.nodes[i]; + if (utils.isOpen(child) || utils.isClose(child)) { + continue; + } + if (!utils.isEmpty(child, fn)) { + return false; + } + } + + return true; +}; + +/** + * Returns true if the `state.inside` stack for the given type exists + * and has one or more nodes on it. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * console.log(utils.isInsideType(state, 'brace')); //=> false + * utils.addType(state, node); + * console.log(utils.isInsideType(state, 'brace')); //=> true + * utils.removeType(state, node); + * console.log(utils.isInsideType(state, 'brace')); //=> false + * ``` + * @param {Object} `state` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.isInsideType = function(state, type) { + assert(isObject(state), 'expected state to be an object'); + assert(isString(type), 'expected type to be a string'); + + if (!state.hasOwnProperty('inside')) { + return false; + } + + if (!state.inside.hasOwnProperty(type)) { + return false; + } + + return state.inside[type].length > 0; +}; + +/** + * Returns true if `node` is either a child or grand-child of the given `type`, + * or `state.inside[type]` is a non-empty array. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * console.log(utils.isInside(state, open, 'brace')); //=> false + * utils.pushNode(node, open); + * console.log(utils.isInside(state, open, 'brace')); //=> true + * ``` + * @param {Object} `state` Either the `compiler.state` object, if it exists, or a user-supplied state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` The `node.type` to check for. + * @return {Boolean} + * @api public + */ + +utils.isInside = function(state, node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + if (Array.isArray(type)) { + for (var i = 0; i < type.length; i++) { + if (utils.isInside(state, node, type[i])) { + return true; + } + } + return false; + } + + var parent = node.parent; + if (typeof type === 'string') { + return (parent && parent.type === type) || utils.isInsideType(state, type); + } + + if (typeOf(type) === 'regexp') { + if (parent && parent.type && type.test(parent.type)) { + return true; + } + + var keys = Object.keys(state.inside); + var len = keys.length; + var idx = -1; + while (++idx < len) { + var key = keys[idx]; + var val = state.inside[key]; + + if (Array.isArray(val) && val.length !== 0 && type.test(key)) { + return true; + } + } + } + return false; +}; + +/** + * Get the last `n` element from the given `array`. Used for getting + * a node from `node.nodes.` + * + * @param {Array} `array` + * @param {Number} `n` + * @return {undefined} + * @api public + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Cast the given `val` to an array. + * + * ```js + * console.log(utils.arrayify('')); + * //=> [] + * console.log(utils.arrayify('foo')); + * //=> ['foo'] + * console.log(utils.arrayify(['foo'])); + * //=> ['foo'] + * ``` + * @param {any} `val` + * @return {Array} + * @api public + */ + +utils.arrayify = function(val) { + if (typeof val === 'string' && val !== '') { + return [val]; + } + if (!Array.isArray(val)) { + return []; + } + return val; +}; + +/** + * Convert the given `val` to a string by joining with `,`. Useful + * for creating a cheerio/CSS/DOM-style selector from a list of strings. + * + * @param {any} `val` + * @return {Array} + * @api public + */ + +utils.stringify = function(val) { + return utils.arrayify(val).join(','); +}; + +/** + * Ensure that the given value is a string and call `.trim()` on it, + * or return an empty string. + * + * @param {String} `str` + * @return {String} + * @api public + */ + +utils.trim = function(str) { + return typeof str === 'string' ? str.trim() : ''; +}; + +/** + * Return true if val is an object + */ + +function isObject(val) { + return typeOf(val) === 'object'; +} + +/** + * Return true if val is a string + */ + +function isString(val) { + return typeof val === 'string'; +} + +/** + * Return true if val is a function + */ + +function isFunction(val) { + return typeof val === 'function'; +} + +/** + * Return true if val is an array + */ + +function isArray(val) { + return Array.isArray(val); +} + +/** + * Shim to ensure the `.append` methods work with any version of snapdragon + */ + +function append(compiler, val, node) { + if (typeof compiler.append !== 'function') { + return compiler.emit(val, node); + } + return compiler.append(val, node); +} + +/** + * Simplified assertion. Throws an error is `val` is falsey. + */ + +function assert(val, message) { + if (!val) throw new Error(message); +} diff --git a/node_modules/snapdragon-util/package.json b/node_modules/snapdragon-util/package.json new file mode 100644 index 0000000000000..434c4f50ba43e --- /dev/null +++ b/node_modules/snapdragon-util/package.json @@ -0,0 +1,65 @@ +{ + "name": "snapdragon-util", + "description": "Utilities for the snapdragon parser/compiler.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/snapdragon-util", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/snapdragon-util", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon-util/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.2.0" + }, + "devDependencies": { + "define-property": "^1.0.0", + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.0", + "isobject": "^3.0.0", + "mocha": "^3.3.0", + "snapdragon": "^0.11.0", + "snapdragon-node": "^1.0.6" + }, + "keywords": [ + "capture", + "compile", + "compiler", + "convert", + "match", + "parse", + "parser", + "plugin", + "render", + "snapdragon", + "snapdragonplugin", + "transform", + "util" + ], + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/snapdragon/LICENSE b/node_modules/snapdragon/LICENSE new file mode 100644 index 0000000000000..1e49edf81fee9 --- /dev/null +++ b/node_modules/snapdragon/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/snapdragon/README.md b/node_modules/snapdragon/README.md new file mode 100644 index 0000000000000..4006e10fd4771 --- /dev/null +++ b/node_modules/snapdragon/README.md @@ -0,0 +1,321 @@ +# snapdragon [![NPM version](https://img.shields.io/npm/v/snapdragon.svg?style=flat)](https://www.npmjs.com/package/snapdragon) [![NPM downloads](https://img.shields.io/npm/dm/snapdragon.svg?style=flat)](https://npmjs.org/package/snapdragon) [![Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon.svg?style=flat)](https://travis-ci.org/jonschlinkert/snapdragon) + +> Fast, pluggable and easy-to-use parser-renderer factory. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon +``` + +Created by [jonschlinkert](https://github.com/jonschlinkert) and [doowb](https://github.com/doowb). + +**Features** + +* Bootstrap your own parser, get sourcemap support for free +* All parsing and compiling is handled by simple, reusable middleware functions +* Inspired by the parsers in [pug](http://jade-lang.com) and [css](https://github.com/reworkcss/css). + +## History + +### v0.5.0 + +**Breaking changes** + +Substantial breaking changes were made in v0.5.0! Most of these changes are part of a larger refactor that will be finished in 0.6.0, including the introduction of a `Lexer` class. + +* Renderer was renamed to `Compiler` +* the `.render` method was renamed to `.compile` +* Many other smaller changes. A more detailed overview will be provided in 0.6.0. If you don't have to time review code, I recommend you wait for the 0.6.0 release. + +## Usage examples + +```js +var Snapdragon = require('snapdragon'); +var snapdragon = new Snapdragon(); +``` + +**Parse** + +```js +var ast = snapdragon.parser('some string', options) + // parser middleware that can be called by other middleware + .set('foo', function () {}) + // parser middleware, runs immediately in the order defined + .use(bar()) + .use(baz()) +``` + +**Render** + +```js +// pass the `ast` from the parse method +var res = snapdragon.compiler(ast) + // compiler middleware, called when the name of the middleware + // matches the `node.type` (defined in a parser middleware) + .set('bar', function () {}) + .set('baz', function () {}) + .compile() +``` + +See the [examples](./examples/). + +## Getting started + +**Parsers** + +Parsers are middleware functions used for parsing a string into an ast node. + +```js +var ast = snapdragon.parser(str, options) + .use(function() { + var pos = this.position(); + var m = this.match(/^\./); + if (!m) return; + return pos({ + // `type` specifies the compiler to use + type: 'dot', + val: m[0] + }); + }) +``` + +**AST node** + +When the parser finds a match, `pos()` is called, pushing a token for that node onto the ast that looks something like: + +```js +{ type: 'dot', + val: '.', + position: + { start: { lineno: 1, column: 1 }, + end: { lineno: 1, column: 2 } }} +``` + +**Renderers** + +Renderers are _named_ middleware functions that visit over an array of ast nodes to compile a string. + +```js +var res = snapdragon.compiler(ast) + .set('dot', function (node) { + console.log(node.val) + //=> '.' + return this.emit(node.val); + }) +``` + +**Source maps** + +If you want source map support, make sure to emit the position as well. + +```js +var res = snapdragon.compiler(ast) + .set('dot', function (node) { + return this.emit(node.val, node.position); + }) +``` + +## Docs + +### Parser middleware + +A parser middleware is a function that returns an abject called a `token`. This token is pushed onto the AST as a node. + +**Example token** + +```js +{ type: 'dot', + val: '.', + position: + { start: { lineno: 1, column: 1 }, + end: { lineno: 1, column: 2 } }} +``` + +**Example parser middleware** + +Match a single `.` in a string: + +1. Get the starting position by calling `this.position()` +2. pass a regex for matching a single dot to the `.match` method +3. if **no match** is found, return `undefined` +4. if a **match** is found, `pos()` is called, which returns a token with: + - `type`: the name of the [compiler] to use + - `val`: The actual value captured by the regex. In this case, a `.`. Note that you can capture and return whatever will be needed by the corresponding [compiler]. + - The ending position: automatically calculated by adding the length of the first capture group to the starting position. + +## Renderer middleware + +Renderers are run when the name of the compiler middleware matches the `type` defined on an ast `node` (which is defined in a parser). + +**Example** + +Exercise: Parse a dot, then compile it as an escaped dot. + +```js +var ast = snapdragon.parser('.') + .use(function () { + var pos = this.position(); + var m = this.match(/^\./); + if (!m) return; + return pos({ + // define the `type` of compiler to use + type: 'dot', + val: m[0] + }) + }) + +var result = snapdragon.compiler(ast) + .set('dot', function (node) { + return this.emit('\\' + node.val); + }) + .compile() + +console.log(result.output); +//=> '\.' +``` + +## API + +### [Parser](lib/parser.js#L19) + +Create a new `Parser` with the given `input` and `options`. + +**Params** + +* `input` **{String}** +* `options` **{Object}** + +### [.define](lib/parser.js#L103) + +Define a non-enumberable property on the `Parser` instance. + +**Example** + +```js +parser.define('foo', 'bar'); +``` + +**Params** + +* `key` **{String}**: propery name +* `val` **{any}**: property value +* `returns` **{Object}**: Returns the Parser instance for chaining. + +Set parser `name` with the given `fn` + +**Params** + +* `name` **{String}** +* `fn` **{Function}** + +Get parser `name` + +**Params** + +* `name` **{String}** + +Push a `token` onto the `type` stack. + +**Params** + +* `type` **{String}** +* `returns` **{Object}** `token` + +Pop a token off of the `type` stack + +**Params** + +* `type` **{String}** +* `returns` **{Object}**: Returns a token + +Return true if inside a `stack` node. Types are `braces`, `parens` or `brackets`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +parser.isType(node, 'brace'); +``` + +**Params** + +* `node` **{Object}** +* `type` **{String}** +* `returns` **{Boolean}** + +### [.define](lib/compiler.js#L71) + +Define a non-enumberable property on the `Compiler` instance. + +**Example** + +```js +compiler.define('foo', 'bar'); +``` + +**Params** + +* `key` **{String}**: propery name +* `val` **{any}**: property value +* `returns` **{Object}**: Returns the Compiler instance for chaining. + +## About + +### Related projects + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.") +* [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.") +* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Convert extended globs to regex-compatible strings. Add (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.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 106 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [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/snapdragon/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 10, 2016._ \ No newline at end of file diff --git a/node_modules/snapdragon/index.js b/node_modules/snapdragon/index.js new file mode 100644 index 0000000000000..235b464bac441 --- /dev/null +++ b/node_modules/snapdragon/index.js @@ -0,0 +1,174 @@ +'use strict'; + +var Base = require('base'); +var define = require('define-property'); +var Compiler = require('./lib/compiler'); +var Parser = require('./lib/parser'); +var utils = require('./lib/utils'); +var regexCache = {}; +var cache = {}; + +/** + * Create a new instance of `Snapdragon` with the given `options`. + * + * ```js + * var snapdragon = new Snapdragon(); + * ``` + * + * @param {Object} `options` + * @api public + */ + +function Snapdragon(options) { + Base.call(this, null, options); + this.options = utils.extend({source: 'string'}, this.options); + this.compiler = new Compiler(this.options); + this.parser = new Parser(this.options); + + Object.defineProperty(this, 'compilers', { + get: function() { + return this.compiler.compilers; + } + }); + + Object.defineProperty(this, 'parsers', { + get: function() { + return this.parser.parsers; + } + }); + + Object.defineProperty(this, 'regex', { + get: function() { + return this.parser.regex; + } + }); +} + +/** + * Inherit Base + */ + +Base.extend(Snapdragon); + +/** + * Add a parser to `snapdragon.parsers` for capturing the given `type` using + * the specified regex or parser function. A function is useful if you need + * to customize how the token is created and/or have access to the parser + * instance to check options, etc. + * + * ```js + * snapdragon + * .capture('slash', /^\//) + * .capture('dot', function() { + * var pos = this.position(); + * var m = this.match(/^\./); + * if (!m) return; + * return pos({ + * type: 'dot', + * val: m[0] + * }); + * }); + * ``` + * @param {String} `type` + * @param {RegExp|Function} `regex` + * @return {Object} Returns the parser instance for chaining + * @api public + */ + +Snapdragon.prototype.capture = function() { + return this.parser.capture.apply(this.parser, arguments); +}; + +/** + * Register a plugin `fn`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * snapdragon.use(function() { + * console.log(this); //<= snapdragon instance + * console.log(this.parser); //<= parser instance + * console.log(this.compiler); //<= compiler instance + * }); + * ``` + * @param {Object} `fn` + * @api public + */ + +Snapdragon.prototype.use = function(fn) { + fn.call(this, this); + return this; +}; + +/** + * Parse the given `str`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * // register parsers + * snapdragon.parser.use(function() {}); + * + * // parse + * var ast = snapdragon.parse('foo/bar'); + * console.log(ast); + * ``` + * @param {String} `str` + * @param {Object} `options` Set `options.sourcemap` to true to enable source maps. + * @return {Object} Returns an AST. + * @api public + */ + +Snapdragon.prototype.parse = function(str, options) { + this.options = utils.extend({}, this.options, options); + var parsed = this.parser.parse(str, this.options); + + // add non-enumerable parser reference + define(parsed, 'parser', this.parser); + return parsed; +}; + +/** + * Compile the given `AST`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * // register plugins + * snapdragon.use(function() {}); + * // register parser plugins + * snapdragon.parser.use(function() {}); + * // register compiler plugins + * snapdragon.compiler.use(function() {}); + * + * // parse + * var ast = snapdragon.parse('foo/bar'); + * + * // compile + * var res = snapdragon.compile(ast); + * console.log(res.output); + * ``` + * @param {Object} `ast` + * @param {Object} `options` + * @return {Object} Returns an object with an `output` property with the rendered string. + * @api public + */ + +Snapdragon.prototype.compile = function(ast, options) { + this.options = utils.extend({}, this.options, options); + var compiled = this.compiler.compile(ast, this.options); + + // add non-enumerable compiler reference + define(compiled, 'compiler', this.compiler); + return compiled; +}; + +/** + * Expose `Snapdragon` + */ + +module.exports = Snapdragon; + +/** + * Expose `Parser` and `Compiler` + */ + +module.exports.Compiler = Compiler; +module.exports.Parser = Parser; diff --git a/node_modules/snapdragon/lib/compiler.js b/node_modules/snapdragon/lib/compiler.js new file mode 100644 index 0000000000000..0ce9d2178bd70 --- /dev/null +++ b/node_modules/snapdragon/lib/compiler.js @@ -0,0 +1,177 @@ +'use strict'; + +var use = require('use'); +var define = require('define-property'); +var debug = require('debug')('snapdragon:compiler'); +var utils = require('./utils'); + +/** + * Create a new `Compiler` with the given `options`. + * @param {Object} `options` + */ + +function Compiler(options, state) { + debug('initializing', __filename); + this.options = utils.extend({source: 'string'}, options); + this.state = state || {}; + this.compilers = {}; + this.output = ''; + this.set('eos', function(node) { + return this.emit(node.val, node); + }); + this.set('noop', function(node) { + return this.emit(node.val, node); + }); + this.set('bos', function(node) { + return this.emit(node.val, node); + }); + use(this); +} + +/** + * Prototype methods + */ + +Compiler.prototype = { + + /** + * Throw an error message with details including the cursor position. + * @param {String} `msg` Message to use in the Error. + */ + + error: function(msg, node) { + var pos = node.position || {start: {column: 0}}; + var message = this.options.source + ' column:' + pos.start.column + ': ' + msg; + + var err = new Error(message); + err.reason = msg; + err.column = pos.start.column; + err.source = this.pattern; + + if (this.options.silent) { + this.errors.push(err); + } else { + throw err; + } + }, + + /** + * Define a non-enumberable property on the `Compiler` instance. + * + * ```js + * compiler.define('foo', 'bar'); + * ``` + * @name .define + * @param {String} `key` propery name + * @param {any} `val` property value + * @return {Object} Returns the Compiler instance for chaining. + * @api public + */ + + define: function(key, val) { + define(this, key, val); + return this; + }, + + /** + * Emit `node.val` + */ + + emit: function(str, node) { + this.output += str; + return str; + }, + + /** + * Add a compiler `fn` with the given `name` + */ + + set: function(name, fn) { + this.compilers[name] = fn; + return this; + }, + + /** + * Get compiler `name`. + */ + + get: function(name) { + return this.compilers[name]; + }, + + /** + * Get the previous AST node. + */ + + prev: function(n) { + return this.ast.nodes[this.idx - (n || 1)] || { type: 'bos', val: '' }; + }, + + /** + * Get the next AST node. + */ + + next: function(n) { + return this.ast.nodes[this.idx + (n || 1)] || { type: 'eos', val: '' }; + }, + + /** + * Visit `node`. + */ + + visit: function(node, nodes, i) { + var fn = this.compilers[node.type]; + this.idx = i; + + if (typeof fn !== 'function') { + throw this.error('compiler "' + node.type + '" is not registered', node); + } + return fn.call(this, node, nodes, i); + }, + + /** + * Map visit over array of `nodes`. + */ + + mapVisit: function(nodes) { + if (!Array.isArray(nodes)) { + throw new TypeError('expected an array'); + } + var len = nodes.length; + var idx = -1; + while (++idx < len) { + this.visit(nodes[idx], nodes, idx); + } + return this; + }, + + /** + * Compile `ast`. + */ + + compile: function(ast, options) { + var opts = utils.extend({}, this.options, options); + this.ast = ast; + this.parsingErrors = this.ast.errors; + this.output = ''; + + // source map support + if (opts.sourcemap) { + var sourcemaps = require('./source-maps'); + sourcemaps(this); + this.mapVisit(this.ast.nodes); + this.applySourceMaps(); + this.map = opts.sourcemap === 'generator' ? this.map : this.map.toJSON(); + return this; + } + + this.mapVisit(this.ast.nodes); + return this; + } +}; + +/** + * Expose `Compiler` + */ + +module.exports = Compiler; diff --git a/node_modules/snapdragon/lib/parser.js b/node_modules/snapdragon/lib/parser.js new file mode 100644 index 0000000000000..a5a9b31cad30e --- /dev/null +++ b/node_modules/snapdragon/lib/parser.js @@ -0,0 +1,533 @@ +'use strict'; + +var use = require('use'); +var util = require('util'); +var Cache = require('map-cache'); +var define = require('define-property'); +var debug = require('debug')('snapdragon:parser'); +var Position = require('./position'); +var utils = require('./utils'); + +/** + * Create a new `Parser` with the given `input` and `options`. + * @param {String} `input` + * @param {Object} `options` + * @api public + */ + +function Parser(options) { + debug('initializing', __filename); + this.options = utils.extend({source: 'string'}, options); + this.init(this.options); + use(this); +} + +/** + * Prototype methods + */ + +Parser.prototype = { + constructor: Parser, + + init: function(options) { + this.orig = ''; + this.input = ''; + this.parsed = ''; + + this.column = 1; + this.line = 1; + + this.regex = new Cache(); + this.errors = this.errors || []; + this.parsers = this.parsers || {}; + this.types = this.types || []; + this.sets = this.sets || {}; + this.fns = this.fns || []; + this.currentType = 'root'; + + var pos = this.position(); + this.bos = pos({type: 'bos', val: ''}); + + this.ast = { + type: 'root', + errors: this.errors, + nodes: [this.bos] + }; + + define(this.bos, 'parent', this.ast); + this.nodes = [this.ast]; + + this.count = 0; + this.setCount = 0; + this.stack = []; + }, + + /** + * Throw a formatted error with the cursor column and `msg`. + * @param {String} `msg` Message to use in the Error. + */ + + error: function(msg, node) { + var pos = node.position || {start: {column: 0, line: 0}}; + var line = pos.start.line; + var column = pos.start.column; + var source = this.options.source; + + var message = source + ' : ' + msg; + var err = new Error(message); + err.source = source; + err.reason = msg; + err.pos = pos; + + if (this.options.silent) { + this.errors.push(err); + } else { + throw err; + } + }, + + /** + * Define a non-enumberable property on the `Parser` instance. + * + * ```js + * parser.define('foo', 'bar'); + * ``` + * @name .define + * @param {String} `key` propery name + * @param {any} `val` property value + * @return {Object} Returns the Parser instance for chaining. + * @api public + */ + + define: function(key, val) { + define(this, key, val); + return this; + }, + + /** + * Mark position and patch `node.position`. + */ + + position: function() { + var start = { line: this.line, column: this.column }; + var self = this; + + return function(node) { + define(node, 'position', new Position(start, self)); + return node; + }; + }, + + /** + * Set parser `name` with the given `fn` + * @param {String} `name` + * @param {Function} `fn` + * @api public + */ + + set: function(type, fn) { + if (this.types.indexOf(type) === -1) { + this.types.push(type); + } + this.parsers[type] = fn.bind(this); + return this; + }, + + /** + * Get parser `name` + * @param {String} `name` + * @api public + */ + + get: function(name) { + return this.parsers[name]; + }, + + /** + * Push a `token` onto the `type` stack. + * + * @param {String} `type` + * @return {Object} `token` + * @api public + */ + + push: function(type, token) { + this.sets[type] = this.sets[type] || []; + this.count++; + this.stack.push(token); + return this.sets[type].push(token); + }, + + /** + * Pop a token off of the `type` stack + * @param {String} `type` + * @returns {Object} Returns a token + * @api public + */ + + pop: function(type) { + this.sets[type] = this.sets[type] || []; + this.count--; + this.stack.pop(); + return this.sets[type].pop(); + }, + + /** + * Return true if inside a `stack` node. Types are `braces`, `parens` or `brackets`. + * + * @param {String} `type` + * @return {Boolean} + * @api public + */ + + isInside: function(type) { + this.sets[type] = this.sets[type] || []; + return this.sets[type].length > 0; + }, + + /** + * Return true if `node` is the given `type`. + * + * ```js + * parser.isType(node, 'brace'); + * ``` + * @param {Object} `node` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + + isType: function(node, type) { + return node && node.type === type; + }, + + /** + * Get the previous AST node + * @return {Object} + */ + + prev: function(n) { + return this.stack.length > 0 + ? utils.last(this.stack, n) + : utils.last(this.nodes, n); + }, + + /** + * Update line and column based on `str`. + */ + + consume: function(len) { + this.input = this.input.substr(len); + }, + + /** + * Update column based on `str`. + */ + + updatePosition: function(str, len) { + var lines = str.match(/\n/g); + if (lines) this.line += lines.length; + var i = str.lastIndexOf('\n'); + this.column = ~i ? len - i : this.column + len; + this.parsed += str; + this.consume(len); + }, + + /** + * Match `regex`, return captures, and update the cursor position by `match[0]` length. + * @param {RegExp} `regex` + * @return {Object} + */ + + match: function(regex) { + var m = regex.exec(this.input); + if (m) { + this.updatePosition(m[0], m[0].length); + return m; + } + }, + + /** + * Capture `type` with the given regex. + * @param {String} `type` + * @param {RegExp} `regex` + * @return {Function} + */ + + capture: function(type, regex) { + if (typeof regex === 'function') { + return this.set.apply(this, arguments); + } + + this.regex.set(type, regex); + this.set(type, function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(regex); + if (!m || !m[0]) return; + + var prev = this.prev(); + var node = pos({ + type: type, + val: m[0], + parsed: parsed, + rest: this.input + }); + + if (m[1]) { + node.inner = m[1]; + } + + define(node, 'inside', this.stack.length > 0); + define(node, 'parent', prev); + prev.nodes.push(node); + }.bind(this)); + return this; + }, + + /** + * Create a parser with open and close for parens, + * brackets or braces + */ + + capturePair: function(type, openRegex, closeRegex, fn) { + this.sets[type] = this.sets[type] || []; + + /** + * Open + */ + + this.set(type + '.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(openRegex); + if (!m || !m[0]) return; + + var val = m[0]; + this.setCount++; + this.specialChars = true; + var open = pos({ + type: type + '.open', + val: val, + rest: this.input + }); + + if (typeof m[1] !== 'undefined') { + open.inner = m[1]; + } + + var prev = this.prev(); + var node = pos({ + type: type, + nodes: [open] + }); + + define(node, 'rest', this.input); + define(node, 'parsed', parsed); + define(node, 'prefix', m[1]); + define(node, 'parent', prev); + define(open, 'parent', node); + + if (typeof fn === 'function') { + fn.call(this, open, node); + } + + this.push(type, node); + prev.nodes.push(node); + }); + + /** + * Close + */ + + this.set(type + '.close', function() { + var pos = this.position(); + var m = this.match(closeRegex); + if (!m || !m[0]) return; + + var parent = this.pop(type); + var node = pos({ + type: type + '.close', + rest: this.input, + suffix: m[1], + val: m[0] + }); + + if (!this.isType(parent, type)) { + if (this.options.strict) { + throw new Error('missing opening "' + type + '"'); + } + + this.setCount--; + node.escaped = true; + return node; + } + + if (node.suffix === '\\') { + parent.escaped = true; + node.escaped = true; + } + + parent.nodes.push(node); + define(node, 'parent', parent); + }); + + return this; + }, + + /** + * Capture end-of-string + */ + + eos: function() { + var pos = this.position(); + if (this.input) return; + var prev = this.prev(); + + while (prev.type !== 'root' && !prev.visited) { + if (this.options.strict === true) { + throw new SyntaxError('invalid syntax:' + util.inspect(prev, null, 2)); + } + + if (!hasDelims(prev)) { + prev.parent.escaped = true; + prev.escaped = true; + } + + visit(prev, function(node) { + if (!hasDelims(node.parent)) { + node.parent.escaped = true; + node.escaped = true; + } + }); + + prev = prev.parent; + } + + var tok = pos({ + type: 'eos', + val: this.append || '' + }); + + define(tok, 'parent', this.ast); + return tok; + }, + + /** + * Run parsers to advance the cursor position + */ + + next: function() { + var parsed = this.parsed; + var len = this.types.length; + var idx = -1; + var tok; + + while (++idx < len) { + if ((tok = this.parsers[this.types[idx]].call(this))) { + define(tok, 'rest', this.input); + define(tok, 'parsed', parsed); + this.last = tok; + return tok; + } + } + }, + + /** + * Parse the given string. + * @return {Array} + */ + + parse: function(input) { + if (typeof input !== 'string') { + throw new TypeError('expected a string'); + } + + this.init(this.options); + this.orig = input; + this.input = input; + var self = this; + + function parse() { + // check input before calling `.next()` + input = self.input; + + // get the next AST ndoe + var node = self.next(); + if (node) { + var prev = self.prev(); + if (prev) { + define(node, 'parent', prev); + if (prev.nodes) { + prev.nodes.push(node); + } + } + + if (self.sets.hasOwnProperty(prev.type)) { + self.currentType = prev.type; + } + } + + // if we got here but input is not changed, throw an error + if (self.input && input === self.input) { + throw new Error('no parsers registered for: "' + self.input.slice(0, 5) + '"'); + } + } + + while (this.input) parse(); + if (this.stack.length && this.options.strict) { + var node = this.stack.pop(); + throw this.error('missing opening ' + node.type + ': "' + this.orig + '"'); + } + + var eos = this.eos(); + var tok = this.prev(); + if (tok.type !== 'eos') { + this.ast.nodes.push(eos); + } + + return this.ast; + } +}; + +/** + * Visit `node` with the given `fn` + */ + +function visit(node, fn) { + if (!node.visited) { + define(node, 'visited', true); + return node.nodes ? mapVisit(node.nodes, fn) : fn(node); + } + return node; +} + +/** + * Map visit over array of `nodes`. + */ + +function mapVisit(nodes, fn) { + var len = nodes.length; + var idx = -1; + while (++idx < len) { + visit(nodes[idx], fn); + } +} + +function hasOpen(node) { + return node.nodes && node.nodes[0].type === (node.type + '.open'); +} + +function hasClose(node) { + return node.nodes && utils.last(node.nodes).type === (node.type + '.close'); +} + +function hasDelims(node) { + return hasOpen(node) && hasClose(node); +} + +/** + * Expose `Parser` + */ + +module.exports = Parser; diff --git a/node_modules/snapdragon/lib/position.js b/node_modules/snapdragon/lib/position.js new file mode 100644 index 0000000000000..c859696adc84f --- /dev/null +++ b/node_modules/snapdragon/lib/position.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-property'); + +/** + * Store position for a node + */ + +module.exports = function Position(start, parser) { + this.start = start; + this.end = { line: parser.line, column: parser.column }; + define(this, 'content', parser.orig); + define(this, 'source', parser.options.source); +}; diff --git a/node_modules/snapdragon/lib/source-maps.js b/node_modules/snapdragon/lib/source-maps.js new file mode 100644 index 0000000000000..d8e638b48d2a2 --- /dev/null +++ b/node_modules/snapdragon/lib/source-maps.js @@ -0,0 +1,145 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var define = require('define-property'); +var utils = require('./utils'); + +/** + * Expose `mixin()`. + * This code is based on `source-maps-support.js` in reworkcss/css + * https://github.com/reworkcss/css/blob/master/lib/stringify/source-map-support.js + * Copyright (c) 2012 TJ Holowaychuk + */ + +module.exports = mixin; + +/** + * Mixin source map support into `compiler`. + * + * @param {Object} `compiler` + * @api public + */ + +function mixin(compiler) { + define(compiler, '_comment', compiler.comment); + compiler.map = new utils.SourceMap.SourceMapGenerator(); + compiler.position = { line: 1, column: 1 }; + compiler.content = {}; + compiler.files = {}; + + for (var key in exports) { + define(compiler, key, exports[key]); + } +} + +/** + * Update position. + * + * @param {String} str + */ + +exports.updatePosition = function(str) { + var lines = str.match(/\n/g); + if (lines) this.position.line += lines.length; + var i = str.lastIndexOf('\n'); + this.position.column = ~i ? str.length - i : this.position.column + str.length; +}; + +/** + * Emit `str` with `position`. + * + * @param {String} str + * @param {Object} [pos] + * @return {String} + */ + +exports.emit = function(str, node) { + var position = node.position || {}; + var source = position.source; + if (source) { + if (position.filepath) { + source = utils.unixify(position.filepath); + } + + this.map.addMapping({ + source: source, + generated: { + line: this.position.line, + column: Math.max(this.position.column - 1, 0) + }, + original: { + line: position.start.line, + column: position.start.column - 1 + } + }); + + if (position.content) { + this.addContent(source, position); + } + if (position.filepath) { + this.addFile(source, position); + } + + this.updatePosition(str); + this.output += str; + } + return str; +}; + +/** + * Adds a file to the source map output if it has not already been added + * @param {String} `file` + * @param {Object} `pos` + */ + +exports.addFile = function(file, position) { + if (typeof position.content !== 'string') return; + if (Object.prototype.hasOwnProperty.call(this.files, file)) return; + this.files[file] = position.content; +}; + +/** + * Adds a content source to the source map output if it has not already been added + * @param {String} `source` + * @param {Object} `position` + */ + +exports.addContent = function(source, position) { + if (typeof position.content !== 'string') return; + if (Object.prototype.hasOwnProperty.call(this.content, source)) return; + this.map.setSourceContent(source, position.content); +}; + +/** + * Applies any original source maps to the output and embeds the source file + * contents in the source map. + */ + +exports.applySourceMaps = function() { + Object.keys(this.files).forEach(function(file) { + var content = this.files[file]; + this.map.setSourceContent(file, content); + + if (this.options.inputSourcemaps === true) { + var originalMap = utils.sourceMapResolve.resolveSync(content, file, fs.readFileSync); + if (originalMap) { + var map = new utils.SourceMap.SourceMapConsumer(originalMap.map); + var relativeTo = originalMap.sourcesRelativeTo; + this.map.applySourceMap(map, file, utils.unixify(path.dirname(relativeTo))); + } + } + }, this); +}; + +/** + * Process comments, drops sourceMap comments. + * @param {Object} node + */ + +exports.comment = function(node) { + if (/^# sourceMappingURL=/.test(node.comment)) { + return this.emit('', node.position); + } + return this._comment(node); +}; diff --git a/node_modules/snapdragon/lib/utils.js b/node_modules/snapdragon/lib/utils.js new file mode 100644 index 0000000000000..33f07e16f8772 --- /dev/null +++ b/node_modules/snapdragon/lib/utils.js @@ -0,0 +1,48 @@ +'use strict'; + +/** + * Module dependencies + */ + +exports.extend = require('extend-shallow'); +exports.SourceMap = require('source-map'); +exports.sourceMapResolve = require('source-map-resolve'); + +/** + * Convert backslash in the given string to forward slashes + */ + +exports.unixify = function(fp) { + return fp.split(/\\+/).join('/'); +}; + +/** + * Return true if `val` is a non-empty string + * + * @param {String} `str` + * @return {Boolean} + */ + +exports.isString = function(str) { + return str && typeof str === 'string'; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +exports.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Get the last `n` element from the given `array` + * @param {Array} `array` + * @return {*} + */ + +exports.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; diff --git a/node_modules/snapdragon/node_modules/define-property/LICENSE b/node_modules/snapdragon/node_modules/define-property/LICENSE new file mode 100644 index 0000000000000..65f90aca8c2ff --- /dev/null +++ b/node_modules/snapdragon/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/snapdragon/node_modules/define-property/README.md b/node_modules/snapdragon/node_modules/define-property/README.md new file mode 100644 index 0000000000000..8cac698ad8d86 --- /dev/null +++ b/node_modules/snapdragon/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/snapdragon/node_modules/define-property/index.js b/node_modules/snapdragon/node_modules/define-property/index.js new file mode 100644 index 0000000000000..3e0e5e133caf5 --- /dev/null +++ b/node_modules/snapdragon/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/snapdragon/node_modules/define-property/package.json b/node_modules/snapdragon/node_modules/define-property/package.json new file mode 100644 index 0000000000000..43561bf56af1b --- /dev/null +++ b/node_modules/snapdragon/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/snapdragon/node_modules/extend-shallow/LICENSE b/node_modules/snapdragon/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000000000..fa30c4cb3e4c1 --- /dev/null +++ b/node_modules/snapdragon/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/snapdragon/node_modules/extend-shallow/README.md b/node_modules/snapdragon/node_modules/extend-shallow/README.md new file mode 100644 index 0000000000000..cdc45d4ff7ad0 --- /dev/null +++ b/node_modules/snapdragon/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/snapdragon/node_modules/extend-shallow/index.js b/node_modules/snapdragon/node_modules/extend-shallow/index.js new file mode 100644 index 0000000000000..92a067fcc489b --- /dev/null +++ b/node_modules/snapdragon/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/snapdragon/node_modules/extend-shallow/package.json b/node_modules/snapdragon/node_modules/extend-shallow/package.json new file mode 100644 index 0000000000000..b42e01c7a79e9 --- /dev/null +++ b/node_modules/snapdragon/node_modules/extend-shallow/package.json @@ -0,0 +1,56 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "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" + }, + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ] +} \ No newline at end of file diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig b/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000000000..449f0da4c1605 --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc b/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000000000..24e5090e5497d --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes b/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000000000..660957e70cf2a --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000000000..37535da621119 --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.nycrc b/node_modules/snapdragon/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md b/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000000000..4963353ee916e --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/node_modules/snapdragon/node_modules/is-descriptor/LICENSE b/node_modules/snapdragon/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000000000..c0d7f136277fb --- /dev/null +++ b/node_modules/snapdragon/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/snapdragon/node_modules/is-descriptor/README.md b/node_modules/snapdragon/node_modules/is-descriptor/README.md new file mode 100644 index 0000000000000..fd9ddcfb7373e --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), 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 +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### 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. +* [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. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/node_modules/snapdragon/node_modules/is-descriptor/index.js b/node_modules/snapdragon/node_modules/is-descriptor/index.js new file mode 100644 index 0000000000000..c9dd24d225e8f --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/node_modules/snapdragon/node_modules/is-descriptor/package.json b/node_modules/snapdragon/node_modules/is-descriptor/package.json new file mode 100644 index 0000000000000..6d6ca8ba08cee --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/snapdragon/node_modules/is-descriptor/test/index.js b/node_modules/snapdragon/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000000000..0b74a35fd8807 --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/snapdragon/package.json b/node_modules/snapdragon/package.json new file mode 100644 index 0000000000000..e4c4e7384b8d4 --- /dev/null +++ b/node_modules/snapdragon/package.json @@ -0,0 +1,79 @@ +{ + "name": "snapdragon", + "description": "Fast, pluggable and easy-to-use parser-renderer factory.", + "version": "0.8.2", + "homepage": "https://github.com/jonschlinkert/snapdragon", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Edward Betts (http://edwardbetts.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/snapdragon", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.10", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.1", + "gulp-unused": "^0.2.0", + "mocha": "^3.0.2" + }, + "keywords": [ + "lexer", + "snapdragon" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "description": "These libraries use snapdragon:", + "list": [ + "braces", + "expand-brackets", + "extglob", + "micromatch" + ] + }, + "reflinks": [ + "css", + "pug", + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/source-map-resolve/LICENSE b/node_modules/source-map-resolve/LICENSE new file mode 100644 index 0000000000000..2ae975765888d --- /dev/null +++ b/node_modules/source-map-resolve/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019 Simon Lydell +Copyright (c) 2019 ZHAO Jinxiang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/source-map-resolve/changelog.md b/node_modules/source-map-resolve/changelog.md new file mode 100644 index 0000000000000..7b3f94b42c5e4 --- /dev/null +++ b/node_modules/source-map-resolve/changelog.md @@ -0,0 +1,108 @@ +### Version 0.5.3 (2019-12-28) ### + +- Fixed: base64 encoded source maps now correctly decodes as utf-8. Previously, + non-ASCII characters could end up garbled. Thanks to ZHAO Jinxiang + (@xiaoxiangmoe)! (Note: This fix does not work in old evironments not + supporting both `TextDecoder` and `Uint8Array`.) +- Improved: Reduced size of the npm package. + +### Version 0.5.2 (2018-05-10) ### + +- Improved: Updated the version range of `atob` to disallow depending on `2.0.3` + which as a [security + vulnerability](https://snyk.io/test/npm/atob/2.0.3?severity=high&severity=medium&severity=low). + +### Version 0.5.1 (2017-10-21) ### + +- Fixed: URLs are now decoded before being passed to `read` in Node.js. This + allows reading files with spaces, for example. +- Fixed: Missing or empty `sources` fields (such as `sources: []`) in source + maps are now handled. Previously, such source maps would cause crashes or + callbacks never bing called. Now, an empty result is produced: + + ```js + sourcesResolved: [], + sourcesContent: [] + ``` + +### Version 0.5.0 (2016-02-28) ### + +- Improved: Errors now have a `sourceMapData` property that contain as much as + possible of the intended result of the function up until the error occurred. +- Changed: `resolveSources` and `resolve`, as well as their `*Sync` + alternatives, no longer fail when one single source fails to be fetched. + Instead, the `sourcesContent` array in the result object will contain error + objects for all failed sources, and strings otherwise. (Backwards-incompatible + change.) + +### Version 0.4.0 (2015-08-29) ### + +- Removed: The `ignoreSourceRoot` option of `resolveSources`. It has been + replaced with `sourceRoot: false`. (Backwards-incompatible change.) +- Added: The `sourceRoot` option of `resolveSources`. It not only allows to + ignore the source root, it also lets you replace it. +- Added: The `parseMapToJSON` method. +- Added: The `resolve` method now accepts `null, mapUrl, ...` as arguments, in + addition to the existing signature, which will read `mapUrl` instead of + looking for a sourceMappingURL in the code. + +### Version 0.3.1 (2014-08-16) ### + +- Improved: Updated the source-map-url dependency to 0.3.0. + + +### Version 0.3.0 (2014-07-02) ### + +- Removed: Argument checking. It’s not worth it. (Possibly + backwards-incompatible change.) +- Added: The `sourceRoot` property of source maps may now be ignored, which can + be useful when resolving sources outside of the browser. +- Added: It is now possible to resolve only the URLs of sources, without + reading them. + + +### Version 0.2.0 (2014-06-22) ### + +- Changed: The result of `resolveSources` is now an object, not an array. The + old result array is available in the `sourcesContent` property. + (Backwards-incompatible change.) +- Changed: `sources` has been renamed to `sourcesContent` in the result object + of `resolve`. (Backwards-incompatible change.) +- Added: `resolveSources` now also returns all sources fully resolved, in the + `sourcesResolved` property. +- Added: The result object of `resolve` now contains the `sourcesResolved` + property from `resolveSources`. + + +### Version 0.1.4 (2014-06-16) ### + +- Fixed: `sourcesContent` was mis-typed as `sourceContents`, which meant that + the `sourcesContent` property of source maps never was used when resolving + sources. + + +### Version 0.1.3 (2014-05-06) ### + +- Only documentation and meta-data changes. + + +### Version 0.1.2 (2014-03-23) ### + +- Improved: Source maps starting with `)]}'` are now parsed correctly. The spec + allows source maps to start with that character sequence to prevent XSSI + attacks. + + +### Version 0.1.1 (2014-03-06) ### + +- Improved: Make sourceRoot resolving more sensible. + + A source root such as `/scripts/subdir` is now treated as `/scripts/subdir/` + — that is, as a directory called “subdir”, not a file called “subdir”. + Pointing to a file as source root does not makes sense. + + + +### Version 0.1.0 (2014-03-03) ### + +- Initial release. diff --git a/node_modules/source-map-resolve/lib/decode-uri-component.js b/node_modules/source-map-resolve/lib/decode-uri-component.js new file mode 100644 index 0000000000000..0739c20f5e60a --- /dev/null +++ b/node_modules/source-map-resolve/lib/decode-uri-component.js @@ -0,0 +1,8 @@ +var decodeUriComponent = require("decode-uri-component") + +function customDecodeUriComponent(string) { + // `decodeUriComponent` turns `+` into ` `, but that's not wanted. + return decodeUriComponent(string.replace(/\+/g, "%2B")) +} + +module.exports = customDecodeUriComponent diff --git a/node_modules/source-map-resolve/lib/resolve-url.js b/node_modules/source-map-resolve/lib/resolve-url.js new file mode 100644 index 0000000000000..e3a86c46a3e2c --- /dev/null +++ b/node_modules/source-map-resolve/lib/resolve-url.js @@ -0,0 +1,9 @@ +var url = require("url") + +function resolveUrl(/* ...urls */) { + return Array.prototype.reduce.call(arguments, function(resolved, nextUrl) { + return url.resolve(resolved, nextUrl) + }) +} + +module.exports = resolveUrl diff --git a/node_modules/source-map-resolve/lib/source-map-resolve-node.js b/node_modules/source-map-resolve/lib/source-map-resolve-node.js new file mode 100644 index 0000000000000..31ec3b2baafde --- /dev/null +++ b/node_modules/source-map-resolve/lib/source-map-resolve-node.js @@ -0,0 +1,342 @@ +var sourceMappingURL = require("source-map-url") + +var resolveUrl = require("./resolve-url") +var decodeUriComponent = require("./decode-uri-component") +var urix = require("urix") +var atob = require("atob") + + + +function callbackAsync(callback, error, result) { + setImmediate(function() { callback(error, result) }) +} + +function parseMapToJSON(string, data) { + try { + return JSON.parse(string.replace(/^\)\]\}'/, "")) + } catch (error) { + error.sourceMapData = data + throw error + } +} + +function readSync(read, url, data) { + var readUrl = decodeUriComponent(url) + try { + return String(read(readUrl)) + } catch (error) { + error.sourceMapData = data + throw error + } +} + + + +function resolveSourceMap(code, codeUrl, read, callback) { + var mapData + try { + mapData = resolveSourceMapHelper(code, codeUrl) + } catch (error) { + return callbackAsync(callback, error) + } + if (!mapData || mapData.map) { + return callbackAsync(callback, null, mapData) + } + var readUrl = decodeUriComponent(mapData.url) + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = mapData + return callback(error) + } + mapData.map = String(result) + try { + mapData.map = parseMapToJSON(mapData.map, mapData) + } catch (error) { + return callback(error) + } + callback(null, mapData) + }) +} + +function resolveSourceMapSync(code, codeUrl, read) { + var mapData = resolveSourceMapHelper(code, codeUrl) + if (!mapData || mapData.map) { + return mapData + } + mapData.map = readSync(read, mapData.url, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + return mapData +} + +var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/ + +/** + * The media type for JSON text is application/json. + * + * {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations } + * + * `text/json` is non-standard media type + */ +var jsonMimeTypeRegex = /^(?:application|text)\/json$/ + +/** + * JSON text exchanged between systems that are not part of a closed ecosystem + * MUST be encoded using UTF-8. + * + * {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding} + */ +var jsonCharacterEncoding = "utf-8" + +function base64ToBuf(b64) { + var binStr = atob(b64) + var len = binStr.length + var arr = new Uint8Array(len) + for (var i = 0; i < len; i++) { + arr[i] = binStr.charCodeAt(i) + } + return arr +} + +function decodeBase64String(b64) { + if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") { + return atob(b64) + } + var buf = base64ToBuf(b64); + // Note: `decoder.decode` method will throw a `DOMException` with the + // `"EncodingError"` value when an coding error is found. + var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true}) + return decoder.decode(buf); +} + +function resolveSourceMapHelper(code, codeUrl) { + codeUrl = urix(codeUrl) + + var url = sourceMappingURL.getFrom(code) + if (!url) { + return null + } + + var dataUri = url.match(dataUriRegex) + if (dataUri) { + var mimeType = dataUri[1] || "text/plain" + var lastParameter = dataUri[2] || "" + var encoded = dataUri[3] || "" + var data = { + sourceMappingURL: url, + url: null, + sourcesRelativeTo: codeUrl, + map: encoded + } + if (!jsonMimeTypeRegex.test(mimeType)) { + var error = new Error("Unuseful data uri mime type: " + mimeType) + error.sourceMapData = data + throw error + } + try { + data.map = parseMapToJSON( + lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded), + data + ) + } catch (error) { + error.sourceMapData = data + throw error + } + return data + } + + var mapUrl = resolveUrl(codeUrl, url) + return { + sourceMappingURL: url, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } +} + + + +function resolveSources(map, mapUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + var pending = map.sources ? map.sources.length : 0 + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (pending === 0) { + callbackAsync(callback, null, result) + return + } + + var done = function() { + pending-- + if (pending === 0) { + callback(null, result) + } + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + callbackAsync(done, null) + } else { + var readUrl = decodeUriComponent(fullUrl) + read(readUrl, function(error, source) { + result.sourcesContent[index] = error ? error : String(source) + done() + }) + } + }) +} + +function resolveSourcesSync(map, mapUrl, read, options) { + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (!map.sources || map.sources.length === 0) { + return result + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (read !== null) { + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + } else { + var readUrl = decodeUriComponent(fullUrl) + try { + result.sourcesContent[index] = String(read(readUrl)) + } catch (error) { + result.sourcesContent[index] = error + } + } + } + }) + + return result +} + +var endingSlash = /\/?$/ + +function resolveSourcesHelper(map, mapUrl, options, fn) { + options = options || {} + mapUrl = urix(mapUrl) + var fullUrl + var sourceContent + var sourceRoot + for (var index = 0, len = map.sources.length; index < len; index++) { + sourceRoot = null + if (typeof options.sourceRoot === "string") { + sourceRoot = options.sourceRoot + } else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) { + sourceRoot = map.sourceRoot + } + // If the sourceRoot is the empty string, it is equivalent to not setting + // the property at all. + if (sourceRoot === null || sourceRoot === '') { + fullUrl = resolveUrl(mapUrl, map.sources[index]) + } else { + // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes + // `/scripts/subdir/`, not `/scripts/`. Pointing to a file as source root + // does not make sense. + fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index]) + } + sourceContent = (map.sourcesContent || [])[index] + fn(fullUrl, sourceContent, index) + } +} + + + +function resolve(code, codeUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + if (code === null) { + var mapUrl = codeUrl + var data = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + var readUrl = decodeUriComponent(mapUrl) + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = data + return callback(error) + } + data.map = String(result) + try { + data.map = parseMapToJSON(data.map, data) + } catch (error) { + return callback(error) + } + _resolveSources(data) + }) + } else { + resolveSourceMap(code, codeUrl, read, function(error, mapData) { + if (error) { + return callback(error) + } + if (!mapData) { + return callback(null, null) + } + _resolveSources(mapData) + }) + } + + function _resolveSources(mapData) { + resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) { + if (error) { + return callback(error) + } + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + callback(null, mapData) + }) + } +} + +function resolveSync(code, codeUrl, read, options) { + var mapData + if (code === null) { + var mapUrl = codeUrl + mapData = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + mapData.map = readSync(read, mapUrl, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + } else { + mapData = resolveSourceMapSync(code, codeUrl, read) + if (!mapData) { + return null + } + } + var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options) + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + return mapData +} + + + +module.exports = { + resolveSourceMap: resolveSourceMap, + resolveSourceMapSync: resolveSourceMapSync, + resolveSources: resolveSources, + resolveSourcesSync: resolveSourcesSync, + resolve: resolve, + resolveSync: resolveSync, + parseMapToJSON: parseMapToJSON +} diff --git a/node_modules/source-map-resolve/package.json b/node_modules/source-map-resolve/package.json new file mode 100644 index 0000000000000..78b639821c6a8 --- /dev/null +++ b/node_modules/source-map-resolve/package.json @@ -0,0 +1,47 @@ +{ + "name": "source-map-resolve", + "version": "0.5.3", + "author": "Simon Lydell", + "license": "MIT", + "description": "Resolve the source map and/or sources for a generated file.", + "keywords": [ + "source map", + "sourcemap", + "source", + "map", + "sourceMappingURL", + "resolve", + "resolver", + "locate", + "locator", + "find", + "finder" + ], + "repository": "lydell/source-map-resolve", + "main": "lib/source-map-resolve-node.js", + "browser": "source-map-resolve.js", + "files": [ + "lib", + "source-map-resolve.js" + ], + "scripts": { + "lint": "jshint lib/ test/", + "unit": "node test/source-map-resolve.js && node test/windows.js", + "test": "npm run lint && npm run unit", + "build": "node generate-source-map-resolve.js" + }, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + }, + "devDependencies": { + "Base64": "1.1.0", + "jshint": "2.10.3", + "setimmediate": "1.0.5", + "simple-asyncify": "1.0.0", + "tape": "4.12.1" + } +} \ No newline at end of file diff --git a/node_modules/source-map-resolve/readme.md b/node_modules/source-map-resolve/readme.md new file mode 100644 index 0000000000000..5796ba1f3b9ae --- /dev/null +++ b/node_modules/source-map-resolve/readme.md @@ -0,0 +1,231 @@ +Overview [![Build Status](https://travis-ci.org/lydell/source-map-resolve.svg?branch=master)](https://travis-ci.org/lydell/source-map-resolve) +======== + +Resolve the source map and/or sources for a generated file. + +```js +var sourceMapResolve = require("source-map-resolve") +var sourceMap = require("source-map") + +var code = [ + "!function(){...}();", + "/*# sourceMappingURL=foo.js.map */" +].join("\n") + +sourceMapResolve.resolveSourceMap(code, "/js/foo.js", fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // map: {file: "foo.js", mappings: "...", sources: ["/coffee/foo.coffee"], names: []}, + // url: "/js/foo.js.map", + // sourcesRelativeTo: "/js/foo.js.map", + // sourceMappingURL: "foo.js.map" + // } + + sourceMapResolve.resolveSources(result.map, result.sourcesRelativeTo, fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // sourcesResolved: ["/coffee/foo.coffee"], + // sourcesContent: [""] + // } + }) +}) + +sourceMapResolve.resolve(code, "/js/foo.js", fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // map: {file: "foo.js", mappings: "...", sources: ["/coffee/foo.coffee"], names: []}, + // url: "/js/foo.js.map", + // sourcesRelativeTo: "/js/foo.js.map", + // sourceMappingURL: "foo.js.map", + // sourcesResolved: ["/coffee/foo.coffee"], + // sourcesContent: [""] + // } + result.map.sourcesContent = result.sourcesContent + var map = new sourceMap.sourceMapConsumer(result.map) + map.sourceContentFor("/coffee/foo.coffee") + // "" +}) +``` + + +Installation +============ + +- `npm install source-map-resolve` +- `bower install source-map-resolve` +- `component install lydell/source-map-resolve` + +Works with CommonJS, AMD and browser globals, through UMD. + +Note: This module requires `setImmediate` and `atob`. +Use polyfills if needed, such as: + +- +- + + +Usage +===== + +### `sourceMapResolve.resolveSourceMap(code, codeUrl, read, callback)` ### + +- `code` is a string of code that may or may not contain a sourceMappingURL + comment. Such a comment is used to resolve the source map. +- `codeUrl` is the url to the file containing `code`. If the sourceMappingURL + is relative, it is resolved against `codeUrl`. +- `read(url, callback)` is a function that reads `url` and responds using + `callback(error, content)`. In Node.js you might want to use `fs.readFile`, + while in the browser you might want to use an asynchronus `XMLHttpRequest`. +- `callback(error, result)` is a function that is invoked with either an error + or `null` and the result. + +The result is an object with the following properties: + +- `map`: The source map for `code`, as an object (not a string). +- `url`: The url to the source map. If the source map came from a data uri, + this property is `null`, since then there is no url to it. +- `sourcesRelativeTo`: The url that the sources of the source map are relative + to. Since the sources are relative to the source map, and the url to the + source map is provided as the `url` property, this property might seem + superfluos. However, remember that the `url` property can be `null` if the + source map came from a data uri. If so, the sources are relative to the file + containing the data uri—`codeUrl`. This property will be identical to the + `url` property or `codeUrl`, whichever is appropriate. This way you can + conveniently resolve the sources without having to think about where the + source map came from. +- `sourceMappingURL`: The url of the sourceMappingURL comment in `code`. + +If `code` contains no sourceMappingURL, the result is `null`. + +### `sourceMapResolve.resolveSources(map, mapUrl, read, [options], callback)` ### + +- `map` is a source map, as an object (not a string). +- `mapUrl` is the url to the file containing `map`. Relative sources in the + source map, if any, are resolved against `mapUrl`. +- `read(url, callback)` is a function that reads `url` and responds using + `callback(error, content)`. In Node.js you might want to use `fs.readFile`, + while in the browser you might want to use an asynchronus `XMLHttpRequest`. +- `options` is an optional object with any of the following properties: + - `sourceRoot`: Override the `sourceRoot` property of the source map, which + might only be relevant when resolving sources in the browser. This lets you + bypass it when using the module outside of a browser, if needed. Pass a + string to replace the `sourceRoot` property with, or `false` to ignore it. + Defaults to `undefined`. +- `callback(error, result)` is a function that is invoked with either an error + or `null` and the result. + +The result is an object with the following properties: + +- `sourcesResolved`: The same as `map.sources`, except all the sources are + fully resolved. +- `sourcesContent`: An array with the contents of all sources in `map.sources`, + in the same order as `map.sources`. If getting the contents of a source fails, + an error object is put into the array instead. + +### `sourceMapResolve.resolve(code, codeUrl, read, [options], callback)` ### + +The arguments are identical to `sourceMapResolve.resolveSourceMap`, except that +you may also provide the same `options` as in `sourceMapResolve.resolveSources`. + +This is a convenience method that first resolves the source map and then its +sources. You could also do this by first calling +`sourceMapResolve.resolveSourceMap` and then `sourceMapResolve.resolveSources`. + +The result is identical to `sourceMapResolve.resolveSourceMap`, with the +properties from `sourceMapResolve.resolveSources` merged into it. + +There is one extra feature available, though. If `code` is `null`, `codeUrl` is +treated as a url to the source map instead of to `code`, and will be read. This +is handy if you _sometimes_ get the source map url from the `SourceMap: ` +header (see the [Notes] section). In this case, the `sourceMappingURL` property +of the result is `null`. + + +[Notes]: #notes + +### `sourceMapResolve.*Sync()` ### + +There are also sync versions of the three previous functions. They are identical +to the async versions, except: + +- They expect a sync reading function. In Node.js you might want to use + `fs.readFileSync`, while in the browser you might want to use a synchronus + `XMLHttpRequest`. +- They throw errors and return the result instead of using a callback. + +`sourceMapResolve.resolveSourcesSync` also accepts `null` as the `read` +parameter. The result is the same as when passing a function as the `read +parameter`, except that the `sourcesContent` property of the result will be an +empty array. In other words, the sources aren’t read. You only get the +`sourcesResolved` property. (This only supported in the synchronus version, since +there is no point doing it asynchronusly.) + +### `sourceMapResolve.parseMapToJSON(string, [data])` ### + +The spec says that if a source map (as a string) starts with `)]}'`, it should +be stripped off. This is to prevent XSSI attacks. This function does that and +returns the result of `JSON.parse`ing what’s left. + +If this function throws `error`, `error.sourceMapData === data`. + +### Errors + +All errors passed to callbacks or thrown by this module have a `sourceMapData` +property that contain as much as possible of the intended result of the function +up until the error occurred. + +Note that while the `map` property of result objects always is an object, +`error.sourceMapData.map` will be a string if parsing that string fails. + + +Note +==== + +This module resolves the source map for a given generated file by looking for a +sourceMappingURL comment. The spec defines yet a way to provide the URL to the +source map: By sending the `SourceMap: ` header along with the generated +file. Since this module doesn’t retrive the generated code for you (instead +_you_ give the generated code to the module), it’s up to you to look for such a +header when you retrieve the file (should the need arise). + + +Development +=========== + +Tests +----- + +First off, run `npm install` to install testing modules and browser polyfills. + +`npm test` lints the code and runs the test suite in Node.js. + +x-package.json5 +--------------- + +package.json, component.json and bower.json are all generated from +x-package.json5 by using [`xpkg`]. Only edit x-package.json5, and remember to +run `xpkg` before commiting! + +[`xpkg`]: https://github.com/kof/node-xpkg + +Generating the browser version +------------------------------ + +source-map-resolve.js is generated from source-map-resolve-node.js and +source-map-resolve-template.js. Only edit the two latter files, _not_ +source-map-resolve.js! To generate it, run `npm run build`. + + +License +======= + +[MIT](LICENSE). diff --git a/node_modules/source-map-resolve/source-map-resolve.js b/node_modules/source-map-resolve/source-map-resolve.js new file mode 100644 index 0000000000000..282b1260bf9bb --- /dev/null +++ b/node_modules/source-map-resolve/source-map-resolve.js @@ -0,0 +1,348 @@ +// Note: source-map-resolve.js is generated from source-map-resolve-node.js and +// source-map-resolve-template.js. Only edit the two latter files, _not_ +// source-map-resolve.js! + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(["source-map-url", "resolve-url"], factory) + } else if (typeof exports === "object") { + var sourceMappingURL = require("source-map-url") + var resolveUrl = require("resolve-url") + module.exports = factory(sourceMappingURL, resolveUrl) + } else { + root.sourceMapResolve = factory(root.sourceMappingURL, root.resolveUrl) + } +}(this, function(sourceMappingURL, resolveUrl) { + + function callbackAsync(callback, error, result) { + setImmediate(function() { callback(error, result) }) + } + + function parseMapToJSON(string, data) { + try { + return JSON.parse(string.replace(/^\)\]\}'/, "")) + } catch (error) { + error.sourceMapData = data + throw error + } + } + + function readSync(read, url, data) { + var readUrl = url + try { + return String(read(readUrl)) + } catch (error) { + error.sourceMapData = data + throw error + } + } + + + + function resolveSourceMap(code, codeUrl, read, callback) { + var mapData + try { + mapData = resolveSourceMapHelper(code, codeUrl) + } catch (error) { + return callbackAsync(callback, error) + } + if (!mapData || mapData.map) { + return callbackAsync(callback, null, mapData) + } + var readUrl = mapData.url + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = mapData + return callback(error) + } + mapData.map = String(result) + try { + mapData.map = parseMapToJSON(mapData.map, mapData) + } catch (error) { + return callback(error) + } + callback(null, mapData) + }) + } + + function resolveSourceMapSync(code, codeUrl, read) { + var mapData = resolveSourceMapHelper(code, codeUrl) + if (!mapData || mapData.map) { + return mapData + } + mapData.map = readSync(read, mapData.url, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + return mapData + } + + var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/ + + /** + * The media type for JSON text is application/json. + * + * {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations } + * + * `text/json` is non-standard media type + */ + var jsonMimeTypeRegex = /^(?:application|text)\/json$/ + + /** + * JSON text exchanged between systems that are not part of a closed ecosystem + * MUST be encoded using UTF-8. + * + * {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding} + */ + var jsonCharacterEncoding = "utf-8" + + function base64ToBuf(b64) { + var binStr = atob(b64) + var len = binStr.length + var arr = new Uint8Array(len) + for (var i = 0; i < len; i++) { + arr[i] = binStr.charCodeAt(i) + } + return arr + } + + function decodeBase64String(b64) { + if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") { + return atob(b64) + } + var buf = base64ToBuf(b64); + // Note: `decoder.decode` method will throw a `DOMException` with the + // `"EncodingError"` value when an coding error is found. + var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true}) + return decoder.decode(buf); + } + + function resolveSourceMapHelper(code, codeUrl) { + var url = sourceMappingURL.getFrom(code) + if (!url) { + return null + } + + var dataUri = url.match(dataUriRegex) + if (dataUri) { + var mimeType = dataUri[1] || "text/plain" + var lastParameter = dataUri[2] || "" + var encoded = dataUri[3] || "" + var data = { + sourceMappingURL: url, + url: null, + sourcesRelativeTo: codeUrl, + map: encoded + } + if (!jsonMimeTypeRegex.test(mimeType)) { + var error = new Error("Unuseful data uri mime type: " + mimeType) + error.sourceMapData = data + throw error + } + try { + data.map = parseMapToJSON( + lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded), + data + ) + } catch (error) { + error.sourceMapData = data + throw error + } + return data + } + + var mapUrl = resolveUrl(codeUrl, url) + return { + sourceMappingURL: url, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + } + + + + function resolveSources(map, mapUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + var pending = map.sources ? map.sources.length : 0 + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (pending === 0) { + callbackAsync(callback, null, result) + return + } + + var done = function() { + pending-- + if (pending === 0) { + callback(null, result) + } + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + callbackAsync(done, null) + } else { + var readUrl = fullUrl + read(readUrl, function(error, source) { + result.sourcesContent[index] = error ? error : String(source) + done() + }) + } + }) + } + + function resolveSourcesSync(map, mapUrl, read, options) { + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (!map.sources || map.sources.length === 0) { + return result + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (read !== null) { + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + } else { + var readUrl = fullUrl + try { + result.sourcesContent[index] = String(read(readUrl)) + } catch (error) { + result.sourcesContent[index] = error + } + } + } + }) + + return result + } + + var endingSlash = /\/?$/ + + function resolveSourcesHelper(map, mapUrl, options, fn) { + options = options || {} + var fullUrl + var sourceContent + var sourceRoot + for (var index = 0, len = map.sources.length; index < len; index++) { + sourceRoot = null + if (typeof options.sourceRoot === "string") { + sourceRoot = options.sourceRoot + } else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) { + sourceRoot = map.sourceRoot + } + // If the sourceRoot is the empty string, it is equivalent to not setting + // the property at all. + if (sourceRoot === null || sourceRoot === '') { + fullUrl = resolveUrl(mapUrl, map.sources[index]) + } else { + // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes + // `/scripts/subdir/`, not `/scripts/`. Pointing to a file as source root + // does not make sense. + fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index]) + } + sourceContent = (map.sourcesContent || [])[index] + fn(fullUrl, sourceContent, index) + } + } + + + + function resolve(code, codeUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + if (code === null) { + var mapUrl = codeUrl + var data = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + var readUrl = mapUrl + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = data + return callback(error) + } + data.map = String(result) + try { + data.map = parseMapToJSON(data.map, data) + } catch (error) { + return callback(error) + } + _resolveSources(data) + }) + } else { + resolveSourceMap(code, codeUrl, read, function(error, mapData) { + if (error) { + return callback(error) + } + if (!mapData) { + return callback(null, null) + } + _resolveSources(mapData) + }) + } + + function _resolveSources(mapData) { + resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) { + if (error) { + return callback(error) + } + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + callback(null, mapData) + }) + } + } + + function resolveSync(code, codeUrl, read, options) { + var mapData + if (code === null) { + var mapUrl = codeUrl + mapData = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + mapData.map = readSync(read, mapUrl, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + } else { + mapData = resolveSourceMapSync(code, codeUrl, read) + if (!mapData) { + return null + } + } + var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options) + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + return mapData + } + + + + return { + resolveSourceMap: resolveSourceMap, + resolveSourceMapSync: resolveSourceMapSync, + resolveSources: resolveSources, + resolveSourcesSync: resolveSourcesSync, + resolve: resolve, + resolveSync: resolveSync, + parseMapToJSON: parseMapToJSON + } + +})); diff --git a/node_modules/source-map-url/LICENSE b/node_modules/source-map-url/LICENSE new file mode 100644 index 0000000000000..10052a95ce241 --- /dev/null +++ b/node_modules/source-map-url/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/source-map-url/changelog.md b/node_modules/source-map-url/changelog.md new file mode 100644 index 0000000000000..61f1c7bf8ed02 --- /dev/null +++ b/node_modules/source-map-url/changelog.md @@ -0,0 +1,57 @@ +### Version 0.4.1 (2021-02-01) ### + +- Improved: The package is now about 50% smaller, by excluding unnecessary + files. Thanks to Piotr Kuczynski (@pkuczynski)! + +### Version 0.4.0 (2015-11-12) ### + +- Changed: sourceMappingURL comments used to be matched only when placed at + the end of the script. However, since several commonly used JavaScript + libraries do not follow this convention and all popular web browsers accept + non-trailing comments, this has been revised. + + So now non-trailing SourceMappingURL comments are matched as well. + + +### Version 0.3.0 (2014-08-16) ### + +- Changed: sourceMappingURL comments used to be matched only if they appeared + on their own line. However, the spec only says: + + > The generated code may include a line at the end of the source, with the following form: + > + > //# sourceMappingURL= + + So now they are matched also when they appear on the same line as code. + +- Removed: The `.set()` method. I couldn’t decide how it should work + considering the above change. Moreover, it was unnecessarily complex (and + would have gotten worse) for very little gain. It is much easier to run + `.remove()` if needed, and then simply `code += "\n//# sourceMappingURL=" + + url` (using the appropriate comment syntax and newline). KISS. + +- Changed: The `.insertBefore()` method now always inserts the string exactly + before the sourceMappingURL comment; not before the newline before the + comment (if any). Moreover, it does not ensure that the comment will be on a + new line anymore. This is up to the caller. KISS. + +- Changed: The `.remove()` method no longer removes the newline before the + sourceMappingURL (if any). + +- Changed: Renamed `.get()` to `.getFrom()`. +- Changed: Renamed `.remove()` to `.removeFrom()`. + +- Added: The `.existsIn()` method. + + +### Version 0.2.0 (2014-02-23) ### + +- Changed: A space is no longer inserted before the closing comment syntax. If + such a space is desired, it needs to be put in the closing comment syntax + itself (such as `["/*", " */"]` instead of `["/*", "*/"]`). (Backwards + incompatible change.) + + +### Version 0.1.0 (2014-02-22) ### + +- Initial release. diff --git a/node_modules/source-map-url/package.json b/node_modules/source-map-url/package.json new file mode 100644 index 0000000000000..6fd96d30cbe7f --- /dev/null +++ b/node_modules/source-map-url/package.json @@ -0,0 +1,39 @@ +{ + "name": "source-map-url", + "version": "0.4.1", + "author": "Simon Lydell", + "license": "MIT", + "description": "Tools for working with sourceMappingURL comments.", + "keywords": [ + "source map", + "sourceMappingURL", + "comment", + "annotation" + ], + "main": "source-map-url.js", + "repository": "lydell/source-map-url", + "scripts": { + "lint": "jshint source-map-url.js test/ ", + "unit": "mocha", + "test": "npm run lint && npm run unit" + }, + "devDependencies": { + "mocha": "~1.17.1", + "expect.js": "~0.3.1", + "jshint": "~2.4.3" + }, + "testling": { + "harness": "mocha", + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "chrome/latest", + "firefox/latest", + "opera/12", + "opera/latest", + "safari/5", + "iphone/6", + "android-browser/4" + ] + } +} diff --git a/node_modules/source-map-url/readme.md b/node_modules/source-map-url/readme.md new file mode 100644 index 0000000000000..216de5e52af08 --- /dev/null +++ b/node_modules/source-map-url/readme.md @@ -0,0 +1,97 @@ +Overview [![Build Status](https://travis-ci.org/lydell/source-map-url.png?branch=master)](https://travis-ci.org/lydell/source-map-url) +======== + +[![browser support](https://ci.testling.com/lydell/source-map-url.png)](https://ci.testling.com/lydell/source-map-url) + +Tools for working with sourceMappingURL comments. + +```js +var sourceMappingURL = require("source-map-url") + +var code = [ + "!function(){...}();", + "/*# sourceMappingURL=foo.js.map */" +].join("\n") + +sourceMappingURL.existsIn(code) +// true + +sourceMappingURL.getFrom(code) +// foo.js.map + +code = sourceMappingURL.insertBefore(code, "// License: MIT\n") +// !function(){...}(); +// // License: MIT +// /*# sourceMappingURL=foo.js.map */ + +code = sourceMappingURL.removeFrom(code) +// !function(){...}(); +// // License: MIT + +sourceMappingURL.existsIn(code) +// false + +sourceMappingURL.getFrom(code) +// null + +code += "//# sourceMappingURL=/other/file.js.map" +// !function(){...}(); +// // License: MIT +// //# sourceMappingURL=/other/file.js.map +``` + + +Installation +============ + +- `npm install source-map-url` +- `bower install source-map-url` +- `component install lydell/source-map-url` + +Works with CommonJS, AMD and browser globals, through UMD. + + +Usage +===== + +### `sourceMappingURL.getFrom(code)` ### + +Returns the url of the sourceMappingURL comment in `code`. Returns `null` if +there is no such comment. + +### `sourceMappingURL.existsIn(code)` ### + +Returns `true` if there is a sourceMappingURL comment in `code`, or `false` +otherwise. + +### `sourceMappingURL.removeFrom(code)` ### + +Removes the sourceMappingURL comment in `code`. Does nothing if there is no +such comment. Returns the updated `code`. + +### `sourceMappingURL.insertBefore(code, string)` ### + +Inserts `string` before the sourceMappingURL comment in `code`. Appends +`string` to `code` if there is no such comment. + +Lets you append something to a file without worrying about burying the +sourceMappingURL comment (by keeping it at the end of the file). + +### `sourceMappingURL.regex` ### + +The regex that is used to match sourceMappingURL comments. It matches both `//` +and `/**/` comments, thus supporting both JavaScript and CSS. + + +Tests +===== + +Start by running `npm test`, which lints the code and runs the test suite in Node.js. + +To run the tests in a browser, run `testling` (`npm install -g testling`) or `testling -u`. + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/node_modules/source-map-url/source-map-url.js b/node_modules/source-map-url/source-map-url.js new file mode 100644 index 0000000000000..1724cb7c0897e --- /dev/null +++ b/node_modules/source-map-url/source-map-url.js @@ -0,0 +1,57 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory) + } else if (typeof exports === "object") { + module.exports = factory() + } else { + root.sourceMappingURL = factory() + } +}(this, function() { + + var innerRegex = /[#@] sourceMappingURL=([^\s'"]*)/ + + var regex = RegExp( + "(?:" + + "/\\*" + + "(?:\\s*\r?\n(?://)?)?" + + "(?:" + innerRegex.source + ")" + + "\\s*" + + "\\*/" + + "|" + + "//(?:" + innerRegex.source + ")" + + ")" + + "\\s*" + ) + + return { + + regex: regex, + _innerRegex: innerRegex, + + getFrom: function(code) { + var match = code.match(regex) + return (match ? match[1] || match[2] || "" : null) + }, + + existsIn: function(code) { + return regex.test(code) + }, + + removeFrom: function(code) { + return code.replace(regex, "") + }, + + insertBefore: function(code, string) { + var match = code.match(regex) + if (match) { + return code.slice(0, match.index) + string + code.slice(match.index) + } else { + return code + string + } + } + } + +})); diff --git a/node_modules/source-map/CHANGELOG.md b/node_modules/source-map/CHANGELOG.md new file mode 100644 index 0000000000000..3a8c066c66b1d --- /dev/null +++ b/node_modules/source-map/CHANGELOG.md @@ -0,0 +1,301 @@ +# Change Log + +## 0.5.6 + +* Fix for regression when people were using numbers as names in source maps. See + #236. + +## 0.5.5 + +* Fix "regression" of unsupported, implementation behavior that half the world + happens to have come to depend on. See #235. + +* Fix regression involving function hoisting in SpiderMonkey. See #233. + +## 0.5.4 + +* Large performance improvements to source-map serialization. See #228 and #229. + +## 0.5.3 + +* Do not include unnecessary distribution files. See + commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. + +## 0.5.2 + +* Include browser distributions of the library in package.json's `files`. See + issue #212. + +## 0.5.1 + +* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See + ff05274becc9e6e1295ed60f3ea090d31d843379. + +## 0.5.0 + +* Node 0.8 is no longer supported. + +* Use webpack instead of dryice for bundling. + +* Big speedups serializing source maps. See pull request #203. + +* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that + explicitly start with the source root. See issue #199. + +## 0.4.4 + +* Fix an issue where using a `SourceMapGenerator` after having created a + `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See + issue #191. + +* Fix an issue with where `SourceMapGenerator` would mistakenly consider + different mappings as duplicates of each other and avoid generating them. See + issue #192. + +## 0.4.3 + +* A very large number of performance improvements, particularly when parsing + source maps. Collectively about 75% of time shaved off of the source map + parsing benchmark! + +* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy + searching in the presence of a column option. See issue #177. + +* Fix a bug with joining a source and its source root when the source is above + the root. See issue #182. + +* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to + determine when all sources' contents are inlined into the source map. See + issue #190. + +## 0.4.2 + +* Add an `.npmignore` file so that the benchmarks aren't pulled down by + dependent projects. Issue #169. + +* Add an optional `column` argument to + `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines + with no mappings. Issues #172 and #173. + +## 0.4.1 + +* Fix accidentally defining a global variable. #170. + +## 0.4.0 + +* The default direction for fuzzy searching was changed back to its original + direction. See #164. + +* There is now a `bias` option you can supply to `SourceMapConsumer` to control + the fuzzy searching direction. See #167. + +* About an 8% speed up in parsing source maps. See #159. + +* Added a benchmark for parsing and generating source maps. + +## 0.3.0 + +* Change the default direction that searching for positions fuzzes when there is + not an exact match. See #154. + +* Support for environments using json2.js for JSON serialization. See #156. + +## 0.2.0 + +* Support for consuming "indexed" source maps which do not have any remote + sections. See pull request #127. This introduces a minor backwards + incompatibility if you are monkey patching `SourceMapConsumer.prototype` + methods. + +## 0.1.43 + +* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue + #148 for some discussion and issues #150, #151, and #152 for implementations. + +## 0.1.42 + +* Fix an issue where `SourceNode`s from different versions of the source-map + library couldn't be used in conjunction with each other. See issue #142. + +## 0.1.41 + +* Fix a bug with getting the source content of relative sources with a "./" + prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). + +* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the + column span of each mapping. + +* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find + all generated positions associated with a given original source and line. + +## 0.1.40 + +* Performance improvements for parsing source maps in SourceMapConsumer. + +## 0.1.39 + +* Fix a bug where setting a source's contents to null before any source content + had been set before threw a TypeError. See issue #131. + +## 0.1.38 + +* Fix a bug where finding relative paths from an empty path were creating + absolute paths. See issue #129. + +## 0.1.37 + +* Fix a bug where if the source root was an empty string, relative source paths + would turn into absolute source paths. Issue #124. + +## 0.1.36 + +* Allow the `names` mapping property to be an empty string. Issue #121. + +## 0.1.35 + +* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` + to specify a path that relative sources in the second parameter should be + relative to. Issue #105. + +* If no file property is given to a `SourceMapGenerator`, then the resulting + source map will no longer have a `null` file property. The property will + simply not exist. Issue #104. + +* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. + Issue #116. + +## 0.1.34 + +* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. + +* Fix bug involving source contents and the + `SourceMapGenerator.prototype.applySourceMap`. Issue #100. + +## 0.1.33 + +* Fix some edge cases surrounding path joining and URL resolution. + +* Add a third parameter for relative path to + `SourceMapGenerator.prototype.applySourceMap`. + +* Fix issues with mappings and EOLs. + +## 0.1.32 + +* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns + (issue 92). + +* Fixed test runner to actually report number of failed tests as its process + exit code. + +* Fixed a typo when reporting bad mappings (issue 87). + +## 0.1.31 + +* Delay parsing the mappings in SourceMapConsumer until queried for a source + location. + +* Support Sass source maps (which at the time of writing deviate from the spec + in small ways) in SourceMapConsumer. + +## 0.1.30 + +* Do not join source root with a source, when the source is a data URI. + +* Extend the test runner to allow running single specific test files at a time. + +* Performance improvements in `SourceNode.prototype.walk` and + `SourceMapConsumer.prototype.eachMapping`. + +* Source map browser builds will now work inside Workers. + +* Better error messages when attempting to add an invalid mapping to a + `SourceMapGenerator`. + +## 0.1.29 + +* Allow duplicate entries in the `names` and `sources` arrays of source maps + (usually from TypeScript) we are parsing. Fixes github issue 72. + +## 0.1.28 + +* Skip duplicate mappings when creating source maps from SourceNode; github + issue 75. + +## 0.1.27 + +* Don't throw an error when the `file` property is missing in SourceMapConsumer, + we don't use it anyway. + +## 0.1.26 + +* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. + +## 0.1.25 + +* Make compatible with browserify + +## 0.1.24 + +* Fix issue with absolute paths and `file://` URIs. See + https://bugzilla.mozilla.org/show_bug.cgi?id=885597 + +## 0.1.23 + +* Fix issue with absolute paths and sourcesContent, github issue 64. + +## 0.1.22 + +* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. + +## 0.1.21 + +* Fixed handling of sources that start with a slash so that they are relative to + the source root's host. + +## 0.1.20 + +* Fixed github issue #43: absolute URLs aren't joined with the source root + anymore. + +## 0.1.19 + +* Using Travis CI to run tests. + +## 0.1.18 + +* Fixed a bug in the handling of sourceRoot. + +## 0.1.17 + +* Added SourceNode.fromStringWithSourceMap. + +## 0.1.16 + +* Added missing documentation. + +* Fixed the generating of empty mappings in SourceNode. + +## 0.1.15 + +* Added SourceMapGenerator.applySourceMap. + +## 0.1.14 + +* The sourceRoot is now handled consistently. + +## 0.1.13 + +* Added SourceMapGenerator.fromSourceMap. + +## 0.1.12 + +* SourceNode now generates empty mappings too. + +## 0.1.11 + +* Added name support to SourceNode. + +## 0.1.10 + +* Added sourcesContent support to the customer and generator. diff --git a/node_modules/source-map/LICENSE b/node_modules/source-map/LICENSE new file mode 100644 index 0000000000000..ed1b7cf27e97e --- /dev/null +++ b/node_modules/source-map/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/source-map/README.md b/node_modules/source-map/README.md new file mode 100644 index 0000000000000..32813394ad1e6 --- /dev/null +++ b/node_modules/source-map/README.md @@ -0,0 +1,729 @@ +# Source Map + +[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) + +[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) + +This is a library to generate and consume the source map format +[described here][format]. + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +## Use with Node + + $ npm install source-map + +## Use on the Web + + + +-------------------------------------------------------------------------------- + + + + + +## 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 0000000000000..b5ab6382abbab --- /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 0000000000000..4e630e29434ca --- /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 0000000000000..f2a46bd02536a --- /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 0000000000000..fbd5c81cae66f --- /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 0000000000000..612b404018ece --- /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 0000000000000..8aa86b3026436 --- /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 0000000000000..010ac941e1568 --- /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 0000000000000..06d1274a025a8 --- /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 0000000000000..6a7caadbbdbea --- /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 0000000000000..6abcc280eea16 --- /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 0000000000000..aff1e7fb268ac --- /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 0000000000000..d196a53f8c0ed --- /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 0000000000000..44e0e45205233 --- /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 0000000000000..048e3ae86099f --- /dev/null +++ b/node_modules/source-map/package.json @@ -0,0 +1,72 @@ +{ + "name": "source-map", + "description": "Generates and consumes source maps", + "version": "0.5.7", + "homepage": "https://github.com/mozilla/source-map", + "author": "Nick Fitzgerald ", + "contributors": [ + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": { + "type": "git", + "url": "http://github.com/mozilla/source-map.git" + }, + "main": "./source-map.js", + "files": [ + "source-map.js", + "lib/", + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "typings": "source-map" +} diff --git a/node_modules/source-map/source-map.js b/node_modules/source-map/source-map.js new file mode 100644 index 0000000000000..bc88fe820c87a --- /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 0000000000000..d645695673349 --- /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 0000000000000..af563d8655a98 --- /dev/null +++ b/node_modules/spdx-correct/README.md @@ -0,0 +1,22 @@ +## Usage + +```javascript +var correct = require('spdx-correct') +var assert = require('assert') + +assert.strictEqual(correct('mit'), 'MIT') + +assert.strictEqual(correct('Apache 2'), 'Apache-2.0') + +assert(correct('No idea what license') === null) + +// disable upgrade option +assert(correct('GPL-3.0'), 'GPL-3.0-or-later') +assert(correct('GPL-3.0', { upgrade: false }), 'GPL-3.0') +``` + +## Contributors + +spdx-correct has benefited from the work of several contributors. +See [the GitHub repository](https://github.com/jslicense/spdx-correct.js/graphs/contributors) +for more information. diff --git a/node_modules/spdx-correct/index.js b/node_modules/spdx-correct/index.js new file mode 100644 index 0000000000000..4d9037e0cc435 --- /dev/null +++ b/node_modules/spdx-correct/index.js @@ -0,0 +1,386 @@ +/* +Copyright spdx-correct.js contributors + +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 + } +} + +// Sorting function that orders the given array of transpositions such +// that a transposition with the longer pattern comes before a transposition +// with a shorter pattern. This is to prevent e.g. the transposition +// ["General Public License", "GPL"] from matching to "Lesser General Public License" +// before a longer and more accurate transposition ["Lesser General Public License", "LGPL"] +// has a chance to be recognized. +function sortTranspositions(a, b) { + var length = b[0].length - a[0].length + if (length !== 0) return length + return a[0].toUpperCase().localeCompare(b[0].toUpperCase()) +} + +// 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 LGPL', 'LGPL'], + ['GNU/GPL', 'GPL'], + ['GNU GLP', 'GPL'], + ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL'], + ['GNU Lesser General Public License', 'LGPL'], + ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'], + ['GNU Lesser General Public License', 'LGPL-2.1'], + ['LESSER GENERAL PUBLIC LICENSE', 'LGPL'], + ['Lesser General Public License', 'LGPL'], + ['LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'], + ['Lesser General Public License', 'LGPL-2.1'], + ['GNU General Public License', 'GPL'], + ['Gnu public license', 'GPL'], + ['GNU Public License', 'GPL'], + ['GNU GENERAL PUBLIC LICENSE', 'GPL'], + ['MTI', 'MIT'], + ['Mozilla Public License', 'MPL'], + ['Universal Permissive License', 'UPL'], + ['WTH', 'WTF'], + ['WTFGPL', 'WTFPL'], + ['-License', ''] +].sort(sortTranspositions) + +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. 'New BSD license' + function (argument) { + return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, 'BSD-3-Clause') + }, + // e.g. 'Simplified BSD license' + function (argument) { + return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, 'BSD-2-Clause') + }, + // e.g. 'Free BSD license' + function (argument) { + return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, 'BSD-2-Clause-$1BSD') + }, + // e.g. 'Clear BSD license' + function (argument) { + return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, 'BSD-3-Clause-Clear') + }, + // e.g. 'Old BSD License' + function (argument) { + return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, 'BSD-4-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'], + ['GPL-1', 'GPL-1.0-only'], + ['GPLV2', 'GPL-2.0-only'], + ['GPL-2', '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).sort(sortTranspositions) + +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, options) { + options = options || {} + var upgrade = options.upgrade === undefined ? true : !!options.upgrade + function postprocess (value) { + return upgrade ? upgradeGPLs(value) : value + } + var validArugment = ( + typeof identifier === 'string' && + identifier.trim().length !== 0 + ) + if (!validArugment) { + throw Error('Invalid argument. Expected non-empty string.') + } + identifier = identifier.trim() + if (valid(identifier)) { + return postprocess(identifier) + } + var noPlus = identifier.replace(/\+$/, '').trim() + if (valid(noPlus)) { + return postprocess(noPlus) + } + var transformed = validTransformation(identifier) + if (transformed !== null) { + return postprocess(transformed) + } + transformed = anyCorrection(identifier, function (argument) { + if (valid(argument)) { + return argument + } + return validTransformation(argument) + }) + if (transformed !== null) { + return postprocess(transformed) + } + transformed = validLastResort(identifier) + if (transformed !== null) { + return postprocess(transformed) + } + transformed = anyCorrection(identifier, validLastResort) + if (transformed !== null) { + return postprocess(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-1.0+', 'GPL-2.0+', 'GPL-3.0+', + 'LGPL-2.0+', 'LGPL-2.1+', 'LGPL-3.0+', + 'AGPL-1.0+', 'AGPL-3.0+' + ].indexOf(value) !== -1) { + return value.replace(/\+$/, '-or-later') + } 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 0000000000000..d77615638be66 --- /dev/null +++ b/node_modules/spdx-correct/package.json @@ -0,0 +1,32 @@ +{ + "name": "spdx-correct", + "description": "correct invalid SPDX expressions", + "version": "3.2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + }, + "devDependencies": { + "defence-cli": "^3.0.1", + "replace-require-self": "^1.0.0", + "standard": "^14.3.4", + "standard-markdown": "^6.0.0", + "tape": "^5.0.1" + }, + "files": [ + "index.js" + ], + "keywords": [ + "SPDX", + "law", + "legal", + "license", + "metadata" + ], + "license": "Apache-2.0", + "repository": "jslicense/spdx-correct.js", + "scripts": { + "lint": "standard && standard-markdown README.md", + "test": "defence README.md | replace-require-self | node && node test.js" + } +} diff --git a/node_modules/spdx-exceptions/README.md b/node_modules/spdx-exceptions/README.md new file mode 100644 index 0000000000000..6c927ecc69119 --- /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 0000000000000..f88f088ab2fa1 --- /dev/null +++ b/node_modules/spdx-exceptions/index.json @@ -0,0 +1,40 @@ +[ + "389-exception", + "Autoconf-exception-2.0", + "Autoconf-exception-3.0", + "Bison-exception-2.2", + "Bootloader-exception", + "Classpath-exception-2.0", + "CLISP-exception-2.0", + "DigiRule-FOSS-exception", + "eCos-exception-2.0", + "Fawkes-Runtime-exception", + "FLTK-exception", + "Font-exception-2.0", + "freertos-exception-2.0", + "GCC-exception-2.0", + "GCC-exception-3.1", + "gnu-javamail-exception", + "GPL-3.0-linking-exception", + "GPL-3.0-linking-source-exception", + "GPL-CC-1.0", + "i2p-gpl-java-exception", + "Libtool-exception", + "Linux-syscall-note", + "LLVM-exception", + "LZMA-exception", + "mif-exception", + "Nokia-Qt-exception-1.1", + "OCaml-LGPL-linking-exception", + "OCCT-exception-1.0", + "OpenJDK-assembly-exception-1.0", + "openvpn-openssl-exception", + "PS-or-PDF-font-exception-20170817", + "Qt-GPL-exception-1.0", + "Qt-LGPL-exception-1.1", + "Qwt-exception-1.0", + "Swift-exception", + "u-boot-exception-2.0", + "Universal-FOSS-exception-1.0", + "WxWindows-exception-3.1" +] diff --git a/node_modules/spdx-exceptions/package.json b/node_modules/spdx-exceptions/package.json new file mode 100644 index 0000000000000..2bafc6a38b243 --- /dev/null +++ b/node_modules/spdx-exceptions/package.json @@ -0,0 +1,17 @@ +{ + "name": "spdx-exceptions", + "description": "list of SPDX standard license exceptions", + "version": "2.3.0", + "author": "The Linux Foundation", + "contributors": [ + "Kyle E. Mitchell (https://kemitchell.com/)" + ], + "license": "CC-BY-3.0", + "repository": "kemitchell/spdx-exceptions.json", + "files": [ + "index.json" + ], + "scripts": { + "build": "node build.js" + } +} diff --git a/node_modules/spdx-expression-parse/AUTHORS b/node_modules/spdx-expression-parse/AUTHORS new file mode 100644 index 0000000000000..257a76b9484c1 --- /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 0000000000000..831618eaba6c8 --- /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 0000000000000..9406462e3cff3 --- /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-license-ids) and [spdx-exceptions](https://www.npmjs.com/package/spdx-exceptions) 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 0000000000000..52fab560aea70 --- /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 0000000000000..c9edc9f939cdf --- /dev/null +++ b/node_modules/spdx-expression-parse/package.json @@ -0,0 +1,39 @@ +{ + "name": "spdx-expression-parse", + "description": "parse SPDX license expressions", + "version": "3.0.1", + "author": "Kyle E. Mitchell (https://kemitchell.com)", + "files": [ + "AUTHORS", + "index.js", + "parse.js", + "scan.js" + ], + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + }, + "devDependencies": { + "defence-cli": "^3.0.1", + "replace-require-self": "^1.0.0", + "standard": "^14.1.0" + }, + "keywords": [ + "SPDX", + "law", + "legal", + "license", + "metadata", + "package", + "package.json", + "standards" + ], + "license": "MIT", + "repository": "jslicense/spdx-expression-parse.js", + "scripts": { + "lint": "standard", + "test:readme": "defence -i javascript README.md | replace-require-self | node", + "test:suite": "node test.js", + "test": "npm run test:suite && npm run test:readme" + } +} diff --git a/node_modules/spdx-expression-parse/parse.js b/node_modules/spdx-expression-parse/parse.js new file mode 100644 index 0000000000000..5a00b45c5799c --- /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 0000000000000..b74fce2e2c663 --- /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 0000000000000..500e32dff1a42 --- /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.com/package/spdx-license-ids) +[![Github Actions](https://action-badges.now.sh/jslicense/spdx-license-ids)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/jslicense/spdx-license-ids) + +A list of [SPDX license](https://spdx.org/licenses/) identifiers + +## Installation + +[Download JSON directly](https://raw.githubusercontent.com/jslicense/spdx-license-ids/main/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/): + +``` +npm install spdx-license-ids +``` + +## [Node.js](https://nodejs.org/) API + +### require('spdx-license-ids') + +Type: `string[]` + +All license IDs except for the currently deprecated ones. + +```javascript +const ids = require('spdx-license-ids'); +//=> ['0BSD', 'AAL', 'ADSL', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AGPL-1.0-only', ...] + +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: `string[]` + +Deprecated license IDs. + +```javascript +const deprecatedIds = require('spdx-license-ids/deprecated'); +//=> ['AGPL-1.0', 'AGPL-3.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', 'GPL-2.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 0000000000000..a877dc3efd8bd --- /dev/null +++ b/node_modules/spdx-license-ids/deprecated.json @@ -0,0 +1,33 @@ +[ + "AGPL-1.0", + "AGPL-3.0", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-1.0+", + "GPL-2.0", + "GPL-2.0+", + "GPL-2.0-with-GCC-exception", + "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-3.0", + "GPL-3.0+", + "GPL-3.0-with-GCC-exception", + "GPL-3.0-with-autoconf-exception", + "LGPL-2.0", + "LGPL-2.0+", + "LGPL-2.1", + "LGPL-2.1+", + "LGPL-3.0", + "LGPL-3.0+", + "Nunit", + "StandardML-NJ", + "bzip2-1.0.5", + "eCos-2.0", + "wxWindows" +] diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json new file mode 100644 index 0000000000000..a7b98b24b6273 --- /dev/null +++ b/node_modules/spdx-license-ids/index.json @@ -0,0 +1,569 @@ +[ + "0BSD", + "AAL", + "ADSL", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "AGPL-1.0-only", + "AGPL-1.0-or-later", + "AGPL-3.0-only", + "AGPL-3.0-or-later", + "AMDPLPA", + "AML", + "AMPAS", + "ANTLR-PD", + "ANTLR-PD-fallback", + "APAFML", + "APL-1.0", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "ASWF-Digital-Assets-1.0", + "ASWF-Digital-Assets-1.1", + "Abstyles", + "AdaCore-doc", + "Adobe-2006", + "Adobe-Glyph", + "Adobe-Utopia", + "Afmparse", + "Aladdin", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "App-s2p", + "Arphic-1999", + "Artistic-1.0", + "Artistic-1.0-Perl", + "Artistic-1.0-cl8", + "Artistic-2.0", + "BSD-1-Clause", + "BSD-2-Clause", + "BSD-2-Clause-Patent", + "BSD-2-Clause-Views", + "BSD-3-Clause", + "BSD-3-Clause-Attribution", + "BSD-3-Clause-Clear", + "BSD-3-Clause-HP", + "BSD-3-Clause-LBNL", + "BSD-3-Clause-Modification", + "BSD-3-Clause-No-Military-License", + "BSD-3-Clause-No-Nuclear-License", + "BSD-3-Clause-No-Nuclear-License-2014", + "BSD-3-Clause-No-Nuclear-Warranty", + "BSD-3-Clause-Open-MPI", + "BSD-3-Clause-Sun", + "BSD-3-Clause-flex", + "BSD-4-Clause", + "BSD-4-Clause-Shortened", + "BSD-4-Clause-UC", + "BSD-4.3RENO", + "BSD-4.3TAHOE", + "BSD-Advertising-Acknowledgement", + "BSD-Attribution-HPND-disclaimer", + "BSD-Inferno-Nettverk", + "BSD-Protection", + "BSD-Source-Code", + "BSD-Systemics", + "BSL-1.0", + "BUSL-1.1", + "Baekmuk", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "Bitstream-Charter", + "Bitstream-Vera", + "BlueOak-1.0.0", + "Boehm-GC", + "Borceux", + "Brian-Gladman-3-Clause", + "C-UDA-1.0", + "CAL-1.0", + "CAL-1.0-Combined-Work-Exception", + "CATOSL-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-2.5-AU", + "CC-BY-3.0", + "CC-BY-3.0-AT", + "CC-BY-3.0-DE", + "CC-BY-3.0-IGO", + "CC-BY-3.0-NL", + "CC-BY-3.0-US", + "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-3.0-DE", + "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-3.0-DE", + "CC-BY-NC-ND-3.0-IGO", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.0-DE", + "CC-BY-NC-SA-2.0-FR", + "CC-BY-NC-SA-2.0-UK", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-3.0-DE", + "CC-BY-NC-SA-3.0-IGO", + "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-3.0-DE", + "CC-BY-ND-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.0-UK", + "CC-BY-SA-2.1-JP", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-3.0-AT", + "CC-BY-SA-3.0-DE", + "CC-BY-SA-3.0-IGO", + "CC-BY-SA-4.0", + "CC-PDDC", + "CC0-1.0", + "CDDL-1.0", + "CDDL-1.1", + "CDL-1.0", + "CDLA-Permissive-1.0", + "CDLA-Permissive-2.0", + "CDLA-Sharing-1.0", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-2.1", + "CECILL-B", + "CECILL-C", + "CERN-OHL-1.1", + "CERN-OHL-1.2", + "CERN-OHL-P-2.0", + "CERN-OHL-S-2.0", + "CERN-OHL-W-2.0", + "CFITSIO", + "CMU-Mach", + "CNRI-Jython", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "COIL-1.0", + "CPAL-1.0", + "CPL-1.0", + "CPOL-1.02", + "CUA-OPL-1.0", + "Caldera", + "ClArtistic", + "Clips", + "Community-Spec-1.0", + "Condor-1.1", + "Cornell-Lossless-JPEG", + "Cronyx", + "Crossword", + "CrystalStacker", + "Cube", + "D-FSL-1.0", + "DL-DE-BY-2.0", + "DL-DE-ZERO-2.0", + "DOC", + "DRL-1.0", + "DSDP", + "Dotseqn", + "ECL-1.0", + "ECL-2.0", + "EFL-1.0", + "EFL-2.0", + "EPICS", + "EPL-1.0", + "EPL-2.0", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "EUPL-1.2", + "Elastic-2.0", + "Entessa", + "ErlPL-1.1", + "Eurosym", + "FBM", + "FDK-AAC", + "FSFAP", + "FSFUL", + "FSFULLR", + "FSFULLRWD", + "FTL", + "Fair", + "Ferguson-Twofish", + "Frameworx-1.0", + "FreeBSD-DOC", + "FreeImage", + "Furuseth", + "GD", + "GFDL-1.1-invariants-only", + "GFDL-1.1-invariants-or-later", + "GFDL-1.1-no-invariants-only", + "GFDL-1.1-no-invariants-or-later", + "GFDL-1.1-only", + "GFDL-1.1-or-later", + "GFDL-1.2-invariants-only", + "GFDL-1.2-invariants-or-later", + "GFDL-1.2-no-invariants-only", + "GFDL-1.2-no-invariants-or-later", + "GFDL-1.2-only", + "GFDL-1.2-or-later", + "GFDL-1.3-invariants-only", + "GFDL-1.3-invariants-or-later", + "GFDL-1.3-no-invariants-only", + "GFDL-1.3-no-invariants-or-later", + "GFDL-1.3-only", + "GFDL-1.3-or-later", + "GL2PS", + "GLWTPL", + "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", + "Giftware", + "Glide", + "Glulxe", + "Graphics-Gems", + "HP-1986", + "HP-1989", + "HPND", + "HPND-DEC", + "HPND-Markus-Kuhn", + "HPND-Pbmplus", + "HPND-UC", + "HPND-doc", + "HPND-doc-sell", + "HPND-export-US", + "HPND-export-US-modify", + "HPND-sell-regexpr", + "HPND-sell-variant", + "HPND-sell-variant-MIT-disclaimer", + "HTMLTIDY", + "HaskellReport", + "Hippocratic-2.1", + "IBM-pibs", + "ICU", + "IEC-Code-Components-EULA", + "IJG", + "IJG-short", + "IPA", + "IPL-1.0", + "ISC", + "ImageMagick", + "Imlib2", + "Info-ZIP", + "Inner-Net-2.0", + "Intel", + "Intel-ACPI", + "Interbase-1.0", + "JPL-image", + "JPNIC", + "JSON", + "Jam", + "JasPer-2.0", + "Kastrup", + "Kazlib", + "Knuth-CTAN", + "LAL-1.2", + "LAL-1.3", + "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", + "LOOP", + "LPL-1.0", + "LPL-1.02", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a", + "LPPL-1.3c", + "LZMA-SDK-9.11-to-9.20", + "LZMA-SDK-9.22", + "Latex2e", + "Latex2e-translated-notice", + "Leptonica", + "LiLiQ-P-1.1", + "LiLiQ-R-1.1", + "LiLiQ-Rplus-1.1", + "Libpng", + "Linux-OpenIB", + "Linux-man-pages-1-para", + "Linux-man-pages-copyleft", + "Linux-man-pages-copyleft-2-para", + "Linux-man-pages-copyleft-var", + "Lucida-Bitmap-Fonts", + "MIT", + "MIT-0", + "MIT-CMU", + "MIT-Festival", + "MIT-Modern-Variant", + "MIT-Wu", + "MIT-advertising", + "MIT-enna", + "MIT-feh", + "MIT-open-group", + "MIT-testregex", + "MITNFA", + "MMIXware", + "MPEG-SSG", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "MS-LPL", + "MS-PL", + "MS-RL", + "MTLL", + "MakeIndex", + "Martin-Birgmeier", + "McPhee-slideshow", + "Minpack", + "MirOS", + "Motosoto", + "MulanPSL-1.0", + "MulanPSL-2.0", + "Multics", + "Mup", + "NAIST-2003", + "NASA-1.3", + "NBPL-1.0", + "NCGL-UK-2.0", + "NCSA", + "NGPL", + "NICTA-1.0", + "NIST-PD", + "NIST-PD-fallback", + "NIST-Software", + "NLOD-1.0", + "NLOD-2.0", + "NLPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "NPOSL-3.0", + "NRL", + "NTP", + "NTP-0", + "Naumen", + "Net-SNMP", + "NetCDF", + "Newsletr", + "Nokia", + "Noweb", + "O-UDA-1.0", + "OCCT-PL", + "OCLC-2.0", + "ODC-By-1.0", + "ODbL-1.0", + "OFFIS", + "OFL-1.0", + "OFL-1.0-RFN", + "OFL-1.0-no-RFN", + "OFL-1.1", + "OFL-1.1-RFN", + "OFL-1.1-no-RFN", + "OGC-1.0", + "OGDL-Taiwan-1.0", + "OGL-Canada-2.0", + "OGL-UK-1.0", + "OGL-UK-2.0", + "OGL-UK-3.0", + "OGTSL", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.2.2", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OLFL-1.3", + "OML", + "OPL-1.0", + "OPL-UK-3.0", + "OPUBL-1.0", + "OSET-PL-2.1", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OpenPBS-2.3", + "OpenSSL", + "PADL", + "PDDL-1.0", + "PHP-3.0", + "PHP-3.01", + "PSF-2.0", + "Parity-6.0.0", + "Parity-7.0.0", + "Plexus", + "PolyForm-Noncommercial-1.0.0", + "PolyForm-Small-Business-1.0.0", + "PostgreSQL", + "Python-2.0", + "Python-2.0.1", + "QPL-1.0", + "QPL-1.0-INRIA-2004", + "Qhull", + "RHeCos-1.1", + "RPL-1.1", + "RPL-1.5", + "RPSL-1.0", + "RSA-MD", + "RSCPL", + "Rdisc", + "Ruby", + "SAX-PD", + "SCEA", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "SGI-OpenGL", + "SGP4", + "SHL-0.5", + "SHL-0.51", + "SISSL", + "SISSL-1.2", + "SL", + "SMLNJ", + "SMPPL", + "SNIA", + "SPL-1.0", + "SSH-OpenSSH", + "SSH-short", + "SSPL-1.0", + "SWL", + "Saxpath", + "SchemeReport", + "Sendmail", + "Sendmail-8.23", + "SimPL-2.0", + "Sleepycat", + "Soundex", + "Spencer-86", + "Spencer-94", + "Spencer-99", + "SugarCRM-1.1.3", + "SunPro", + "Symlinks", + "TAPR-OHL-1.0", + "TCL", + "TCP-wrappers", + "TMate", + "TORQUE-1.1", + "TOSL", + "TPDL", + "TPL-1.0", + "TTWL", + "TTYP0", + "TU-Berlin-1.0", + "TU-Berlin-2.0", + "TermReadKey", + "UCAR", + "UCL-1.0", + "UPL-1.0", + "URT-RLE", + "Unicode-DFS-2015", + "Unicode-DFS-2016", + "Unicode-TOU", + "UnixCrypt", + "Unlicense", + "VOSTROM", + "VSL-1.0", + "Vim", + "W3C", + "W3C-19980720", + "W3C-20150513", + "WTFPL", + "Watcom-1.0", + "Widget-Workshop", + "Wsuipa", + "X11", + "X11-distribute-modifications-variant", + "XFree86-1.1", + "XSkat", + "Xdebug-1.03", + "Xerox", + "Xfig", + "Xnet", + "YPL-1.0", + "YPL-1.1", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1", + "Zed", + "Zeeff", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "Zlib", + "blessing", + "bzip2-1.0.6", + "check-cvs", + "checkmk", + "copyleft-next-0.3.0", + "copyleft-next-0.3.1", + "curl", + "diffmark", + "dtoa", + "dvipdfm", + "eGenix", + "etalab-2.0", + "fwlw", + "gSOAP-1.3b", + "gnuplot", + "iMatix", + "libpng-2.0", + "libselinux-1.0", + "libtiff", + "libutil-David-Nugent", + "lsof", + "magaz", + "metamail", + "mpi-permissive", + "mpich2", + "mplus", + "pnmstitch", + "psfrag", + "psutils", + "python-ldap", + "snprintf", + "ssh-keyscan", + "swrule", + "ulem", + "w3m", + "xinetd", + "xlock", + "xpp", + "zlib-acknowledgement" +] diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json new file mode 100644 index 0000000000000..196b02705769a --- /dev/null +++ b/node_modules/spdx-license-ids/package.json @@ -0,0 +1,39 @@ +{ + "name": "spdx-license-ids", + "version": "3.0.16", + "description": "A list of SPDX license identifiers", + "repository": "jslicense/spdx-license-ids", + "author": "Shinnosuke Watanabe (https://github.com/shinnn)", + "license": "CC0-1.0", + "scripts": { + "build": "node build.js", + "pretest": "eslint .", + "latest": "node latest.js", + "test": "node test.js" + }, + "files": [ + "deprecated.json", + "index.json" + ], + "keywords": [ + "spdx", + "license", + "licenses", + "id", + "identifier", + "identifiers", + "json", + "array", + "oss" + ], + "devDependencies": { + "@shinnn/eslint-config": "^7.0.0", + "eslint": "^8.49.0", + "eslint-formatter-codeframe": "^7.32.1", + "rmfr": "^2.0.0", + "tape": "^5.6.6" + }, + "eslintConfig": { + "extends": "@shinnn" + } +} diff --git a/node_modules/split-string/LICENSE b/node_modules/split-string/LICENSE new file mode 100644 index 0000000000000..e33d14b754e8c --- /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 0000000000000..d622e44d99941 --- /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 0000000000000..7bc0ea91b14d4 --- /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 0000000000000..8f490a245c160 --- /dev/null +++ b/node_modules/split-string/package.json @@ -0,0 +1,65 @@ +{ + "name": "split-string", + "description": "Split a string on a character except when the character is escaped.", + "version": "3.1.0", + "homepage": "https://github.com/jonschlinkert/split-string", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/split-string", + "bugs": { + "url": "https://github.com/jonschlinkert/split-string/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "character", + "escape", + "split", + "string" + ], + "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 + } + } +} diff --git a/node_modules/split/.npmignore b/node_modules/split/.npmignore new file mode 100644 index 0000000000000..13abef4f58898 --- /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 0000000000000..dad2273c5c348 --- /dev/null +++ b/node_modules/split/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" diff --git a/node_modules/split/LICENCE b/node_modules/split/LICENCE new file mode 100644 index 0000000000000..171dd970053ce --- /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 0000000000000..2e891316edfba --- /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 0000000000000..d856433c5f541 --- /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; + 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/split/package.json b/node_modules/split/package.json new file mode 100644 index 0000000000000..00b35caead0cb --- /dev/null +++ b/node_modules/split/package.json @@ -0,0 +1,30 @@ +{ + "name": "split", + "version": "0.3.3", + "license": "MIT", + "description": "split a Text Stream into a Line Stream", + "homepage": "http://github.com/dominictarr/split", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/split.git" + }, + "dependencies": { + "through": "2" + }, + "devDependencies": { + "asynct": "*", + "event-stream": "~3.0.2", + "it-is": "1", + "stream-spec": "~0.2", + "ubelt": "~2.9", + "string-to-stream": "~1.0.0" + }, + "scripts": { + "test": "asynct test/" + }, + "author": "Dominic Tarr (http://bit.ly/dominictarr)", + "optionalDependencies": {}, + "engines": { + "node": "*" + } +} diff --git a/node_modules/split/readme.markdown b/node_modules/split/readme.markdown new file mode 100644 index 0000000000000..13854ae9aa2d7 --- /dev/null +++ b/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/split/test/options.asynct.js b/node_modules/split/test/options.asynct.js new file mode 100644 index 0000000000000..6d34d875f8ad6 --- /dev/null +++ b/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/split/test/partitioned_unicode.js b/node_modules/split/test/partitioned_unicode.js new file mode 100644 index 0000000000000..aff3d5da5ffc6 --- /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 0000000000000..e5df026db7cce --- /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 (delimeter) { + return function (arr, piece) { + return arr.concat(piece.split(delimeter)) + } +} \ No newline at end of file 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 0000000000000..39e49f737b49c --- /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 0000000000000..e28e6032316ae --- /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 0000000000000..f4124b2aac799 --- /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 0000000000000..65f90aca8c2ff --- /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 0000000000000..8cac698ad8d86 --- /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 0000000000000..3e0e5e133caf5 --- /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 0000000000000..43561bf56af1b --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/.editorconfig b/node_modules/static-extend/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000000000..449f0da4c1605 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/static-extend/node_modules/is-descriptor/.eslintrc b/node_modules/static-extend/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000000000..24e5090e5497d --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/.gitattributes b/node_modules/static-extend/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000000000..660957e70cf2a --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000000000..37535da621119 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/static-extend/node_modules/is-descriptor/.nycrc b/node_modules/static-extend/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md b/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000000000..4963353ee916e --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) 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 0000000000000..c0d7f136277fb --- /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 0000000000000..fd9ddcfb7373e --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), 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 +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### 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. +* [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. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions 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 0000000000000..c9dd24d225e8f --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' 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 0000000000000..6d6ca8ba08cee --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/test/index.js b/node_modules/static-extend/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000000000..0b74a35fd8807 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/static-extend/package.json b/node_modules/static-extend/package.json new file mode 100644 index 0000000000000..a63ab9500c109 --- /dev/null +++ b/node_modules/static-extend/package.json @@ -0,0 +1,63 @@ +{ + "name": "static-extend", + "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.", + "version": "0.1.2", + "homepage": "https://github.com/jonschlinkert/static-extend", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/static-extend", + "bugs": { + "url": "https://github.com/jonschlinkert/static-extend/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3" + }, + "keywords": [ + "class", + "ctor", + "descriptor", + "extend", + "extends", + "inherit", + "inheritance", + "merge", + "method", + "prop", + "properties", + "property", + "prototype" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb", + "verb-readme-generator" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/stream-combiner/.npmignore b/node_modules/stream-combiner/.npmignore new file mode 100644 index 0000000000000..13abef4f58898 --- /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 0000000000000..895dbd3623421 --- /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 0000000000000..6d03581f36143 --- /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 0000000000000..565e0e263b135 --- /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 0000000000000..99cf5b61b9bde --- /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 0000000000000..c0e984553f389 --- /dev/null +++ b/node_modules/stream-combiner/package.json @@ -0,0 +1,21 @@ +{ + "name": "stream-combiner", + "version": "0.0.4", + "homepage": "https://github.com/dominictarr/stream-combiner", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/stream-combiner.git" + }, + "dependencies": { + "duplexer": "~0.1.1" + }, + "devDependencies": { + "tape": "~2.3.0", + "event-stream": "~3.0.7" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "author": "'Dominic Tarr' (http://dominictarr.com)", + "license": "MIT" +} diff --git a/node_modules/stream-combiner/test/index.js b/node_modules/stream-combiner/test/index.js new file mode 100644 index 0000000000000..d17ddada854f5 --- /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.prototype.padend/.editorconfig b/node_modules/string.prototype.padend/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/string.prototype.padend/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/string.prototype.padend/.eslintrc b/node_modules/string.prototype.padend/.eslintrc new file mode 100644 index 0000000000000..748d957eeef06 --- /dev/null +++ b/node_modules/string.prototype.padend/.eslintrc @@ -0,0 +1,20 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], + "new-cap": [2, { "capIsNewExceptions": ["ToLength", "ToString", "RequireObjectCoercible"] }], + "no-magic-numbers": [0] + }, + + "overrides": [ + { + "files": "test/**/*", + "rules": { + "no-invalid-this": 1, + }, + }, + ], +} diff --git a/node_modules/string.prototype.padend/.nycrc b/node_modules/string.prototype.padend/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/string.prototype.padend/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/string.prototype.padend/CHANGELOG.md b/node_modules/string.prototype.padend/CHANGELOG.md new file mode 100644 index 0000000000000..5bf1f2872fc9e --- /dev/null +++ b/node_modules/string.prototype.padend/CHANGELOG.md @@ -0,0 +1,88 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.5](https://github.com/es-shims/String.prototype.padEnd/compare/v3.1.4...v3.1.5) - 2023-09-04 + +### Commits + +- [Deps] update `define-properties`, `es-abstract` [`b5aa85c`](https://github.com/es-shims/String.prototype.padEnd/commit/b5aa85c9c212d293b6881d6d227af9f23a1ed6c1) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`bdce52b`](https://github.com/es-shims/String.prototype.padEnd/commit/bdce52b243fa2978cc01e61b9c93e85a4d659230) + +## [v3.1.4](https://github.com/es-shims/String.prototype.padEnd/compare/v3.1.3...v3.1.4) - 2022-11-07 + +### Commits + +- [actions] reuse common workflows [`1599a3a`](https://github.com/es-shims/String.prototype.padEnd/commit/1599a3af34b28f23014c96f4d30c2ce95931b151) +- [meta] use `npmignore` to autogenerate an npmignore file [`626d38c`](https://github.com/es-shims/String.prototype.padEnd/commit/626d38ce72992fe2d3f08f31fae71b6a2a1fb020) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`9aa073a`](https://github.com/es-shims/String.prototype.padEnd/commit/9aa073a07f12e026789146dac55be7efa1bba1c4) +- [meta] add `auto-changelog` [`e48bc74`](https://github.com/es-shims/String.prototype.padEnd/commit/e48bc7404f1db9c572b7a4bcf571ce2e923b01b8) +- [Deps] update `define-properties`, `es-abstract` [`7113258`](https://github.com/es-shims/String.prototype.padEnd/commit/7113258f12294af629dd3968a5ea509dd881ba2e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `tape` [`800dfc3`](https://github.com/es-shims/String.prototype.padEnd/commit/800dfc3bb40b4be12e0c221b9e606bad8f1d4006) +- [actions] update rebase action to use reusable workflow [`a3f9ddb`](https://github.com/es-shims/String.prototype.padEnd/commit/a3f9ddb4b25b55a7950ba3bc6a718bfab6eb7160) +- [actions] update codecov uploader [`6d2290f`](https://github.com/es-shims/String.prototype.padEnd/commit/6d2290fd32c506d6b49c37d7f110600ee4b8ef1b) + + + +3.1.3 / 2021-10-04 +================= + * [Robustness] remove runtime `.push` call + * [readme] add github actions/codecov badges + * [Deps] update `es-abstract` + * [meta] use `prepublishOnly` script for npm 7+ + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `tape` + * [actions] update workflows + * [actions] use `node/install` instead of `node/run`; use `codecov` action + +3.1.2 / 2021-02-20 +================= + * [meta] do not publish github action workflow files + * [Deps] update `call-bind`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `has-strict-mode`, `tape` + * [actions] update workflows + * [Tests] increase coverage + +3.1.1 / 2020-11-21 +================= + * [Deps] update `es-abstract`; use `call-bind` where applicable + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `tape`; add `aud`, `safe-publish-latest + * [meta] gitignore nyc output + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests + * [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner + +3.1.0 / 2019-12-14 +================= + * [New] add `auto` entry point + * [Refactor] use split-up `es-abstract` (77% bundle size decrease) + * [readme] remove testling + * [readme] Stage 4 + * [Deps] update `define-properties`, `es-abstract`, `function-bind` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape`, `@es-shims/api`; use `functions-have-names` + * [meta] add `funding` field + * [meta] Only apps should have lockfiles + * [Tests] use shared travis-ci configs + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] remove `jscs` + * [actions] add automatic rebasing / merge commit blocking + +3.0.0 / 2015-11-17 +================= + * Renamed to `padStart`/`padEnd` per November 2015 TC39 meeting. + +2.0.0 / 2015-09-25 +================= + * Implement the [es-shim API](es-shims/api). + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Deps] update `es-abstract` + * [Dev Deps] Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config`, `nsp` + * [Refactor] Remove redundant `max` operation, per https://github.com/ljharb/proposal-string-pad-left-right/pull/2 + +1.0.0 / 2015-07-30 +================= + * v1.0.0 diff --git a/node_modules/string.prototype.padend/LICENSE b/node_modules/string.prototype.padend/LICENSE new file mode 100644 index 0000000000000..4193abd719f74 --- /dev/null +++ b/node_modules/string.prototype.padend/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 EcmaScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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.prototype.padend/README.md b/node_modules/string.prototype.padend/README.md new file mode 100644 index 0000000000000..3d7bbc630b7c5 --- /dev/null +++ b/node_modules/string.prototype.padend/README.md @@ -0,0 +1,46 @@ +# String.prototype.padEnd [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES2017 spec-compliant `String.prototype.padEnd` shim. Invoke its "shim" method to shim `String.prototype.padEnd` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://github.com/tc39/ecma262/pull/581). + +Most common usage: +```js +var padEnd = require('string.prototype.padend'); + +assert(padEnd('foo', 5, 'bar') === 'fooba'); + +padEnd.shim(); + +assert(padEnd('foo', 2) === 'foo'.padEnd(2)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/string.prototype.padend +[npm-version-svg]: http://versionbadg.es/es-shims/String.prototype.padEnd.svg +[travis-svg]: https://travis-ci.org/es-shims/String.prototype.padEnd.svg +[travis-url]: https://travis-ci.org/es-shims/String.prototype.padEnd +[deps-svg]: https://david-dm.org/es-shims/String.prototype.padEnd.svg +[deps-url]: https://david-dm.org/es-shims/String.prototype.padEnd +[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.padEnd/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.padEnd#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/string.prototype.padend.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/string.prototype.padend.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/string.prototype.padend.svg +[downloads-url]: http://npm-stat.com/charts.html?package=string.prototype.padend +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.padEnd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.padEnd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.padEnd +[actions-url]: https://github.com/es-shims/String.prototype.padEnd/actions diff --git a/node_modules/string.prototype.padend/auto.js b/node_modules/string.prototype.padend/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/string.prototype.padend/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/string.prototype.padend/implementation.js b/node_modules/string.prototype.padend/implementation.js new file mode 100644 index 0000000000000..9d881efb60ff1 --- /dev/null +++ b/node_modules/string.prototype.padend/implementation.js @@ -0,0 +1,35 @@ +'use strict'; + +var ToLength = require('es-abstract/2023/ToLength'); +var ToString = require('es-abstract/2023/ToString'); +var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible'); +var callBound = require('call-bind/callBound'); + +var $slice = callBound('String.prototype.slice'); + +module.exports = function padEnd(maxLength) { + var O = RequireObjectCoercible(this); + var S = ToString(O); + var stringLength = ToLength(S.length); + var fillString; + if (arguments.length > 1) { + fillString = arguments[1]; + } + var filler = typeof fillString === 'undefined' ? '' : ToString(fillString); + if (filler === '') { + filler = ' '; + } + var intMaxLength = ToLength(maxLength); + if (intMaxLength <= stringLength) { + return S; + } + var fillLen = intMaxLength - stringLength; + while (filler.length < fillLen) { + var fLen = filler.length; + var remainingCodeUnits = fillLen - fLen; + filler += fLen > remainingCodeUnits ? $slice(filler, 0, remainingCodeUnits) : filler; + } + + var truncatedStringFiller = filler.length > fillLen ? $slice(filler, 0, fillLen) : filler; + return S + truncatedStringFiller; +}; diff --git a/node_modules/string.prototype.padend/index.js b/node_modules/string.prototype.padend/index.js new file mode 100644 index 0000000000000..cdaaa400be5ff --- /dev/null +++ b/node_modules/string.prototype.padend/index.js @@ -0,0 +1,25 @@ +'use strict'; + +var define = require('define-properties'); +var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind.apply(getPolyfill()); + +var boundPadEnd = function padEnd(str, maxLength) { + RequireObjectCoercible(str); + var args = arguments.length > 2 ? [maxLength, arguments[2]] : [maxLength]; + return bound(str, args); +}; + +define(boundPadEnd, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundPadEnd; diff --git a/node_modules/string.prototype.padend/package.json b/node_modules/string.prototype.padend/package.json new file mode 100644 index 0000000000000..482a66dfa932e --- /dev/null +++ b/node_modules/string.prototype.padend/package.json @@ -0,0 +1,98 @@ +{ + "name": "string.prototype.padend", + "version": "3.1.5", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES2017 spec-compliant String.prototype.padEnd shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/String.prototype.padEnd.git" + }, + "keywords": [ + "String.prototype.padRight", + "String.prototype.padEnd", + "string", + "ES2017", + "ES8", + "shim", + "trim", + "padLeft", + "padRight", + "padStart", + "padEnd", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "function-bind": "^1.1.1", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "3.1.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/string.prototype.padend/polyfill.js b/node_modules/string.prototype.padend/polyfill.js new file mode 100644 index 0000000000000..c4245235f9f71 --- /dev/null +++ b/node_modules/string.prototype.padend/polyfill.js @@ -0,0 +1,7 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + return typeof String.prototype.padEnd === 'function' ? String.prototype.padEnd : implementation; +}; diff --git a/node_modules/string.prototype.padend/shim.js b/node_modules/string.prototype.padend/shim.js new file mode 100644 index 0000000000000..3daaa81cf53ef --- /dev/null +++ b/node_modules/string.prototype.padend/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var getPolyfill = require('./polyfill'); +var define = require('define-properties'); + +module.exports = function shimPadEnd() { + var polyfill = getPolyfill(); + define(String.prototype, { padEnd: polyfill }, { + padEnd: function testPadEnd() { + return String.prototype.padEnd !== polyfill; + } + }); + return polyfill; +}; diff --git a/node_modules/string.prototype.padend/test/.eslintrc b/node_modules/string.prototype.padend/test/.eslintrc new file mode 100644 index 0000000000000..168cdf85730f6 --- /dev/null +++ b/node_modules/string.prototype.padend/test/.eslintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "max-statements-per-line": [2, { "max": 2 }] + } +} diff --git a/node_modules/string.prototype.padend/test/implementation.js b/node_modules/string.prototype.padend/test/implementation.js new file mode 100644 index 0000000000000..8408e6c46882a --- /dev/null +++ b/node_modules/string.prototype.padend/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var padEnd = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { padEnd.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { padEnd.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(padEnd), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.padend/test/index.js b/node_modules/string.prototype.padend/test/index.js new file mode 100644 index 0000000000000..d38ad4a6b51a0 --- /dev/null +++ b/node_modules/string.prototype.padend/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var padEnd = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { padEnd(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { padEnd(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(padEnd, t); + + t.end(); +}); diff --git a/node_modules/string.prototype.padend/test/shimmed.js b/node_modules/string.prototype.padend/test/shimmed.js new file mode 100644 index 0000000000000..a6e9a66ce86cc --- /dev/null +++ b/node_modules/string.prototype.padend/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var bind = require('function-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(String.prototype.padEnd.length, 1, 'String#padEnd has a length of 1'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(String.prototype.padEnd.name, 'padEnd', 'String#padEnd has name "padEnd"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(String.prototype, 'padEnd'), 'String#padEnd is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return String.prototype.padEnd.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.padEnd.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(bind.call(Function.call, String.prototype.padEnd), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.padend/test/tests.js b/node_modules/string.prototype.padend/test/tests.js new file mode 100644 index 0000000000000..d62fa4830bd9c --- /dev/null +++ b/node_modules/string.prototype.padend/test/tests.js @@ -0,0 +1,26 @@ +'use strict'; + +module.exports = function (padEnd, t) { + t.test('normal cases', function (st) { + st.equal(padEnd('a', 3, 'b'), 'abb', 'string pads end with single character'); + st.equal(padEnd('abc', 3, 'd'), 'abc', 'string already of maximum length noops'); + st.equal(padEnd('abc', -3, 'd'), 'abc', 'string already larger than maximum length noops'); + st.equal(padEnd('cd', 3, 'ab'), 'cda', 'string with maximum length equal to length plus filler length, pads'); + st.equal(padEnd('abc'), 'abc', 'absent maximum length is noop'); + st.equal(padEnd('a', 3), 'a ', 'absent fillStr defaults to a space'); + st.equal(padEnd('ed', 6, null), 'ednull', 'non-string fillStr gets stringified'); + + st.end(); + }); + + t.test('truncated fill string', function (st) { + st.equal(padEnd('a', 2, 'bc'), 'ab', 'truncates at the provided max length'); + + st.end(); + }); + + t.test('exceptions', function (st) { + + st.end(); + }); +}; diff --git a/node_modules/string.prototype.trim/.editorconfig b/node_modules/string.prototype.trim/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/string.prototype.trim/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/string.prototype.trim/.eslintrc b/node_modules/string.prototype.trim/.eslintrc new file mode 100644 index 0000000000000..2bbc53b115bb1 --- /dev/null +++ b/node_modules/string.prototype.trim/.eslintrc @@ -0,0 +1,25 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "RequireObjectCoercible", + "ToString", + ], + }], + "no-invalid-this": 1, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "id-length": 0, + }, + }, + ], +} diff --git a/node_modules/string.prototype.trim/.nycrc b/node_modules/string.prototype.trim/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/string.prototype.trim/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/string.prototype.trim/CHANGELOG.md b/node_modules/string.prototype.trim/CHANGELOG.md new file mode 100644 index 0000000000000..25a4545889375 --- /dev/null +++ b/node_modules/string.prototype.trim/CHANGELOG.md @@ -0,0 +1,182 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.8](https://github.com/es-shims/String.prototype.trim/compare/v1.2.7...v1.2.8) - 2023-09-07 + +### Commits + +- [Tests] add passing test cases [`2ab172c`](https://github.com/es-shims/String.prototype.trim/commit/2ab172c3ddeec62fb4f6ead3c7e10d24e340ecad) +- [Deps] update `es-abstract` [`8c16598`](https://github.com/es-shims/String.prototype.trim/commit/8c16598aba57e30c5e8446f91fb998a5790c1f81) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`2b99fad`](https://github.com/es-shims/String.prototype.trim/commit/2b99fad6f32386b5bf1b304acb0fdd2a73c77a95) +- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/eslint-config`, `aud`, `tape` [`97be2b5`](https://github.com/es-shims/String.prototype.trim/commit/97be2b55a3902753f50fadc2e9df6b7ff0f0f669) +- [Deps] update `define-properties`, `es-abstract` [`1fdc65f`](https://github.com/es-shims/String.prototype.trim/commit/1fdc65ff4b9c73cc9d132832943a89a57f1f93a5) + +## [v1.2.7](https://github.com/es-shims/String.prototype.trim/compare/v1.2.6...v1.2.7) - 2022-11-07 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3e6de84`](https://github.com/es-shims/String.prototype.trim/commit/3e6de84f959c1ecc44e894aa1a64a8eb5007f3f5) +- [actions] update rebase action to use reusable workflow [`b725a04`](https://github.com/es-shims/String.prototype.trim/commit/b725a0499b832e69dfe5121bb643464a659ba8ff) +- [Deps] update `es-abstract` [`b707a17`](https://github.com/es-shims/String.prototype.trim/commit/b707a1747363f361665c50eda5eb952a86755e8c) +- [Dev Deps] update `aud`, `tape` [`5295419`](https://github.com/es-shims/String.prototype.trim/commit/5295419b0bbaf8035696ef3a24a8625ee743ec7f) + +## [v1.2.6](https://github.com/es-shims/String.prototype.trim/compare/v1.2.5...v1.2.6) - 2022-04-24 + +### Commits + +- [actions] reuse common workflows [`dbfc093`](https://github.com/es-shims/String.prototype.trim/commit/dbfc0932e7b2fad166245599310a1d84a1be0882) +- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`56bbb86`](https://github.com/es-shims/String.prototype.trim/commit/56bbb86b8e514a16fc47e095b8c1014e12a2e92a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`7fa437e`](https://github.com/es-shims/String.prototype.trim/commit/7fa437e4c3d25798d979294a121f93cb4346ba04) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`716a060`](https://github.com/es-shims/String.prototype.trim/commit/716a06080dbca68ec8e3b2e0e18c0a333ed28594) +- [actions] update codecov uploader [`9a39958`](https://github.com/es-shims/String.prototype.trim/commit/9a39958a13e20d6b9f01f9fce71dd37cc03da52e) +- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`24220c4`](https://github.com/es-shims/String.prototype.trim/commit/24220c49dcb7055b5b94eb52c4d610428e19d3e4) +- [Deps] update `define-properties`, `es-abstract` [`c6008ea`](https://github.com/es-shims/String.prototype.trim/commit/c6008ea9007741755710b70ae05003cb71a7d1bd) + +## [v1.2.5](https://github.com/es-shims/String.prototype.trim/compare/v1.2.4...v1.2.5) - 2021-10-03 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`37d5a61`](https://github.com/es-shims/String.prototype.trim/commit/37d5a61c95a26c079b30e2d9d2ffdb70f36ca9cf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`4c4a85e`](https://github.com/es-shims/String.prototype.trim/commit/4c4a85e5f521ae9811ac1205af933e3845b5a24e) +- [readme] add github actions/codecov badges [`9980eee`](https://github.com/es-shims/String.prototype.trim/commit/9980eee58866b08218ff3257a3af2aa9e29774fc) +- [Deps] update `es-abstract` [`6c1da80`](https://github.com/es-shims/String.prototype.trim/commit/6c1da806270fd909a76fc43e3dfe91be46058382) +- [readme] remove defunct testling badge [`8d282d1`](https://github.com/es-shims/String.prototype.trim/commit/8d282d1becd5f8d3ffe0e6e1dbfa2ddf29071670) +- [Dev Deps] update `eslint`, `tape` [`8856c26`](https://github.com/es-shims/String.prototype.trim/commit/8856c2663b5495cafb930e009f68e2d22958cac0) +- [actions] update workflows [`62cd341`](https://github.com/es-shims/String.prototype.trim/commit/62cd3412aaeee13c0d2cfe7f9bd33297e7279989) +- [meta] use `prepublishOnly` script for npm 7+ [`abd99c4`](https://github.com/es-shims/String.prototype.trim/commit/abd99c4a9838847efb3db7ddf579fb4bda8f6030) +- [Deps] update `es-abstract` [`802cb7b`](https://github.com/es-shims/String.prototype.trim/commit/802cb7b69b3a0c9a9b9642d641f0af490bd9dde7) + +## [v1.2.4](https://github.com/es-shims/String.prototype.trim/compare/v1.2.3...v1.2.4) - 2021-02-21 + +### Commits + +- [meta] do not publish github action workflow files [`936161b`](https://github.com/es-shims/String.prototype.trim/commit/936161bf43c83e09bc39c4d472d313c8f64e3fe3) +- [readme] remove travis badge [`9a28c39`](https://github.com/es-shims/String.prototype.trim/commit/9a28c3943b51a2cc87694c954205249122256d92) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `has-strict-mode`, `tape` [`7b4be8d`](https://github.com/es-shims/String.prototype.trim/commit/7b4be8d12365feb5b42658902cf18316508a0c62) +- [Tests] increase coverage [`31b8735`](https://github.com/es-shims/String.prototype.trim/commit/31b87354f55f24501ca8b2f02477cb692a70457c) +- [actions] update workflows [`eda6ab7`](https://github.com/es-shims/String.prototype.trim/commit/eda6ab73fea52b49b74653e96ac81d5372599dc8) +- [Deps] update `call-bind`, `es-abstract` [`083f88f`](https://github.com/es-shims/String.prototype.trim/commit/083f88f5342144f337f1f82874cb8cd6f27f2262) + +## [v1.2.3](https://github.com/es-shims/String.prototype.trim/compare/v1.2.2...v1.2.3) - 2020-11-21 + +### Commits + +- [Tests] migrate tests to Github Actions [`6768c8d`](https://github.com/es-shims/String.prototype.trim/commit/6768c8d5569a6fcc841436b98a19ddf6b63c7de4) +- [Tests] run `nyc` on all tests [`2fd5baa`](https://github.com/es-shims/String.prototype.trim/commit/2fd5baa7239a4d449338e0333e2dc4573597962e) +- [Deps] update `es-abstract`; use `call-bind` where applicable [`e4e8c6e`](https://github.com/es-shims/String.prototype.trim/commit/e4e8c6ede423ee8c384564092f624f980097bb28) +- [Dev Deps] update `eslint`, `aud`, `auto-changelog` [`a21c1d5`](https://github.com/es-shims/String.prototype.trim/commit/a21c1d5c87ec9b1b5107b0a1faf138993951081c) + +## [v1.2.2](https://github.com/es-shims/String.prototype.trim/compare/v1.2.1...v1.2.2) - 2020-09-15 + +### Commits + +- [Tests] use `nyc` for coverage` [`0884270`](https://github.com/es-shims/String.prototype.trim/commit/0884270b26f7e6f7602d9f355dc3b4d5cd12d97e) +- [Tests] add implementation tests [`475c480`](https://github.com/es-shims/String.prototype.trim/commit/475c4804224a11bb6fba6d1407b59f7aab2c5d4e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`d70d913`](https://github.com/es-shims/String.prototype.trim/commit/d70d9136bc76499ecee1997068b7f3d1ba0f94e8) +- [actions] add "Allow Edits" workflow [`6e6be23`](https://github.com/es-shims/String.prototype.trim/commit/6e6be23aa679e02836e1f3e65bd09dd30c3fd2ae) +- [Refactor] use `RequireObjectCoercible` instead of `CheckObjectCoercible` [`5bfaf17`](https://github.com/es-shims/String.prototype.trim/commit/5bfaf1731edd5fcd01ec07f75717eebdf4992e4c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `functions-have-names`; add `safe-publish-latest` [`65be600`](https://github.com/es-shims/String.prototype.trim/commit/65be600028222127c1faaeacea810bc042f35f70) +- [Deps] update `es-abstract`, remove `function-bind` [`5f4d1ec`](https://github.com/es-shims/String.prototype.trim/commit/5f4d1ec8f2c13a4b4fde171ca2029e1ec4057b2b) +- [Refactor] switch from 2019 to 2020 AOs [`4c2d5d2`](https://github.com/es-shims/String.prototype.trim/commit/4c2d5d23f63731958007d856767f5a2f9c779c15) +- [Dev Deps] update `auto-changelog`, `tape` [`c7fc9e2`](https://github.com/es-shims/String.prototype.trim/commit/c7fc9e22b09d24a9aa9e68358d4a5ba10e25ff04) +- [Dev Deps] update `auto-changelog`; add `aud` [`e1dec36`](https://github.com/es-shims/String.prototype.trim/commit/e1dec364391ea5d7dc8339d2da279fdc511cdbe9) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`35826c2`](https://github.com/es-shims/String.prototype.trim/commit/35826c21b140a3c1431bd20c3443da23888b92bc) +- [Deps] update `es-abstract` [`54095ef`](https://github.com/es-shims/String.prototype.trim/commit/54095ef76d193c8595516977e98343f8db754e2d) +- [Deps] update `es-abstract` [`486dd9c`](https://github.com/es-shims/String.prototype.trim/commit/486dd9c68c5843a9f50cde55749d34edb9702616) + +## [v1.2.1](https://github.com/es-shims/String.prototype.trim/compare/v1.2.0...v1.2.1) - 2019-12-16 + +### Commits + +- [Tests] use shared travis-ci configs [`52f7e64`](https://github.com/es-shims/String.prototype.trim/commit/52f7e643f128e04ed0139c1cb3da7b7907ea639f) +- [meta] add `auto-changelog` [`6284c06`](https://github.com/es-shims/String.prototype.trim/commit/6284c061c8f4de4314a43e8600ff879164ab162c) +- [meta] remove unused Makefile and associated utilities [`8c781cd`](https://github.com/es-shims/String.prototype.trim/commit/8c781cd4bad87f7bf31dae256ef0f1c19cec2113) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names` [`c54b481`](https://github.com/es-shims/String.prototype.trim/commit/c54b481743611e736315c10885cfc861d306e64a) +- [Refactor] use split-up `es-abstract` (57% bundle size decrease) [`b0378c9`](https://github.com/es-shims/String.prototype.trim/commit/b0378c99988846b0a8edf3fcfd08f30dd632f5a9) +- [actions] add automatic rebasing / merge commit blocking [`bffe893`](https://github.com/es-shims/String.prototype.trim/commit/bffe893990837250f8a3c4714bd52675251af5c7) +- [meta] add `funding` field [`0559449`](https://github.com/es-shims/String.prototype.trim/commit/05594490366fad2d8e4bd435937fbd81169d965a) +- [Deps] update `es-abstract` [`c44d307`](https://github.com/es-shims/String.prototype.trim/commit/c44d307a50bb1fc53811b49d9203cd794ed1bae4) + +## [v1.2.0](https://github.com/es-shims/String.prototype.trim/compare/v1.1.2...v1.2.0) - 2019-07-24 + +### Commits + +- [Tests] up to `node` `v12.6`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v7.10`, `v6.17`, `4.9`; use `nvm install-latest-npm` [`b857148`](https://github.com/es-shims/String.prototype.trim/commit/b857148644d305f720b2dd9bf691b7dc2930f91d) +- [Tests] remove `jscs` [`ad1dea7`](https://github.com/es-shims/String.prototype.trim/commit/ad1dea7f6114de79d637e82cdfaf1aa5499bd358) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `replace`, `semver`, `tape` [`fcbc11d`](https://github.com/es-shims/String.prototype.trim/commit/fcbc11d4af9be65f4f7eb4aec20498c7a33a004f) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`06a4ffa`](https://github.com/es-shims/String.prototype.trim/commit/06a4ffa3078d4ab65418e878d3ef7b03277e8a1f) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@es-shims/api` [`3554fb1`](https://github.com/es-shims/String.prototype.trim/commit/3554fb1fe722004080000b0767f7f89676a3d73a) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`804b2f2`](https://github.com/es-shims/String.prototype.trim/commit/804b2f244c257b32cb2473eb1a829ce97dc6a0a5) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`6a69408`](https://github.com/es-shims/String.prototype.trim/commit/6a694081cdd9aa9296ea181e4d2b4c6fe656bb16) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`e89adee`](https://github.com/es-shims/String.prototype.trim/commit/e89adeefcbd6fb59563e62d230b8036d65a8bf69) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`1280e56`](https://github.com/es-shims/String.prototype.trim/commit/1280e5629deb4554c7077d0e452399c03c06f7b1) +- [New] add `auto` entry point [`bb00b15`](https://github.com/es-shims/String.prototype.trim/commit/bb00b1551d2774e216b5d316b552d08a7f0619d4) +- [Tests] fix tests for the mongolian vowel separator [`a35f627`](https://github.com/es-shims/String.prototype.trim/commit/a35f6275ec7b4d6b47136a007fd07566e037cac8) +- [Tests] up to `node` `v5.9`, `v4.4` [`b541b9b`](https://github.com/es-shims/String.prototype.trim/commit/b541b9b46873be859aea6c5b1e7f6f54323ea139) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`b52022d`](https://github.com/es-shims/String.prototype.trim/commit/b52022d809922914827c34bcf2c1f81b68bde092) +- [Tests] use pretest/posttest for linting/security [`39f5684`](https://github.com/es-shims/String.prototype.trim/commit/39f56844f30f630ab5497f38153b8f0646ed1d96) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`8c358c2`](https://github.com/es-shims/String.prototype.trim/commit/8c358c22ee57bd5e7b437fb707230399ea7c42aa) +- [Tests] up to `node` `v6.2` [`2ac7e1f`](https://github.com/es-shims/String.prototype.trim/commit/2ac7e1f90088bb0c96986006539ffebb6b2a6eda) +- Only apps should have lockfiles [`cb15ed5`](https://github.com/es-shims/String.prototype.trim/commit/cb15ed57fbf3ba3f2d7f24af957e8ff41421dd81) +- [Deps] update `define-properties`, `es-abstract`, `function-bind` [`5e0371a`](https://github.com/es-shims/String.prototype.trim/commit/5e0371af5c7b8fee49a0e7d1bcc26fcf41743779) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api` [`37bae7f`](https://github.com/es-shims/String.prototype.trim/commit/37bae7f8f4952b376036d924673b9e885da022f8) +- [Tests] on `node` `v5.6`, `v4.3` [`33017cf`](https://github.com/es-shims/String.prototype.trim/commit/33017cf0d3aade480c357ee8aedaca7bc5a75092) +- [Tests] allow coverage to fail [`0d7b1e3`](https://github.com/es-shims/String.prototype.trim/commit/0d7b1e365484f8c33247b60e2a07748dc2183d40) +- [Tests] use `functions-have-names` [`3e68777`](https://github.com/es-shims/String.prototype.trim/commit/3e687776f6a45e3a6d129705aad3bb4863758114) +- [Tests] on `node` `v5.12` [`32ea49d`](https://github.com/es-shims/String.prototype.trim/commit/32ea49d7572b3f981d036ea060e3ed3559ad78ef) +- [Deps] update `es-abstract` [`15f7f24`](https://github.com/es-shims/String.prototype.trim/commit/15f7f249619b7aab941c6c8156cb81ed57c39b7e) +- [Tests] on `node` `v5.10` [`080c50f`](https://github.com/es-shims/String.prototype.trim/commit/080c50fc617de7ac024d443d4a9b76ba295bd744) +- [Deps] update `function-bind` [`532480e`](https://github.com/es-shims/String.prototype.trim/commit/532480e07ad7bf22da64d401ede35928d21ff558) + +## [v1.1.2](https://github.com/es-shims/String.prototype.trim/compare/v1.1.1...v1.1.2) - 2016-02-06 + +### Commits + +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`df94d07`](https://github.com/es-shims/String.prototype.trim/commit/df94d07e12ca1e52739353f534a3d89e0a860a70) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`ef78d89`](https://github.com/es-shims/String.prototype.trim/commit/ef78d89148efe8d371fb828923dd149163e2c5c6) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`b746516`](https://github.com/es-shims/String.prototype.trim/commit/b7465166a48828367bedaa2d42a30a5e148dcaae) +- package.json: use object form of "authors", add "contributors" [`a799df1`](https://github.com/es-shims/String.prototype.trim/commit/a799df17322ae526d5c8732c75bd5bcc3d1f649f) +- [Tests] up to `node` `v5.5`, don’t allow `0.8` to fail [`7fea308`](https://github.com/es-shims/String.prototype.trim/commit/7fea3082424fbeb25f2cb88884a999326ca428f2) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`d14c7c1`](https://github.com/es-shims/String.prototype.trim/commit/d14c7c1850fb8e3a9f1d153bd818ed3beacdbadc) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`2903359`](https://github.com/es-shims/String.prototype.trim/commit/29033591ca3e65977e2746537c94b7e2e8b65ecc) +- [Tests] fix npm upgrades for older nodes [`0a6cbfa`](https://github.com/es-shims/String.prototype.trim/commit/0a6cbfa0ac506703ed554f6dc8bbde7ac1977cd4) +- [Deps] update `define-properties`, `es-abstract` [`39ccb08`](https://github.com/es-shims/String.prototype.trim/commit/39ccb0881762d762934ef2cb3c0459c65b3abf72) +- [Deps] update `es-abstract` [`c40e4fb`](https://github.com/es-shims/String.prototype.trim/commit/c40e4fb229e1a6a3e3c6818fc680ca380f2d866c) +- Use the polyfill, not the implementation, as the default export. [`0fe847e`](https://github.com/es-shims/String.prototype.trim/commit/0fe847e901871f1a8f33a66be2cd518bf8dcd0e1) +- [Tests] on `node` `v4.2` [`589743c`](https://github.com/es-shims/String.prototype.trim/commit/589743c0f8b1432a79cfed4b29187e6a9760a87b) +- [Deps] update `es-abstract` [`85bad8e`](https://github.com/es-shims/String.prototype.trim/commit/85bad8e217969a6e1eb7679a1bb06d6f075bd557) +- added assert [`aa81ac5`](https://github.com/es-shims/String.prototype.trim/commit/aa81ac55540a9e53a58ce0d1f5266ff36d403b3a) + +## [v1.1.1](https://github.com/es-shims/String.prototype.trim/compare/v1.1.0...v1.1.1) - 2015-08-16 + +### Commits + +- [Docs] remove "if" around `.shim` call in example [`b9ce088`](https://github.com/es-shims/String.prototype.trim/commit/b9ce08875f7252a85928e426db9b533cc5ee007a) + +## [v1.1.0](https://github.com/es-shims/String.prototype.trim/compare/v1.0.0...v1.1.0) - 2015-08-16 + +### Commits + +- Implement the [es-shim API](es-shims/api). [`5812703`](https://github.com/es-shims/String.prototype.trim/commit/581270337926462f9babf83772bcab71bc48bf8f) +- Move implementation to `implementation.js` [`e455b2a`](https://github.com/es-shims/String.prototype.trim/commit/e455b2af0e360358f02e54b556e698a971fc31f4) +- Fix `make release` [`efd2071`](https://github.com/es-shims/String.prototype.trim/commit/efd20711e9a226ad25e2b1e5ad7bbe85ef832d69) +- [Dev Deps] update `jscs` [`6c2fa95`](https://github.com/es-shims/String.prototype.trim/commit/6c2fa957538f139767de540693910cf1f49c8d3a) +- [Deps] update `es-abstract` [`de4cd87`](https://github.com/es-shims/String.prototype.trim/commit/de4cd876239d550f3c35e1db55a973cbb03c9b77) +- [Dev Deps] update `tape` [`2d07fe1`](https://github.com/es-shims/String.prototype.trim/commit/2d07fe19ff136467e1edbca91cfea6caac1b06d8) +- [Dev Deps] update `tape` [`e697efe`](https://github.com/es-shims/String.prototype.trim/commit/e697efe943cab07639d62649424c72e4f44f2469) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`6065103`](https://github.com/es-shims/String.prototype.trim/commit/6065103baa10f56b904f44693d5ba6b23ee6ba57) + +## v1.0.0 - 2015-08-08 + +### Commits + +- Dotfiles / Makefile [`b7f0e52`](https://github.com/es-shims/String.prototype.trim/commit/b7f0e526ea73136e00595d768faaba83a41da7ee) +- Tests [`4d61441`](https://github.com/es-shims/String.prototype.trim/commit/4d61441de9dcf2278dcd118077d4541843a47534) +- package.json [`2a2e0f2`](https://github.com/es-shims/String.prototype.trim/commit/2a2e0f2949dd30095eda20e1796483ea21dd7b38) +- Initial commit [`51aa18f`](https://github.com/es-shims/String.prototype.trim/commit/51aa18f299f8d340034670af0311c5981c89f713) +- Read me [`5681192`](https://github.com/es-shims/String.prototype.trim/commit/56811925aed1dd06a2cfa654b3f246b6a897a33c) +- Implementation [`87f08c5`](https://github.com/es-shims/String.prototype.trim/commit/87f08c565f7be56c2826386aa4a4e683a00d8871) diff --git a/node_modules/string.prototype.trim/LICENSE b/node_modules/string.prototype.trim/LICENSE new file mode 100644 index 0000000000000..fcf5754efe64a --- /dev/null +++ b/node_modules/string.prototype.trim/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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.prototype.trim/README.md b/node_modules/string.prototype.trim/README.md new file mode 100644 index 0000000000000..60b333f5c55e3 --- /dev/null +++ b/node_modules/string.prototype.trim/README.md @@ -0,0 +1,48 @@ +# String.prototype.trim [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES5 spec-compliant `String.prototype.trim` shim. Invoke its "shim" method to shim `String.prototype.trim` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the spec (both [ES5](https://262.ecma-international.org/5.1/#sec-15.5.4.20) and [current](https://tc39.es/ecma262/#sec-string.prototype.trim)). + +Most common usage: + +```js +var assert = require('assert'); +var trim = require('string.prototype.trim'); + +assert(trim(' \t\na \t\n') === 'a'); + +trim.shim(); // will be a no-op if not needed + +assert(trim(' \t\na \t\n') === ' \t\na \t\n'.trim()); +``` + +## Engine Bugs +Some implementations of `String#trim` incorrectly trim zero-width spaces. This shim detects and corrects this behavior. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/string.prototype.trim +[npm-version-svg]: https://versionbadg.es/es-shims/String.prototype.trim.svg +[deps-svg]: https://david-dm.org/es-shims/String.prototype.trim.svg +[deps-url]: https://david-dm.org/es-shims/String.prototype.trim +[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trim/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trim#info=devDependencies +[license-image]: https://img.shields.io/npm/l/string.prototype.trim.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trim.svg +[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trim +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trim/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trim/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trim +[actions-url]: https://github.com/es-shims/String.prototype.trim/actions diff --git a/node_modules/string.prototype.trim/auto.js b/node_modules/string.prototype.trim/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/string.prototype.trim/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/string.prototype.trim/implementation.js b/node_modules/string.prototype.trim/implementation.js new file mode 100644 index 0000000000000..4c91889f8d4a1 --- /dev/null +++ b/node_modules/string.prototype.trim/implementation.js @@ -0,0 +1,21 @@ +'use strict'; + +var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible'); +var ToString = require('es-abstract/2023/ToString'); +var callBound = require('call-bind/callBound'); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var leftWhitespace = mvsIsWS + ? /^[\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]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; +var rightWhitespace = mvsIsWS + ? /[\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]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; +/* eslint-enable no-control-regex */ + +module.exports = function trim() { + var S = ToString(RequireObjectCoercible(this)); + return $replace($replace(S, leftWhitespace, ''), rightWhitespace, ''); +}; diff --git a/node_modules/string.prototype.trim/index.js b/node_modules/string.prototype.trim/index.js new file mode 100644 index 0000000000000..ee4f4f6c8f74f --- /dev/null +++ b/node_modules/string.prototype.trim/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var callBind = require('call-bind'); +var define = require('define-properties'); +var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; diff --git a/node_modules/string.prototype.trim/package.json b/node_modules/string.prototype.trim/package.json new file mode 100644 index 0000000000000..0b7e1cd1e080d --- /dev/null +++ b/node_modules/string.prototype.trim/package.json @@ -0,0 +1,101 @@ +{ + "name": "string.prototype.trim", + "version": "1.2.8", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "ES5 spec-compliant shim for String.prototype.trim", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/String.prototype.trim.git" + }, + "keywords": [ + "String.prototype.trim", + "string", + "ES5", + "shim", + "trim", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/string.prototype.trim/polyfill.js b/node_modules/string.prototype.trim/polyfill.js new file mode 100644 index 0000000000000..534db4ca9f830 --- /dev/null +++ b/node_modules/string.prototype.trim/polyfill.js @@ -0,0 +1,19 @@ +'use strict'; + +var implementation = require('./implementation'); + +var zeroWidthSpace = '\u200b'; +var mongolianVowelSeparator = '\u180E'; + +module.exports = function getPolyfill() { + if ( + String.prototype.trim + && zeroWidthSpace.trim() === zeroWidthSpace + && mongolianVowelSeparator.trim() === mongolianVowelSeparator + && ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator) + && (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_') + ) { + return String.prototype.trim; + } + return implementation; +}; diff --git a/node_modules/string.prototype.trim/shim.js b/node_modules/string.prototype.trim/shim.js new file mode 100644 index 0000000000000..607c909ea27a0 --- /dev/null +++ b/node_modules/string.prototype.trim/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimStringTrim() { + var polyfill = getPolyfill(); + define(String.prototype, { trim: polyfill }, { + trim: function testTrim() { + return String.prototype.trim !== polyfill; + } + }); + return polyfill; +}; diff --git a/node_modules/string.prototype.trim/test/implementation.js b/node_modules/string.prototype.trim/test/implementation.js new file mode 100644 index 0000000000000..ba3ae596ea41e --- /dev/null +++ b/node_modules/string.prototype.trim/test/implementation.js @@ -0,0 +1,21 @@ +'use strict'; + +var trim = require('../implementation'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var callBind = require('call-bind'); + +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { trim.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { trim.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(trim), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trim/test/index.js b/node_modules/string.prototype.trim/test/index.js new file mode 100644 index 0000000000000..cc90851756c4d --- /dev/null +++ b/node_modules/string.prototype.trim/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var trim = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { trim(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { trim(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(trim, t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trim/test/shimmed.js b/node_modules/string.prototype.trim/test/shimmed.js new file mode 100644 index 0000000000000..57cf69c7c3279 --- /dev/null +++ b/node_modules/string.prototype.trim/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(String.prototype.trim.length, 0, 'String#trim has a length of 0'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(String.prototype.trim.name, 'trim', 'String#trim has name "trim"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(String.prototype, 'trim'), 'String#trim is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return String.prototype.trim.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.trim.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(String.prototype.trim), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trim/test/tests.js b/node_modules/string.prototype.trim/test/tests.js new file mode 100644 index 0000000000000..fcc065146680c --- /dev/null +++ b/node_modules/string.prototype.trim/test/tests.js @@ -0,0 +1,62 @@ +'use strict'; + +var forEach = require('for-each'); + +module.exports = function (trim, t) { + t.test('normal cases', function (st) { + st.equal(trim(' \t\na \t\n'), 'a', 'strips whitespace off left and right sides'); + st.equal(trim('a'), 'a', 'noop when no whitespace'); + + var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + st.equal(trim(allWhitespaceChars + 'a' + allWhitespaceChars), 'a', 'all expected whitespace chars are trimmed'); + + st.end(); + }); + + // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ + var mongolianVowelSeparator = '\u180E'; + var mvsIsWS = (/^\s$/).test('\u180E'); + t.test('unicode >= 4 && < 6.3', function (st) { + st.equal( + trim(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), + mvsIsWS ? 'a' : mongolianVowelSeparator + 'a' + mongolianVowelSeparator, + 'mongolian vowel separator is' + (mvsIsWS ? '' : ' not') + ' whitespace' + ); + + st.equal( + trim(mongolianVowelSeparator), + mvsIsWS ? '' : mongolianVowelSeparator + ); + st.equal( + trim('_' + mongolianVowelSeparator), + '_' + (mvsIsWS ? '' : mongolianVowelSeparator) + ); + st.equal( + trim(mongolianVowelSeparator + '_'), + (mvsIsWS ? '' : mongolianVowelSeparator) + '_' + ); + + st.end(); + }); + + t.test('zero-width spaces', function (st) { + var zeroWidth = '\u200b'; + st.equal(trim(zeroWidth), zeroWidth, 'zero width space does not trim'); + st.end(); + }); + + t.test('non-whitespace characters', function (st) { + // Zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace. + var nonWhitespaces = { + '\\u0085': '\u0085', + '\\u200b': '\u200b', + '\\ufffe': '\ufffe' + }; + + forEach(nonWhitespaces, function (nonWhitespace, name) { + st.equal(trim(nonWhitespace), nonWhitespace, name + ' does not trim'); + }); + + st.end(); + }); +}; diff --git a/node_modules/string.prototype.trimend/.editorconfig b/node_modules/string.prototype.trimend/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/string.prototype.trimend/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/string.prototype.trimend/.eslintrc b/node_modules/string.prototype.trimend/.eslintrc new file mode 100644 index 0000000000000..8056b20c9f21c --- /dev/null +++ b/node_modules/string.prototype.trimend/.eslintrc @@ -0,0 +1,24 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + ], + }], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "id-length": 0, + "no-invalid-this": 1, + }, + }, + ], +} diff --git a/node_modules/string.prototype.trimend/.nycrc b/node_modules/string.prototype.trimend/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/string.prototype.trimend/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/string.prototype.trimend/CHANGELOG.md b/node_modules/string.prototype.trimend/CHANGELOG.md new file mode 100644 index 0000000000000..e7c47e4c8dfea --- /dev/null +++ b/node_modules/string.prototype.trimend/CHANGELOG.md @@ -0,0 +1,108 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.7](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.6...v1.0.7) - 2023-09-07 + +### Commits + +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`1a10293`](https://github.com/es-shims/String.prototype.trimEnd/commit/1a102935636b564cd346d83666f62a9398864081) +- [Deps] update `define-properties`, `es-abstract` [`6ba2e19`](https://github.com/es-shims/String.prototype.trimEnd/commit/6ba2e19a78f9c63bad2daf0627ce7f2e33f1aeb9) + +## [v1.0.6](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.5...v1.0.6) - 2022-11-07 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`1d1e717`](https://github.com/es-shims/String.prototype.trimEnd/commit/1d1e71720ada81e484c9bffb386f65d7a6a1335e) +- [actions] update rebase action to use reusable workflow [`83f2683`](https://github.com/es-shims/String.prototype.trimEnd/commit/83f268325cc37ca72bea995281167a9d2821810b) +- [Dev Deps] update `aud`, `tape` [`a3a9129`](https://github.com/es-shims/String.prototype.trimEnd/commit/a3a9129dd995a949bdb93d278f403aa400e088ed) +- [Deps] update `es-abstract` [`a6e476d`](https://github.com/es-shims/String.prototype.trimEnd/commit/a6e476dc0120a41a22e66b5079bf3b407da387fa) + +## [v1.0.5](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.4...v1.0.5) - 2022-05-02 + +### Commits + +- [actions] reuse common workflows [`69a56ce`](https://github.com/es-shims/String.prototype.trimEnd/commit/69a56ce95343848d5e498f8e939a0697db8ac9f2) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`5d7db31`](https://github.com/es-shims/String.prototype.trimEnd/commit/5d7db314948faac975705db56305b6cc3dae7ba9) +- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`bb1983d`](https://github.com/es-shims/String.prototype.trimEnd/commit/bb1983dc27504733ab883a42f55b134f679a642d) +- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`10a1091`](https://github.com/es-shims/String.prototype.trimEnd/commit/10a10916e1ffc8cdab78515b2cc521cc74c08277) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`a08e14b`](https://github.com/es-shims/String.prototype.trimEnd/commit/a08e14bfea5e27d419ef742e83f467a169a69971) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`1c4c8da`](https://github.com/es-shims/String.prototype.trimEnd/commit/1c4c8dab4aefc1c5823a61b5a0286bb6fe1e036c) +- [actions] update codecov uploader [`70c4a7c`](https://github.com/es-shims/String.prototype.trimEnd/commit/70c4a7c566fd5bf72475df9318ec2cd218ceca26) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`4b08ed7`](https://github.com/es-shims/String.prototype.trimEnd/commit/4b08ed78a579585b593b3ca4ac7919d13906e840) +- [readme] add github actions/codecov badges [`9805501`](https://github.com/es-shims/String.prototype.trimEnd/commit/980550105b304385bcccb8ec05a247e02c24d04a) +- [Dev Deps] update `eslint`, `tape` [`50ec335`](https://github.com/es-shims/String.prototype.trimEnd/commit/50ec335ed42b59d1ab626dbe412f4ae23ab99b4b) +- [actions] update workflows [`bf9c32e`](https://github.com/es-shims/String.prototype.trimEnd/commit/bf9c32efe08e98b53302df67581dc971b7a758cd) +- [meta] use `prepublishOnly` script for npm 7+ [`9d921bd`](https://github.com/es-shims/String.prototype.trimEnd/commit/9d921bdbcaf8cebebbc302e6df518cbc3e4907bd) +- [Deps] update `define-properties` [`15617ce`](https://github.com/es-shims/String.prototype.trimEnd/commit/15617ced8ac2ea3ab8324a04d16fd294b12059b5) + +## [v1.0.4](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.3...v1.0.4) - 2021-02-23 + +### Commits + +- [meta] do not publish github action workflow files [`08e735c`](https://github.com/es-shims/String.prototype.trimEnd/commit/08e735cd55b00ae78a9dc16c6b4e786f7931085b) +- [readme] remove travis badge [`10e0e47`](https://github.com/es-shims/String.prototype.trimEnd/commit/10e0e47cb2ecfd171e68b40f8486c5d007dcf3ef) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `has-strict-mode`, `tape` [`0871432`](https://github.com/es-shims/String.prototype.trimEnd/commit/0871432c70c2f6a3929acd740a5d1f57c939f345) +- [Tests] increase coverage [`711e6a6`](https://github.com/es-shims/String.prototype.trimEnd/commit/711e6a66660f30f7a30fef536be435af1a13d05c) +- [actions] update workflows [`deb0d06`](https://github.com/es-shims/String.prototype.trimEnd/commit/deb0d06f41ac1c3e1e640ecd1cf0e69303ab5799) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`e250b4a`](https://github.com/es-shims/String.prototype.trimEnd/commit/e250b4a38401e7c02a067dab26cc68316da47ef7) +- [meta] gitignore coverage output [`55231df`](https://github.com/es-shims/String.prototype.trimEnd/commit/55231dfd9829277ba5c3f07be5434dc385703ca9) +- [Deps] update `call-bind` [`0580f5f`](https://github.com/es-shims/String.prototype.trimEnd/commit/0580f5f915ecb87677764d03fe3cf023e3bee7d8) + +## [v1.0.3](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.2...v1.0.3) - 2020-11-21 + +### Commits + +- [Tests] migrate tests to Github Actions [`23e7a09`](https://github.com/es-shims/String.prototype.trimEnd/commit/23e7a09a4ad37c21c3db3d7761212c7d84a371a2) +- [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner [`26e8623`](https://github.com/es-shims/String.prototype.trimEnd/commit/26e8623cf35c1859d0b482d4bb5b3450d101a810) +- [Tests] run `nyc` on all tests [`a72a546`](https://github.com/es-shims/String.prototype.trimEnd/commit/a72a546f671c5d3ac65dff68b4db1a1cc7089bfd) +- [Deps] replace `es-abstract` with `call-bind` [`f07b87d`](https://github.com/es-shims/String.prototype.trimEnd/commit/f07b87dd452090a2601d666edceb1daa90d45f24) +- [Dev Deps] update `eslint`, `aud`; add `safe-publish-latest` [`122ecb7`](https://github.com/es-shims/String.prototype.trimEnd/commit/122ecb726b1dc043b9ef27fa5a7b4172a4d5df37) + +## [v1.0.2](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.1...v1.0.2) - 2020-10-20 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`a003e71`](https://github.com/es-shims/String.prototype.trimEnd/commit/a003e7166d8de16c551a14b0ec855187357cce43) +- [actions] add "Allow Edits" workflow [`0b4b43c`](https://github.com/es-shims/String.prototype.trimEnd/commit/0b4b43cb605f7b3532e61c43dfc7f1795296c5a4) +- [Deps] update `es-abstract` [`75ca6b0`](https://github.com/es-shims/String.prototype.trimEnd/commit/75ca6b0e9757d64013ae863cfaac49ebcb36f1cf) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`552016c`](https://github.com/es-shims/String.prototype.trimEnd/commit/552016cb631ac13c12bbbc0d6dd65012e5e79583) + +## [v1.0.1](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.0...v1.0.1) - 2020-04-09 + +### Commits + +- [meta] add some missing repo metadata [`6abe248`](https://github.com/es-shims/String.prototype.trimEnd/commit/6abe248ba0b57a8b0e16bbe01de07a4d37c421bc) +- [Dev Deps] update `auto-changelog` [`e2eaab2`](https://github.com/es-shims/String.prototype.trimEnd/commit/e2eaab2fd1bc27a3d224b3d76db16190c1dd6d08) + +## [v1.0.0](https://github.com/es-shims/String.prototype.trimEnd/compare/v0.1.0...v1.0.0) - 2020-03-30 + +### Commits + +- [Breaking] convert to es-shim API [`2c6ef13`](https://github.com/es-shims/String.prototype.trimEnd/commit/2c6ef13d3f0b07a9bc55e367b311dbb731780405) +- [meta] add `auto-changelog` [`6f1fcc1`](https://github.com/es-shims/String.prototype.trimEnd/commit/6f1fcc1739de1e9541bd603b659807646a13dd7f) +- [meta] update readme [`ed4ce0d`](https://github.com/es-shims/String.prototype.trimEnd/commit/ed4ce0d84d53e626b48375c5959be20332464eaf) +- [Tests] add `npm run lint` [`eadaf2c`](https://github.com/es-shims/String.prototype.trimEnd/commit/eadaf2c83f2d791b54d80d7b30a9961ebc0f246f) +- Only apps should have lockfiles [`44d355f`](https://github.com/es-shims/String.prototype.trimEnd/commit/44d355f7dafcb0b51c5001824b07f7a2b9f1d06e) +- [actions] add automatic rebasing / merge commit blocking [`e78bf8e`](https://github.com/es-shims/String.prototype.trimEnd/commit/e78bf8e5fc04fcb3379dd1c98360d7df4f9ea7d6) +- [Tests] use shared travis-ci configs [`983c563`](https://github.com/es-shims/String.prototype.trimEnd/commit/983c5639efca2c9bb8b93ebbb917fbcb2561b94c) +- [meta] add `funding` field [`35139d6`](https://github.com/es-shims/String.prototype.trimEnd/commit/35139d6236ceacfc1501d08fb196d18a936ee583) +- [meta] fix non-updated version number [`a2d308b`](https://github.com/es-shims/String.prototype.trimEnd/commit/a2d308b99967ca427936c54747175794ca7336e1) + +## [v0.1.0](https://github.com/es-shims/String.prototype.trimEnd/compare/v0.0.1...v0.1.0) - 2017-12-19 + +### Commits + +- updated README [`f1c71a0`](https://github.com/es-shims/String.prototype.trimEnd/commit/f1c71a0a882e89e1c207ed2b316d91670be2b075) + +## v0.0.1 - 2017-12-19 + +### Commits + +- finished polyfill [`e58d550`](https://github.com/es-shims/String.prototype.trimEnd/commit/e58d550ab8695924ff4221ebe91f00f29801aa4b) +- created README file [`f78628a`](https://github.com/es-shims/String.prototype.trimEnd/commit/f78628ab123171f8b7759bba331d6a589702584f) +- Initial commit [`9199478`](https://github.com/es-shims/String.prototype.trimEnd/commit/9199478256da953e2f5bddfc4d82a161f4537e85) +- typo [`d1f4558`](https://github.com/es-shims/String.prototype.trimEnd/commit/d1f4558a51157833f14d8a424426d038d06576ce) diff --git a/node_modules/string.prototype.trimend/LICENSE b/node_modules/string.prototype.trimend/LICENSE new file mode 100644 index 0000000000000..e48a1b576c0f6 --- /dev/null +++ b/node_modules/string.prototype.trimend/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Khaled Al-Ansari + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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.prototype.trimend/README.md b/node_modules/string.prototype.trimend/README.md new file mode 100644 index 0000000000000..292bda959b935 --- /dev/null +++ b/node_modules/string.prototype.trimend/README.md @@ -0,0 +1,46 @@ +# String.prototype.trimEnd [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES2019-spec-compliant `String.prototype.trimEnd` shim. Invoke its "shim" method to shim `String.prototype.trimEnd` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. + +Most common usage: +```js +var trimEnd = require('string.prototype.trimend'); + +assert(trimEnd(' \t\na \t\n') === 'a \t\n'); + +if (!String.prototype.trimEnd) { + trimEnd.shim(); +} + +assert(trimEnd(' \t\na \t\n ') === ' \t\na \t\n '.trimEnd()); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/string.prototype.trimend +[npm-version-svg]: https://vb.teelaun.ch/es-shims/String.prototype.trimEnd.svg +[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimEnd.svg +[deps-url]: https://david-dm.org/es-shims/String.prototype.trimEnd +[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimEnd/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimEnd#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/string.prototype.trimend.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/string.prototype.trimend.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimend.svg +[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimend +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimEnd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimEnd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimEnd +[actions-url]: https://github.com/es-shims/String.prototype.trimEnd/actions diff --git a/node_modules/string.prototype.trimend/auto.js b/node_modules/string.prototype.trimend/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/string.prototype.trimend/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/string.prototype.trimend/implementation.js b/node_modules/string.prototype.trimend/implementation.js new file mode 100644 index 0000000000000..4628abaa3bdf3 --- /dev/null +++ b/node_modules/string.prototype.trimend/implementation.js @@ -0,0 +1,15 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var endWhitespace = mvsIsWS + ? /[\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]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; +/* eslint-enable no-control-regex */ + +module.exports = function trimEnd() { + return $replace(this, endWhitespace, ''); +}; diff --git a/node_modules/string.prototype.trimend/index.js b/node_modules/string.prototype.trimend/index.js new file mode 100644 index 0000000000000..ee4f4f6c8f74f --- /dev/null +++ b/node_modules/string.prototype.trimend/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var callBind = require('call-bind'); +var define = require('define-properties'); +var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; diff --git a/node_modules/string.prototype.trimend/package.json b/node_modules/string.prototype.trimend/package.json new file mode 100644 index 0000000000000..450dcade67525 --- /dev/null +++ b/node_modules/string.prototype.trimend/package.json @@ -0,0 +1,79 @@ +{ + "name": "string.prototype.trimend", + "version": "1.0.7", + "author": "Jordan Harband ", + "contributors": [ + "Jordan Harband ", + "Khaled Al-Ansari " + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES2019 spec-compliant String.prototype.trimEnd shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/String.prototype.trimEnd.git" + }, + "keywords": [ + "es6", + "es7", + "es8", + "javascript", + "prototype", + "polyfill", + "utility", + "trim", + "trimLeft", + "trimRight", + "trimStart", + "trimEnd", + "tc39" + ], + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/string.prototype.trimend/polyfill.js b/node_modules/string.prototype.trimend/polyfill.js new file mode 100644 index 0000000000000..0fa4f708357ea --- /dev/null +++ b/node_modules/string.prototype.trimend/polyfill.js @@ -0,0 +1,15 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + if (!String.prototype.trimEnd && !String.prototype.trimRight) { + return implementation; + } + var zeroWidthSpace = '\u200b'; + var trimmed = zeroWidthSpace.trimEnd ? zeroWidthSpace.trimEnd() : zeroWidthSpace.trimRight(); + if (trimmed !== zeroWidthSpace) { + return implementation; + } + return String.prototype.trimEnd || String.prototype.trimRight; +}; diff --git a/node_modules/string.prototype.trimend/shim.js b/node_modules/string.prototype.trimend/shim.js new file mode 100644 index 0000000000000..5a8f4773b0a2d --- /dev/null +++ b/node_modules/string.prototype.trimend/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimTrimEnd() { + var polyfill = getPolyfill(); + define( + String.prototype, + { trimEnd: polyfill }, + { trimEnd: function () { return String.prototype.trimEnd !== polyfill; } } + ); + return polyfill; +}; diff --git a/node_modules/string.prototype.trimend/test/implementation.js b/node_modules/string.prototype.trimend/test/implementation.js new file mode 100644 index 0000000000000..7fdf95b7da1a5 --- /dev/null +++ b/node_modules/string.prototype.trimend/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(implementation), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimend/test/index.js b/node_modules/string.prototype.trimend/test/index.js new file mode 100644 index 0000000000000..2ee8f6703ccd6 --- /dev/null +++ b/node_modules/string.prototype.trimend/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var trimEnd = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { trimEnd(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { trimEnd(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(trimEnd, t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimend/test/shimmed.js b/node_modules/string.prototype.trimend/test/shimmed.js new file mode 100644 index 0000000000000..1a01ceb1bcf4c --- /dev/null +++ b/node_modules/string.prototype.trimend/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var runTests = require('./tests'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +test('shimmed', function (t) { + t.equal(String.prototype.trimEnd.length, 0, 'String#trimEnd has a length of 0'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal((/^(?:trimRight|trimEnd)$/).test(String.prototype.trimEnd.name), true, 'String#trimEnd has name "trimRight" or "trimEnd"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(String.prototype, 'trimEnd'), 'String#trimEnd is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return String.prototype.trimEnd.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.trimEnd.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(String.prototype.trimEnd), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimend/test/tests.js b/node_modules/string.prototype.trimend/test/tests.js new file mode 100644 index 0000000000000..03a8c5c51bb4a --- /dev/null +++ b/node_modules/string.prototype.trimend/test/tests.js @@ -0,0 +1,31 @@ +'use strict'; + +module.exports = function (trimEnd, t) { + t.test('normal cases', function (st) { + st.equal(trimEnd(' \t\na \t\n'), ' \t\na', 'strips whitespace off the left side'); + st.equal(trimEnd('a'), 'a', 'noop when no whitespace'); + + var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + st.equal(trimEnd(allWhitespaceChars + 'a' + allWhitespaceChars), allWhitespaceChars + 'a', 'all expected whitespace chars are trimmed'); + + st.end(); + }); + + // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ + var mongolianVowelSeparator = '\u180E'; + var mvsIsWS = (/^\s$/).test(mongolianVowelSeparator); + t.test('mongolian vowel separator: unicode >= 4 && < 6.3', function (st) { + st.equal( + trimEnd(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), + mongolianVowelSeparator + 'a' + (mvsIsWS ? '' : mongolianVowelSeparator), + 'mongolian vowel separator is ' + (mvsIsWS ? '' : 'not ') + 'whitespace' + ); + st.end(); + }); + + t.test('zero-width spaces', function (st) { + var zeroWidth = '\u200b'; + st.equal(trimEnd(zeroWidth), zeroWidth, 'zero width space does not trim'); + st.end(); + }); +}; diff --git a/node_modules/string.prototype.trimstart/.editorconfig b/node_modules/string.prototype.trimstart/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/string.prototype.trimstart/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/string.prototype.trimstart/.eslintrc b/node_modules/string.prototype.trimstart/.eslintrc new file mode 100644 index 0000000000000..8056b20c9f21c --- /dev/null +++ b/node_modules/string.prototype.trimstart/.eslintrc @@ -0,0 +1,24 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + ], + }], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "id-length": 0, + "no-invalid-this": 1, + }, + }, + ], +} diff --git a/node_modules/string.prototype.trimstart/.nycrc b/node_modules/string.prototype.trimstart/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/string.prototype.trimstart/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/string.prototype.trimstart/CHANGELOG.md b/node_modules/string.prototype.trimstart/CHANGELOG.md new file mode 100644 index 0000000000000..4a04eb2967d40 --- /dev/null +++ b/node_modules/string.prototype.trimstart/CHANGELOG.md @@ -0,0 +1,108 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.7](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.6...v1.0.7) - 2023-09-04 + +### Commits + +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`58e7aa6`](https://github.com/es-shims/String.prototype.trimStart/commit/58e7aa63b702f4494b89b8723b585bab5899a304) +- [Deps] update `define-properties`, `es-abstract` [`8d9a7bf`](https://github.com/es-shims/String.prototype.trimStart/commit/8d9a7bf123f320799211dd57aa0c832aaafb8a19) + +## [v1.0.6](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.5...v1.0.6) - 2022-11-07 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`0838ae4`](https://github.com/es-shims/String.prototype.trimStart/commit/0838ae4ed948df470185afbeea4296f5c5ecd759) +- [actions] update rebase action to use reusable workflow [`d6bb784`](https://github.com/es-shims/String.prototype.trimStart/commit/d6bb78400a00459e9ab0b28f433c45804a65184d) +- [Dev Deps] update `aud`, `tape` [`8734d9a`](https://github.com/es-shims/String.prototype.trimStart/commit/8734d9a616c6aca9ec7f0c8819e66c2496deb32e) +- [Deps] update `es-abstract` [`30f593f`](https://github.com/es-shims/String.prototype.trimStart/commit/30f593f3febf6d8d9b3d5605174b437fed9cbb3a) + +## [v1.0.5](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.4...v1.0.5) - 2022-05-02 + +### Commits + +- [actions] reuse common workflows [`61d4009`](https://github.com/es-shims/String.prototype.trimStart/commit/61d40098a96b3dcc6cf963c9d03dd1b23b6eb13d) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`bfe39c4`](https://github.com/es-shims/String.prototype.trimStart/commit/bfe39c498e26a4ad75c64cce27ff3df9bfef2cc1) +- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`36e3730`](https://github.com/es-shims/String.prototype.trimStart/commit/36e37307bb06fb5dc34d861a4bf6f7db931340d9) +- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`4f77eed`](https://github.com/es-shims/String.prototype.trimStart/commit/4f77eed5aa64e6f781310847d7831563fce90f5c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`59fcb99`](https://github.com/es-shims/String.prototype.trimStart/commit/59fcb995ef8d4723a83e28d46dbe41a14253b681) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`486ffcf`](https://github.com/es-shims/String.prototype.trimStart/commit/486ffcfa93c75516601169a3973b81fdfeb7de8b) +- [actions] update codecov uploader [`b33ac48`](https://github.com/es-shims/String.prototype.trimStart/commit/b33ac48ccc86f6b894d8fde5162bd1c806904972) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`3c89fa5`](https://github.com/es-shims/String.prototype.trimStart/commit/3c89fa571d1c4b8894230d93caaf3b3d9885534d) +- [readme] add github actions/codecov badges [`00be6b3`](https://github.com/es-shims/String.prototype.trimStart/commit/00be6b34fdd989950b934b4471087362b78d4b0c) +- [Dev Deps] update `eslint`, `tape` [`13a08f5`](https://github.com/es-shims/String.prototype.trimStart/commit/13a08f578c53cf5f129fb6ebe486e8bbcc40c14e) +- [actions] update workflows [`6ac576d`](https://github.com/es-shims/String.prototype.trimStart/commit/6ac576dde99f73d19492777efed29ec069e89bf1) +- [meta] use `prepublishOnly` script for npm 7+ [`fa382ca`](https://github.com/es-shims/String.prototype.trimStart/commit/fa382caa5c8e9a868572605ce215a3db1dc9ef21) +- [Deps] update `define-properties` [`d57bffe`](https://github.com/es-shims/String.prototype.trimStart/commit/d57bffef7d89384c8888627c5ee33b80e24d54e0) + +## [v1.0.4](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.3...v1.0.4) - 2021-02-23 + +### Commits + +- [meta] do not publish github action workflow files [`9c434ec`](https://github.com/es-shims/String.prototype.trimStart/commit/9c434eceb50141cf36e8e65f514226b0b547b568) +- [readme] remove travis badge [`7843160`](https://github.com/es-shims/String.prototype.trimStart/commit/7843160a3e8feaa2213feb0da9c5ad7d9bf21b59) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `has-strict-mode`, `tape` [`8b52646`](https://github.com/es-shims/String.prototype.trimStart/commit/8b52646510aea20473da5491fe0876117a2251b1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`badeda2`](https://github.com/es-shims/String.prototype.trimStart/commit/badeda2b01d2e266e4d1c2e7dc0e4fca0f066f3e) +- [Tests] increase coverage [`bf8777d`](https://github.com/es-shims/String.prototype.trimStart/commit/bf8777d54c4b05c093559021cfaf0670306120f8) +- [actions] update workflows [`61be1c6`](https://github.com/es-shims/String.prototype.trimStart/commit/61be1c649ae859faa40286e57fa22cef65ae1229) +- [meta] gitignore coverage output [`c9c98d7`](https://github.com/es-shims/String.prototype.trimStart/commit/c9c98d75d7708e8906a39b55a0ad7a0ed6a9e4b0) +- [Deps] update `call-bind` [`c8645e8`](https://github.com/es-shims/String.prototype.trimStart/commit/c8645e89f9ace7681660ba66c724cf00c798f3d4) + +## [v1.0.3](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.2...v1.0.3) - 2020-11-21 + +### Commits + +- [Tests] migrate tests to Github Actions [`fbc7519`](https://github.com/es-shims/String.prototype.trimStart/commit/fbc7519cce2b5bfff9fe28dea96fb5f6f82e19fd) +- [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner [`3c9330b`](https://github.com/es-shims/String.prototype.trimStart/commit/3c9330be9ad02497f78ff0fd94b7c918c3a4bc21) +- [Tests] run `nyc` on all tests [`52229ca`](https://github.com/es-shims/String.prototype.trimStart/commit/52229ca28426be516c3826743e417be85144673e) +- [Deps] replace `es-abstract` with `call-bind` [`5e5068d`](https://github.com/es-shims/String.prototype.trimStart/commit/5e5068d2cc85d0a6f2a441ea984521ee70470537) +- [Dev Deps] update `eslint`, `aud`; add `safe-publish-latest` [`42a853e`](https://github.com/es-shims/String.prototype.trimStart/commit/42a853e2cb419378085098cb66e421ee94eed3ab) + +## [v1.0.2](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.1...v1.0.2) - 2020-10-20 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`d032b38`](https://github.com/es-shims/String.prototype.trimStart/commit/d032b38aac7e9ebae7bf5c4195492c508af2815a) +- [actions] add "Allow Edits" workflow [`83e30ba`](https://github.com/es-shims/String.prototype.trimStart/commit/83e30bac01572b6dba6358fec6e339c55dc431c9) +- [Deps] update `es-abstract` [`707d85d`](https://github.com/es-shims/String.prototype.trimStart/commit/707d85d827d9c537a144f199fdecc47edaade1cd) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`096c6d9`](https://github.com/es-shims/String.prototype.trimStart/commit/096c6d9dc142286c750da7024e7a88ed698a4953) + +## [v1.0.1](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.0...v1.0.1) - 2020-04-09 + +### Commits + +- [meta] add some missing repo metadata [`3385da3`](https://github.com/es-shims/String.prototype.trimStart/commit/3385da3bbb87819de11a869981ca954887a6a092) +- [Dev Deps] update `auto-changelog` [`879377d`](https://github.com/es-shims/String.prototype.trimStart/commit/879377df9c1ff97d8f0b3eac800683f1d68a304c) + +## [v1.0.0](https://github.com/es-shims/String.prototype.trimStart/compare/v0.1.0...v1.0.0) - 2020-03-30 + +### Commits + +- [Breaking] convert to es-shim API [`970922c`](https://github.com/es-shims/String.prototype.trimStart/commit/970922c494c78b033c351c77f61a8aefd49c30d9) +- [meta] add `auto-changelog` [`ff30c09`](https://github.com/es-shims/String.prototype.trimStart/commit/ff30c0996289113d2c3dbbfca7e280ff151bf36d) +- [meta] update readme [`816291d`](https://github.com/es-shims/String.prototype.trimStart/commit/816291d01e0eaf85da9b732c179cfb2454bd282e) +- [Tests] add `npm run lint` [`3341104`](https://github.com/es-shims/String.prototype.trimStart/commit/3341104450bc6ac84f3b70a6d6c0fbeb4df5131e) +- Only apps should have lockfiles [`f008df7`](https://github.com/es-shims/String.prototype.trimStart/commit/f008df73fbf3dcf8dfad6d5cad86de7050d0ae09) +- [actions] add automatic rebasing / merge commit blocking [`e5ba35c`](https://github.com/es-shims/String.prototype.trimStart/commit/e5ba35c1a14fcf652336cc9c4be49d232981161e) +- [Tests] use shared travis-ci configs [`46516b1`](https://github.com/es-shims/String.prototype.trimStart/commit/46516b137a8c07ed5807d751bd61199688ef9baa) +- [meta] add `funding` field [`34ae856`](https://github.com/es-shims/String.prototype.trimStart/commit/34ae8563f115bd4a5e5f5d2d786c0fa0a420fa2a) +- [meta] fix non-updated version number [`3b0e262`](https://github.com/es-shims/String.prototype.trimStart/commit/3b0e262e2f4eeee2e1b99fe890f8ca17bed8f2fd) + +## [v0.1.0](https://github.com/es-shims/String.prototype.trimStart/compare/v0.0.1...v0.1.0) - 2017-12-19 + +### Commits + +- updated README [`ab2f6ac`](https://github.com/es-shims/String.prototype.trimStart/commit/ab2f6ac8813ed336a0f2dc3aa8cdb52f4d52814b) + +## v0.0.1 - 2017-12-19 + +### Commits + +- finished polyfill [`1c7ca20`](https://github.com/es-shims/String.prototype.trimStart/commit/1c7ca2043e3383b6e743870bc622ad4a38477147) +- created README file: [`192ecad`](https://github.com/es-shims/String.prototype.trimStart/commit/192ecaded4e0d5baaa65cd41e590b8d837520d44) +- Initial commit [`14044f8`](https://github.com/es-shims/String.prototype.trimStart/commit/14044f8a0fe1d155fe7403a8327bdbaf135da2d6) +- updated README [`d4fb6be`](https://github.com/es-shims/String.prototype.trimStart/commit/d4fb6be15455dd68fc4b306bee1d30dd4afc96e7) diff --git a/node_modules/string.prototype.trimstart/LICENSE b/node_modules/string.prototype.trimstart/LICENSE new file mode 100644 index 0000000000000..e48a1b576c0f6 --- /dev/null +++ b/node_modules/string.prototype.trimstart/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Khaled Al-Ansari + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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.prototype.trimstart/README.md b/node_modules/string.prototype.trimstart/README.md new file mode 100644 index 0000000000000..5ec76138e80f7 --- /dev/null +++ b/node_modules/string.prototype.trimstart/README.md @@ -0,0 +1,46 @@ +# String.prototype.trimStart [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES2019-spec-compliant `String.prototype.trimStart` shim. Invoke its "shim" method to shim `String.prototype.trimStart` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. + +Most common usage: +```js +var trimStart = require('string.prototype.trimstart'); + +assert(trimStart(' \t\na \t\n') === 'a \t\n'); + +if (!String.prototype.trimStart) { + trimStart.shim(); +} + +assert(trimStart(' \t\na \t\n') === ' \t\na \t\n'.trimStart()); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/string.prototype.trimstart +[npm-version-svg]: https://vb.teelaun.ch/es-shims/String.prototype.trimStart.svg +[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimStart.svg +[deps-url]: https://david-dm.org/es-shims/String.prototype.trimStart +[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimStart/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimStart#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/string.prototype.trimstart.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/string.prototype.trimstart.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimstart.svg +[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimstart +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimStart/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimStart/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimStart +[actions-url]: https://github.com/es-shims/String.prototype.trimStart/actions diff --git a/node_modules/string.prototype.trimstart/auto.js b/node_modules/string.prototype.trimstart/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/string.prototype.trimstart/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/string.prototype.trimstart/implementation.js b/node_modules/string.prototype.trimstart/implementation.js new file mode 100644 index 0000000000000..882e7111e1e10 --- /dev/null +++ b/node_modules/string.prototype.trimstart/implementation.js @@ -0,0 +1,15 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var startWhitespace = mvsIsWS + ? /^[\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]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; +/* eslint-enable no-control-regex */ + +module.exports = function trimStart() { + return $replace(this, startWhitespace, ''); +}; diff --git a/node_modules/string.prototype.trimstart/index.js b/node_modules/string.prototype.trimstart/index.js new file mode 100644 index 0000000000000..ee4f4f6c8f74f --- /dev/null +++ b/node_modules/string.prototype.trimstart/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var callBind = require('call-bind'); +var define = require('define-properties'); +var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; diff --git a/node_modules/string.prototype.trimstart/package.json b/node_modules/string.prototype.trimstart/package.json new file mode 100644 index 0000000000000..e21ef7415f717 --- /dev/null +++ b/node_modules/string.prototype.trimstart/package.json @@ -0,0 +1,79 @@ +{ + "name": "string.prototype.trimstart", + "version": "1.0.7", + "author": "Jordan Harband ", + "contributors": [ + "Jordan Harband ", + "Khaled Al-Ansari " + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES2019 spec-compliant String.prototype.trimStart shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/String.prototype.trimStart.git" + }, + "keywords": [ + "es6", + "es7", + "es8", + "javascript", + "prototype", + "polyfill", + "utility", + "trim", + "trimLeft", + "trimRight", + "trimStart", + "trimEnd", + "tc39" + ], + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.6" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/string.prototype.trimstart/polyfill.js b/node_modules/string.prototype.trimstart/polyfill.js new file mode 100644 index 0000000000000..9adaccd528b9f --- /dev/null +++ b/node_modules/string.prototype.trimstart/polyfill.js @@ -0,0 +1,15 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + if (!String.prototype.trimStart && !String.prototype.trimLeft) { + return implementation; + } + var zeroWidthSpace = '\u200b'; + var trimmed = zeroWidthSpace.trimStart ? zeroWidthSpace.trimStart() : zeroWidthSpace.trimLeft(); + if (trimmed !== zeroWidthSpace) { + return implementation; + } + return String.prototype.trimStart || String.prototype.trimLeft; +}; diff --git a/node_modules/string.prototype.trimstart/shim.js b/node_modules/string.prototype.trimstart/shim.js new file mode 100644 index 0000000000000..5ea6dfdcf9dde --- /dev/null +++ b/node_modules/string.prototype.trimstart/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimTrimStart() { + var polyfill = getPolyfill(); + define( + String.prototype, + { trimStart: polyfill }, + { trimStart: function () { return String.prototype.trimStart !== polyfill; } } + ); + return polyfill; +}; diff --git a/node_modules/string.prototype.trimstart/test/implementation.js b/node_modules/string.prototype.trimstart/test/implementation.js new file mode 100644 index 0000000000000..7fdf95b7da1a5 --- /dev/null +++ b/node_modules/string.prototype.trimstart/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(implementation), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimstart/test/index.js b/node_modules/string.prototype.trimstart/test/index.js new file mode 100644 index 0000000000000..baff6b59b825c --- /dev/null +++ b/node_modules/string.prototype.trimstart/test/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var trimStart = require('../'); +var test = require('tape'); + +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { trimStart(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { trimStart(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(trimStart, t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimstart/test/shimmed.js b/node_modules/string.prototype.trimstart/test/shimmed.js new file mode 100644 index 0000000000000..bfdbe486c2962 --- /dev/null +++ b/node_modules/string.prototype.trimstart/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var runTests = require('./tests'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +test('shimmed', function (t) { + t.equal(String.prototype.trimStart.length, 0, 'String#trimStart has a length of 0'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal((/^(?:trimLeft|trimStart)$/).test(String.prototype.trimStart.name), true, 'String#trimStart has name "trimLeft" or "trimStart"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(String.prototype, 'trimStart'), 'String#trimStart is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return String.prototype.trimStart.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.trimStart.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(String.prototype.trimStart), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimstart/test/tests.js b/node_modules/string.prototype.trimstart/test/tests.js new file mode 100644 index 0000000000000..526aac144d6cf --- /dev/null +++ b/node_modules/string.prototype.trimstart/test/tests.js @@ -0,0 +1,31 @@ +'use strict'; + +module.exports = function (trimStart, t) { + t.test('normal cases', function (st) { + st.equal(trimStart(' \t\na \t\n'), 'a \t\n', 'strips whitespace off the left side'); + st.equal(trimStart('a'), 'a', 'noop when no whitespace'); + + var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + st.equal(trimStart(allWhitespaceChars + 'a' + allWhitespaceChars), 'a' + allWhitespaceChars, 'all expected whitespace chars are trimmed'); + + st.end(); + }); + + // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ + var mongolianVowelSeparator = '\u180E'; + var mvsIsWS = (/^\s$/).test(mongolianVowelSeparator); + t.test('mongolian vowel separator: unicode >= 4 && < 6.3', function (st) { + st.equal( + trimStart(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), + (mvsIsWS ? '' : mongolianVowelSeparator) + 'a' + mongolianVowelSeparator, + 'mongolian vowel separator is ' + (mvsIsWS ? '' : 'not ') + 'whitespace' + ); + st.end(); + }); + + t.test('zero-width spaces', function (st) { + var zeroWidth = '\u200b'; + st.equal(trimStart(zeroWidth), zeroWidth, 'zero width space does not trim'); + st.end(); + }); +}; diff --git a/node_modules/string_decoder/.travis.yml b/node_modules/string_decoder/.travis.yml new file mode 100644 index 0000000000000..3347a72546505 --- /dev/null +++ b/node_modules/string_decoder/.travis.yml @@ -0,0 +1,50 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.10' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.11' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.12' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 1 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 2 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 3 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 6 + env: TASK=test + - node_js: 7 + env: TASK=test + - node_js: 8 + env: TASK=test + - node_js: 9 + env: TASK=test diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE new file mode 100644 index 0000000000000..778edb20730ef --- /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 0000000000000..5fd58315ed588 --- /dev/null +++ b/node_modules/string_decoder/README.md @@ -0,0 +1,47 @@ +# string_decoder + +***Node-core v8.9.4 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_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/v8.9.4/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. + +## Streams Working Group + +`string_decoder` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + +See [readable-stream](https://github.com/nodejs/readable-stream) for +more details. 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 0000000000000..2e89e63f7933e --- /dev/null +++ b/node_modules/string_decoder/lib/string_decoder.js @@ -0,0 +1,296 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var 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. If an invalid byte is detected, -2 is returned. +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 byte >> 6 === 0x02 ? -1 : -2; +} + +// 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 || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) 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 +// a single UTF-8 replacement character ('\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'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } + } + } +} + +// 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 is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + 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 0000000000000..518c3eb9fb1ff --- /dev/null +++ b/node_modules/string_decoder/package.json @@ -0,0 +1,31 @@ +{ + "name": "string_decoder", + "version": "1.1.1", + "description": "The string_decoder module from Node core", + "main": "lib/string_decoder.js", + "dependencies": { + "safe-buffer": "~5.1.0" + }, + "devDependencies": { + "babel-polyfill": "^6.23.0", + "core-util-is": "^1.0.2", + "inherits": "^2.0.3", + "tap": "~0.4.8" + }, + "scripts": { + "test": "tap test/parallel/*.js && node test/verify-dependencies", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/string_decoder.git" + }, + "homepage": "https://github.com/nodejs/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT" +} diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js new file mode 100644 index 0000000000000..099480fbfc54c --- /dev/null +++ b/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/node_modules/strip-ansi/license b/node_modules/strip-ansi/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/strip-ansi/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-ansi/package.json b/node_modules/strip-ansi/package.json new file mode 100644 index 0000000000000..301685ba329f5 --- /dev/null +++ b/node_modules/strip-ansi/package.json @@ -0,0 +1,57 @@ +{ + "name": "strip-ansi", + "version": "3.0.1", + "description": "Strip ANSI escape codes", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Boy Nicolai Appelman (jbna.nl)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000000000..cb7d9ff7ee403 --- /dev/null +++ b/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/strip-bom/index.js b/node_modules/strip-bom/index.js new file mode 100644 index 0000000000000..5695c5c79bcc5 --- /dev/null +++ b/node_modules/strip-bom/index.js @@ -0,0 +1,17 @@ +'use strict'; +var isUtf8 = require('is-utf8'); + +module.exports = function (x) { + // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string + // conversion translates it to FEFF (UTF-16 BOM) + if (typeof x === 'string' && x.charCodeAt(0) === 0xFEFF) { + return x.slice(1); + } + + if (Buffer.isBuffer(x) && isUtf8(x) && + x[0] === 0xEF && x[1] === 0xBB && x[2] === 0xBF) { + return x.slice(3); + } + + return x; +}; diff --git a/node_modules/strip-bom/license b/node_modules/strip-bom/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /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 0000000000000..8fe93ea5331a2 --- /dev/null +++ b/node_modules/strip-bom/package.json @@ -0,0 +1,42 @@ +{ + "name": "strip-bom", + "version": "2.0.0", + "description": "Strip UTF-8 byte order mark (BOM) from a string/buffer", + "license": "MIT", + "repository": "sindresorhus/strip-bom", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "bom", + "strip", + "byte", + "mark", + "unicode", + "utf8", + "utf-8", + "remove", + "delete", + "trim", + "text", + "buffer", + "string" + ], + "dependencies": { + "is-utf8": "^0.2.0" + }, + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/strip-bom/readme.md b/node_modules/strip-bom/readme.md new file mode 100644 index 0000000000000..8ecf258b63294 --- /dev/null +++ b/node_modules/strip-bom/readme.md @@ -0,0 +1,39 @@ +# 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/buffer + +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 +var fs = require('fs'); +var stripBom = require('strip-bom'); + +stripBom('\uFEFFunicorn'); +//=> 'unicorn' + +stripBom(fs.readFileSync('unicorn.txt')); +//=> 'unicorn' +``` + + +## Related + +- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module +- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js new file mode 100644 index 0000000000000..4346e272e1f1c --- /dev/null +++ b/node_modules/supports-color/index.js @@ -0,0 +1,50 @@ +'use strict'; +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/supports-color/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/supports-color/package.json b/node_modules/supports-color/package.json new file mode 100644 index 0000000000000..3bb77ac1b8479 --- /dev/null +++ b/node_modules/supports-color/package.json @@ -0,0 +1,49 @@ +{ + "name": "supports-color", + "version": "2.0.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect" + ], + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + } +} diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md new file mode 100644 index 0000000000000..b4761f1ecdeaf --- /dev/null +++ b/node_modules/supports-color/readme.md @@ -0,0 +1,36 @@ +# 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 --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## 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 + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/supports-preserve-symlinks-flag/.eslintrc b/node_modules/supports-preserve-symlinks-flag/.eslintrc new file mode 100644 index 0000000000000..346ffeca87d37 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "rules": { + "id-length": "off", + }, +} diff --git a/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml new file mode 100644 index 0000000000000..e8d64f37e5fc4 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/supports-preserve-symlink-flag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/supports-preserve-symlinks-flag/.nycrc b/node_modules/supports-preserve-symlinks-flag/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md new file mode 100644 index 0000000000000..61f607f4894be --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-01-02 + +### Commits + +- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) +- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) +- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) +- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) +- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) +- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) +- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) +- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) +- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) +- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) +- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/node_modules/supports-preserve-symlinks-flag/LICENSE b/node_modules/supports-preserve-symlinks-flag/LICENSE new file mode 100644 index 0000000000000..2e7b9a3eacf26 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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-preserve-symlinks-flag/README.md b/node_modules/supports-preserve-symlinks-flag/README.md new file mode 100644 index 0000000000000..eb05b124ca68b --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/README.md @@ -0,0 +1,42 @@ +# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the current node version supports the `--preserve-symlinks` flag. + +## Example + +```js +var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); +var assert = require('assert'); + +assert.equal(supportsPreserveSymlinks, null); // in a browser +assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 +assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag +[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag +[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag +[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag +[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/node_modules/supports-preserve-symlinks-flag/browser.js b/node_modules/supports-preserve-symlinks-flag/browser.js new file mode 100644 index 0000000000000..087be1fe9fda8 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/browser.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = null; diff --git a/node_modules/supports-preserve-symlinks-flag/index.js b/node_modules/supports-preserve-symlinks-flag/index.js new file mode 100644 index 0000000000000..86fd5d331c4a4 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/index.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = ( +// node 12+ + process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') +) || ( +// node v6.2 - v11 + String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle +); diff --git a/node_modules/supports-preserve-symlinks-flag/package.json b/node_modules/supports-preserve-symlinks-flag/package.json new file mode 100644 index 0000000000000..56edadcaad850 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/package.json @@ -0,0 +1,70 @@ +{ + "name": "supports-preserve-symlinks-flag", + "version": "1.0.0", + "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", + "main": "./index.js", + "browser": "./browser.js", + "exports": { + ".": [ + { + "browser": "./browser.js", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" + }, + "keywords": [ + "node", + "flag", + "symlink", + "symlinks", + "preserve-symlinks" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" + }, + "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.6.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.4.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/supports-preserve-symlinks-flag/test/index.js b/node_modules/supports-preserve-symlinks-flag/test/index.js new file mode 100644 index 0000000000000..9938d67169179 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); +var semver = require('semver'); + +var supportsPreserveSymlinks = require('../'); +var browser = require('../browser'); + +test('supportsPreserveSymlinks', function (t) { + t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean'); + + t.equal(browser, null, 'browser file is `null`'); + t.equal( + supportsPreserveSymlinks, + null, + 'in a browser, is null', + { skip: typeof window === 'undefined' } + ); + + var expected = semver.satisfies(process.version, '>= 6.2'); + t.equal( + supportsPreserveSymlinks, + expected, + 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')', + { skip: typeof window !== 'undefined' } + ); + + t.end(); +}); diff --git a/node_modules/through/.travis.yml b/node_modules/through/.travis.yml new file mode 100644 index 0000000000000..c693a939df980 --- /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 0000000000000..6366c04716fb9 --- /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 0000000000000..6eafbd734a6e0 --- /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 0000000000000..ca5fc5901fd87 --- /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 0000000000000..98621899d058a --- /dev/null +++ b/node_modules/through/package.json @@ -0,0 +1,36 @@ +{ + "name": "through", + "version": "2.3.8", + "description": "simplified stream construction", + "main": "index.js", + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "devDependencies": { + "stream-spec": "~0.3.5", + "tape": "~2.3.2", + "from": "~0.1.3" + }, + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "author": "Dominic Tarr (dominictarr.com)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/dominictarr/through.git" + }, + "homepage": "https://github.com/dominictarr/through", + "testling": { + "browsers": [ + "ie/8..latest", + "ff/15..latest", + "chrome/20..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + } +} diff --git a/node_modules/through/readme.markdown b/node_modules/through/readme.markdown new file mode 100644 index 0000000000000..cb34c8135f53e --- /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 0000000000000..46bdbaebcbc09 --- /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 0000000000000..9a8fd0006f5b8 --- /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 0000000000000..b0084bfc6ed5a --- /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 0000000000000..fa113f58e0360 --- /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 0000000000000..96da82f97c74c --- /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/to-object-path/LICENSE b/node_modules/to-object-path/LICENSE new file mode 100644 index 0000000000000..1e49edf81fee9 --- /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 0000000000000..7f3cfb1632247 --- /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 0000000000000..489f8f6843c02 --- /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/package.json b/node_modules/to-object-path/package.json new file mode 100644 index 0000000000000..2fe341b742728 --- /dev/null +++ b/node_modules/to-object-path/package.json @@ -0,0 +1,48 @@ +{ + "name": "to-object-path", + "description": "Create an object path from a list or array of strings.", + "version": "0.3.0", + "homepage": "https://github.com/jonschlinkert/to-object-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/to-object-path", + "bugs": { + "url": "https://github.com/jonschlinkert/to-object-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "base": "^0.6.7", + "mocha": "*" + }, + "keywords": [ + "dot", + "nested", + "notation", + "object", + "path", + "stringify" + ], + "verb": { + "related": { + "list": [ + "get-value", + "set-value", + "has-value", + "omit-value", + "unset-value" + ] + } + } +} diff --git a/node_modules/to-regex-range/LICENSE b/node_modules/to-regex-range/LICENSE new file mode 100644 index 0000000000000..83b56e709c3e5 --- /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 0000000000000..2763c5aef3ac8 --- /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 0000000000000..7bb5a743eb119 --- /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/node_modules/is-number/LICENSE b/node_modules/to-regex-range/node_modules/is-number/LICENSE new file mode 100644 index 0000000000000..842218cf09a20 --- /dev/null +++ b/node_modules/to-regex-range/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/to-regex-range/node_modules/is-number/README.md b/node_modules/to-regex-range/node_modules/is-number/README.md new file mode 100644 index 0000000000000..281165dcea345 --- /dev/null +++ b/node_modules/to-regex-range/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/to-regex-range/node_modules/is-number/index.js b/node_modules/to-regex-range/node_modules/is-number/index.js new file mode 100644 index 0000000000000..7a2a45bed02f5 --- /dev/null +++ b/node_modules/to-regex-range/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/to-regex-range/node_modules/is-number/package.json b/node_modules/to-regex-range/node_modules/is-number/package.json new file mode 100644 index 0000000000000..8c1f9ab48e72d --- /dev/null +++ b/node_modules/to-regex-range/node_modules/is-number/package.json @@ -0,0 +1,83 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Charlike Mike Reagent (http://www.tunnckocore.tk)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "benchmarked": "^0.2.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "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" + ] + } +} \ No newline at end of file diff --git a/node_modules/to-regex-range/package.json b/node_modules/to-regex-range/package.json new file mode 100644 index 0000000000000..6c8e6b1cc5cb3 --- /dev/null +++ b/node_modules/to-regex-range/package.json @@ -0,0 +1,86 @@ +{ + "name": "to-regex-range", + "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", + "version": "2.1.1", + "homepage": "https://github.com/micromatch/to-regex-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "micromatch/to-regex-range", + "bugs": { + "url": "https://github.com/micromatch/to-regex-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "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" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "date", + "expand", + "expansion", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sequence", + "sh", + "to", + "year" + ], + "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" + ] + } +} diff --git a/node_modules/to-regex/LICENSE b/node_modules/to-regex/LICENSE new file mode 100644 index 0000000000000..7c9987bc6cdd2 --- /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 0000000000000..5a28fc33bbce5 --- /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 0000000000000..a87d015915edc --- /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 0000000000000..e4277d3162acd --- /dev/null +++ b/node_modules/to-regex/package.json @@ -0,0 +1,62 @@ +{ + "name": "to-regex", + "description": "Generate a regex from a string or array of strings.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/to-regex", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/to-regex", + "bugs": { + "url": "https://github.com/jonschlinkert/to-regex/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "match", + "regex", + "regular expression", + "test", + "to" + ], + "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 + } + } +} diff --git a/node_modules/typed-array-buffer/.eslintrc b/node_modules/typed-array-buffer/.eslintrc new file mode 100644 index 0000000000000..46f3b120b8724 --- /dev/null +++ b/node_modules/typed-array-buffer/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/typed-array-buffer/.github/FUNDING.yml b/node_modules/typed-array-buffer/.github/FUNDING.yml new file mode 100644 index 0000000000000..bf630d0a3c679 --- /dev/null +++ b/node_modules/typed-array-buffer/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-buffer +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/typed-array-buffer/.nycrc b/node_modules/typed-array-buffer/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/typed-array-buffer/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-buffer/CHANGELOG.md b/node_modules/typed-array-buffer/CHANGELOG.md new file mode 100644 index 0000000000000..b4f34e40b3bbf --- /dev/null +++ b/node_modules/typed-array-buffer/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2023-06-05 + +### Commits + +- Initial implementation, tests, readme [`5bc2953`](https://github.com/ljharb/typed-array-buffer/commit/5bc295337b4310659832fc08699a4d10c2dbbded) +- Initial commit [`98b8ac9`](https://github.com/ljharb/typed-array-buffer/commit/98b8ac90f407c368effa25d395aeea1d72e1d4b6) +- npm init [`6a4a73c`](https://github.com/ljharb/typed-array-buffer/commit/6a4a73c66b1f13fd17699c6500a4979003676696) +- Only apps should have lockfiles [`7226abf`](https://github.com/ljharb/typed-array-buffer/commit/7226abfda329b99dc25526c48740b076d128a7be) diff --git a/node_modules/typed-array-buffer/LICENSE b/node_modules/typed-array-buffer/LICENSE new file mode 100644 index 0000000000000..b4213ac640ad5 --- /dev/null +++ b/node_modules/typed-array-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/typed-array-buffer/README.md b/node_modules/typed-array-buffer/README.md new file mode 100644 index 0000000000000..eb7205dd574f7 --- /dev/null +++ b/node_modules/typed-array-buffer/README.md @@ -0,0 +1,42 @@ +# typed-array-buffer [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Get the ArrayBuffer out of a TypedArray, robustly. + +This will work in node <= 0.10 and < 0.11.4, where there's no prototype accessor, only a nonconfigurable own property. +It will also work in modern engines where `TypedArray.prototype.buffer` has been deleted after this module has loaded. + +## Example + +```js +const typedArrayBuffer = require('typed-array-buffer'); +const assert = require('assert'); + +const arr = new Uint8Array(0); +assert.equal(arr.buffer, typedArrayBuffer(arr)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/typed-array-buffer +[npm-version-svg]: https://versionbadg.es/ljharb/typed-array-buffer.svg +[deps-svg]: https://david-dm.org/ljharb/typed-array-buffer.svg +[deps-url]: https://david-dm.org/ljharb/typed-array-buffer +[dev-deps-svg]: https://david-dm.org/ljharb/typed-array-buffer/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/typed-array-buffer#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/typed-array-buffer.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/typed-array-buffer.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/typed-array-buffer.svg +[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-buffer +[codecov-image]: https://codecov.io/gh/ljharb/typed-array-buffer/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/typed-array-buffer/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/typed-array-buffer +[actions-url]: https://github.com/ljharb/typed-array-buffer/actions diff --git a/node_modules/typed-array-buffer/index.js b/node_modules/typed-array-buffer/index.js new file mode 100644 index 0000000000000..34939d519be35 --- /dev/null +++ b/node_modules/typed-array-buffer/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true); + +var isTypedArray = require('is-typed-array'); + +// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter +module.exports = $typedArrayBuffer || function typedArrayBuffer(x) { + if (!isTypedArray(x)) { + throw new $TypeError('Not a Typed Array'); + } + return x.buffer; +}; diff --git a/node_modules/typed-array-buffer/package.json b/node_modules/typed-array-buffer/package.json new file mode 100644 index 0000000000000..d15ea4b3defc3 --- /dev/null +++ b/node_modules/typed-array-buffer/package.json @@ -0,0 +1,73 @@ +{ + "name": "typed-array-buffer", + "version": "1.0.0", + "description": "Get the ArrayBuffer out of a TypedArray, robustly.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/typed-array-buffer.git" + }, + "keywords": [ + "typed array", + "arraybuffer", + "buffer" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/typed-array-buffer/issues" + }, + "homepage": "https://github.com/ljharb/typed-array-buffer#readme", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.5", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/typed-array-buffer/test/index.js b/node_modules/typed-array-buffer/test/index.js new file mode 100644 index 0000000000000..57247be00f95a --- /dev/null +++ b/node_modules/typed-array-buffer/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var availableTypedArrays = require('available-typed-arrays')(); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); +var inspect = require('object-inspect'); + +var typedArrayBuffer = require('../'); + +test('typedArrayBuffer', function (t) { + forEach(v.primitives.concat(v.objects), function (nonTA) { + t['throws'](function () { typedArrayBuffer(nonTA); }, TypeError, inspect(nonTA) + ' is not a Typed Array'); + }); + + forEach(availableTypedArrays, function (TA) { + var ta = new global[TA](0); + t.equal(typedArrayBuffer(ta), ta.buffer, inspect(ta) + ' has the same buffer as its own buffer property'); + }); + + t.end(); +}); diff --git a/node_modules/typed-array-byte-length/.eslintrc b/node_modules/typed-array-byte-length/.eslintrc new file mode 100644 index 0000000000000..7c87f56901172 --- /dev/null +++ b/node_modules/typed-array-byte-length/.eslintrc @@ -0,0 +1,12 @@ +{ + "root": true, + + "extends": "@ljharb", + + "globals": { + "Uint8Array": false, + }, + + "rules": { + }, +} diff --git a/node_modules/typed-array-byte-length/.github/FUNDING.yml b/node_modules/typed-array-byte-length/.github/FUNDING.yml new file mode 100644 index 0000000000000..7d6aac43f8717 --- /dev/null +++ b/node_modules/typed-array-byte-length/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-length +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/typed-array-byte-length/.nycrc b/node_modules/typed-array-byte-length/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/typed-array-byte-length/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-byte-length/CHANGELOG.md b/node_modules/typed-array-byte-length/CHANGELOG.md new file mode 100644 index 0000000000000..67c5ee42a909e --- /dev/null +++ b/node_modules/typed-array-byte-length/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2023-07-14 + +### Commits + +- Initial implementation, tests, readme [`b8800c8`](https://github.com/inspect-js/typed-array-byte-length/commit/b8800c8f7f0fddd8744fd13dfa6239a504b4dc8d) +- Initial commit [`72723d8`](https://github.com/inspect-js/typed-array-byte-length/commit/72723d8f8fbff27d74b19f5e096d2eb2087d90dc) +- Only apps should have lockfiles [`a7dfc57`](https://github.com/inspect-js/typed-array-byte-length/commit/a7dfc57098655049b9c43cf1c3a39f24205821be) diff --git a/node_modules/typed-array-byte-length/LICENSE b/node_modules/typed-array-byte-length/LICENSE new file mode 100644 index 0000000000000..707437b5750a2 --- /dev/null +++ b/node_modules/typed-array-byte-length/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/typed-array-byte-length/README.md b/node_modules/typed-array-byte-length/README.md new file mode 100644 index 0000000000000..a6172618fdab7 --- /dev/null +++ b/node_modules/typed-array-byte-length/README.md @@ -0,0 +1,70 @@ +# typed-array-byte-offset [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Robustly get the byte offset of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `byteOffset` property is overridden. + +## Example + +```js +var typedArrayByteOffset = require('typed-array-byte-offset'); +var assert = require('assert'); + +assert.equal(false, typedArrayByteOffset(undefined)); +assert.equal(false, typedArrayByteOffset(null)); +assert.equal(false, typedArrayByteOffset(false)); +assert.equal(false, typedArrayByteOffset(true)); +assert.equal(false, typedArrayByteOffset([])); +assert.equal(false, typedArrayByteOffset({})); +assert.equal(false, typedArrayByteOffset(/a/g)); +assert.equal(false, typedArrayByteOffset(new RegExp('a', 'g'))); +assert.equal(false, typedArrayByteOffset(new Date())); +assert.equal(false, typedArrayByteOffset(42)); +assert.equal(false, typedArrayByteOffset(NaN)); +assert.equal(false, typedArrayByteOffset(Infinity)); +assert.equal(false, typedArrayByteOffset(new Number(42))); +assert.equal(false, typedArrayByteOffset('foo')); +assert.equal(false, typedArrayByteOffset(Object('foo'))); +assert.equal(false, typedArrayByteOffset(function () {})); +assert.equal(false, typedArrayByteOffset(function* () {})); +assert.equal(false, typedArrayByteOffset(x => x * x)); +assert.equal(false, typedArrayByteOffset([])); + +const buffer = new ArrayBuffer(32); + +assert.equal(8, typedArrayByteOffset(new Int8Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint8Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint8ClampedArray(buffer, 8))); +assert.equal(4, typedArrayByteOffset(new Int16Array(buffer, 4))); +assert.equal(4, typedArrayByteOffset(new Uint16Array(buffer, 4))); +assert.equal(8, typedArrayByteOffset(new Int32Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint32Array(buffer, 8))); +assert.equal(16, typedArrayByteOffset(new Float32Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new Float64Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new BigInt64Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new BigUint64Array(buffer, 16))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/typed-array-byte-offset +[npm-version-svg]: https://versionbadg.es/inspect-js/typed-array-byte-offset.svg +[deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset.svg +[deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset +[dev-deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/typed-array-byte-offset.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/typed-array-byte-offset.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/typed-array-byte-offset.svg +[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-byte-offset +[codecov-image]: https://codecov.io/gh/inspect-js/typed-array-byte-offset/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/typed-array-byte-offset/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/typed-array-byte-offset +[actions-url]: https://github.com/inspect-js/typed-array-byte-offset/actions diff --git a/node_modules/typed-array-byte-length/index.js b/node_modules/typed-array-byte-length/index.js new file mode 100644 index 0000000000000..7b23cf2c30d31 --- /dev/null +++ b/node_modules/typed-array-byte-length/index.js @@ -0,0 +1,66 @@ +'use strict'; + +var forEach = require('for-each'); +var callBind = require('call-bind'); + +var typedArrays = require('available-typed-arrays')(); + +var getters = {}; +var hasProto = require('has-proto')(); + +var gOPD = Object.getOwnPropertyDescriptor; +var oDP = Object.defineProperty; +if (gOPD) { + var getByteLength = function (x) { + return x.byteLength; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof global[typedArray] === 'function' || typeof global[typedArray] === 'object') { + var Proto = global[typedArray].prototype; + var descriptor = gOPD(Proto, 'byteLength'); + if (!descriptor && hasProto) { + var superProto = Proto.__proto__; // eslint-disable-line no-proto + descriptor = gOPD(superProto, 'byteLength'); + } + // Opera 12.16 has a magic byteLength data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic byteLength data property + var arr = new global[typedArray](2); + descriptor = gOPD(arr, 'byteLength'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getByteLength; + } + } + } + }); +} + +var tryTypedArrays = function tryAllTypedArrays(value) { + var foundByteLength; + forEach(getters, function (getter) { + if (typeof foundByteLength !== 'number') { + try { + var byteLength = getter(value); + if (typeof byteLength === 'number') { + foundByteLength = byteLength; + } + } catch (e) {} + } + }); + return foundByteLength; +}; + +var isTypedArray = require('is-typed-array'); + +module.exports = function typedArrayByteLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; diff --git a/node_modules/typed-array-byte-length/package.json b/node_modules/typed-array-byte-length/package.json new file mode 100644 index 0000000000000..542c17803f154 --- /dev/null +++ b/node_modules/typed-array-byte-length/package.json @@ -0,0 +1,98 @@ +{ + "name": "typed-array-byte-length", + "version": "1.0.0", + "description": "Robustly get the byte length of a Typed Array", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/typed-array-byte-length.git" + }, + "keywords": [ + "typed", + "array", + "byteLength", + "byte", + "length", + "robust", + "es", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "BigInt64Array", + "BigUint64Array" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/typed-array-byte-length/issues" + }, + "homepage": "https://github.com/inspect-js/typed-array-byte-length#readme", + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.5", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/typed-array-byte-length/test/index.js b/node_modules/typed-array-byte-length/test/index.js new file mode 100644 index 0000000000000..b9a2f3e1fbfc9 --- /dev/null +++ b/node_modules/typed-array-byte-length/test/index.js @@ -0,0 +1,81 @@ +'use strict'; + +var test = require('tape'); +var typedArrayByteLength = require('../'); +var isCallable = require('is-callable'); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); +var availableTypedArrays = require('available-typed-arrays')(); + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + st.equal(false, typedArrayByteLength(), 'undefined is not typed array'); + st.equal(false, typedArrayByteLength(null), 'null is not typed array'); + st.equal(false, typedArrayByteLength(false), 'false is not typed array'); + st.equal(false, typedArrayByteLength(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, typedArrayByteLength({}), 'object is not typed array'); + t.equal(false, typedArrayByteLength(/a/g), 'regex literal is not typed array'); + t.equal(false, typedArrayByteLength(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, typedArrayByteLength(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, typedArrayByteLength(42), 'number is not typed array'); + st.equal(false, typedArrayByteLength(Object(42)), 'number object is not typed array'); + st.equal(false, typedArrayByteLength(NaN), 'NaN is not typed array'); + st.equal(false, typedArrayByteLength(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, typedArrayByteLength('foo'), 'string primitive is not typed array'); + st.equal(false, typedArrayByteLength(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, typedArrayByteLength(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, typedArrayByteLength(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.equal(false, typedArrayByteLength(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (t) { + var length = 64; + var byteLength = 32; + + forEach(availableTypedArrays, function (typedArray) { + var buffer = new ArrayBuffer(length); + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(buffer, byteLength); + t.equal(typedArrayByteLength(arr), byteLength, 'new ' + typedArray + '(new ArrayBuffer(' + length + '), ' + byteLength + ') is typed array of byte Length ' + byteLength); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + + var buffer = new ArrayBuffer(8); + var uint8 = new Uint8Array(buffer, 2); + + t.equal(typedArrayByteLength(uint8), 6, 'byteLength is as expected'); + + t.end(); +}); diff --git a/node_modules/typed-array-byte-offset/.eslintrc b/node_modules/typed-array-byte-offset/.eslintrc new file mode 100644 index 0000000000000..7376ac839fdfc --- /dev/null +++ b/node_modules/typed-array-byte-offset/.eslintrc @@ -0,0 +1,8 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + }, +} diff --git a/node_modules/typed-array-byte-offset/.github/FUNDING.yml b/node_modules/typed-array-byte-offset/.github/FUNDING.yml new file mode 100644 index 0000000000000..7d6aac43f8717 --- /dev/null +++ b/node_modules/typed-array-byte-offset/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-length +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/typed-array-byte-offset/.nycrc b/node_modules/typed-array-byte-offset/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/typed-array-byte-offset/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-byte-offset/CHANGELOG.md b/node_modules/typed-array-byte-offset/CHANGELOG.md new file mode 100644 index 0000000000000..b209037d5dff8 --- /dev/null +++ b/node_modules/typed-array-byte-offset/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2023-06-06 + +### Commits + +- Initial implementation, tests, readme [`f227633`](https://github.com/inspect-js/typed-array-byte-offset/commit/f2276337a907bdfe9725af1b36c3109e76f2430d) +- Initial commit [`806bbaf`](https://github.com/inspect-js/typed-array-byte-offset/commit/806bbaf81e0267aebce5ae68cbf138718513642a) +- npm init [`1151981`](https://github.com/inspect-js/typed-array-byte-offset/commit/1151981427eb1fddab8599d36e6afea50a78293f) +- Only apps should have lockfiles [`5fa9933`](https://github.com/inspect-js/typed-array-byte-offset/commit/5fa9933275f10bdb9e8a175cc70a8228d4811642) diff --git a/node_modules/typed-array-byte-offset/LICENSE b/node_modules/typed-array-byte-offset/LICENSE new file mode 100644 index 0000000000000..707437b5750a2 --- /dev/null +++ b/node_modules/typed-array-byte-offset/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/typed-array-byte-offset/README.md b/node_modules/typed-array-byte-offset/README.md new file mode 100644 index 0000000000000..a6172618fdab7 --- /dev/null +++ b/node_modules/typed-array-byte-offset/README.md @@ -0,0 +1,70 @@ +# typed-array-byte-offset [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Robustly get the byte offset of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `byteOffset` property is overridden. + +## Example + +```js +var typedArrayByteOffset = require('typed-array-byte-offset'); +var assert = require('assert'); + +assert.equal(false, typedArrayByteOffset(undefined)); +assert.equal(false, typedArrayByteOffset(null)); +assert.equal(false, typedArrayByteOffset(false)); +assert.equal(false, typedArrayByteOffset(true)); +assert.equal(false, typedArrayByteOffset([])); +assert.equal(false, typedArrayByteOffset({})); +assert.equal(false, typedArrayByteOffset(/a/g)); +assert.equal(false, typedArrayByteOffset(new RegExp('a', 'g'))); +assert.equal(false, typedArrayByteOffset(new Date())); +assert.equal(false, typedArrayByteOffset(42)); +assert.equal(false, typedArrayByteOffset(NaN)); +assert.equal(false, typedArrayByteOffset(Infinity)); +assert.equal(false, typedArrayByteOffset(new Number(42))); +assert.equal(false, typedArrayByteOffset('foo')); +assert.equal(false, typedArrayByteOffset(Object('foo'))); +assert.equal(false, typedArrayByteOffset(function () {})); +assert.equal(false, typedArrayByteOffset(function* () {})); +assert.equal(false, typedArrayByteOffset(x => x * x)); +assert.equal(false, typedArrayByteOffset([])); + +const buffer = new ArrayBuffer(32); + +assert.equal(8, typedArrayByteOffset(new Int8Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint8Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint8ClampedArray(buffer, 8))); +assert.equal(4, typedArrayByteOffset(new Int16Array(buffer, 4))); +assert.equal(4, typedArrayByteOffset(new Uint16Array(buffer, 4))); +assert.equal(8, typedArrayByteOffset(new Int32Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint32Array(buffer, 8))); +assert.equal(16, typedArrayByteOffset(new Float32Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new Float64Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new BigInt64Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new BigUint64Array(buffer, 16))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/typed-array-byte-offset +[npm-version-svg]: https://versionbadg.es/inspect-js/typed-array-byte-offset.svg +[deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset.svg +[deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset +[dev-deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/typed-array-byte-offset.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/typed-array-byte-offset.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/typed-array-byte-offset.svg +[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-byte-offset +[codecov-image]: https://codecov.io/gh/inspect-js/typed-array-byte-offset/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/typed-array-byte-offset/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/typed-array-byte-offset +[actions-url]: https://github.com/inspect-js/typed-array-byte-offset/actions diff --git a/node_modules/typed-array-byte-offset/index.js b/node_modules/typed-array-byte-offset/index.js new file mode 100644 index 0000000000000..5e5068872b88f --- /dev/null +++ b/node_modules/typed-array-byte-offset/index.js @@ -0,0 +1,66 @@ +'use strict'; + +var forEach = require('for-each'); +var callBind = require('call-bind'); + +var typedArrays = require('available-typed-arrays')(); + +var getters = {}; +var hasProto = require('has-proto')(); + +var gOPD = Object.getOwnPropertyDescriptor; +var oDP = Object.defineProperty; +if (gOPD) { + var getByteOffset = function (x) { + return x.byteOffset; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof global[typedArray] === 'function' || typeof global[typedArray] === 'object') { + var Proto = global[typedArray].prototype; + var descriptor = gOPD(Proto, 'byteOffset'); + if (!descriptor && hasProto) { + var superProto = Proto.__proto__; // eslint-disable-line no-proto + descriptor = gOPD(superProto, 'byteOffset'); + } + // Opera 12.16 has a magic byteOffset data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic byteOffset data property + var arr = new global[typedArray](2); + descriptor = gOPD(arr, 'byteOffset'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getByteOffset; + } + } + } + }); +} + +var tryTypedArrays = function tryAllTypedArrays(value) { + var foundOffset; + forEach(getters, function (getter) { + if (typeof foundOffset !== 'number') { + try { + var offset = getter(value); + if (typeof offset === 'number') { + foundOffset = offset; + } + } catch (e) {} + } + }); + return foundOffset; +}; + +var isTypedArray = require('is-typed-array'); + +module.exports = function typedArrayByteOffset(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; diff --git a/node_modules/typed-array-byte-offset/package.json b/node_modules/typed-array-byte-offset/package.json new file mode 100644 index 0000000000000..7e20c76170326 --- /dev/null +++ b/node_modules/typed-array-byte-offset/package.json @@ -0,0 +1,98 @@ +{ + "name": "typed-array-byte-offset", + "version": "1.0.0", + "description": "Robustly get the byte offset of a Typed Array", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/typed-array-byte-offset.git" + }, + "keywords": [ + "typed", + "array", + "byteOffset", + "byte", + "offset", + "robust", + "es", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "BigInt64Array", + "BigUint64Array" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/typed-array-byte-offset/issues" + }, + "homepage": "https://github.com/inspect-js/typed-array-byte-offset#readme", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/typed-array-byte-offset/test/index.js b/node_modules/typed-array-byte-offset/test/index.js new file mode 100644 index 0000000000000..d366a7c62025c --- /dev/null +++ b/node_modules/typed-array-byte-offset/test/index.js @@ -0,0 +1,88 @@ +'use strict'; + +var test = require('tape'); +var typedArrayByteOffset = require('../'); +var isCallable = require('is-callable'); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + st.equal(false, typedArrayByteOffset(), 'undefined is not typed array'); + st.equal(false, typedArrayByteOffset(null), 'null is not typed array'); + st.equal(false, typedArrayByteOffset(false), 'false is not typed array'); + st.equal(false, typedArrayByteOffset(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, typedArrayByteOffset({}), 'object is not typed array'); + t.equal(false, typedArrayByteOffset(/a/g), 'regex literal is not typed array'); + t.equal(false, typedArrayByteOffset(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, typedArrayByteOffset(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, typedArrayByteOffset(42), 'number is not typed array'); + st.equal(false, typedArrayByteOffset(Object(42)), 'number object is not typed array'); + st.equal(false, typedArrayByteOffset(NaN), 'NaN is not typed array'); + st.equal(false, typedArrayByteOffset(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, typedArrayByteOffset('foo'), 'string primitive is not typed array'); + st.equal(false, typedArrayByteOffset(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, typedArrayByteOffset(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, typedArrayByteOffset(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.equal(false, typedArrayByteOffset(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('Typed Arrays', function (t) { + var length = 32; + var byteOffset = 16; + + forEach(typedArrayNames, function (typedArray) { + var buffer = new ArrayBuffer(length); + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(buffer, byteOffset); + t.equal(typedArrayByteOffset(arr), byteOffset, 'new ' + typedArray + '(new ArrayBuffer(' + length + '), ' + byteOffset + ') is typed array of byte offset ' + byteOffset); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/typed-array-length/.eslintrc b/node_modules/typed-array-length/.eslintrc new file mode 100644 index 0000000000000..c66fbb29185f6 --- /dev/null +++ b/node_modules/typed-array-length/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 11], + "max-statements": [2, 14], + "new-cap": [2, { "capIsNewExceptions": ["IsCallable"] }], + }, +} diff --git a/node_modules/typed-array-length/.github/FUNDING.yml b/node_modules/typed-array-length/.github/FUNDING.yml new file mode 100644 index 0000000000000..7d6aac43f8717 --- /dev/null +++ b/node_modules/typed-array-length/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-length +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/typed-array-length/.nycrc b/node_modules/typed-array-length/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/typed-array-length/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-length/CHANGELOG.md b/node_modules/typed-array-length/CHANGELOG.md new file mode 100644 index 0000000000000..a5b969fa1a7b3 --- /dev/null +++ b/node_modules/typed-array-length/CHANGELOG.md @@ -0,0 +1,69 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/inspect-js/typed-array-length/compare/v1.0.3...v1.0.4) - 2022-05-23 + +### Commits + +- [actions] reuse common workflows [`dfd4a37`](https://github.com/inspect-js/typed-array-length/commit/dfd4a37d851a28e3d74d892a69874e02f2e58c37) +- [meta] use `npmignore` to autogenerate an npmignore file [`a837e80`](https://github.com/inspect-js/typed-array-length/commit/a837e80d4029f26785ab9f3aa571ca782ac8e851) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `object-inspect`, `tape` [`7b05a87`](https://github.com/inspect-js/typed-array-length/commit/7b05a8772af399e52bb448618a246cd34d3e3273) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c495f6e`](https://github.com/inspect-js/typed-array-length/commit/c495f6e050a4a7463a82c9195f31f44cf2760945) +- [meta] simplify "exports" [`e42a6b6`](https://github.com/inspect-js/typed-array-length/commit/e42a6b6b0dc243fce32df20a75a7962782ef2a83) +- [Fix] ensure `for-each` dependency is properly listed [`8ec761c`](https://github.com/inspect-js/typed-array-length/commit/8ec761ca56c13927281d626958a2f55211e14f45) +- [Deps] update `call-bind`, `is-typed-array` [`2cc173a`](https://github.com/inspect-js/typed-array-length/commit/2cc173a4216e167db896bea7b8e03edf8b2d3833) +- [meta] add `safe-publish-latest` [`e8e3afa`](https://github.com/inspect-js/typed-array-length/commit/e8e3afa431ce98bbdbb68c9f8e3c029cc5128c6c) +- [Deps] update `is-typed-array` [`cd8084d`](https://github.com/inspect-js/typed-array-length/commit/cd8084db59b734ac4519b6d47f96233b6f73b1a6) + +## [v1.0.3](https://github.com/inspect-js/typed-array-length/compare/v1.0.2...v1.0.3) - 2020-12-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`a578b83`](https://github.com/inspect-js/typed-array-length/commit/a578b83e68055c1e7c7120bc4583e1d6926fc268) +- [meta] avoid publishing github workflows [`f064a4b`](https://github.com/inspect-js/typed-array-length/commit/f064a4bf9090202154249d969be0799c34804ad4) +- [Tests] run `nyc` on all tests [`69b841e`](https://github.com/inspect-js/typed-array-length/commit/69b841e43042358c71c3290342514b6d107f08d1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`4594e83`](https://github.com/inspect-js/typed-array-length/commit/4594e83250579cdbff870aa951e7af56ca169489) +- [actions] add "Allow Edits" workflow [`81e953b`](https://github.com/inspect-js/typed-array-length/commit/81e953ba6b3f59c5657e0d17fa1e7619b94891f5) +- [Deps] update `is-typed-array`; use `call-bind` instead of `es-abstract` [`e7da56b`](https://github.com/inspect-js/typed-array-length/commit/e7da56b3c03b7f0db9bb110444ec1ccf19d7e9f9) +- [readme] remove travis badge [`6d610d8`](https://github.com/inspect-js/typed-array-length/commit/6d610d83cb78ac5286c5ca273f4b3c7289f7686e) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2d0ad64`](https://github.com/inspect-js/typed-array-length/commit/2d0ad644a11f754e61b49d327fdf891605abbe58) + +## [v1.0.2](https://github.com/inspect-js/typed-array-length/compare/v1.0.1...v1.0.2) - 2020-04-22 + +### Commits + +- [Dev Deps] update `make-arrow-function`, `make-generator-function` [`4facf69`](https://github.com/inspect-js/typed-array-length/commit/4facf697cafb36b9c1057dc4ca1a21d8550c564e) +- [Deps] update `is-typed-array`, `es-abstract` [`aaf3585`](https://github.com/inspect-js/typed-array-length/commit/aaf3585429896b9520dedd886c07aa4a96b50615) +- [Dev Deps] update `aud`, `auto-changelog` [`f10e298`](https://github.com/inspect-js/typed-array-length/commit/f10e298c7733b8de59231c1581c9b000c205edbd) +- [meta] allow `package.json` to be required/imported [`104f4c6`](https://github.com/inspect-js/typed-array-length/commit/104f4c6a6363e600d54aeb7abd90e37d99693aaf) +- [Tests] only audit prod deps [`c748ab5`](https://github.com/inspect-js/typed-array-length/commit/c748ab596de505483df14ca7eeda7f27aeb20383) +- [Deps] update `es-abstract` [`6cd213e`](https://github.com/inspect-js/typed-array-length/commit/6cd213ec654da3325abc8190f8c07c860474d944) +- [Dev Deps] update `tape` [`2b0b2ea`](https://github.com/inspect-js/typed-array-length/commit/2b0b2ea9be106e8a068597c3f499ef703cce1edb) +- [Dev Deps] update `@ljharb/eslint-config` [`cf462f3`](https://github.com/inspect-js/typed-array-length/commit/cf462f3352cf2fd592e624746371e3de800a265d) +- [Deps] update `is-typed-array` [`ff46995`](https://github.com/inspect-js/typed-array-length/commit/ff469955b5d92942ba066c77eac7467e0c4de1ec) + +## [v1.0.1](https://github.com/inspect-js/typed-array-length/compare/v1.0.0...v1.0.1) - 2020-01-19 + +### Commits + +- readme [`d3643fd`](https://github.com/inspect-js/typed-array-length/commit/d3643fd11919844b1f42041ef980a1f33215b515) +- [meta] fix "exports" field [`006e28b`](https://github.com/inspect-js/typed-array-length/commit/006e28b30b11f8948e607d13ef0e96c3d7d7f61f) + +## v1.0.0 - 2020-01-18 + +### Commits + +- Initial commit [`5f9e2ec`](https://github.com/inspect-js/typed-array-length/commit/5f9e2ec6650f80dc894e354e9e98181b09006346) +- Tests [`6b9cadb`](https://github.com/inspect-js/typed-array-length/commit/6b9cadb0c274933bc7ee5e3fc6a5a380163cbe76) +- Implementation [`6a3cb50`](https://github.com/inspect-js/typed-array-length/commit/6a3cb50429f40fc4ac9020bbf9539560c1b70213) +- npm init [`41d42cd`](https://github.com/inspect-js/typed-array-length/commit/41d42cddfd3d47df6c9d480cf77787eae1109432) +- [meta] add `auto-changelog` [`4fd159b`](https://github.com/inspect-js/typed-array-length/commit/4fd159bc6535e86c370a2186d60a68656f0d8917) +- [meta] add `funding` field; create FUNDING.yml [`6a9fca7`](https://github.com/inspect-js/typed-array-length/commit/6a9fca7e0fdf3ff3fd4b0f18596471ca3d050a39) +- [actions] add automatic rebasing / merge commit blocking [`8303296`](https://github.com/inspect-js/typed-array-length/commit/83032967b14afd37c382d4bf2c1fc5c95e3764bd) +- [Tests] add `npm run lint` [`47a9c21`](https://github.com/inspect-js/typed-array-length/commit/47a9c211f474dbe8528f6b28f50080eacd5bf7eb) +- [Tests] use shared travis-ci configs [`d0c8915`](https://github.com/inspect-js/typed-array-length/commit/d0c89153e1c50f1eadd0b42521bcdcf3366b8af5) +- Only apps should have lockfiles [`3eaef9c`](https://github.com/inspect-js/typed-array-length/commit/3eaef9cd192b1a25d1930739e7c0044e39ad3c0d) diff --git a/node_modules/typed-array-length/LICENSE b/node_modules/typed-array-length/LICENSE new file mode 100644 index 0000000000000..707437b5750a2 --- /dev/null +++ b/node_modules/typed-array-length/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/typed-array-length/README.md b/node_modules/typed-array-length/README.md new file mode 100644 index 0000000000000..5e78c2004b682 --- /dev/null +++ b/node_modules/typed-array-length/README.md @@ -0,0 +1,64 @@ +# typed-array-length [![Version Badge][2]][1] + +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Robustly get the length of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `length` property is overridden. + +## Example + +```js +var typedArrayLength = require('typed-array-length'); +var assert = require('assert'); + +assert.equal(false, typedArrayLength(undefined)); +assert.equal(false, typedArrayLength(null)); +assert.equal(false, typedArrayLength(false)); +assert.equal(false, typedArrayLength(true)); +assert.equal(false, typedArrayLength([])); +assert.equal(false, typedArrayLength({})); +assert.equal(false, typedArrayLength(/a/g)); +assert.equal(false, typedArrayLength(new RegExp('a', 'g'))); +assert.equal(false, typedArrayLength(new Date())); +assert.equal(false, typedArrayLength(42)); +assert.equal(false, typedArrayLength(NaN)); +assert.equal(false, typedArrayLength(Infinity)); +assert.equal(false, typedArrayLength(new Number(42))); +assert.equal(false, typedArrayLength('foo')); +assert.equal(false, typedArrayLength(Object('foo'))); +assert.equal(false, typedArrayLength(function () {})); +assert.equal(false, typedArrayLength(function* () {})); +assert.equal(false, typedArrayLength(x => x * x)); +assert.equal(false, typedArrayLength([])); + +assert.equal(1, typedArrayLength(new Int8Array(1))); +assert.equal(2, typedArrayLength(new Uint8Array(2))); +assert.equal(3, typedArrayLength(new Uint8ClampedArray(3))); +assert.equal(4, typedArrayLength(new Int16Array(4))); +assert.equal(5, typedArrayLength(new Uint16Array(5))); +assert.equal(6, typedArrayLength(new Int32Array(6))); +assert.equal(7, typedArrayLength(new Uint32Array(7))); +assert.equal(8, typedArrayLength(new Float32Array(8))); +assert.equal(9, typedArrayLength(new Float64Array(9))); +assert.equal(10, typedArrayLength(new BigInt64Array(10))); +assert.equal(11, typedArrayLength(new BigUint64Array(11))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/typed-array-length +[2]: https://versionbadg.es/inspect-js/typed-array-length.svg +[5]: https://david-dm.org/inspect-js/typed-array-length.svg +[6]: https://david-dm.org/inspect-js/typed-array-length +[7]: https://david-dm.org/inspect-js/typed-array-length/dev-status.svg +[8]: https://david-dm.org/inspect-js/typed-array-length#info=devDependencies +[11]: https://nodei.co/npm/typed-array-length.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/typed-array-length.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/typed-array-length.svg +[downloads-url]: http://npm-stat.com/charts.html?package=typed-array-length diff --git a/node_modules/typed-array-length/index.js b/node_modules/typed-array-length/index.js new file mode 100644 index 0000000000000..f78eb66f17986 --- /dev/null +++ b/node_modules/typed-array-length/index.js @@ -0,0 +1,77 @@ +'use strict'; + +var forEach = require('for-each'); +var callBind = require('call-bind'); + +var typedArrays = [ + 'Float32Array', + 'Float64Array', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +var getters = {}; +var hasProto = [].__proto__ === Array.prototype; // eslint-disable-line no-proto +var gOPD = Object.getOwnPropertyDescriptor; +var oDP = Object.defineProperty; +if (gOPD) { + var getLength = function (x) { + return x.length; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof global[typedArray] === 'function' || typeof global[typedArray] === 'object') { + var Proto = global[typedArray].prototype; + var descriptor = gOPD(Proto, 'length'); + if (!descriptor && hasProto) { + var superProto = Proto.__proto__; // eslint-disable-line no-proto + descriptor = gOPD(superProto, 'length'); + } + // Opera 12.16 has a magic length data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic length data property + var arr = new global[typedArray](2); + descriptor = gOPD(arr, 'length'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getLength; + } + } + } + }); +} + +var tryTypedArrays = function tryAllTypedArrays(value) { + var foundLength; + forEach(getters, function (getter) { + if (typeof foundLength !== 'number') { + try { + var length = getter(value); + if (typeof length === 'number') { + foundLength = length; + } + } catch (e) {} + } + }); + return foundLength; +}; + +var isTypedArray = require('is-typed-array'); + +module.exports = function typedArrayLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; diff --git a/node_modules/typed-array-length/package.json b/node_modules/typed-array-length/package.json new file mode 100644 index 0000000000000..d963b806dfff2 --- /dev/null +++ b/node_modules/typed-array-length/package.json @@ -0,0 +1,89 @@ +{ + "name": "typed-array-length", + "version": "1.0.4", + "description": "Robustly get the length of a Typed Array", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test:harmony": "nyc node --harmony --es-staging test", + "test": "npm run tests-only && npm run test:harmony", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/typed-array-length.git" + }, + "keywords": [ + "typed", + "array", + "length", + "robust", + "es", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/typed-array-length/issues" + }, + "homepage": "https://github.com/inspect-js/typed-array-length#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "is-callable": "^1.2.4", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/typed-array-length/test/index.js b/node_modules/typed-array-length/test/index.js new file mode 100644 index 0000000000000..8852fee809e04 --- /dev/null +++ b/node_modules/typed-array-length/test/index.js @@ -0,0 +1,85 @@ +'use strict'; + +var test = require('tape'); +var typedArrayLength = require('../'); +var isCallable = require('is-callable'); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + st.equal(false, typedArrayLength(), 'undefined is not typed array'); + st.equal(false, typedArrayLength(null), 'null is not typed array'); + st.equal(false, typedArrayLength(false), 'false is not typed array'); + st.equal(false, typedArrayLength(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, typedArrayLength({}), 'object is not typed array'); + t.equal(false, typedArrayLength(/a/g), 'regex literal is not typed array'); + t.equal(false, typedArrayLength(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, typedArrayLength(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, typedArrayLength(42), 'number is not typed array'); + st.equal(false, typedArrayLength(Object(42)), 'number object is not typed array'); + st.equal(false, typedArrayLength(NaN), 'NaN is not typed array'); + st.equal(false, typedArrayLength(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, typedArrayLength('foo'), 'string primitive is not typed array'); + st.equal(false, typedArrayLength(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, typedArrayLength(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, typedArrayLength(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.equal(false, typedArrayLength(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var length = 10; + var arr = new TypedArray(length); + t.equal(typedArrayLength(arr), length, 'new ' + typedArray + '(10) is typed array of length ' + length); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/uglify-js/LICENSE b/node_modules/uglify-js/LICENSE new file mode 100644 index 0000000000000..dd7706f0cbfaf --- /dev/null +++ b/node_modules/uglify-js/LICENSE @@ -0,0 +1,29 @@ +UglifyJS is released under the BSD license: + +Copyright 2012-2013 (c) Mihai Bazon + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff --git a/node_modules/uglify-js/README.md b/node_modules/uglify-js/README.md new file mode 100644 index 0000000000000..8c1d676421ceb --- /dev/null +++ b/node_modules/uglify-js/README.md @@ -0,0 +1,995 @@ +UglifyJS 2 +========== +[![Build Status](https://travis-ci.org/mishoo/UglifyJS2.svg)](https://travis-ci.org/mishoo/UglifyJS2) + +UglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit. + +This page documents the command line utility. For +[API and internals documentation see my website](http://lisperator.net/uglifyjs/). +There's also an +[in-browser online demo](http://lisperator.net/uglifyjs/#demo) (for Firefox, +Chrome and probably Safari). + +#### Note: +- `uglify-js` only supports ECMAScript 5 (ES5). +- Support for `const` is [present but incomplete](#support-for-const), and may not be + transformed properly. +- Those wishing to minify ES2015+ (ES6+) should use the `npm` package [**uglify-es**](https://github.com/mishoo/UglifyJS2/tree/harmony). + +Install +------- + +First make sure you have installed the latest version of [node.js](http://nodejs.org/) +(You may need to restart your computer after this step). + +From NPM for use as a command line app: + + npm install uglify-js -g + +From NPM for programmatic use: + + npm install uglify-js + +Usage +----- + + uglifyjs [input files] [options] + +UglifyJS2 can take multiple input files. It's recommended that you pass the +input files first, then pass the options. UglifyJS will parse input files +in sequence and apply any compression options. The files are parsed in the +same global scope, that is, a reference from a file to some +variable/function declared in another file will be matched properly. + +If you want to read from STDIN instead, pass a single dash instead of input +files. + +If you wish to pass your options before the input files, separate the two with +a double dash to prevent input files being used as option arguments: + + uglifyjs --compress --mangle -- input.js + +The available options are: + +``` + --source-map Specify an output file where to generate source + map. + --source-map-root The path to the original source to be included + in the source map. + --source-map-url The path to the source map to be added in //# + sourceMappingURL. Defaults to the value passed + with --source-map. + --source-map-include-sources Pass this flag if you want to include the + content of source files in the source map as + sourcesContent property. + --source-map-inline Write base64-encoded source map to the end of js output. + --in-source-map Input source map, useful if you're compressing + JS that was generated from some other original + code. Specify "inline" if the source map is included + inline with the sources. + --screw-ie8 Use this flag if you don't wish to support + Internet Explorer 6/7/8. + By default UglifyJS will not try to be IE-proof. + --support-ie8 Use this flag to support Internet Explorer 6/7/8. + Equivalent to setting `screw_ie8: false` in `minify()` + for `compress`, `mangle` and `output` options. + --expr Parse a single expression, rather than a + program (for parsing JSON) + -p, --prefix Skip prefix for original filenames that appear + in source maps. For example -p 3 will drop 3 + directories from file names and ensure they are + relative paths. You can also specify -p + relative, which will make UglifyJS figure out + itself the relative paths between original + sources, the source map and the output file. + -o, --output Output file (default STDOUT). + -b, --beautify Beautify output/specify output options. + -m, --mangle Mangle names/pass mangler options. + -r, --reserved Reserved names to exclude from mangling. + -c, --compress Enable compressor/pass compressor options, e.g. + `-c 'if_return=false,pure_funcs=["Math.pow","console.log"]'` + Use `-c` with no argument to enable default compression + options. + -d, --define Global definitions + -e, --enclose Embed everything in a big function, with a + configurable parameter/argument list. + --comments Preserve copyright comments in the output. By + default this works like Google Closure, keeping + JSDoc-style comments that contain "@license" or + "@preserve". You can optionally pass one of the + following arguments to this flag: + - "all" to keep all comments + - a valid JS RegExp like `/foo/` or `/^!/` to + keep only matching comments. + Note that currently not *all* comments can be + kept when compression is on, because of dead + code removal or cascading statements into + sequences. + --preamble Preamble to prepend to the output. You can use + this to insert a comment, for example for + licensing information. This will not be + parsed, but the source map will adjust for its + presence. + --stats Display operations run time on STDERR. + --acorn Use Acorn for parsing. + --spidermonkey Assume input files are SpiderMonkey AST format + (as JSON). + --self Build itself (UglifyJS2) as a library (implies + --wrap=UglifyJS --export-all) + --wrap Embed everything in a big function, making the + “exports” and “global” variables available. You + need to pass an argument to this option to + specify the name that your module will take + when included in, say, a browser. + --export-all Only used when --wrap, this tells UglifyJS to + add code to automatically export all globals. + --lint Display some scope warnings + -v, --verbose Verbose + -V, --version Print version number and exit. + --noerr Don't throw an error for unknown options in -c, + -b or -m. + --bare-returns Allow return outside of functions. Useful when + minifying CommonJS modules and Userscripts that + may be anonymous function wrapped (IIFE) by the + .user.js engine `caller`. + --keep-fnames Do not mangle/drop function names. Useful for + code relying on Function.prototype.name. + --reserved-file File containing reserved names + --reserve-domprops Make (most?) DOM properties reserved for + --mangle-props + --mangle-props Mangle property names (default `0`). Set to + `true` or `1` to mangle all property names. Set + to `unquoted` or `2` to only mangle unquoted + property names. Mode `2` also enables the + `keep_quoted_props` beautifier option to + preserve the quotes around property names and + disables the `properties` compressor option to + prevent rewriting quoted properties with dot + notation. You can override these by setting + them explicitly on the command line. + --mangle-regex Only mangle property names matching the regex + --name-cache File to hold mangled names mappings + --pure-funcs Functions that can be safely removed if their + return value is not used, e.g. + `--pure-funcs Math.floor console.info` + (requires `--compress`) +``` + +Specify `--output` (`-o`) to declare the output file. Otherwise the output +goes to STDOUT. + +## Source map options + +UglifyJS2 can generate a source map file, which is highly useful for +debugging your compressed JavaScript. To get a source map, pass +`--source-map output.js.map` (full path to the file where you want the +source map dumped). + +Additionally you might need `--source-map-root` to pass the URL where the +original files can be found. In case you are passing full paths to input +files to UglifyJS, you can use `--prefix` (`-p`) to specify the number of +directories to drop from the path prefix when declaring files in the source +map. + +For example: + + uglifyjs /home/doe/work/foo/src/js/file1.js \ + /home/doe/work/foo/src/js/file2.js \ + -o foo.min.js \ + --source-map foo.min.js.map \ + --source-map-root http://foo.com/src \ + -p 5 -c -m + +The above will compress and mangle `file1.js` and `file2.js`, will drop the +output in `foo.min.js` and the source map in `foo.min.js.map`. The source +mapping will refer to `http://foo.com/src/js/file1.js` and +`http://foo.com/src/js/file2.js` (in fact it will list `http://foo.com/src` +as the source map root, and the original files as `js/file1.js` and +`js/file2.js`). + +### Composed source map + +When you're compressing JS code that was output by a compiler such as +CoffeeScript, mapping to the JS code won't be too helpful. Instead, you'd +like to map back to the original code (i.e. CoffeeScript). UglifyJS has an +option to take an input source map. Assuming you have a mapping from +CoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript → +compressed JS by mapping every token in the compiled JS to its original +location. + +To use this feature you need to pass `--in-source-map +/path/to/input/source.map` or `--in-source-map inline` if the source map is +included inline with the sources. Normally the input source map should also +point to the file containing the generated JS, so if that's correct you can +omit input files from the command line. + +## Mangler options + +To enable the mangler you need to pass `--mangle` (`-m`). The following +(comma-separated) options are supported: + +- `toplevel` — mangle names declared in the toplevel scope (disabled by + default). + +- `eval` — mangle names visible in scopes where `eval` or `with` are used + (disabled by default). + +When mangling is enabled but you want to prevent certain names from being +mangled, you can declare those names with `--reserved` (`-r`) — pass a +comma-separated list of names. For example: + + uglifyjs ... -m -r '$,require,exports' + +to prevent the `require`, `exports` and `$` names from being changed. + +### Mangling property names (`--mangle-props`) + +**Note:** this will probably break your code. Mangling property names is a +separate step, different from variable name mangling. Pass +`--mangle-props`. It will mangle all properties that are seen in some +object literal, or that are assigned to. For example: + +```js +var x = { + foo: 1 +}; + +x.bar = 2; +x["baz"] = 3; +x[condition ? "moo" : "boo"] = 4; +console.log(x.something()); +``` + +In the above code, `foo`, `bar`, `baz`, `moo` and `boo` will be replaced +with single characters, while `something()` will be left as is. + +In order for this to be of any use, we should avoid mangling standard JS +names. For instance, if your code would contain `x.length = 10`, then +`length` becomes a candidate for mangling and it will be mangled throughout +the code, regardless if it's being used as part of your own objects or +accessing an array's length. To avoid that, you can use `--reserved-file` +to pass a filename that should contain the names to be excluded from +mangling. This file can be used both for excluding variable names and +property names. It could look like this, for example: + +```js +{ + "vars": [ "define", "require", ... ], + "props": [ "length", "prototype", ... ] +} +``` + +`--reserved-file` can be an array of file names (either a single +comma-separated argument, or you can pass multiple `--reserved-file` +arguments) — in this case it will exclude names from all those files. + +A default exclusion file is provided in `tools/domprops.json` which should +cover most standard JS and DOM properties defined in various browsers. Pass +`--reserve-domprops` to read that in. + +You can also use a regular expression to define which property names should be +mangled. For example, `--mangle-regex="/^_/"` will only mangle property names +that start with an underscore. + +When you compress multiple files using this option, in order for them to +work together in the end we need to ensure somehow that one property gets +mangled to the same name in all of them. For this, pass `--name-cache +filename.json` and UglifyJS will maintain these mappings in a file which can +then be reused. It should be initially empty. Example: + +``` +rm -f /tmp/cache.json # start fresh +uglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js +uglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js +``` + +Now, `part1.js` and `part2.js` will be consistent with each other in terms +of mangled property names. + +Using the name cache is not necessary if you compress all your files in a +single call to UglifyJS. + +#### Mangling unquoted names (`--mangle-props=unquoted` or `--mangle-props=2`) + +Using quoted property name (`o["foo"]`) reserves the property name (`foo`) +so that it is not mangled throughout the entire script even when used in an +unquoted style (`o.foo`). Example: + +``` +$ echo 'var o={"foo":1, bar:3}; o.foo += o.bar; console.log(o.foo);' | uglifyjs --mangle-props=2 -mc +var o={"foo":1,a:3};o.foo+=o.a,console.log(o.foo); +``` + +#### Debugging property name mangling + +You can also pass `--mangle-props-debug` in order to mangle property names +without completely obscuring them. For example the property `o.foo` +would mangle to `o._$foo$_` with this option. This allows property mangling +of a large codebase while still being able to debug the code and identify +where mangling is breaking things. + +You can also pass a custom suffix using `--mangle-props-debug=XYZ`. This would then +mangle `o.foo` to `o._$foo$XYZ_`. You can change this each time you compile a +script to identify how a property got mangled. One technique is to pass a +random number on every compile to simulate mangling changing with different +inputs (e.g. as you update the input script with new properties), and to help +identify mistakes like writing mangled keys to storage. + +## Compressor options + +You need to pass `--compress` (`-c`) to enable the compressor. Optionally +you can pass a comma-separated list of options. Options are in the form +`foo=bar`, or just `foo` (the latter implies a boolean option that you want +to set `true`; it's effectively a shortcut for `foo=true`). + +- `sequences` (default: true) -- join consecutive simple statements using the + comma operator. May be set to a positive integer to specify the maximum number + of consecutive comma sequences that will be generated. If this option is set to + `true` then the default `sequences` limit is `200`. Set option to `false` or `0` + to disable. The smallest `sequences` length is `2`. A `sequences` value of `1` + is grandfathered to be equivalent to `true` and as such means `200`. On rare + occasions the default sequences limit leads to very slow compress times in which + case a value of `20` or less is recommended. + +- `properties` -- rewrite property access using the dot notation, for + example `foo["bar"] → foo.bar` + +- `dead_code` -- remove unreachable code + +- `drop_debugger` -- remove `debugger;` statements + +- `unsafe` (default: false) -- apply "unsafe" transformations (discussion below) + +- `unsafe_comps` (default: false) -- Reverse `<` and `<=` to `>` and `>=` to + allow improved compression. This might be unsafe when an at least one of two + operands is an object with computed values due the use of methods like `get`, + or `valueOf`. This could cause change in execution order after operands in the + comparison are switching. Compression only works if both `comparisons` and + `unsafe_comps` are both set to true. + +- `unsafe_math` (default: false) -- optimize numerical expressions like + `2 * x * 3` into `6 * x`, which may give imprecise floating point results. + +- `unsafe_proto` (default: false) -- optimize expressions like + `Array.prototype.slice.call(a)` into `[].slice.call(a)` + +- `unsafe_regexp` (default: false) -- enable substitutions of variables with + `RegExp` values the same way as if they are constants. + +- `conditionals` -- apply optimizations for `if`-s and conditional + expressions + +- `comparisons` -- apply certain optimizations to binary nodes, for example: + `!(a <= b) → a > b` (only when `unsafe_comps`), attempts to negate binary + nodes, e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc. + +- `evaluate` -- attempt to evaluate constant expressions + +- `booleans` -- various optimizations for boolean context, for example `!!a + ? b : c → a ? b : c` + +- `loops` -- optimizations for `do`, `while` and `for` loops when we can + statically determine the condition + +- `unused` -- drop unreferenced functions and variables (simple direct variable + assignments do not count as references unless set to `"keep_assign"`) + +- `toplevel` -- drop unreferenced functions (`"funcs"`) and/or variables (`"vars"`) + in the toplevel scope (`false` by default, `true` to drop both unreferenced + functions and variables) + +- `top_retain` -- prevent specific toplevel functions and variables from `unused` + removal (can be array, comma-separated, RegExp or function. Implies `toplevel`) + +- `hoist_funs` -- hoist function declarations + +- `hoist_vars` (default: false) -- hoist `var` declarations (this is `false` + by default because it seems to increase the size of the output in general) + +- `if_return` -- optimizations for if/return and if/continue + +- `join_vars` -- join consecutive `var` statements + +- `cascade` -- small optimization for sequences, transform `x, x` into `x` + and `x = something(), x` into `x = something()` + +- `collapse_vars` -- Collapse single-use `var` and `const` definitions + when possible. + +- `reduce_vars` -- Improve optimization on variables assigned with and + used as constant values. + +- `warnings` -- display warnings when dropping unreachable code or unused + declarations etc. + +- `negate_iife` -- negate "Immediately-Called Function Expressions" + where the return value is discarded, to avoid the parens that the + code generator would insert. + +- `pure_getters` -- the default is `false`. If you pass `true` for + this, UglifyJS will assume that object property access + (e.g. `foo.bar` or `foo["bar"]`) doesn't have any side effects. + Specify `"strict"` to treat `foo.bar` as side-effect-free only when + `foo` is certain to not throw, i.e. not `null` or `undefined`. + +- `pure_funcs` -- default `null`. You can pass an array of names and + UglifyJS will assume that those functions do not produce side + effects. DANGER: will not check if the name is redefined in scope. + An example case here, for instance `var q = Math.floor(a/b)`. If + variable `q` is not used elsewhere, UglifyJS will drop it, but will + still keep the `Math.floor(a/b)`, not knowing what it does. You can + pass `pure_funcs: [ 'Math.floor' ]` to let it know that this + function won't produce any side effect, in which case the whole + statement would get discarded. The current implementation adds some + overhead (compression will be slower). + +- `drop_console` -- default `false`. Pass `true` to discard calls to + `console.*` functions. If you wish to drop a specific function call + such as `console.info` and/or retain side effects from function arguments + after dropping the function call then use `pure_funcs` instead. + +- `expression` -- default `false`. Pass `true` to preserve completion values + from terminal statements without `return`, e.g. in bookmarklets. + +- `keep_fargs` -- default `true`. Prevents the + compressor from discarding unused function arguments. You need this + for code which relies on `Function.length`. + +- `keep_fnames` -- default `false`. Pass `true` to prevent the + compressor from discarding function names. Useful for code relying on + `Function.prototype.name`. See also: the `keep_fnames` [mangle option](#mangle). + +- `passes` -- default `1`. Number of times to run compress with a maximum of 3. + In some cases more than one pass leads to further compressed code. Keep in + mind more passes will take more time. + +- `keep_infinity` -- default `false`. Pass `true` to prevent `Infinity` from + being compressed into `1/0`, which may cause performance issues on Chrome. + +- `side_effects` -- default `true`. Pass `false` to disable potentially dropping + functions marked as "pure". A function call is marked as "pure" if a comment + annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For + example: `/*@__PURE__*/foo();` + + +### The `unsafe` option + +It enables some transformations that *might* break code logic in certain +contrived cases, but should be fine for most code. You might want to try it +on your own code, it should reduce the minified size. Here's what happens +when this flag is on: + +- `new Array(1, 2, 3)` or `Array(1, 2, 3)` → `[ 1, 2, 3 ]` +- `new Object()` → `{}` +- `String(exp)` or `exp.toString()` → `"" + exp` +- `new Object/RegExp/Function/Error/Array (...)` → we discard the `new` +- `typeof foo == "undefined"` → `foo === void 0` +- `void 0` → `undefined` (if there is a variable named "undefined" in + scope; we do it because the variable name will be mangled, typically + reduced to a single character) + +### Conditional compilation + +You can use the `--define` (`-d`) switch in order to declare global +variables that UglifyJS will assume to be constants (unless defined in +scope). For example if you pass `--define DEBUG=false` then, coupled with +dead code removal UglifyJS will discard the following from the output: +```javascript +if (DEBUG) { + console.log("debug stuff"); +} +``` + +You can specify nested constants in the form of `--define env.DEBUG=false`. + +UglifyJS will warn about the condition being always false and about dropping +unreachable code; for now there is no option to turn off only this specific +warning, you can pass `warnings=false` to turn off *all* warnings. + +Another way of doing that is to declare your globals as constants in a +separate file and include it into the build. For example you can have a +`build/defines.js` file with the following: +```javascript +const DEBUG = false; +const PRODUCTION = true; +// etc. +``` + +and build your code like this: + + uglifyjs build/defines.js js/foo.js js/bar.js... -c + +UglifyJS will notice the constants and, since they cannot be altered, it +will evaluate references to them to the value itself and drop unreachable +code as usual. The build will contain the `const` declarations if you use +them. If you are targeting < ES6 environments which does not support `const`, +using `var` with `reduce_vars` (enabled by default) should suffice. + +
+ +#### Conditional compilation, API +You can also use conditional compilation via the programmatic API. With the difference that the +property name is `global_defs` and is a compressor property: + +```js +uglifyJS.minify([ "input.js"], { + compress: { + dead_code: true, + global_defs: { + DEBUG: false + } + } +}); +``` + +## Beautifier options + +The code generator tries to output shortest code possible by default. In +case you want beautified output, pass `--beautify` (`-b`). Optionally you +can pass additional arguments that control the code output: + +- `beautify` (default `true`) -- whether to actually beautify the output. + Passing `-b` will set this to true, but you might need to pass `-b` even + when you want to generate minified code, in order to specify additional + arguments, so you can use `-b beautify=false` to override it. +- `indent-level` (default 4) +- `indent-start` (default 0) -- prefix all lines by that many spaces +- `quote-keys` (default `false`) -- pass `true` to quote all keys in literal + objects +- `space-colon` (default `true`) -- insert a space after the colon signs +- `ascii-only` (default `false`) -- escape Unicode characters in strings and + regexps (affects directives with non-ascii characters becoming invalid) +- `inline-script` (default `false`) -- escape the slash in occurrences of + ` 0) { + print_error("WARN: Ignoring input files since --self was passed"); + } + files = UglifyJS.FILES; + if (!ARGS.wrap) ARGS.wrap = "UglifyJS"; +} + +var ORIG_MAP = ARGS.in_source_map; + +if (ORIG_MAP && ORIG_MAP != "inline") { + ORIG_MAP = JSON.parse(fs.readFileSync(ORIG_MAP)); + if (files.length == 0) { + print_error("INFO: Using file from the input source map: " + ORIG_MAP.file); + files = [ ORIG_MAP.file ]; + } +} + +if (files.length == 0) { + files = [ "-" ]; +} + +if (ORIG_MAP == "inline") { + if (files.length > 1) { + print_error("ERROR: Inline source map only works with singular input"); + process.exit(1); + } + if (ARGS.acorn || ARGS.spidermonkey) { + print_error("ERROR: Inline source map only works with built-in parser"); + process.exit(1); + } +} + +if (files.indexOf("-") >= 0 && ARGS.source_map) { + print_error("ERROR: Source map doesn't work with input from STDIN"); + process.exit(1); +} + +if (files.filter(function(el){ return el == "-" }).length > 1) { + print_error("ERROR: Can read a single file from STDIN (two or more dashes specified)"); + process.exit(1); +} + +var STATS = {}; +var TOPLEVEL = null; +var P_RELATIVE = ARGS.p && ARGS.p == "relative"; +var SOURCES_CONTENT = {}; +var index = 0; + +!function cb() { + if (index == files.length) return done(); + var file = files[index++]; + read_whole_file(file, function (err, code) { + if (err) { + print_error("ERROR: can't read file: " + file); + process.exit(1); + } + if (ORIG_MAP == "inline") { + ORIG_MAP = read_source_map(code); + } + if (ARGS.p != null) { + if (P_RELATIVE) { + file = path.relative(path.dirname(ARGS.source_map), file).replace(/\\/g, '/'); + } else { + var p = parseInt(ARGS.p, 10); + if (!isNaN(p)) { + file = file.replace(/^\/+/, "").split(/\/+/).slice(ARGS.p).join("/"); + } + } + } + SOURCES_CONTENT[file] = code; + time_it("parse", function(){ + if (ARGS.spidermonkey) { + var program = JSON.parse(code); + if (!TOPLEVEL) TOPLEVEL = program; + else TOPLEVEL.body = TOPLEVEL.body.concat(program.body); + } + else if (ARGS.acorn) { + TOPLEVEL = acorn.parse(code, { + locations : true, + sourceFile : file, + program : TOPLEVEL + }); + } + else { + try { + TOPLEVEL = UglifyJS.parse(code, { + filename : file, + toplevel : TOPLEVEL, + expression : ARGS.expr, + bare_returns : ARGS.bare_returns, + }); + } catch(ex) { + if (ex instanceof UglifyJS.JS_Parse_Error) { + print_error("Parse error at " + file + ":" + ex.line + "," + ex.col); + var col = ex.col; + var lines = code.split(/\r?\n/); + var line = lines[ex.line - 1]; + if (!line && !col) { + line = lines[ex.line - 2]; + col = line.length; + } + if (line) { + if (col > 40) { + line = line.slice(col - 40); + col = 40; + } + print_error(line.slice(0, 80)); + print_error(line.slice(0, col).replace(/\S/g, " ") + "^"); + } + print_error(ex.stack); + process.exit(1); + } + throw ex; + } + }; + }); + cb(); + }); +}(); + +function done() { + var OUTPUT_FILE = ARGS.o; + + var SOURCE_MAP = (ARGS.source_map || ARGS.source_map_inline) ? UglifyJS.SourceMap({ + file: P_RELATIVE ? path.relative(path.dirname(ARGS.source_map), OUTPUT_FILE) : OUTPUT_FILE, + root: ARGS.source_map_root || ORIG_MAP && ORIG_MAP.sourceRoot, + orig: ORIG_MAP, + }) : null; + + OUTPUT_OPTIONS.source_map = SOURCE_MAP; + + try { + var output = UglifyJS.OutputStream(OUTPUT_OPTIONS); + var compressor = COMPRESS && UglifyJS.Compressor(COMPRESS); + } catch(ex) { + if (ex instanceof UglifyJS.DefaultsError) { + print_error(ex.message); + print_error("Supported options:"); + print_error(sys.inspect(ex.defs)); + process.exit(1); + } + } + + if (ARGS.acorn || ARGS.spidermonkey) time_it("convert_ast", function(){ + TOPLEVEL = UglifyJS.AST_Node.from_mozilla_ast(TOPLEVEL); + }); + + if (ARGS.wrap != null) { + TOPLEVEL = TOPLEVEL.wrap_commonjs(ARGS.wrap, ARGS.export_all); + } + + if (ARGS.enclose != null) { + var arg_parameter_list = ARGS.enclose; + if (arg_parameter_list === true) { + arg_parameter_list = []; + } + else if (!(arg_parameter_list instanceof Array)) { + arg_parameter_list = [arg_parameter_list]; + } + TOPLEVEL = TOPLEVEL.wrap_enclose(arg_parameter_list); + } + + if (ARGS.mangle_props || ARGS.name_cache) (function(){ + var reserved = RESERVED ? RESERVED.props : null; + var cache = readNameCache("props"); + var regex; + + try { + regex = ARGS.mangle_regex ? extractRegex(ARGS.mangle_regex) : null; + } catch (e) { + print_error("ERROR: Invalid --mangle-regex: " + e.message); + process.exit(1); + } + + TOPLEVEL = UglifyJS.mangle_properties(TOPLEVEL, { + reserved : reserved, + cache : cache, + only_cache : !ARGS.mangle_props, + regex : regex, + ignore_quoted : ARGS.mangle_props == 2, + debug : typeof ARGS.mangle_props_debug === "undefined" ? false : ARGS.mangle_props_debug + }); + writeNameCache("props", cache); + })(); + + var SCOPE_IS_NEEDED = COMPRESS || MANGLE || ARGS.lint + var TL_CACHE = readNameCache("vars"); + if (MANGLE) MANGLE.cache = TL_CACHE; + + if (SCOPE_IS_NEEDED) { + time_it("scope", function(){ + TOPLEVEL.figure_out_scope(MANGLE || { screw_ie8: screw_ie8, cache: TL_CACHE }); + if (ARGS.lint) { + TOPLEVEL.scope_warnings(); + } + }); + } + + if (COMPRESS) { + time_it("squeeze", function(){ + TOPLEVEL = compressor.compress(TOPLEVEL); + }); + } + + if (SCOPE_IS_NEEDED) { + time_it("scope", function(){ + TOPLEVEL.figure_out_scope(MANGLE || { screw_ie8: screw_ie8, cache: TL_CACHE }); + if (MANGLE && !TL_CACHE) { + TOPLEVEL.compute_char_frequency(MANGLE); + } + }); + } + + if (MANGLE) time_it("mangle", function(){ + TOPLEVEL.mangle_names(MANGLE); + }); + + writeNameCache("vars", TL_CACHE); + + if (ARGS.source_map_include_sources) { + for (var file in SOURCES_CONTENT) { + if (SOURCES_CONTENT.hasOwnProperty(file)) { + SOURCE_MAP.get().setSourceContent(file, SOURCES_CONTENT[file]); + } + } + } + + if (ARGS.dump_spidermonkey_ast) { + print(JSON.stringify(TOPLEVEL.to_mozilla_ast(), null, 2)); + } else { + time_it("generate", function(){ + TOPLEVEL.print(output); + }); + + output = output.get(); + + if (SOURCE_MAP) { + if (ARGS.source_map_inline) { + var base64_string = new Buffer(SOURCE_MAP.toString()).toString('base64'); + output += "\n//# sourceMappingURL=data:application/json;charset=utf-8;base64," + base64_string; + } else { + fs.writeFileSync(ARGS.source_map, SOURCE_MAP, "utf8"); + var source_map_url = ARGS.source_map_url || ( + P_RELATIVE + ? path.relative(path.dirname(OUTPUT_FILE), ARGS.source_map) + : ARGS.source_map + ); + output += "\n//# sourceMappingURL=" + source_map_url; + } + } + + if (OUTPUT_FILE) { + fs.writeFileSync(OUTPUT_FILE, output, "utf8"); + } else { + print(output); + } + } + + if (ARGS.stats) { + print_error(UglifyJS.string_template("Timing information (compressed {count} files):", { + count: files.length + })); + for (var i in STATS) if (STATS.hasOwnProperty(i)) { + print_error(UglifyJS.string_template("- {name}: {time}s", { + name: i, + time: (STATS[i] / 1000).toFixed(3) + })); + } + } +} + +/* -----[ functions ]----- */ + +function normalize(o) { + for (var i in o) if (o.hasOwnProperty(i) && /-/.test(i)) { + o[i.replace(/-/g, "_")] = o[i]; + delete o[i]; + } +} + +function getOptions(flag, constants) { + var x = ARGS[flag]; + if (x == null || x === false) return null; + var ret = {}; + if (x !== "") { + if (Array.isArray(x)) x = x.map(function (v) { return "(" + v + ")"; }).join(", "); + + var ast; + try { + ast = UglifyJS.parse(x, { cli: true, expression: true }); + } catch(ex) { + if (ex instanceof UglifyJS.JS_Parse_Error) { + print_error("Error parsing arguments for flag `" + flag + "': " + x); + process.exit(1); + } + } + ast.walk(new UglifyJS.TreeWalker(function(node){ + if (node instanceof UglifyJS.AST_Seq) return; // descend + if (node instanceof UglifyJS.AST_Assign) { + var name = node.left.print_to_string().replace(/-/g, "_"); + var value = node.right; + if (constants) + value = new Function("return (" + value.print_to_string() + ")")(); + ret[name] = value; + return true; // no descend + } + if (node instanceof UglifyJS.AST_Symbol || node instanceof UglifyJS.AST_Binary) { + var name = node.print_to_string().replace(/-/g, "_"); + ret[name] = true; + return true; // no descend + } + print_error(node.TYPE) + print_error("Error parsing arguments for flag `" + flag + "': " + x); + process.exit(1); + })); + } + return ret; +} + +function read_whole_file(filename, cb) { + if (filename == "-") { + var chunks = []; + process.stdin.setEncoding('utf-8'); + process.stdin.on('data', function (chunk) { + chunks.push(chunk); + }).on('end', function () { + cb(null, chunks.join("")); + }); + process.openStdin(); + } else { + fs.readFile(filename, "utf-8", cb); + } +} + +function read_source_map(code) { + var match = /\n\/\/# sourceMappingURL=data:application\/json(;.*?)?;base64,(.*)/.exec(code); + if (!match) { + print_error("WARN: inline source map not found"); + return null; + } + return JSON.parse(new Buffer(match[2], "base64")); +} + +function time_it(name, cont) { + var t1 = new Date().getTime(); + var ret = cont(); + if (ARGS.stats) { + var spent = new Date().getTime() - t1; + if (STATS[name]) STATS[name] += spent; + else STATS[name] = spent; + } + return ret; +} + +function print_error(msg) { + console.error("%s", msg); +} + +function print(txt) { + console.log("%s", txt); +} diff --git a/node_modules/uglify-js/lib/ast.js b/node_modules/uglify-js/lib/ast.js new file mode 100644 index 0000000000000..028772f3fb0e4 --- /dev/null +++ b/node_modules/uglify-js/lib/ast.js @@ -0,0 +1,1052 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +function DEFNODE(type, props, methods, base) { + if (arguments.length < 4) base = AST_Node; + if (!props) props = []; + else props = props.split(/\s+/); + var self_props = props; + if (base && base.PROPS) + props = props.concat(base.PROPS); + var code = "return function AST_" + type + "(props){ if (props) { "; + for (var i = props.length; --i >= 0;) { + code += "this." + props[i] + " = props." + props[i] + ";"; + } + var proto = base && new base; + if (proto && proto.initialize || (methods && methods.initialize)) + code += "this.initialize();"; + code += "}}"; + var ctor = new Function(code)(); + if (proto) { + ctor.prototype = proto; + ctor.BASE = base; + } + if (base) base.SUBCLASSES.push(ctor); + ctor.prototype.CTOR = ctor; + ctor.PROPS = props || null; + ctor.SELF_PROPS = self_props; + ctor.SUBCLASSES = []; + if (type) { + ctor.prototype.TYPE = ctor.TYPE = type; + } + if (methods) for (i in methods) if (HOP(methods, i)) { + if (/^\$/.test(i)) { + ctor[i.substr(1)] = methods[i]; + } else { + ctor.prototype[i] = methods[i]; + } + } + ctor.DEFMETHOD = function(name, method) { + this.prototype[name] = method; + }; + if (typeof exports !== "undefined") { + exports["AST_" + type] = ctor; + } + return ctor; +}; + +var AST_Token = DEFNODE("Token", "type value line col pos endline endcol endpos nlb comments_before file raw", { +}, null); + +var AST_Node = DEFNODE("Node", "start end", { + _clone: function(deep) { + if (deep) { + var self = this.clone(); + return self.transform(new TreeTransformer(function(node) { + if (node !== self) { + return node.clone(true); + } + })); + } + return new this.CTOR(this); + }, + clone: function(deep) { + return this._clone(deep); + }, + $documentation: "Base class of all AST nodes", + $propdoc: { + start: "[AST_Token] The first token of this node", + end: "[AST_Token] The last token of this node" + }, + _walk: function(visitor) { + return visitor._visit(this); + }, + walk: function(visitor) { + return this._walk(visitor); // not sure the indirection will be any help + } +}, null); + +AST_Node.warn_function = null; +AST_Node.warn = function(txt, props) { + if (AST_Node.warn_function) + AST_Node.warn_function(string_template(txt, props)); +}; + +/* -----[ statements ]----- */ + +var AST_Statement = DEFNODE("Statement", null, { + $documentation: "Base class of all statements", +}); + +var AST_Debugger = DEFNODE("Debugger", null, { + $documentation: "Represents a debugger statement", +}, AST_Statement); + +var AST_Directive = DEFNODE("Directive", "value scope quote", { + $documentation: "Represents a directive, like \"use strict\";", + $propdoc: { + value: "[string] The value of this directive as a plain string (it's not an AST_String!)", + scope: "[AST_Scope/S] The scope that this directive affects", + quote: "[string] the original quote character" + }, +}, AST_Statement); + +var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", { + $documentation: "A statement consisting of an expression, i.e. a = 1 + 2", + $propdoc: { + body: "[AST_Node] an expression node (should not be instanceof AST_Statement)" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + }); + } +}, AST_Statement); + +function walk_body(node, visitor) { + var body = node.body; + if (body instanceof AST_Statement) { + body._walk(visitor); + } + else for (var i = 0, len = body.length; i < len; i++) { + body[i]._walk(visitor); + } +}; + +var AST_Block = DEFNODE("Block", "body", { + $documentation: "A body of statements (usually bracketed)", + $propdoc: { + body: "[AST_Statement*] an array of statements" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + walk_body(this, visitor); + }); + } +}, AST_Statement); + +var AST_BlockStatement = DEFNODE("BlockStatement", null, { + $documentation: "A block statement", +}, AST_Block); + +var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { + $documentation: "The empty statement (empty block or simply a semicolon)", + _walk: function(visitor) { + return visitor._visit(this); + } +}, AST_Statement); + +var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { + $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", + $propdoc: { + body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + }); + } +}, AST_Statement); + +var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { + $documentation: "Statement with a label", + $propdoc: { + label: "[AST_Label] a label definition" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.label._walk(visitor); + this.body._walk(visitor); + }); + }, + clone: function(deep) { + var node = this._clone(deep); + if (deep) { + var label = node.label; + var def = this.label; + node.walk(new TreeWalker(function(node) { + if (node instanceof AST_LoopControl + && node.label && node.label.thedef === def) { + node.label.thedef = label; + label.references.push(node); + } + })); + } + return node; + } +}, AST_StatementWithBody); + +var AST_IterationStatement = DEFNODE("IterationStatement", null, { + $documentation: "Internal class. All loops inherit from it." +}, AST_StatementWithBody); + +var AST_DWLoop = DEFNODE("DWLoop", "condition", { + $documentation: "Base class for do/while statements", + $propdoc: { + condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" + } +}, AST_IterationStatement); + +var AST_Do = DEFNODE("Do", null, { + $documentation: "A `do` statement", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + this.condition._walk(visitor); + }); + } +}, AST_DWLoop); + +var AST_While = DEFNODE("While", null, { + $documentation: "A `while` statement", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_DWLoop); + +var AST_For = DEFNODE("For", "init condition step", { + $documentation: "A `for` statement", + $propdoc: { + init: "[AST_Node?] the `for` initialization code, or null if empty", + condition: "[AST_Node?] the `for` termination clause, or null if empty", + step: "[AST_Node?] the `for` update clause, or null if empty" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + if (this.init) this.init._walk(visitor); + if (this.condition) this.condition._walk(visitor); + if (this.step) this.step._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_IterationStatement); + +var AST_ForIn = DEFNODE("ForIn", "init name object", { + $documentation: "A `for ... in` statement", + $propdoc: { + init: "[AST_Node] the `for/in` initialization code", + name: "[AST_SymbolRef?] the loop variable, only if `init` is AST_Var", + object: "[AST_Node] the object that we're looping through" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.init._walk(visitor); + this.object._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_IterationStatement); + +var AST_With = DEFNODE("With", "expression", { + $documentation: "A `with` statement", + $propdoc: { + expression: "[AST_Node] the `with` expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +/* -----[ scope and functions ]----- */ + +var AST_Scope = DEFNODE("Scope", "directives variables functions uses_with uses_eval parent_scope enclosed cname", { + $documentation: "Base class for all statements introducing a lexical scope", + $propdoc: { + directives: "[string*/S] an array of directives declared in this scope", + variables: "[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope", + functions: "[Object/S] like `variables`, but only lists function declarations", + uses_with: "[boolean/S] tells whether this scope uses the `with` statement", + uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`", + parent_scope: "[AST_Scope?/S] link to the parent scope", + enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes", + cname: "[integer/S] current index for mangling variables (used internally by the mangler)", + }, +}, AST_Block); + +var AST_Toplevel = DEFNODE("Toplevel", "globals", { + $documentation: "The toplevel scope", + $propdoc: { + globals: "[Object/S] a map of name -> SymbolDef for all undeclared names", + }, + wrap_enclose: function(arg_parameter_pairs) { + var self = this; + var args = []; + var parameters = []; + + arg_parameter_pairs.forEach(function(pair) { + var splitAt = pair.lastIndexOf(":"); + + args.push(pair.substr(0, splitAt)); + parameters.push(pair.substr(splitAt + 1)); + }); + + var wrapped_tl = "(function(" + parameters.join(",") + "){ '$ORIG'; })(" + args.join(",") + ")"; + wrapped_tl = parse(wrapped_tl); + wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node){ + if (node instanceof AST_Directive && node.value == "$ORIG") { + return MAP.splice(self.body); + } + })); + return wrapped_tl; + }, + wrap_commonjs: function(name, export_all) { + var self = this; + var to_export = []; + if (export_all) { + self.figure_out_scope(); + self.walk(new TreeWalker(function(node){ + if (node instanceof AST_SymbolDeclaration && node.definition().global) { + if (!find_if(function(n){ return n.name == node.name }, to_export)) + to_export.push(node); + } + })); + } + var wrapped_tl = "(function(exports, global){ '$ORIG'; '$EXPORTS'; global['" + name + "'] = exports; }({}, (function(){return this}())))"; + wrapped_tl = parse(wrapped_tl); + wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node){ + if (node instanceof AST_Directive) { + switch (node.value) { + case "$ORIG": + return MAP.splice(self.body); + case "$EXPORTS": + var body = []; + to_export.forEach(function(sym){ + body.push(new AST_SimpleStatement({ + body: new AST_Assign({ + left: new AST_Sub({ + expression: new AST_SymbolRef({ name: "exports" }), + property: new AST_String({ value: sym.name }), + }), + operator: "=", + right: new AST_SymbolRef(sym), + }), + })); + }); + return MAP.splice(body); + } + } + })); + return wrapped_tl; + } +}, AST_Scope); + +var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments", { + $documentation: "Base class for functions", + $propdoc: { + name: "[AST_SymbolDeclaration?] the name of this function", + argnames: "[AST_SymbolFunarg*] array of function arguments", + uses_arguments: "[boolean/S] tells whether this function accesses the arguments array" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + if (this.name) this.name._walk(visitor); + var argnames = this.argnames; + for (var i = 0, len = argnames.length; i < len; i++) { + argnames[i]._walk(visitor); + } + walk_body(this, visitor); + }); + } +}, AST_Scope); + +var AST_Accessor = DEFNODE("Accessor", null, { + $documentation: "A setter/getter function. The `name` property is always null." +}, AST_Lambda); + +var AST_Function = DEFNODE("Function", null, { + $documentation: "A function expression" +}, AST_Lambda); + +var AST_Defun = DEFNODE("Defun", null, { + $documentation: "A function definition" +}, AST_Lambda); + +/* -----[ JUMPS ]----- */ + +var AST_Jump = DEFNODE("Jump", null, { + $documentation: "Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)" +}, AST_Statement); + +var AST_Exit = DEFNODE("Exit", "value", { + $documentation: "Base class for “exits” (`return` and `throw`)", + $propdoc: { + value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return" + }, + _walk: function(visitor) { + return visitor._visit(this, this.value && function(){ + this.value._walk(visitor); + }); + } +}, AST_Jump); + +var AST_Return = DEFNODE("Return", null, { + $documentation: "A `return` statement" +}, AST_Exit); + +var AST_Throw = DEFNODE("Throw", null, { + $documentation: "A `throw` statement" +}, AST_Exit); + +var AST_LoopControl = DEFNODE("LoopControl", "label", { + $documentation: "Base class for loop control statements (`break` and `continue`)", + $propdoc: { + label: "[AST_LabelRef?] the label, or null if none", + }, + _walk: function(visitor) { + return visitor._visit(this, this.label && function(){ + this.label._walk(visitor); + }); + } +}, AST_Jump); + +var AST_Break = DEFNODE("Break", null, { + $documentation: "A `break` statement" +}, AST_LoopControl); + +var AST_Continue = DEFNODE("Continue", null, { + $documentation: "A `continue` statement" +}, AST_LoopControl); + +/* -----[ IF ]----- */ + +var AST_If = DEFNODE("If", "condition alternative", { + $documentation: "A `if` statement", + $propdoc: { + condition: "[AST_Node] the `if` condition", + alternative: "[AST_Statement?] the `else` part, or null if not present" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + if (this.alternative) this.alternative._walk(visitor); + }); + } +}, AST_StatementWithBody); + +/* -----[ SWITCH ]----- */ + +var AST_Switch = DEFNODE("Switch", "expression", { + $documentation: "A `switch` statement", + $propdoc: { + expression: "[AST_Node] the `switch` “discriminant”" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_Block); + +var AST_SwitchBranch = DEFNODE("SwitchBranch", null, { + $documentation: "Base class for `switch` branches", +}, AST_Block); + +var AST_Default = DEFNODE("Default", null, { + $documentation: "A `default` switch branch", +}, AST_SwitchBranch); + +var AST_Case = DEFNODE("Case", "expression", { + $documentation: "A `case` switch branch", + $propdoc: { + expression: "[AST_Node] the `case` expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_SwitchBranch); + +/* -----[ EXCEPTIONS ]----- */ + +var AST_Try = DEFNODE("Try", "bcatch bfinally", { + $documentation: "A `try` statement", + $propdoc: { + bcatch: "[AST_Catch?] the catch block, or null if not present", + bfinally: "[AST_Finally?] the finally block, or null if not present" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + walk_body(this, visitor); + if (this.bcatch) this.bcatch._walk(visitor); + if (this.bfinally) this.bfinally._walk(visitor); + }); + } +}, AST_Block); + +var AST_Catch = DEFNODE("Catch", "argname", { + $documentation: "A `catch` node; only makes sense as part of a `try` statement", + $propdoc: { + argname: "[AST_SymbolCatch] symbol for the exception" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.argname._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_Block); + +var AST_Finally = DEFNODE("Finally", null, { + $documentation: "A `finally` node; only makes sense as part of a `try` statement" +}, AST_Block); + +/* -----[ VAR/CONST ]----- */ + +var AST_Definitions = DEFNODE("Definitions", "definitions", { + $documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)", + $propdoc: { + definitions: "[AST_VarDef*] array of variable definitions" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + var definitions = this.definitions; + for (var i = 0, len = definitions.length; i < len; i++) { + definitions[i]._walk(visitor); + } + }); + } +}, AST_Statement); + +var AST_Var = DEFNODE("Var", null, { + $documentation: "A `var` statement" +}, AST_Definitions); + +var AST_Const = DEFNODE("Const", null, { + $documentation: "A `const` statement" +}, AST_Definitions); + +var AST_VarDef = DEFNODE("VarDef", "name value", { + $documentation: "A variable declaration; only appears in a AST_Definitions node", + $propdoc: { + name: "[AST_SymbolVar|AST_SymbolConst] name of the variable", + value: "[AST_Node?] initializer, or null of there's no initializer" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.name._walk(visitor); + if (this.value) this.value._walk(visitor); + }); + } +}); + +/* -----[ OTHER ]----- */ + +var AST_Call = DEFNODE("Call", "expression args", { + $documentation: "A function call expression", + $propdoc: { + expression: "[AST_Node] expression to invoke as function", + args: "[AST_Node*] array of arguments" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + var args = this.args; + for (var i = 0, len = args.length; i < len; i++) { + args[i]._walk(visitor); + } + }); + } +}); + +var AST_New = DEFNODE("New", null, { + $documentation: "An object instantiation. Derives from a function call since it has exactly the same properties" +}, AST_Call); + +var AST_Seq = DEFNODE("Seq", "car cdr", { + $documentation: "A sequence expression (two comma-separated expressions)", + $propdoc: { + car: "[AST_Node] first element in sequence", + cdr: "[AST_Node] second element in sequence" + }, + $cons: function(x, y) { + var seq = new AST_Seq(x); + seq.car = x; + seq.cdr = y; + return seq; + }, + $from_array: function(array) { + if (array.length == 0) return null; + if (array.length == 1) return array[0].clone(); + var list = null; + for (var i = array.length; --i >= 0;) { + list = AST_Seq.cons(array[i], list); + } + var p = list; + while (p) { + if (p.cdr && !p.cdr.cdr) { + p.cdr = p.cdr.car; + break; + } + p = p.cdr; + } + return list; + }, + to_array: function() { + var p = this, a = []; + while (p) { + a.push(p.car); + if (p.cdr && !(p.cdr instanceof AST_Seq)) { + a.push(p.cdr); + break; + } + p = p.cdr; + } + return a; + }, + add: function(node) { + var p = this; + while (p) { + if (!(p.cdr instanceof AST_Seq)) { + var cell = AST_Seq.cons(p.cdr, node); + return p.cdr = cell; + } + p = p.cdr; + } + }, + len: function() { + if (this.cdr instanceof AST_Seq) { + return this.cdr.len() + 1; + } else { + return 2; + } + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.car._walk(visitor); + if (this.cdr) this.cdr._walk(visitor); + }); + } +}); + +var AST_PropAccess = DEFNODE("PropAccess", "expression property", { + $documentation: "Base class for property access expressions, i.e. `a.foo` or `a[\"foo\"]`", + $propdoc: { + expression: "[AST_Node] the “container” expression", + property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node" + } +}); + +var AST_Dot = DEFNODE("Dot", null, { + $documentation: "A dotted property access expression", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + }); + } +}, AST_PropAccess); + +var AST_Sub = DEFNODE("Sub", null, { + $documentation: "Index-style property access, i.e. `a[\"foo\"]`", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.property._walk(visitor); + }); + } +}, AST_PropAccess); + +var AST_Unary = DEFNODE("Unary", "operator expression", { + $documentation: "Base class for unary expressions", + $propdoc: { + operator: "[string] the operator", + expression: "[AST_Node] expression that this unary operator applies to" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + }); + } +}); + +var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, { + $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`" +}, AST_Unary); + +var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, { + $documentation: "Unary postfix expression, i.e. `i++`" +}, AST_Unary); + +var AST_Binary = DEFNODE("Binary", "left operator right", { + $documentation: "Binary expression, i.e. `a + b`", + $propdoc: { + left: "[AST_Node] left-hand side expression", + operator: "[string] the operator", + right: "[AST_Node] right-hand side expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.left._walk(visitor); + this.right._walk(visitor); + }); + } +}); + +var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", { + $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`", + $propdoc: { + condition: "[AST_Node]", + consequent: "[AST_Node]", + alternative: "[AST_Node]" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.consequent._walk(visitor); + this.alternative._walk(visitor); + }); + } +}); + +var AST_Assign = DEFNODE("Assign", null, { + $documentation: "An assignment expression — `a = b + 5`", +}, AST_Binary); + +/* -----[ LITERALS ]----- */ + +var AST_Array = DEFNODE("Array", "elements", { + $documentation: "An array literal", + $propdoc: { + elements: "[AST_Node*] array of elements" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + var elements = this.elements; + for (var i = 0, len = elements.length; i < len; i++) { + elements[i]._walk(visitor); + } + }); + } +}); + +var AST_Object = DEFNODE("Object", "properties", { + $documentation: "An object literal", + $propdoc: { + properties: "[AST_ObjectProperty*] array of properties" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + var properties = this.properties; + for (var i = 0, len = properties.length; i < len; i++) { + properties[i]._walk(visitor); + } + }); + } +}); + +var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", { + $documentation: "Base class for literal object properties", + $propdoc: { + key: "[string] the property name converted to a string for ObjectKeyVal. For setters and getters this is an AST_SymbolAccessor.", + value: "[AST_Node] property value. For setters and getters this is an AST_Accessor." + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.value._walk(visitor); + }); + } +}); + +var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", "quote", { + $documentation: "A key: value object property", + $propdoc: { + quote: "[string] the original quote character" + } +}, AST_ObjectProperty); + +var AST_ObjectSetter = DEFNODE("ObjectSetter", null, { + $documentation: "An object setter property", +}, AST_ObjectProperty); + +var AST_ObjectGetter = DEFNODE("ObjectGetter", null, { + $documentation: "An object getter property", +}, AST_ObjectProperty); + +var AST_Symbol = DEFNODE("Symbol", "scope name thedef", { + $propdoc: { + name: "[string] name of this symbol", + scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)", + thedef: "[SymbolDef/S] the definition of this symbol" + }, + $documentation: "Base class for all symbols", +}); + +var AST_SymbolAccessor = DEFNODE("SymbolAccessor", null, { + $documentation: "The name of a property accessor (setter/getter function)" +}, AST_Symbol); + +var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", { + $documentation: "A declaration symbol (symbol in var/const, function name or argument, symbol in catch)", +}, AST_Symbol); + +var AST_SymbolVar = DEFNODE("SymbolVar", null, { + $documentation: "Symbol defining a variable", +}, AST_SymbolDeclaration); + +var AST_SymbolConst = DEFNODE("SymbolConst", null, { + $documentation: "A constant declaration" +}, AST_SymbolDeclaration); + +var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, { + $documentation: "Symbol naming a function argument", +}, AST_SymbolVar); + +var AST_SymbolDefun = DEFNODE("SymbolDefun", null, { + $documentation: "Symbol defining a function", +}, AST_SymbolDeclaration); + +var AST_SymbolLambda = DEFNODE("SymbolLambda", null, { + $documentation: "Symbol naming a function expression", +}, AST_SymbolDeclaration); + +var AST_SymbolCatch = DEFNODE("SymbolCatch", null, { + $documentation: "Symbol naming the exception in catch", +}, AST_SymbolDeclaration); + +var AST_Label = DEFNODE("Label", "references", { + $documentation: "Symbol naming a label (declaration)", + $propdoc: { + references: "[AST_LoopControl*] a list of nodes referring to this label" + }, + initialize: function() { + this.references = []; + this.thedef = this; + } +}, AST_Symbol); + +var AST_SymbolRef = DEFNODE("SymbolRef", null, { + $documentation: "Reference to some symbol (not definition/declaration)", +}, AST_Symbol); + +var AST_LabelRef = DEFNODE("LabelRef", null, { + $documentation: "Reference to a label symbol", +}, AST_Symbol); + +var AST_This = DEFNODE("This", null, { + $documentation: "The `this` symbol", +}, AST_Symbol); + +var AST_Constant = DEFNODE("Constant", null, { + $documentation: "Base class for all constants", + getValue: function() { + return this.value; + } +}); + +var AST_String = DEFNODE("String", "value quote", { + $documentation: "A string literal", + $propdoc: { + value: "[string] the contents of this string", + quote: "[string] the original quote character" + } +}, AST_Constant); + +var AST_Number = DEFNODE("Number", "value literal", { + $documentation: "A number literal", + $propdoc: { + value: "[number] the numeric value", + literal: "[string] numeric value as string (optional)" + } +}, AST_Constant); + +var AST_RegExp = DEFNODE("RegExp", "value", { + $documentation: "A regexp literal", + $propdoc: { + value: "[RegExp] the actual regexp" + } +}, AST_Constant); + +var AST_Atom = DEFNODE("Atom", null, { + $documentation: "Base class for atoms", +}, AST_Constant); + +var AST_Null = DEFNODE("Null", null, { + $documentation: "The `null` atom", + value: null +}, AST_Atom); + +var AST_NaN = DEFNODE("NaN", null, { + $documentation: "The impossible value", + value: 0/0 +}, AST_Atom); + +var AST_Undefined = DEFNODE("Undefined", null, { + $documentation: "The `undefined` value", + value: (function(){}()) +}, AST_Atom); + +var AST_Hole = DEFNODE("Hole", null, { + $documentation: "A hole in an array", + value: (function(){}()) +}, AST_Atom); + +var AST_Infinity = DEFNODE("Infinity", null, { + $documentation: "The `Infinity` value", + value: 1/0 +}, AST_Atom); + +var AST_Boolean = DEFNODE("Boolean", null, { + $documentation: "Base class for booleans", +}, AST_Atom); + +var AST_False = DEFNODE("False", null, { + $documentation: "The `false` atom", + value: false +}, AST_Boolean); + +var AST_True = DEFNODE("True", null, { + $documentation: "The `true` atom", + value: true +}, AST_Boolean); + +/* -----[ TreeWalker ]----- */ + +function TreeWalker(callback) { + this.visit = callback; + this.stack = []; + this.directives = Object.create(null); +}; +TreeWalker.prototype = { + _visit: function(node, descend) { + this.push(node); + var ret = this.visit(node, descend ? function(){ + descend.call(node); + } : noop); + if (!ret && descend) { + descend.call(node); + } + this.pop(node); + return ret; + }, + parent: function(n) { + return this.stack[this.stack.length - 2 - (n || 0)]; + }, + push: function (node) { + if (node instanceof AST_Lambda) { + this.directives = Object.create(this.directives); + } else if (node instanceof AST_Directive && !this.directives[node.value]) { + this.directives[node.value] = node; + } + this.stack.push(node); + }, + pop: function(node) { + this.stack.pop(); + if (node instanceof AST_Lambda) { + this.directives = Object.getPrototypeOf(this.directives); + } + }, + self: function() { + return this.stack[this.stack.length - 1]; + }, + find_parent: function(type) { + var stack = this.stack; + for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof type) return x; + } + }, + has_directive: function(type) { + var dir = this.directives[type]; + if (dir) return dir; + var node = this.stack[this.stack.length - 1]; + if (node instanceof AST_Scope) { + for (var i = 0; i < node.body.length; ++i) { + var st = node.body[i]; + if (!(st instanceof AST_Directive)) break; + if (st.value == type) return st; + } + } + }, + in_boolean_context: function() { + var stack = this.stack; + var i = stack.length, self = stack[--i]; + while (i > 0) { + var p = stack[--i]; + if ((p instanceof AST_If && p.condition === self) || + (p instanceof AST_Conditional && p.condition === self) || + (p instanceof AST_DWLoop && p.condition === self) || + (p instanceof AST_For && p.condition === self) || + (p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self)) + { + return true; + } + if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) + return false; + self = p; + } + }, + loopcontrol_target: function(node) { + var stack = this.stack; + if (node.label) for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof AST_LabeledStatement && x.label.name == node.label.name) + return x.body; + } else for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof AST_IterationStatement + || node instanceof AST_Break && x instanceof AST_Switch) + return x; + } + } +}; diff --git a/node_modules/uglify-js/lib/compress.js b/node_modules/uglify-js/lib/compress.js new file mode 100644 index 0000000000000..d8a491ebc8ed4 --- /dev/null +++ b/node_modules/uglify-js/lib/compress.js @@ -0,0 +1,4101 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +function Compressor(options, false_by_default) { + if (!(this instanceof Compressor)) + return new Compressor(options, false_by_default); + TreeTransformer.call(this, this.before, this.after); + this.options = defaults(options, { + angular : false, + booleans : !false_by_default, + cascade : !false_by_default, + collapse_vars : !false_by_default, + comparisons : !false_by_default, + conditionals : !false_by_default, + dead_code : !false_by_default, + drop_console : false, + drop_debugger : !false_by_default, + evaluate : !false_by_default, + expression : false, + global_defs : {}, + hoist_funs : !false_by_default, + hoist_vars : false, + if_return : !false_by_default, + join_vars : !false_by_default, + keep_fargs : true, + keep_fnames : false, + keep_infinity : false, + loops : !false_by_default, + negate_iife : !false_by_default, + passes : 1, + properties : !false_by_default, + pure_getters : !false_by_default && "strict", + pure_funcs : null, + reduce_vars : !false_by_default, + screw_ie8 : true, + sequences : !false_by_default, + side_effects : !false_by_default, + switches : !false_by_default, + top_retain : null, + toplevel : !!(options && options["top_retain"]), + unsafe : false, + unsafe_comps : false, + unsafe_math : false, + unsafe_proto : false, + unsafe_regexp : false, + unused : !false_by_default, + warnings : true, + }, true); + var pure_funcs = this.options["pure_funcs"]; + if (typeof pure_funcs == "function") { + this.pure_funcs = pure_funcs; + } else { + this.pure_funcs = pure_funcs ? function(node) { + return pure_funcs.indexOf(node.expression.print_to_string()) < 0; + } : return_true; + } + var top_retain = this.options["top_retain"]; + if (top_retain instanceof RegExp) { + this.top_retain = function(def) { + return top_retain.test(def.name); + }; + } else if (typeof top_retain == "function") { + this.top_retain = top_retain; + } else if (top_retain) { + if (typeof top_retain == "string") { + top_retain = top_retain.split(/,/); + } + this.top_retain = function(def) { + return top_retain.indexOf(def.name) >= 0; + }; + } + var sequences = this.options["sequences"]; + this.sequences_limit = sequences == 1 ? 200 : sequences | 0; + this.warnings_produced = {}; +}; + +Compressor.prototype = new TreeTransformer; +merge(Compressor.prototype, { + option: function(key) { return this.options[key] }, + compress: function(node) { + if (this.option("expression")) { + node = node.process_expression(true); + } + var passes = +this.options.passes || 1; + for (var pass = 0; pass < passes && pass < 3; ++pass) { + if (pass > 0 || this.option("reduce_vars")) + node.reset_opt_flags(this, true); + node = node.transform(this); + } + if (this.option("expression")) { + node = node.process_expression(false); + } + return node; + }, + info: function() { + if (this.options.warnings == "verbose") { + AST_Node.warn.apply(AST_Node, arguments); + } + }, + warn: function(text, props) { + if (this.options.warnings) { + // only emit unique warnings + var message = string_template(text, props); + if (!(message in this.warnings_produced)) { + this.warnings_produced[message] = true; + AST_Node.warn.apply(AST_Node, arguments); + } + } + }, + clear_warnings: function() { + this.warnings_produced = {}; + }, + before: function(node, descend, in_list) { + if (node._squeezed) return node; + var was_scope = false; + if (node instanceof AST_Scope) { + node = node.hoist_declarations(this); + was_scope = true; + } + // Before https://github.com/mishoo/UglifyJS2/pull/1602 AST_Node.optimize() + // would call AST_Node.transform() if a different instance of AST_Node is + // produced after OPT(). + // This corrupts TreeWalker.stack, which cause AST look-ups to malfunction. + // Migrate and defer all children's AST_Node.transform() to below, which + // will now happen after this parent AST_Node has been properly substituted + // thus gives a consistent AST snapshot. + descend(node, this); + // Existing code relies on how AST_Node.optimize() worked, and omitting the + // following replacement call would result in degraded efficiency of both + // output and performance. + descend(node, this); + var opt = node.optimize(this); + if (was_scope && opt instanceof AST_Scope) { + opt.drop_unused(this); + descend(opt, this); + } + if (opt === node) opt._squeezed = true; + return opt; + } +}); + +(function(){ + + function OPT(node, optimizer) { + node.DEFMETHOD("optimize", function(compressor){ + var self = this; + if (self._optimized) return self; + if (compressor.has_directive("use asm")) return self; + var opt = optimizer(self, compressor); + opt._optimized = true; + return opt; + }); + }; + + OPT(AST_Node, function(self, compressor){ + return self; + }); + + AST_Node.DEFMETHOD("equivalent_to", function(node){ + return this.TYPE == node.TYPE && this.print_to_string() == node.print_to_string(); + }); + + AST_Node.DEFMETHOD("process_expression", function(insert, compressor) { + var self = this; + var tt = new TreeTransformer(function(node) { + if (insert && node instanceof AST_SimpleStatement) { + return make_node(AST_Return, node, { + value: node.body + }); + } + if (!insert && node instanceof AST_Return) { + if (compressor) { + var value = node.value && node.value.drop_side_effect_free(compressor, true); + return value ? make_node(AST_SimpleStatement, node, { + body: value + }) : make_node(AST_EmptyStatement, node); + } + return make_node(AST_SimpleStatement, node, { + body: node.value || make_node(AST_UnaryPrefix, node, { + operator: "void", + expression: make_node(AST_Number, node, { + value: 0 + }) + }) + }); + } + if (node instanceof AST_Lambda && node !== self) { + return node; + } + if (node instanceof AST_Block) { + var index = node.body.length - 1; + if (index >= 0) { + node.body[index] = node.body[index].transform(tt); + } + } + if (node instanceof AST_If) { + node.body = node.body.transform(tt); + if (node.alternative) { + node.alternative = node.alternative.transform(tt); + } + } + if (node instanceof AST_With) { + node.body = node.body.transform(tt); + } + return node; + }); + return self.transform(tt); + }); + + AST_Node.DEFMETHOD("reset_opt_flags", function(compressor, rescan){ + var reduce_vars = rescan && compressor.option("reduce_vars"); + var toplevel = compressor.option("toplevel"); + var safe_ids = Object.create(null); + var suppressor = new TreeWalker(function(node) { + if (node instanceof AST_Symbol) { + var d = node.definition(); + if (node instanceof AST_SymbolRef) d.references.push(node); + d.fixed = false; + } + }); + var tw = new TreeWalker(function(node, descend){ + node._squeezed = false; + node._optimized = false; + if (reduce_vars) { + if (node instanceof AST_Toplevel) node.globals.each(reset_def); + if (node instanceof AST_Scope) node.variables.each(reset_def); + if (node instanceof AST_SymbolRef) { + var d = node.definition(); + d.references.push(node); + if (d.fixed === undefined || !is_safe(d) + || is_modified(node, 0, node.fixed_value() instanceof AST_Lambda)) { + d.fixed = false; + } else { + var parent = tw.parent(); + if (parent instanceof AST_Assign && parent.operator == "=" && node === parent.right + || parent instanceof AST_Call && node !== parent.expression + || parent instanceof AST_Return && node === parent.value && node.scope !== d.scope + || parent instanceof AST_VarDef && node === parent.value) { + d.escaped = true; + } + } + } + if (node instanceof AST_SymbolCatch) { + node.definition().fixed = false; + } + if (node instanceof AST_VarDef) { + var d = node.name.definition(); + if (d.fixed == null) { + if (node.value) { + d.fixed = function() { + return node.value; + }; + mark(d, false); + descend(); + } else { + d.fixed = null; + } + mark(d, true); + return true; + } else if (node.value) { + d.fixed = false; + } + } + if (node instanceof AST_Defun) { + var d = node.name.definition(); + if (!toplevel && d.global || is_safe(d)) { + d.fixed = false; + } else { + d.fixed = node; + mark(d, true); + } + var save_ids = safe_ids; + safe_ids = Object.create(null); + descend(); + safe_ids = save_ids; + return true; + } + if (node instanceof AST_Function) { + push(); + var iife; + if (!node.name + && (iife = tw.parent()) instanceof AST_Call + && iife.expression === node) { + // Virtually turn IIFE parameters into variable definitions: + // (function(a,b) {...})(c,d) => (function() {var a=c,b=d; ...})() + // So existing transformation rules can work on them. + node.argnames.forEach(function(arg, i) { + var d = arg.definition(); + if (!node.uses_arguments && d.fixed === undefined) { + d.fixed = function() { + return iife.args[i] || make_node(AST_Undefined, iife); + }; + mark(d, true); + } else { + d.fixed = false; + } + }); + } + descend(); + pop(); + return true; + } + if (node instanceof AST_Accessor) { + var save_ids = safe_ids; + safe_ids = Object.create(null); + descend(); + safe_ids = save_ids; + return true; + } + if (node instanceof AST_Binary + && (node.operator == "&&" || node.operator == "||")) { + node.left.walk(tw); + push(); + node.right.walk(tw); + pop(); + return true; + } + if (node instanceof AST_Conditional) { + node.condition.walk(tw); + push(); + node.consequent.walk(tw); + pop(); + push(); + node.alternative.walk(tw); + pop(); + return true; + } + if (node instanceof AST_If || node instanceof AST_DWLoop) { + node.condition.walk(tw); + push(); + node.body.walk(tw); + pop(); + if (node.alternative) { + push(); + node.alternative.walk(tw); + pop(); + } + return true; + } + if (node instanceof AST_LabeledStatement) { + push(); + node.body.walk(tw); + pop(); + return true; + } + if (node instanceof AST_For) { + if (node.init) node.init.walk(tw); + push(); + if (node.condition) node.condition.walk(tw); + node.body.walk(tw); + if (node.step) node.step.walk(tw); + pop(); + return true; + } + if (node instanceof AST_ForIn) { + node.init.walk(suppressor); + node.object.walk(tw); + push(); + node.body.walk(tw); + pop(); + return true; + } + if (node instanceof AST_Try) { + push(); + walk_body(node, tw); + pop(); + if (node.bcatch) { + push(); + node.bcatch.walk(tw); + pop(); + } + if (node.bfinally) node.bfinally.walk(tw); + return true; + } + if (node instanceof AST_SwitchBranch) { + push(); + descend(); + pop(); + return true; + } + } + }); + this.walk(tw); + + function mark(def, safe) { + safe_ids[def.id] = safe; + } + + function is_safe(def) { + if (safe_ids[def.id]) { + if (def.fixed == null) { + var orig = def.orig[0]; + if (orig instanceof AST_SymbolFunarg || orig.name == "arguments") return false; + def.fixed = make_node(AST_Undefined, orig); + } + return true; + } + } + + function push() { + safe_ids = Object.create(safe_ids); + } + + function pop() { + safe_ids = Object.getPrototypeOf(safe_ids); + } + + function reset_def(def) { + def.escaped = false; + if (def.scope.uses_eval) { + def.fixed = false; + } else if (toplevel || !def.global || def.orig[0] instanceof AST_SymbolConst) { + def.fixed = undefined; + } else { + def.fixed = false; + } + def.references = []; + def.should_replace = undefined; + } + + function is_modified(node, level, func) { + var parent = tw.parent(level); + if (is_lhs(node, parent) + || !func && parent instanceof AST_Call && parent.expression === node) { + return true; + } else if (parent instanceof AST_PropAccess && parent.expression === node) { + return !func && is_modified(parent, level + 1); + } + } + }); + + AST_SymbolRef.DEFMETHOD("fixed_value", function() { + var fixed = this.definition().fixed; + if (!fixed || fixed instanceof AST_Node) return fixed; + return fixed(); + }); + + function is_reference_const(ref) { + if (!(ref instanceof AST_SymbolRef)) return false; + var orig = ref.definition().orig; + for (var i = orig.length; --i >= 0;) { + if (orig[i] instanceof AST_SymbolConst) return true; + } + } + + function find_variable(compressor, name) { + var scope, i = 0; + while (scope = compressor.parent(i++)) { + if (scope instanceof AST_Scope) break; + if (scope instanceof AST_Catch) { + scope = scope.argname.definition().scope; + break; + } + } + return scope.find_variable(name); + } + + function make_node(ctor, orig, props) { + if (!props) props = {}; + if (orig) { + if (!props.start) props.start = orig.start; + if (!props.end) props.end = orig.end; + } + return new ctor(props); + }; + + function make_node_from_constant(val, orig) { + switch (typeof val) { + case "string": + return make_node(AST_String, orig, { + value: val + }); + case "number": + if (isNaN(val)) return make_node(AST_NaN, orig); + if (isFinite(val)) { + return 1 / val < 0 ? make_node(AST_UnaryPrefix, orig, { + operator: "-", + expression: make_node(AST_Number, orig, { value: -val }) + }) : make_node(AST_Number, orig, { value: val }); + } + return val < 0 ? make_node(AST_UnaryPrefix, orig, { + operator: "-", + expression: make_node(AST_Infinity, orig) + }) : make_node(AST_Infinity, orig); + case "boolean": + return make_node(val ? AST_True : AST_False, orig); + case "undefined": + return make_node(AST_Undefined, orig); + default: + if (val === null) { + return make_node(AST_Null, orig, { value: null }); + } + if (val instanceof RegExp) { + return make_node(AST_RegExp, orig, { value: val }); + } + throw new Error(string_template("Can't handle constant of type: {type}", { + type: typeof val + })); + } + }; + + // we shouldn't compress (1,func)(something) to + // func(something) because that changes the meaning of + // the func (becomes lexical instead of global). + function maintain_this_binding(parent, orig, val) { + if (parent instanceof AST_UnaryPrefix && parent.operator == "delete" + || parent instanceof AST_Call && parent.expression === orig + && (val instanceof AST_PropAccess || val instanceof AST_SymbolRef && val.name == "eval")) { + return make_node(AST_Seq, orig, { + car: make_node(AST_Number, orig, { + value: 0 + }), + cdr: val + }); + } + return val; + } + + function as_statement_array(thing) { + if (thing === null) return []; + if (thing instanceof AST_BlockStatement) return thing.body; + if (thing instanceof AST_EmptyStatement) return []; + if (thing instanceof AST_Statement) return [ thing ]; + throw new Error("Can't convert thing to statement array"); + }; + + function is_empty(thing) { + if (thing === null) return true; + if (thing instanceof AST_EmptyStatement) return true; + if (thing instanceof AST_BlockStatement) return thing.body.length == 0; + return false; + }; + + function loop_body(x) { + if (x instanceof AST_Switch) return x; + if (x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) { + return (x.body instanceof AST_BlockStatement ? x.body : x); + } + return x; + }; + + function is_iife_call(node) { + if (node instanceof AST_Call && !(node instanceof AST_New)) { + return node.expression instanceof AST_Function || is_iife_call(node.expression); + } + return false; + } + + function tighten_body(statements, compressor) { + var CHANGED, max_iter = 10; + do { + CHANGED = false; + if (compressor.option("angular")) { + statements = process_for_angular(statements); + } + statements = eliminate_spurious_blocks(statements); + if (compressor.option("dead_code")) { + statements = eliminate_dead_code(statements, compressor); + } + if (compressor.option("if_return")) { + statements = handle_if_return(statements, compressor); + } + if (compressor.sequences_limit > 0) { + statements = sequencesize(statements, compressor); + } + if (compressor.option("join_vars")) { + statements = join_consecutive_vars(statements, compressor); + } + if (compressor.option("collapse_vars")) { + statements = collapse_single_use_vars(statements, compressor); + } + } while (CHANGED && max_iter-- > 0); + + return statements; + + function collapse_single_use_vars(statements, compressor) { + // Iterate statements backwards looking for a statement with a var/const + // declaration immediately preceding it. Grab the rightmost var definition + // and if it has exactly one reference then attempt to replace its reference + // in the statement with the var value and then erase the var definition. + + var self = compressor.self(); + var var_defs_removed = false; + var toplevel = compressor.option("toplevel"); + for (var stat_index = statements.length; --stat_index >= 0;) { + var stat = statements[stat_index]; + if (stat instanceof AST_Definitions) continue; + + // Process child blocks of statement if present. + [stat, stat.body, stat.alternative, stat.bcatch, stat.bfinally].forEach(function(node) { + node && node.body && collapse_single_use_vars(node.body, compressor); + }); + + // The variable definition must precede a statement. + if (stat_index <= 0) break; + var prev_stat_index = stat_index - 1; + var prev_stat = statements[prev_stat_index]; + if (!(prev_stat instanceof AST_Definitions)) continue; + var var_defs = prev_stat.definitions; + if (var_defs == null) continue; + + var var_names_seen = {}; + var side_effects_encountered = false; + var lvalues_encountered = false; + var lvalues = {}; + + // Scan variable definitions from right to left. + for (var var_defs_index = var_defs.length; --var_defs_index >= 0;) { + + // Obtain var declaration and var name with basic sanity check. + var var_decl = var_defs[var_defs_index]; + if (var_decl.value == null) break; + var var_name = var_decl.name.name; + if (!var_name || !var_name.length) break; + + // Bail if we've seen a var definition of same name before. + if (var_name in var_names_seen) break; + var_names_seen[var_name] = true; + + // Only interested in cases with just one reference to the variable. + var def = self.find_variable && self.find_variable(var_name); + if (!def || !def.references || def.references.length !== 1 + || var_name == "arguments" || (!toplevel && def.global)) { + side_effects_encountered = true; + continue; + } + var ref = def.references[0]; + + // Don't replace ref if eval() or with statement in scope. + if (ref.scope.uses_eval || ref.scope.uses_with) break; + + // Constant single use vars can be replaced in any scope. + if (var_decl.value.is_constant()) { + var ctt = new TreeTransformer(function(node) { + var parent = ctt.parent(); + if (parent instanceof AST_IterationStatement + && (parent.condition === node || parent.init === node)) { + return node; + } + if (node === ref) + return replace_var(node, parent, true); + }); + stat.transform(ctt); + continue; + } + + // Restrict var replacement to constants if side effects encountered. + if (side_effects_encountered |= lvalues_encountered) continue; + + var value_has_side_effects = var_decl.value.has_side_effects(compressor); + // Non-constant single use vars can only be replaced in same scope. + if (ref.scope !== self) { + side_effects_encountered |= value_has_side_effects; + continue; + } + + // Detect lvalues in var value. + var tw = new TreeWalker(function(node){ + if (node instanceof AST_SymbolRef && is_lvalue(node, tw.parent())) { + lvalues[node.name] = lvalues_encountered = true; + } + }); + var_decl.value.walk(tw); + + // Replace the non-constant single use var in statement if side effect free. + var unwind = false; + var tt = new TreeTransformer( + function preorder(node) { + if (unwind) return node; + var parent = tt.parent(); + if (node instanceof AST_Lambda + || node instanceof AST_Try + || node instanceof AST_With + || node instanceof AST_Case + || node instanceof AST_IterationStatement + || (parent instanceof AST_If && node !== parent.condition) + || (parent instanceof AST_Conditional && node !== parent.condition) + || (node instanceof AST_SymbolRef + && value_has_side_effects + && !are_references_in_scope(node.definition(), self)) + || (parent instanceof AST_Binary + && (parent.operator == "&&" || parent.operator == "||") + && node === parent.right) + || (parent instanceof AST_Switch && node !== parent.expression)) { + return side_effects_encountered = unwind = true, node; + } + function are_references_in_scope(def, scope) { + if (def.orig.length === 1 + && def.orig[0] instanceof AST_SymbolDefun) return true; + if (def.scope !== scope) return false; + var refs = def.references; + for (var i = 0, len = refs.length; i < len; i++) { + if (refs[i].scope !== scope) return false; + } + return true; + } + }, + function postorder(node) { + if (unwind) return node; + if (node === ref) + return unwind = true, replace_var(node, tt.parent(), false); + if (side_effects_encountered |= node.has_side_effects(compressor)) + return unwind = true, node; + if (lvalues_encountered && node instanceof AST_SymbolRef && node.name in lvalues) { + side_effects_encountered = true; + return unwind = true, node; + } + } + ); + stat.transform(tt); + } + } + + // Remove extraneous empty statments in block after removing var definitions. + // Leave at least one statement in `statements`. + if (var_defs_removed) for (var i = statements.length; --i >= 0;) { + if (statements.length > 1 && statements[i] instanceof AST_EmptyStatement) + statements.splice(i, 1); + } + + return statements; + + function is_lvalue(node, parent) { + return node instanceof AST_SymbolRef && is_lhs(node, parent); + } + function replace_var(node, parent, is_constant) { + if (is_lvalue(node, parent)) return node; + + // Remove var definition and return its value to the TreeTransformer to replace. + var value = maintain_this_binding(parent, node, var_decl.value); + var_decl.value = null; + + var_defs.splice(var_defs_index, 1); + if (var_defs.length === 0) { + statements[prev_stat_index] = make_node(AST_EmptyStatement, self); + var_defs_removed = true; + } + // Further optimize statement after substitution. + stat.reset_opt_flags(compressor); + + compressor.info("Collapsing " + (is_constant ? "constant" : "variable") + + " " + var_name + " [{file}:{line},{col}]", node.start); + CHANGED = true; + return value; + } + } + + function process_for_angular(statements) { + function has_inject(comment) { + return /@ngInject/.test(comment.value); + } + function make_arguments_names_list(func) { + return func.argnames.map(function(sym){ + return make_node(AST_String, sym, { value: sym.name }); + }); + } + function make_array(orig, elements) { + return make_node(AST_Array, orig, { elements: elements }); + } + function make_injector(func, name) { + return make_node(AST_SimpleStatement, func, { + body: make_node(AST_Assign, func, { + operator: "=", + left: make_node(AST_Dot, name, { + expression: make_node(AST_SymbolRef, name, name), + property: "$inject" + }), + right: make_array(func, make_arguments_names_list(func)) + }) + }); + } + function check_expression(body) { + if (body && body.args) { + // if this is a function call check all of arguments passed + body.args.forEach(function(argument, index, array) { + var comments = argument.start.comments_before; + // if the argument is function preceded by @ngInject + if (argument instanceof AST_Lambda && comments.length && has_inject(comments[0])) { + // replace the function with an array of names of its parameters and function at the end + array[index] = make_array(argument, make_arguments_names_list(argument).concat(argument)); + } + }); + // if this is chained call check previous one recursively + if (body.expression && body.expression.expression) { + check_expression(body.expression.expression); + } + } + } + return statements.reduce(function(a, stat){ + a.push(stat); + + if (stat.body && stat.body.args) { + check_expression(stat.body); + } else { + var token = stat.start; + var comments = token.comments_before; + if (comments && comments.length > 0) { + var last = comments.pop(); + if (has_inject(last)) { + // case 1: defun + if (stat instanceof AST_Defun) { + a.push(make_injector(stat, stat.name)); + } + else if (stat instanceof AST_Definitions) { + stat.definitions.forEach(function(def) { + if (def.value && def.value instanceof AST_Lambda) { + a.push(make_injector(def.value, def.name)); + } + }); + } + else { + compressor.warn("Unknown statement marked with @ngInject [{file}:{line},{col}]", token); + } + } + } + } + + return a; + }, []); + } + + function eliminate_spurious_blocks(statements) { + var seen_dirs = []; + return statements.reduce(function(a, stat){ + if (stat instanceof AST_BlockStatement) { + CHANGED = true; + a.push.apply(a, eliminate_spurious_blocks(stat.body)); + } else if (stat instanceof AST_EmptyStatement) { + CHANGED = true; + } else if (stat instanceof AST_Directive) { + if (seen_dirs.indexOf(stat.value) < 0) { + a.push(stat); + seen_dirs.push(stat.value); + } else { + CHANGED = true; + } + } else { + a.push(stat); + } + return a; + }, []); + }; + + function handle_if_return(statements, compressor) { + var self = compressor.self(); + var multiple_if_returns = has_multiple_if_returns(statements); + var in_lambda = self instanceof AST_Lambda; + var ret = []; // Optimized statements, build from tail to front + loop: for (var i = statements.length; --i >= 0;) { + var stat = statements[i]; + switch (true) { + case (in_lambda && stat instanceof AST_Return && !stat.value && ret.length == 0): + CHANGED = true; + // note, ret.length is probably always zero + // because we drop unreachable code before this + // step. nevertheless, it's good to check. + continue loop; + case stat instanceof AST_If: + if (stat.body instanceof AST_Return) { + //--- + // pretty silly case, but: + // if (foo()) return; return; ==> foo(); return; + if (((in_lambda && ret.length == 0) + || (ret[0] instanceof AST_Return && !ret[0].value)) + && !stat.body.value && !stat.alternative) { + CHANGED = true; + var cond = make_node(AST_SimpleStatement, stat.condition, { + body: stat.condition + }); + ret.unshift(cond); + continue loop; + } + //--- + // if (foo()) return x; return y; ==> return foo() ? x : y; + if (ret[0] instanceof AST_Return && stat.body.value && ret[0].value && !stat.alternative) { + CHANGED = true; + stat = stat.clone(); + stat.alternative = ret[0]; + ret[0] = stat.transform(compressor); + continue loop; + } + //--- + // if (foo()) return x; [ return ; ] ==> return foo() ? x : undefined; + if (multiple_if_returns && (ret.length == 0 || ret[0] instanceof AST_Return) + && stat.body.value && !stat.alternative && in_lambda) { + CHANGED = true; + stat = stat.clone(); + stat.alternative = ret[0] || make_node(AST_Return, stat, { + value: null + }); + ret[0] = stat.transform(compressor); + continue loop; + } + //--- + // if (foo()) return; [ else x... ]; y... ==> if (!foo()) { x...; y... } + if (!stat.body.value && in_lambda) { + CHANGED = true; + stat = stat.clone(); + stat.condition = stat.condition.negate(compressor); + var body = as_statement_array(stat.alternative).concat(ret); + var funs = extract_functions_from_statement_array(body); + stat.body = make_node(AST_BlockStatement, stat, { + body: body + }); + stat.alternative = null; + ret = funs.concat([ stat.transform(compressor) ]); + continue loop; + } + + //--- + // if (a) return b; if (c) return d; e; ==> return a ? b : c ? d : void e; + // + // if sequences is not enabled, this can lead to an endless loop (issue #866). + // however, with sequences on this helps producing slightly better output for + // the example code. + if (compressor.option("sequences") + && i > 0 && statements[i - 1] instanceof AST_If && statements[i - 1].body instanceof AST_Return + && ret.length == 1 && in_lambda && ret[0] instanceof AST_SimpleStatement + && !stat.alternative) { + CHANGED = true; + ret.push(make_node(AST_Return, ret[0], { + value: null + }).transform(compressor)); + ret.unshift(stat); + continue loop; + } + } + + var ab = aborts(stat.body); + var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab) : null; + if (ab && ((ab instanceof AST_Return && !ab.value && in_lambda) + || (ab instanceof AST_Continue && self === loop_body(lct)) + || (ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct))) { + if (ab.label) { + remove(ab.label.thedef.references, ab); + } + CHANGED = true; + var body = as_statement_array(stat.body).slice(0, -1); + stat = stat.clone(); + stat.condition = stat.condition.negate(compressor); + stat.body = make_node(AST_BlockStatement, stat, { + body: as_statement_array(stat.alternative).concat(ret) + }); + stat.alternative = make_node(AST_BlockStatement, stat, { + body: body + }); + ret = [ stat.transform(compressor) ]; + continue loop; + } + + var ab = aborts(stat.alternative); + var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab) : null; + if (ab && ((ab instanceof AST_Return && !ab.value && in_lambda) + || (ab instanceof AST_Continue && self === loop_body(lct)) + || (ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct))) { + if (ab.label) { + remove(ab.label.thedef.references, ab); + } + CHANGED = true; + stat = stat.clone(); + stat.body = make_node(AST_BlockStatement, stat.body, { + body: as_statement_array(stat.body).concat(ret) + }); + stat.alternative = make_node(AST_BlockStatement, stat.alternative, { + body: as_statement_array(stat.alternative).slice(0, -1) + }); + ret = [ stat.transform(compressor) ]; + continue loop; + } + + ret.unshift(stat); + break; + default: + ret.unshift(stat); + break; + } + } + return ret; + + function has_multiple_if_returns(statements) { + var n = 0; + for (var i = statements.length; --i >= 0;) { + var stat = statements[i]; + if (stat instanceof AST_If && stat.body instanceof AST_Return) { + if (++n > 1) return true; + } + } + return false; + } + }; + + function eliminate_dead_code(statements, compressor) { + var has_quit = false; + var orig = statements.length; + var self = compressor.self(); + statements = statements.reduce(function(a, stat){ + if (has_quit) { + extract_declarations_from_unreachable_code(compressor, stat, a); + } else { + if (stat instanceof AST_LoopControl) { + var lct = compressor.loopcontrol_target(stat); + if ((stat instanceof AST_Break + && !(lct instanceof AST_IterationStatement) + && loop_body(lct) === self) || (stat instanceof AST_Continue + && loop_body(lct) === self)) { + if (stat.label) { + remove(stat.label.thedef.references, stat); + } + } else { + a.push(stat); + } + } else { + a.push(stat); + } + if (aborts(stat)) has_quit = true; + } + return a; + }, []); + CHANGED = statements.length != orig; + return statements; + }; + + function sequencesize(statements, compressor) { + if (statements.length < 2) return statements; + var seq = [], ret = []; + function push_seq() { + seq = AST_Seq.from_array(seq); + if (seq) ret.push(make_node(AST_SimpleStatement, seq, { + body: seq + })); + seq = []; + }; + statements.forEach(function(stat){ + if (stat instanceof AST_SimpleStatement) { + if (seqLength(seq) >= compressor.sequences_limit) push_seq(); + var body = stat.body; + if (seq.length > 0) body = body.drop_side_effect_free(compressor); + if (body) seq.push(body); + } else { + push_seq(); + ret.push(stat); + } + }); + push_seq(); + ret = sequencesize_2(ret, compressor); + CHANGED = ret.length != statements.length; + return ret; + }; + + function seqLength(a) { + for (var len = 0, i = 0; i < a.length; ++i) { + var stat = a[i]; + if (stat instanceof AST_Seq) { + len += stat.len(); + } else { + len++; + } + } + return len; + }; + + function sequencesize_2(statements, compressor) { + function cons_seq(right) { + ret.pop(); + var left = prev.body; + if (left instanceof AST_Seq) { + left.add(right); + } else { + left = AST_Seq.cons(left, right); + } + return left.transform(compressor); + }; + var ret = [], prev = null; + statements.forEach(function(stat){ + if (prev) { + if (stat instanceof AST_For) { + var opera = {}; + try { + prev.body.walk(new TreeWalker(function(node){ + if (node instanceof AST_Binary && node.operator == "in") + throw opera; + })); + if (stat.init && !(stat.init instanceof AST_Definitions)) { + stat.init = cons_seq(stat.init); + } + else if (!stat.init) { + stat.init = prev.body.drop_side_effect_free(compressor); + ret.pop(); + } + } catch(ex) { + if (ex !== opera) throw ex; + } + } + else if (stat instanceof AST_If) { + stat.condition = cons_seq(stat.condition); + } + else if (stat instanceof AST_With) { + stat.expression = cons_seq(stat.expression); + } + else if (stat instanceof AST_Exit && stat.value) { + stat.value = cons_seq(stat.value); + } + else if (stat instanceof AST_Exit) { + stat.value = cons_seq(make_node(AST_Undefined, stat).transform(compressor)); + } + else if (stat instanceof AST_Switch) { + stat.expression = cons_seq(stat.expression); + } + } + ret.push(stat); + prev = stat instanceof AST_SimpleStatement ? stat : null; + }); + return ret; + }; + + function join_consecutive_vars(statements, compressor) { + var prev = null; + return statements.reduce(function(a, stat){ + if (stat instanceof AST_Definitions && prev && prev.TYPE == stat.TYPE) { + prev.definitions = prev.definitions.concat(stat.definitions); + CHANGED = true; + } + else if (stat instanceof AST_For + && prev instanceof AST_Var + && (!stat.init || stat.init.TYPE == prev.TYPE)) { + CHANGED = true; + a.pop(); + if (stat.init) { + stat.init.definitions = prev.definitions.concat(stat.init.definitions); + } else { + stat.init = prev; + } + a.push(stat); + prev = stat; + } + else { + prev = stat; + a.push(stat); + } + return a; + }, []); + }; + + }; + + function extract_functions_from_statement_array(statements) { + var funs = []; + for (var i = statements.length - 1; i >= 0; --i) { + var stat = statements[i]; + if (stat instanceof AST_Defun) { + statements.splice(i, 1); + funs.unshift(stat); + } + } + return funs; + } + + function extract_declarations_from_unreachable_code(compressor, stat, target) { + if (!(stat instanceof AST_Defun)) { + compressor.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start); + } + stat.walk(new TreeWalker(function(node){ + if (node instanceof AST_Definitions) { + compressor.warn("Declarations in unreachable code! [{file}:{line},{col}]", node.start); + node.remove_initializers(); + target.push(node); + return true; + } + if (node instanceof AST_Defun) { + target.push(node); + return true; + } + if (node instanceof AST_Scope) { + return true; + } + })); + }; + + function is_undefined(node, compressor) { + return node.is_undefined + || node instanceof AST_Undefined + || node instanceof AST_UnaryPrefix + && node.operator == "void" + && !node.expression.has_side_effects(compressor); + } + + // may_throw_on_access() + // returns true if this node may be null, undefined or contain `AST_Accessor` + (function(def) { + AST_Node.DEFMETHOD("may_throw_on_access", function(compressor) { + var pure_getters = compressor.option("pure_getters"); + return !pure_getters || this._throw_on_access(pure_getters); + }); + + function is_strict(pure_getters) { + return /strict/.test(pure_getters); + } + + def(AST_Node, is_strict); + def(AST_Null, return_true); + def(AST_Undefined, return_true); + def(AST_Constant, return_false); + def(AST_Array, return_false); + def(AST_Object, function(pure_getters) { + if (!is_strict(pure_getters)) return false; + for (var i = this.properties.length; --i >=0;) + if (this.properties[i].value instanceof AST_Accessor) return true; + return false; + }); + def(AST_Function, return_false); + def(AST_UnaryPostfix, return_false); + def(AST_UnaryPrefix, function() { + return this.operator == "void"; + }); + def(AST_Binary, function(pure_getters) { + switch (this.operator) { + case "&&": + return this.left._throw_on_access(pure_getters); + case "||": + return this.left._throw_on_access(pure_getters) + && this.right._throw_on_access(pure_getters); + default: + return false; + } + }) + def(AST_Assign, function(pure_getters) { + return this.operator == "=" + && this.right._throw_on_access(pure_getters); + }) + def(AST_Conditional, function(pure_getters) { + return this.consequent._throw_on_access(pure_getters) + || this.alternative._throw_on_access(pure_getters); + }) + def(AST_Seq, function(pure_getters) { + return this.cdr._throw_on_access(pure_getters); + }); + def(AST_SymbolRef, function(pure_getters) { + if (this.is_undefined) return true; + if (!is_strict(pure_getters)) return false; + var fixed = this.fixed_value(); + return !fixed || fixed._throw_on_access(pure_getters); + }); + })(function(node, func) { + node.DEFMETHOD("_throw_on_access", func); + }); + + /* -----[ boolean/negation helpers ]----- */ + + // methods to determine whether an expression has a boolean result type + (function (def){ + var unary_bool = [ "!", "delete" ]; + var binary_bool = [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ]; + def(AST_Node, return_false); + def(AST_UnaryPrefix, function(){ + return member(this.operator, unary_bool); + }); + def(AST_Binary, function(){ + return member(this.operator, binary_bool) || + ( (this.operator == "&&" || this.operator == "||") && + this.left.is_boolean() && this.right.is_boolean() ); + }); + def(AST_Conditional, function(){ + return this.consequent.is_boolean() && this.alternative.is_boolean(); + }); + def(AST_Assign, function(){ + return this.operator == "=" && this.right.is_boolean(); + }); + def(AST_Seq, function(){ + return this.cdr.is_boolean(); + }); + def(AST_True, return_true); + def(AST_False, return_true); + })(function(node, func){ + node.DEFMETHOD("is_boolean", func); + }); + + // methods to determine if an expression has a numeric result type + (function (def){ + def(AST_Node, return_false); + def(AST_Number, return_true); + var unary = makePredicate("+ - ~ ++ --"); + def(AST_Unary, function(){ + return unary(this.operator); + }); + var binary = makePredicate("- * / % & | ^ << >> >>>"); + def(AST_Binary, function(compressor){ + return binary(this.operator) || this.operator == "+" + && this.left.is_number(compressor) + && this.right.is_number(compressor); + }); + def(AST_Assign, function(compressor){ + return binary(this.operator.slice(0, -1)) + || this.operator == "=" && this.right.is_number(compressor); + }); + def(AST_Seq, function(compressor){ + return this.cdr.is_number(compressor); + }); + def(AST_Conditional, function(compressor){ + return this.consequent.is_number(compressor) && this.alternative.is_number(compressor); + }); + })(function(node, func){ + node.DEFMETHOD("is_number", func); + }); + + // methods to determine if an expression has a string result type + (function (def){ + def(AST_Node, return_false); + def(AST_String, return_true); + def(AST_UnaryPrefix, function(){ + return this.operator == "typeof"; + }); + def(AST_Binary, function(compressor){ + return this.operator == "+" && + (this.left.is_string(compressor) || this.right.is_string(compressor)); + }); + def(AST_Assign, function(compressor){ + return (this.operator == "=" || this.operator == "+=") && this.right.is_string(compressor); + }); + def(AST_Seq, function(compressor){ + return this.cdr.is_string(compressor); + }); + def(AST_Conditional, function(compressor){ + return this.consequent.is_string(compressor) && this.alternative.is_string(compressor); + }); + })(function(node, func){ + node.DEFMETHOD("is_string", func); + }); + + var unary_side_effects = makePredicate("delete ++ --"); + + function is_lhs(node, parent) { + if (parent instanceof AST_Unary && unary_side_effects(parent.operator)) return parent.expression; + if (parent instanceof AST_Assign && parent.left === node) return node; + } + + (function (def){ + AST_Node.DEFMETHOD("resolve_defines", function(compressor) { + if (!compressor.option("global_defs")) return; + var def = this._find_defs(compressor, ""); + if (def) { + var node, parent = this, level = 0; + do { + node = parent; + parent = compressor.parent(level++); + } while (parent instanceof AST_PropAccess && parent.expression === node); + if (is_lhs(node, parent)) { + compressor.warn('global_defs ' + this.print_to_string() + ' redefined [{file}:{line},{col}]', this.start); + } else { + return def; + } + } + }); + function to_node(value, orig) { + if (value instanceof AST_Node) return make_node(value.CTOR, orig, value); + if (Array.isArray(value)) return make_node(AST_Array, orig, { + elements: value.map(function(value) { + return to_node(value, orig); + }) + }); + if (value && typeof value == "object") { + var props = []; + for (var key in value) { + props.push(make_node(AST_ObjectKeyVal, orig, { + key: key, + value: to_node(value[key], orig) + })); + } + return make_node(AST_Object, orig, { + properties: props + }); + } + return make_node_from_constant(value, orig); + } + def(AST_Node, noop); + def(AST_Dot, function(compressor, suffix){ + return this.expression._find_defs(compressor, "." + this.property + suffix); + }); + def(AST_SymbolRef, function(compressor, suffix){ + if (!this.global()) return; + var name; + var defines = compressor.option("global_defs"); + if (defines && HOP(defines, (name = this.name + suffix))) { + var node = to_node(defines[name], this); + var top = compressor.find_parent(AST_Toplevel); + node.walk(new TreeWalker(function(node) { + if (node instanceof AST_SymbolRef) { + node.scope = top; + node.thedef = top.def_global(node); + } + })); + return node; + } + }); + })(function(node, func){ + node.DEFMETHOD("_find_defs", func); + }); + + function best_of_expression(ast1, ast2) { + return ast1.print_to_string().length > + ast2.print_to_string().length + ? ast2 : ast1; + } + + function best_of_statement(ast1, ast2) { + return best_of_expression(make_node(AST_SimpleStatement, ast1, { + body: ast1 + }), make_node(AST_SimpleStatement, ast2, { + body: ast2 + })).body; + } + + function best_of(compressor, ast1, ast2) { + return (first_in_statement(compressor) ? best_of_statement : best_of_expression)(ast1, ast2); + } + + // methods to evaluate a constant expression + (function (def){ + // If the node has been successfully reduced to a constant, + // then its value is returned; otherwise the element itself + // is returned. + // They can be distinguished as constant value is never a + // descendant of AST_Node. + AST_Node.DEFMETHOD("evaluate", function(compressor){ + if (!compressor.option("evaluate")) return this; + try { + var val = this._eval(compressor); + return !val || val instanceof RegExp || typeof val != "object" ? val : this; + } catch(ex) { + if (ex !== def) throw ex; + return this; + } + }); + var unaryPrefix = makePredicate("! ~ - + void"); + AST_Node.DEFMETHOD("is_constant", function(){ + // Accomodate when compress option evaluate=false + // as well as the common constant expressions !0 and -1 + if (this instanceof AST_Constant) { + return !(this instanceof AST_RegExp); + } else { + return this instanceof AST_UnaryPrefix + && this.expression instanceof AST_Constant + && unaryPrefix(this.operator); + } + }); + // Obtain the constant value of an expression already known to be constant. + // Result only valid iff this.is_constant() is true. + AST_Node.DEFMETHOD("constant_value", function(compressor){ + // Accomodate when option evaluate=false. + if (this instanceof AST_Constant && !(this instanceof AST_RegExp)) { + return this.value; + } + // Accomodate the common constant expressions !0 and -1 when option evaluate=false. + if (this instanceof AST_UnaryPrefix + && this.expression instanceof AST_Constant) switch (this.operator) { + case "!": + return !this.expression.value; + case "~": + return ~this.expression.value; + case "-": + return -this.expression.value; + case "+": + return +this.expression.value; + default: + throw new Error(string_template("Cannot evaluate unary expression {value}", { + value: this.print_to_string() + })); + } + var result = this.evaluate(compressor); + if (result !== this) { + return result; + } + throw new Error(string_template("Cannot evaluate constant [{file}:{line},{col}]", this.start)); + }); + def(AST_Statement, function(){ + throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start)); + }); + def(AST_Lambda, function(){ + throw def; + }); + function ev(node, compressor) { + if (!compressor) throw new Error("Compressor must be passed"); + + return node._eval(compressor); + }; + def(AST_Node, function(){ + throw def; // not constant + }); + def(AST_Constant, function(){ + return this.getValue(); + }); + def(AST_Array, function(compressor){ + if (compressor.option("unsafe")) { + return this.elements.map(function(element) { + return ev(element, compressor); + }); + } + throw def; + }); + def(AST_Object, function(compressor){ + if (compressor.option("unsafe")) { + var val = {}; + for (var i = 0, len = this.properties.length; i < len; i++) { + var prop = this.properties[i]; + var key = prop.key; + if (key instanceof AST_Symbol) { + key = key.name; + } else if (key instanceof AST_Node) { + key = ev(key, compressor); + } + if (typeof Object.prototype[key] === 'function') { + throw def; + } + val[key] = ev(prop.value, compressor); + } + return val; + } + throw def; + }); + def(AST_UnaryPrefix, function(compressor){ + var e = this.expression; + switch (this.operator) { + case "!": return !ev(e, compressor); + case "typeof": + // Function would be evaluated to an array and so typeof would + // incorrectly return 'object'. Hence making is a special case. + if (e instanceof AST_Function) return typeof function(){}; + + e = ev(e, compressor); + + // typeof returns "object" or "function" on different platforms + // so cannot evaluate reliably + if (e instanceof RegExp) throw def; + + return typeof e; + case "void": return void ev(e, compressor); + case "~": return ~ev(e, compressor); + case "-": return -ev(e, compressor); + case "+": return +ev(e, compressor); + } + throw def; + }); + def(AST_Binary, function(c){ + var left = this.left, right = this.right, result; + switch (this.operator) { + case "&&" : result = ev(left, c) && ev(right, c); break; + case "||" : result = ev(left, c) || ev(right, c); break; + case "|" : result = ev(left, c) | ev(right, c); break; + case "&" : result = ev(left, c) & ev(right, c); break; + case "^" : result = ev(left, c) ^ ev(right, c); break; + case "+" : result = ev(left, c) + ev(right, c); break; + case "*" : result = ev(left, c) * ev(right, c); break; + case "/" : result = ev(left, c) / ev(right, c); break; + case "%" : result = ev(left, c) % ev(right, c); break; + case "-" : result = ev(left, c) - ev(right, c); break; + case "<<" : result = ev(left, c) << ev(right, c); break; + case ">>" : result = ev(left, c) >> ev(right, c); break; + case ">>>" : result = ev(left, c) >>> ev(right, c); break; + case "==" : result = ev(left, c) == ev(right, c); break; + case "===" : result = ev(left, c) === ev(right, c); break; + case "!=" : result = ev(left, c) != ev(right, c); break; + case "!==" : result = ev(left, c) !== ev(right, c); break; + case "<" : result = ev(left, c) < ev(right, c); break; + case "<=" : result = ev(left, c) <= ev(right, c); break; + case ">" : result = ev(left, c) > ev(right, c); break; + case ">=" : result = ev(left, c) >= ev(right, c); break; + default: + throw def; + } + if (isNaN(result) && c.find_parent(AST_With)) { + // leave original expression as is + throw def; + } + return result; + }); + def(AST_Conditional, function(compressor){ + return ev(this.condition, compressor) + ? ev(this.consequent, compressor) + : ev(this.alternative, compressor); + }); + def(AST_SymbolRef, function(compressor){ + if (!compressor.option("reduce_vars") || this._evaluating) throw def; + this._evaluating = true; + try { + var fixed = this.fixed_value(); + if (!fixed) throw def; + var value = ev(fixed, compressor); + if (!HOP(fixed, "_eval")) fixed._eval = function() { + return value; + }; + if (value && typeof value == "object" && this.definition().escaped) throw def; + return value; + } finally { + this._evaluating = false; + } + }); + def(AST_PropAccess, function(compressor){ + if (compressor.option("unsafe")) { + var key = this.property; + if (key instanceof AST_Node) { + key = ev(key, compressor); + } + var val = ev(this.expression, compressor); + if (val && HOP(val, key)) { + return val[key]; + } + } + throw def; + }); + })(function(node, func){ + node.DEFMETHOD("_eval", func); + }); + + // method to negate an expression + (function(def){ + function basic_negation(exp) { + return make_node(AST_UnaryPrefix, exp, { + operator: "!", + expression: exp + }); + } + function best(orig, alt, first_in_statement) { + var negated = basic_negation(orig); + if (first_in_statement) { + var stat = make_node(AST_SimpleStatement, alt, { + body: alt + }); + return best_of_expression(negated, stat) === stat ? alt : negated; + } + return best_of_expression(negated, alt); + } + def(AST_Node, function(){ + return basic_negation(this); + }); + def(AST_Statement, function(){ + throw new Error("Cannot negate a statement"); + }); + def(AST_Function, function(){ + return basic_negation(this); + }); + def(AST_UnaryPrefix, function(){ + if (this.operator == "!") + return this.expression; + return basic_negation(this); + }); + def(AST_Seq, function(compressor){ + var self = this.clone(); + self.cdr = self.cdr.negate(compressor); + return self; + }); + def(AST_Conditional, function(compressor, first_in_statement){ + var self = this.clone(); + self.consequent = self.consequent.negate(compressor); + self.alternative = self.alternative.negate(compressor); + return best(this, self, first_in_statement); + }); + def(AST_Binary, function(compressor, first_in_statement){ + var self = this.clone(), op = this.operator; + if (compressor.option("unsafe_comps")) { + switch (op) { + case "<=" : self.operator = ">" ; return self; + case "<" : self.operator = ">=" ; return self; + case ">=" : self.operator = "<" ; return self; + case ">" : self.operator = "<=" ; return self; + } + } + switch (op) { + case "==" : self.operator = "!="; return self; + case "!=" : self.operator = "=="; return self; + case "===": self.operator = "!=="; return self; + case "!==": self.operator = "==="; return self; + case "&&": + self.operator = "||"; + self.left = self.left.negate(compressor, first_in_statement); + self.right = self.right.negate(compressor); + return best(this, self, first_in_statement); + case "||": + self.operator = "&&"; + self.left = self.left.negate(compressor, first_in_statement); + self.right = self.right.negate(compressor); + return best(this, self, first_in_statement); + } + return basic_negation(this); + }); + })(function(node, func){ + node.DEFMETHOD("negate", function(compressor, first_in_statement){ + return func.call(this, compressor, first_in_statement); + }); + }); + + AST_Call.DEFMETHOD("has_pure_annotation", function(compressor) { + if (!compressor.option("side_effects")) return false; + if (this.pure !== undefined) return this.pure; + var pure = false; + var comments, last_comment; + if (this.start + && (comments = this.start.comments_before) + && comments.length + && /[@#]__PURE__/.test((last_comment = comments[comments.length - 1]).value)) { + pure = last_comment; + } + return this.pure = pure; + }); + + // determine if expression has side effects + (function(def){ + def(AST_Node, return_true); + + def(AST_EmptyStatement, return_false); + def(AST_Constant, return_false); + def(AST_This, return_false); + + def(AST_Call, function(compressor){ + if (!this.has_pure_annotation(compressor) && compressor.pure_funcs(this)) return true; + for (var i = this.args.length; --i >= 0;) { + if (this.args[i].has_side_effects(compressor)) + return true; + } + return false; + }); + + function any(list, compressor) { + for (var i = list.length; --i >= 0;) + if (list[i].has_side_effects(compressor)) + return true; + return false; + } + + def(AST_Block, function(compressor){ + return any(this.body, compressor); + }); + def(AST_Switch, function(compressor){ + return this.expression.has_side_effects(compressor) + || any(this.body, compressor); + }); + def(AST_Case, function(compressor){ + return this.expression.has_side_effects(compressor) + || any(this.body, compressor); + }); + def(AST_Try, function(compressor){ + return any(this.body, compressor) + || this.bcatch && this.bcatch.has_side_effects(compressor) + || this.bfinally && this.bfinally.has_side_effects(compressor); + }); + def(AST_If, function(compressor){ + return this.condition.has_side_effects(compressor) + || this.body && this.body.has_side_effects(compressor) + || this.alternative && this.alternative.has_side_effects(compressor); + }); + def(AST_LabeledStatement, function(compressor){ + return this.body.has_side_effects(compressor); + }); + def(AST_SimpleStatement, function(compressor){ + return this.body.has_side_effects(compressor); + }); + def(AST_Defun, return_true); + def(AST_Function, return_false); + def(AST_Binary, function(compressor){ + return this.left.has_side_effects(compressor) + || this.right.has_side_effects(compressor); + }); + def(AST_Assign, return_true); + def(AST_Conditional, function(compressor){ + return this.condition.has_side_effects(compressor) + || this.consequent.has_side_effects(compressor) + || this.alternative.has_side_effects(compressor); + }); + def(AST_Unary, function(compressor){ + return unary_side_effects(this.operator) + || this.expression.has_side_effects(compressor); + }); + def(AST_SymbolRef, function(compressor){ + return this.undeclared(); + }); + def(AST_Object, function(compressor){ + return any(this.properties, compressor); + }); + def(AST_ObjectProperty, function(compressor){ + return this.value.has_side_effects(compressor); + }); + def(AST_Array, function(compressor){ + return any(this.elements, compressor); + }); + def(AST_Dot, function(compressor){ + return this.expression.may_throw_on_access(compressor) + || this.expression.has_side_effects(compressor); + }); + def(AST_Sub, function(compressor){ + return this.expression.may_throw_on_access(compressor) + || this.expression.has_side_effects(compressor) + || this.property.has_side_effects(compressor); + }); + def(AST_Seq, function(compressor){ + return this.car.has_side_effects(compressor) + || this.cdr.has_side_effects(compressor); + }); + })(function(node, func){ + node.DEFMETHOD("has_side_effects", func); + }); + + // tell me if a statement aborts + function aborts(thing) { + return thing && thing.aborts(); + }; + (function(def){ + def(AST_Statement, return_null); + def(AST_Jump, return_this); + function block_aborts(){ + var n = this.body.length; + return n > 0 && aborts(this.body[n - 1]); + }; + def(AST_BlockStatement, block_aborts); + def(AST_SwitchBranch, block_aborts); + def(AST_If, function(){ + return this.alternative && aborts(this.body) && aborts(this.alternative) && this; + }); + })(function(node, func){ + node.DEFMETHOD("aborts", func); + }); + + /* -----[ optimizers ]----- */ + + OPT(AST_Directive, function(self, compressor){ + if (compressor.has_directive(self.value) !== self) { + return make_node(AST_EmptyStatement, self); + } + return self; + }); + + OPT(AST_Debugger, function(self, compressor){ + if (compressor.option("drop_debugger")) + return make_node(AST_EmptyStatement, self); + return self; + }); + + OPT(AST_LabeledStatement, function(self, compressor){ + if (self.body instanceof AST_Break + && compressor.loopcontrol_target(self.body) === self.body) { + return make_node(AST_EmptyStatement, self); + } + return self.label.references.length == 0 ? self.body : self; + }); + + OPT(AST_Block, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + OPT(AST_BlockStatement, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + switch (self.body.length) { + case 1: return self.body[0]; + case 0: return make_node(AST_EmptyStatement, self); + } + return self; + }); + + AST_Scope.DEFMETHOD("drop_unused", function(compressor){ + var self = this; + if (compressor.has_directive("use asm")) return self; + var toplevel = compressor.option("toplevel"); + if (compressor.option("unused") + && (!(self instanceof AST_Toplevel) || toplevel) + && !self.uses_eval + && !self.uses_with) { + var assign_as_unused = !/keep_assign/.test(compressor.option("unused")); + var drop_funcs = /funcs/.test(toplevel); + var drop_vars = /vars/.test(toplevel); + if (!(self instanceof AST_Toplevel) || toplevel == true) { + drop_funcs = drop_vars = true; + } + var in_use = []; + var in_use_ids = Object.create(null); // avoid expensive linear scans of in_use + if (self instanceof AST_Toplevel && compressor.top_retain) { + self.variables.each(function(def) { + if (compressor.top_retain(def) && !(def.id in in_use_ids)) { + in_use_ids[def.id] = true; + in_use.push(def); + } + }); + } + var initializations = new Dictionary(); + // pass 1: find out which symbols are directly used in + // this scope (not in nested scopes). + var scope = this; + var tw = new TreeWalker(function(node, descend){ + if (node !== self) { + if (node instanceof AST_Defun) { + if (!drop_funcs && scope === self) { + var node_def = node.name.definition(); + if (!(node_def.id in in_use_ids)) { + in_use_ids[node_def.id] = true; + in_use.push(node_def); + } + } + initializations.add(node.name.name, node); + return true; // don't go in nested scopes + } + if (node instanceof AST_Definitions && scope === self) { + node.definitions.forEach(function(def){ + if (!drop_vars) { + var node_def = def.name.definition(); + if (!(node_def.id in in_use_ids)) { + in_use_ids[node_def.id] = true; + in_use.push(node_def); + } + } + if (def.value) { + initializations.add(def.name.name, def.value); + if (def.value.has_side_effects(compressor)) { + def.value.walk(tw); + } + } + }); + return true; + } + if (assign_as_unused + && node instanceof AST_Assign + && node.operator == "=" + && node.left instanceof AST_SymbolRef + && !is_reference_const(node.left) + && scope === self) { + node.right.walk(tw); + return true; + } + if (node instanceof AST_SymbolRef) { + var node_def = node.definition(); + if (!(node_def.id in in_use_ids)) { + in_use_ids[node_def.id] = true; + in_use.push(node_def); + } + return true; + } + if (node instanceof AST_Scope) { + var save_scope = scope; + scope = node; + descend(); + scope = save_scope; + return true; + } + } + }); + self.walk(tw); + // pass 2: for every used symbol we need to walk its + // initialization code to figure out if it uses other + // symbols (that may not be in_use). + for (var i = 0; i < in_use.length; ++i) { + in_use[i].orig.forEach(function(decl){ + // undeclared globals will be instanceof AST_SymbolRef + var init = initializations.get(decl.name); + if (init) init.forEach(function(init){ + var tw = new TreeWalker(function(node){ + if (node instanceof AST_SymbolRef) { + var node_def = node.definition(); + if (!(node_def.id in in_use_ids)) { + in_use_ids[node_def.id] = true; + in_use.push(node_def); + } + } + }); + init.walk(tw); + }); + }); + } + // pass 3: we should drop declarations not in_use + var tt = new TreeTransformer( + function before(node, descend, in_list) { + if (node instanceof AST_Function + && node.name + && !compressor.option("keep_fnames")) { + var def = node.name.definition(); + // any declarations with same name will overshadow + // name of this anonymous function and can therefore + // never be used anywhere + if (!(def.id in in_use_ids) || def.orig.length > 1) + node.name = null; + } + if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) { + var trim = !compressor.option("keep_fargs"); + for (var a = node.argnames, i = a.length; --i >= 0;) { + var sym = a[i]; + if (!(sym.definition().id in in_use_ids)) { + sym.__unused = true; + if (trim) { + a.pop(); + compressor[sym.unreferenced() ? "warn" : "info"]("Dropping unused function argument {name} [{file}:{line},{col}]", { + name : sym.name, + file : sym.start.file, + line : sym.start.line, + col : sym.start.col + }); + } + } + else { + trim = false; + } + } + } + if (drop_funcs && node instanceof AST_Defun && node !== self) { + if (!(node.name.definition().id in in_use_ids)) { + compressor[node.name.unreferenced() ? "warn" : "info"]("Dropping unused function {name} [{file}:{line},{col}]", { + name : node.name.name, + file : node.name.start.file, + line : node.name.start.line, + col : node.name.start.col + }); + return make_node(AST_EmptyStatement, node); + } + return node; + } + if (drop_vars && node instanceof AST_Definitions && !(tt.parent() instanceof AST_ForIn && tt.parent().init === node)) { + var def = node.definitions.filter(function(def){ + if (def.value) def.value = def.value.transform(tt); + var sym = def.name.definition(); + if (sym.id in in_use_ids) return true; + if (sym.orig[0] instanceof AST_SymbolCatch) { + def.value = def.value && def.value.drop_side_effect_free(compressor); + return true; + } + var w = { + name : def.name.name, + file : def.name.start.file, + line : def.name.start.line, + col : def.name.start.col + }; + if (def.value && (def._unused_side_effects = def.value.drop_side_effect_free(compressor))) { + compressor.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]", w); + return true; + } + compressor[def.name.unreferenced() ? "warn" : "info"]("Dropping unused variable {name} [{file}:{line},{col}]", w); + return false; + }); + // place uninitialized names at the start + def = mergeSort(def, function(a, b){ + if (!a.value && b.value) return -1; + if (!b.value && a.value) return 1; + return 0; + }); + // for unused names whose initialization has + // side effects, we can cascade the init. code + // into the next one, or next statement. + var side_effects = []; + for (var i = 0; i < def.length;) { + var x = def[i]; + if (x._unused_side_effects) { + side_effects.push(x._unused_side_effects); + def.splice(i, 1); + } else { + if (side_effects.length > 0) { + side_effects.push(x.value); + x.value = AST_Seq.from_array(side_effects); + side_effects = []; + } + ++i; + } + } + if (side_effects.length > 0) { + side_effects = make_node(AST_BlockStatement, node, { + body: [ make_node(AST_SimpleStatement, node, { + body: AST_Seq.from_array(side_effects) + }) ] + }); + } else { + side_effects = null; + } + if (def.length == 0 && !side_effects) { + return make_node(AST_EmptyStatement, node); + } + if (def.length == 0) { + return in_list ? MAP.splice(side_effects.body) : side_effects; + } + node.definitions = def; + if (side_effects) { + side_effects.body.unshift(node); + return in_list ? MAP.splice(side_effects.body) : side_effects; + } + return node; + } + if (drop_vars && assign_as_unused + && node instanceof AST_Assign + && node.operator == "=" + && node.left instanceof AST_SymbolRef) { + var def = node.left.definition(); + if (!(def.id in in_use_ids) + && self.variables.get(def.name) === def) { + return maintain_this_binding(tt.parent(), node, node.right.transform(tt)); + } + } + // certain combination of unused name + side effect leads to: + // https://github.com/mishoo/UglifyJS2/issues/44 + // https://github.com/mishoo/UglifyJS2/issues/1830 + // that's an invalid AST. + // We fix it at this stage by moving the `var` outside the `for`. + if (node instanceof AST_For) { + descend(node, this); + if (node.init instanceof AST_BlockStatement) { + var block = node.init; + node.init = block.body.pop(); + block.body.push(node); + return in_list ? MAP.splice(block.body) : block; + } else if (is_empty(node.init)) { + node.init = null; + } + return node; + } + if (node instanceof AST_LabeledStatement && node.body instanceof AST_For) { + descend(node, this); + if (node.body instanceof AST_BlockStatement) { + var block = node.body; + node.body = block.body.pop(); + block.body.push(node); + return in_list ? MAP.splice(block.body) : block; + } + return node; + } + if (node instanceof AST_Scope && node !== self) + return node; + } + ); + self.transform(tt); + } + }); + + AST_Scope.DEFMETHOD("hoist_declarations", function(compressor){ + var self = this; + if (compressor.has_directive("use asm")) return self; + var hoist_funs = compressor.option("hoist_funs"); + var hoist_vars = compressor.option("hoist_vars"); + if (hoist_funs || hoist_vars) { + var dirs = []; + var hoisted = []; + var vars = new Dictionary(), vars_found = 0, var_decl = 0; + // let's count var_decl first, we seem to waste a lot of + // space if we hoist `var` when there's only one. + self.walk(new TreeWalker(function(node){ + if (node instanceof AST_Scope && node !== self) + return true; + if (node instanceof AST_Var) { + ++var_decl; + return true; + } + })); + hoist_vars = hoist_vars && var_decl > 1; + var tt = new TreeTransformer( + function before(node) { + if (node !== self) { + if (node instanceof AST_Directive) { + dirs.push(node); + return make_node(AST_EmptyStatement, node); + } + if (node instanceof AST_Defun && hoist_funs) { + hoisted.push(node); + return make_node(AST_EmptyStatement, node); + } + if (node instanceof AST_Var && hoist_vars) { + node.definitions.forEach(function(def){ + vars.set(def.name.name, def); + ++vars_found; + }); + var seq = node.to_assignments(compressor); + var p = tt.parent(); + if (p instanceof AST_ForIn && p.init === node) { + if (seq == null) { + var def = node.definitions[0].name; + return make_node(AST_SymbolRef, def, def); + } + return seq; + } + if (p instanceof AST_For && p.init === node) { + return seq; + } + if (!seq) return make_node(AST_EmptyStatement, node); + return make_node(AST_SimpleStatement, node, { + body: seq + }); + } + if (node instanceof AST_Scope) + return node; // to avoid descending in nested scopes + } + } + ); + self = self.transform(tt); + if (vars_found > 0) { + // collect only vars which don't show up in self's arguments list + var defs = []; + vars.each(function(def, name){ + if (self instanceof AST_Lambda + && find_if(function(x){ return x.name == def.name.name }, + self.argnames)) { + vars.del(name); + } else { + def = def.clone(); + def.value = null; + defs.push(def); + vars.set(name, def); + } + }); + if (defs.length > 0) { + // try to merge in assignments + for (var i = 0; i < self.body.length;) { + if (self.body[i] instanceof AST_SimpleStatement) { + var expr = self.body[i].body, sym, assign; + if (expr instanceof AST_Assign + && expr.operator == "=" + && (sym = expr.left) instanceof AST_Symbol + && vars.has(sym.name)) + { + var def = vars.get(sym.name); + if (def.value) break; + def.value = expr.right; + remove(defs, def); + defs.push(def); + self.body.splice(i, 1); + continue; + } + if (expr instanceof AST_Seq + && (assign = expr.car) instanceof AST_Assign + && assign.operator == "=" + && (sym = assign.left) instanceof AST_Symbol + && vars.has(sym.name)) + { + var def = vars.get(sym.name); + if (def.value) break; + def.value = assign.right; + remove(defs, def); + defs.push(def); + self.body[i].body = expr.cdr; + continue; + } + } + if (self.body[i] instanceof AST_EmptyStatement) { + self.body.splice(i, 1); + continue; + } + if (self.body[i] instanceof AST_BlockStatement) { + var tmp = [ i, 1 ].concat(self.body[i].body); + self.body.splice.apply(self.body, tmp); + continue; + } + break; + } + defs = make_node(AST_Var, self, { + definitions: defs + }); + hoisted.push(defs); + }; + } + self.body = dirs.concat(hoisted, self.body); + } + return self; + }); + + // drop_side_effect_free() + // remove side-effect-free parts which only affects return value + (function(def){ + // Drop side-effect-free elements from an array of expressions. + // Returns an array of expressions with side-effects or null + // if all elements were dropped. Note: original array may be + // returned if nothing changed. + function trim(nodes, compressor, first_in_statement) { + var ret = [], changed = false; + for (var i = 0, len = nodes.length; i < len; i++) { + var node = nodes[i].drop_side_effect_free(compressor, first_in_statement); + changed |= node !== nodes[i]; + if (node) { + ret.push(node); + first_in_statement = false; + } + } + return changed ? ret.length ? ret : null : nodes; + } + + def(AST_Node, return_this); + def(AST_Constant, return_null); + def(AST_This, return_null); + def(AST_Call, function(compressor, first_in_statement){ + if (!this.has_pure_annotation(compressor) && compressor.pure_funcs(this)) { + if (this.expression instanceof AST_Function + && (!this.expression.name || !this.expression.name.definition().references.length)) { + var node = this.clone(); + node.expression = node.expression.process_expression(false, compressor); + return node; + } + return this; + } + if (this.pure) { + compressor.warn("Dropping __PURE__ call [{file}:{line},{col}]", this.start); + this.pure.value = this.pure.value.replace(/[@#]__PURE__/g, ' '); + } + var args = trim(this.args, compressor, first_in_statement); + return args && AST_Seq.from_array(args); + }); + def(AST_Accessor, return_null); + def(AST_Function, return_null); + def(AST_Binary, function(compressor, first_in_statement){ + var right = this.right.drop_side_effect_free(compressor); + if (!right) return this.left.drop_side_effect_free(compressor, first_in_statement); + switch (this.operator) { + case "&&": + case "||": + if (right === this.right) return this; + var node = this.clone(); + node.right = right; + return node; + default: + var left = this.left.drop_side_effect_free(compressor, first_in_statement); + if (!left) return this.right.drop_side_effect_free(compressor, first_in_statement); + return make_node(AST_Seq, this, { + car: left, + cdr: right + }); + } + }); + def(AST_Assign, return_this); + def(AST_Conditional, function(compressor){ + var consequent = this.consequent.drop_side_effect_free(compressor); + var alternative = this.alternative.drop_side_effect_free(compressor); + if (consequent === this.consequent && alternative === this.alternative) return this; + if (!consequent) return alternative ? make_node(AST_Binary, this, { + operator: "||", + left: this.condition, + right: alternative + }) : this.condition.drop_side_effect_free(compressor); + if (!alternative) return make_node(AST_Binary, this, { + operator: "&&", + left: this.condition, + right: consequent + }); + var node = this.clone(); + node.consequent = consequent; + node.alternative = alternative; + return node; + }); + def(AST_Unary, function(compressor, first_in_statement){ + if (unary_side_effects(this.operator)) return this; + if (this.operator == "typeof" && this.expression instanceof AST_SymbolRef) return null; + var expression = this.expression.drop_side_effect_free(compressor, first_in_statement); + if (first_in_statement + && this instanceof AST_UnaryPrefix + && is_iife_call(expression)) { + if (expression === this.expression && this.operator.length === 1) return this; + return make_node(AST_UnaryPrefix, this, { + operator: this.operator.length === 1 ? this.operator : "!", + expression: expression + }); + } + return expression; + }); + def(AST_SymbolRef, function() { + return this.undeclared() ? this : null; + }); + def(AST_Object, function(compressor, first_in_statement){ + var values = trim(this.properties, compressor, first_in_statement); + return values && AST_Seq.from_array(values); + }); + def(AST_ObjectProperty, function(compressor, first_in_statement){ + return this.value.drop_side_effect_free(compressor, first_in_statement); + }); + def(AST_Array, function(compressor, first_in_statement){ + var values = trim(this.elements, compressor, first_in_statement); + return values && AST_Seq.from_array(values); + }); + def(AST_Dot, function(compressor, first_in_statement){ + if (this.expression.may_throw_on_access(compressor)) return this; + return this.expression.drop_side_effect_free(compressor, first_in_statement); + }); + def(AST_Sub, function(compressor, first_in_statement){ + if (this.expression.may_throw_on_access(compressor)) return this; + var expression = this.expression.drop_side_effect_free(compressor, first_in_statement); + if (!expression) return this.property.drop_side_effect_free(compressor, first_in_statement); + var property = this.property.drop_side_effect_free(compressor); + if (!property) return expression; + return make_node(AST_Seq, this, { + car: expression, + cdr: property + }); + }); + def(AST_Seq, function(compressor){ + var cdr = this.cdr.drop_side_effect_free(compressor); + if (cdr === this.cdr) return this; + if (!cdr) return this.car; + return make_node(AST_Seq, this, { + car: this.car, + cdr: cdr + }); + }); + })(function(node, func){ + node.DEFMETHOD("drop_side_effect_free", func); + }); + + OPT(AST_SimpleStatement, function(self, compressor){ + if (compressor.option("side_effects")) { + var body = self.body; + var node = body.drop_side_effect_free(compressor, true); + if (!node) { + compressor.warn("Dropping side-effect-free statement [{file}:{line},{col}]", self.start); + return make_node(AST_EmptyStatement, self); + } + if (node !== body) { + return make_node(AST_SimpleStatement, self, { body: node }); + } + } + return self; + }); + + OPT(AST_DWLoop, function(self, compressor){ + if (!compressor.option("loops")) return self; + var cond = self.condition.evaluate(compressor); + if (cond !== self.condition) { + if (cond) { + return make_node(AST_For, self, { + body: self.body + }); + } + if (compressor.option("dead_code") && self instanceof AST_While) { + var a = []; + extract_declarations_from_unreachable_code(compressor, self.body, a); + return make_node(AST_BlockStatement, self, { body: a }).optimize(compressor); + } + if (self instanceof AST_Do) { + var has_loop_control = false; + var tw = new TreeWalker(function(node) { + if (node instanceof AST_Scope || has_loop_control) return true; + if (node instanceof AST_LoopControl && tw.loopcontrol_target(node) === self) + return has_loop_control = true; + }); + var parent = compressor.parent(); + (parent instanceof AST_LabeledStatement ? parent : self).walk(tw); + if (!has_loop_control) return self.body; + } + } + if (self instanceof AST_While) { + return make_node(AST_For, self, self).optimize(compressor); + } + return self; + }); + + function if_break_in_loop(self, compressor) { + function drop_it(rest) { + rest = as_statement_array(rest); + if (self.body instanceof AST_BlockStatement) { + self.body = self.body.clone(); + self.body.body = rest.concat(self.body.body.slice(1)); + self.body = self.body.transform(compressor); + } else { + self.body = make_node(AST_BlockStatement, self.body, { + body: rest + }).transform(compressor); + } + if_break_in_loop(self, compressor); + } + var first = self.body instanceof AST_BlockStatement ? self.body.body[0] : self.body; + if (first instanceof AST_If) { + if (first.body instanceof AST_Break + && compressor.loopcontrol_target(first.body) === compressor.self()) { + if (self.condition) { + self.condition = make_node(AST_Binary, self.condition, { + left: self.condition, + operator: "&&", + right: first.condition.negate(compressor), + }); + } else { + self.condition = first.condition.negate(compressor); + } + drop_it(first.alternative); + } + else if (first.alternative instanceof AST_Break + && compressor.loopcontrol_target(first.alternative) === compressor.self()) { + if (self.condition) { + self.condition = make_node(AST_Binary, self.condition, { + left: self.condition, + operator: "&&", + right: first.condition, + }); + } else { + self.condition = first.condition; + } + drop_it(first.body); + } + } + }; + + OPT(AST_For, function(self, compressor){ + if (!compressor.option("loops")) return self; + if (self.condition) { + var cond = self.condition.evaluate(compressor); + if (compressor.option("dead_code") && !cond) { + var a = []; + if (self.init instanceof AST_Statement) { + a.push(self.init); + } + else if (self.init) { + a.push(make_node(AST_SimpleStatement, self.init, { + body: self.init + })); + } + extract_declarations_from_unreachable_code(compressor, self.body, a); + return make_node(AST_BlockStatement, self, { body: a }).optimize(compressor); + } + if (cond !== self.condition) { + cond = make_node_from_constant(cond, self.condition).transform(compressor); + self.condition = best_of_expression(cond, self.condition); + } + } + if_break_in_loop(self, compressor); + return self; + }); + + OPT(AST_If, function(self, compressor){ + if (is_empty(self.alternative)) self.alternative = null; + + if (!compressor.option("conditionals")) return self; + // if condition can be statically determined, warn and drop + // one of the blocks. note, statically determined implies + // “has no side effects”; also it doesn't work for cases like + // `x && true`, though it probably should. + var cond = self.condition.evaluate(compressor); + if (cond !== self.condition) { + if (cond) { + compressor.warn("Condition always true [{file}:{line},{col}]", self.condition.start); + if (compressor.option("dead_code")) { + var a = []; + if (self.alternative) { + extract_declarations_from_unreachable_code(compressor, self.alternative, a); + } + a.push(self.body); + return make_node(AST_BlockStatement, self, { body: a }).optimize(compressor); + } + } else { + compressor.warn("Condition always false [{file}:{line},{col}]", self.condition.start); + if (compressor.option("dead_code")) { + var a = []; + extract_declarations_from_unreachable_code(compressor, self.body, a); + if (self.alternative) a.push(self.alternative); + return make_node(AST_BlockStatement, self, { body: a }).optimize(compressor); + } + } + cond = make_node_from_constant(cond, self.condition).transform(compressor); + self.condition = best_of_expression(cond, self.condition); + } + var negated = self.condition.negate(compressor); + var self_condition_length = self.condition.print_to_string().length; + var negated_length = negated.print_to_string().length; + var negated_is_best = negated_length < self_condition_length; + if (self.alternative && negated_is_best) { + negated_is_best = false; // because we already do the switch here. + // no need to swap values of self_condition_length and negated_length + // here because they are only used in an equality comparison later on. + self.condition = negated; + var tmp = self.body; + self.body = self.alternative || make_node(AST_EmptyStatement, self); + self.alternative = tmp; + } + if (is_empty(self.body) && is_empty(self.alternative)) { + return make_node(AST_SimpleStatement, self.condition, { + body: self.condition.clone() + }).optimize(compressor); + } + if (self.body instanceof AST_SimpleStatement + && self.alternative instanceof AST_SimpleStatement) { + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Conditional, self, { + condition : self.condition, + consequent : self.body.body, + alternative : self.alternative.body + }) + }).optimize(compressor); + } + if (is_empty(self.alternative) && self.body instanceof AST_SimpleStatement) { + if (self_condition_length === negated_length && !negated_is_best + && self.condition instanceof AST_Binary && self.condition.operator == "||") { + // although the code length of self.condition and negated are the same, + // negated does not require additional surrounding parentheses. + // see https://github.com/mishoo/UglifyJS2/issues/979 + negated_is_best = true; + } + if (negated_is_best) return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "||", + left : negated, + right : self.body.body + }) + }).optimize(compressor); + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "&&", + left : self.condition, + right : self.body.body + }) + }).optimize(compressor); + } + if (self.body instanceof AST_EmptyStatement + && self.alternative instanceof AST_SimpleStatement) { + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "||", + left : self.condition, + right : self.alternative.body + }) + }).optimize(compressor); + } + if (self.body instanceof AST_Exit + && self.alternative instanceof AST_Exit + && self.body.TYPE == self.alternative.TYPE) { + return make_node(self.body.CTOR, self, { + value: make_node(AST_Conditional, self, { + condition : self.condition, + consequent : self.body.value || make_node(AST_Undefined, self.body), + alternative : self.alternative.value || make_node(AST_Undefined, self.alternative) + }).transform(compressor) + }).optimize(compressor); + } + if (self.body instanceof AST_If + && !self.body.alternative + && !self.alternative) { + self = make_node(AST_If, self, { + condition: make_node(AST_Binary, self.condition, { + operator: "&&", + left: self.condition, + right: self.body.condition + }), + body: self.body.body, + alternative: null + }); + } + if (aborts(self.body)) { + if (self.alternative) { + var alt = self.alternative; + self.alternative = null; + return make_node(AST_BlockStatement, self, { + body: [ self, alt ] + }).optimize(compressor); + } + } + if (aborts(self.alternative)) { + var body = self.body; + self.body = self.alternative; + self.condition = negated_is_best ? negated : self.condition.negate(compressor); + self.alternative = null; + return make_node(AST_BlockStatement, self, { + body: [ self, body ] + }).optimize(compressor); + } + return self; + }); + + OPT(AST_Switch, function(self, compressor){ + if (!compressor.option("switches")) return self; + var branch; + var value = self.expression.evaluate(compressor); + if (value !== self.expression) { + var expression = make_node_from_constant(value, self.expression).transform(compressor); + self.expression = best_of_expression(expression, self.expression); + } + if (!compressor.option("dead_code")) return self; + var decl = []; + var body = []; + var default_branch; + var exact_match; + for (var i = 0, len = self.body.length; i < len && !exact_match; i++) { + branch = self.body[i]; + if (branch instanceof AST_Default) { + if (!default_branch) { + default_branch = branch; + } else { + eliminate_branch(branch, body[body.length - 1]); + } + } else if (value !== self.expression) { + var exp = branch.expression.evaluate(compressor); + if (exp === value) { + exact_match = branch; + if (default_branch) { + var default_index = body.indexOf(default_branch); + body.splice(default_index, 1); + eliminate_branch(default_branch, body[default_index - 1]); + default_branch = null; + } + } else if (exp !== branch.expression) { + eliminate_branch(branch, body[body.length - 1]); + continue; + } + } + if (aborts(branch)) { + var prev = body[body.length - 1]; + if (aborts(prev) && prev.body.length == branch.body.length + && make_node(AST_BlockStatement, prev, prev).equivalent_to(make_node(AST_BlockStatement, branch, branch))) { + prev.body = []; + } + } + body.push(branch); + } + while (i < len) eliminate_branch(self.body[i++], body[body.length - 1]); + if (body.length > 0) { + body[0].body = decl.concat(body[0].body); + } + self.body = body; + while (branch = body[body.length - 1]) { + var stat = branch.body[branch.body.length - 1]; + if (stat instanceof AST_Break && compressor.loopcontrol_target(stat) === self) + branch.body.pop(); + if (branch.body.length || branch instanceof AST_Case + && (default_branch || branch.expression.has_side_effects(compressor))) break; + if (body.pop() === default_branch) default_branch = null; + } + if (body.length == 0) { + return make_node(AST_BlockStatement, self, { + body: decl.concat(make_node(AST_SimpleStatement, self.expression, { + body: self.expression + })) + }).optimize(compressor); + } + if (body.length == 1 && (body[0] === exact_match || body[0] === default_branch)) { + var has_break = false; + var tw = new TreeWalker(function(node) { + if (has_break + || node instanceof AST_Lambda + || node instanceof AST_SimpleStatement) return true; + if (node instanceof AST_Break && tw.loopcontrol_target(node) === self) + has_break = true; + }); + self.walk(tw); + if (!has_break) { + body = body[0].body.slice(); + body.unshift(make_node(AST_SimpleStatement, self.expression, { + body: self.expression + })); + return make_node(AST_BlockStatement, self, { + body: body + }).optimize(compressor); + } + } + return self; + + function eliminate_branch(branch, prev) { + if (prev && !aborts(prev)) { + prev.body = prev.body.concat(branch.body); + } else { + extract_declarations_from_unreachable_code(compressor, branch, decl); + } + } + }); + + OPT(AST_Try, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + if (self.bcatch && self.bfinally && all(self.bfinally.body, is_empty)) self.bfinally = null; + if (all(self.body, is_empty)) { + var body = []; + if (self.bcatch) extract_declarations_from_unreachable_code(compressor, self.bcatch, body); + if (self.bfinally) body = body.concat(self.bfinally.body); + return make_node(AST_BlockStatement, self, { + body: body + }).optimize(compressor); + } + return self; + }); + + AST_Definitions.DEFMETHOD("remove_initializers", function(){ + this.definitions.forEach(function(def){ def.value = null }); + }); + + AST_Definitions.DEFMETHOD("to_assignments", function(compressor){ + var reduce_vars = compressor.option("reduce_vars"); + var assignments = this.definitions.reduce(function(a, def){ + if (def.value) { + var name = make_node(AST_SymbolRef, def.name, def.name); + a.push(make_node(AST_Assign, def, { + operator : "=", + left : name, + right : def.value + })); + if (reduce_vars) name.definition().fixed = false; + } + return a; + }, []); + if (assignments.length == 0) return null; + return AST_Seq.from_array(assignments); + }); + + OPT(AST_Definitions, function(self, compressor){ + if (self.definitions.length == 0) + return make_node(AST_EmptyStatement, self); + return self; + }); + + OPT(AST_Call, function(self, compressor){ + var exp = self.expression; + if (compressor.option("reduce_vars") + && exp instanceof AST_SymbolRef) { + var def = exp.definition(); + var fixed = exp.fixed_value(); + if (fixed instanceof AST_Defun) { + def.fixed = fixed = make_node(AST_Function, fixed, fixed).clone(true); + } + if (fixed instanceof AST_Function) { + exp = fixed; + if (compressor.option("unused") + && def.references.length == 1 + && !(def.scope.uses_arguments + && def.orig[0] instanceof AST_SymbolFunarg) + && !def.scope.uses_eval + && compressor.find_parent(AST_Scope) === def.scope) { + self.expression = exp; + } + } + } + if (compressor.option("unused") + && exp instanceof AST_Function + && !exp.uses_arguments + && !exp.uses_eval) { + var pos = 0, last = 0; + for (var i = 0, len = self.args.length; i < len; i++) { + var trim = i >= exp.argnames.length; + if (trim || exp.argnames[i].__unused) { + var node = self.args[i].drop_side_effect_free(compressor); + if (node) { + self.args[pos++] = node; + } else if (!trim) { + self.args[pos++] = make_node(AST_Number, self.args[i], { + value: 0 + }); + continue; + } + } else { + self.args[pos++] = self.args[i]; + } + last = pos; + } + self.args.length = last; + } + if (compressor.option("unsafe")) { + if (exp instanceof AST_SymbolRef && exp.undeclared()) { + switch (exp.name) { + case "Array": + if (self.args.length != 1) { + return make_node(AST_Array, self, { + elements: self.args + }).optimize(compressor); + } + break; + case "Object": + if (self.args.length == 0) { + return make_node(AST_Object, self, { + properties: [] + }); + } + break; + case "String": + if (self.args.length == 0) return make_node(AST_String, self, { + value: "" + }); + if (self.args.length <= 1) return make_node(AST_Binary, self, { + left: self.args[0], + operator: "+", + right: make_node(AST_String, self, { value: "" }) + }).optimize(compressor); + break; + case "Number": + if (self.args.length == 0) return make_node(AST_Number, self, { + value: 0 + }); + if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { + expression: self.args[0], + operator: "+" + }).optimize(compressor); + case "Boolean": + if (self.args.length == 0) return make_node(AST_False, self); + if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { + expression: make_node(AST_UnaryPrefix, self, { + expression: self.args[0], + operator: "!" + }), + operator: "!" + }).optimize(compressor); + break; + case "Function": + // new Function() => function(){} + if (self.args.length == 0) return make_node(AST_Function, self, { + argnames: [], + body: [] + }); + if (all(self.args, function(x){ return x instanceof AST_String })) { + // quite a corner-case, but we can handle it: + // https://github.com/mishoo/UglifyJS2/issues/203 + // if the code argument is a constant, then we can minify it. + try { + var code = "(function(" + self.args.slice(0, -1).map(function(arg){ + return arg.value; + }).join(",") + "){" + self.args[self.args.length - 1].value + "})()"; + var ast = parse(code); + ast.figure_out_scope({ screw_ie8: compressor.option("screw_ie8") }); + var comp = new Compressor(compressor.options); + ast = ast.transform(comp); + ast.figure_out_scope({ screw_ie8: compressor.option("screw_ie8") }); + ast.mangle_names(); + var fun; + try { + ast.walk(new TreeWalker(function(node){ + if (node instanceof AST_Lambda) { + fun = node; + throw ast; + } + })); + } catch(ex) { + if (ex !== ast) throw ex; + }; + if (!fun) return self; + var args = fun.argnames.map(function(arg, i){ + return make_node(AST_String, self.args[i], { + value: arg.print_to_string() + }); + }); + var code = OutputStream(); + AST_BlockStatement.prototype._codegen.call(fun, fun, code); + code = code.toString().replace(/^\{|\}$/g, ""); + args.push(make_node(AST_String, self.args[self.args.length - 1], { + value: code + })); + self.args = args; + return self; + } catch(ex) { + if (ex instanceof JS_Parse_Error) { + compressor.warn("Error parsing code passed to new Function [{file}:{line},{col}]", self.args[self.args.length - 1].start); + compressor.warn(ex.toString()); + } else { + console.log(ex); + throw ex; + } + } + } + break; + } + } + else if (exp instanceof AST_Dot && exp.property == "toString" && self.args.length == 0) { + return make_node(AST_Binary, self, { + left: make_node(AST_String, self, { value: "" }), + operator: "+", + right: exp.expression + }).optimize(compressor); + } + else if (exp instanceof AST_Dot && exp.expression instanceof AST_Array && exp.property == "join") EXIT: { + var separator; + if (self.args.length > 0) { + separator = self.args[0].evaluate(compressor); + if (separator === self.args[0]) break EXIT; // not a constant + } + var elements = []; + var consts = []; + exp.expression.elements.forEach(function(el) { + var value = el.evaluate(compressor); + if (value !== el) { + consts.push(value); + } else { + if (consts.length > 0) { + elements.push(make_node(AST_String, self, { + value: consts.join(separator) + })); + consts.length = 0; + } + elements.push(el); + } + }); + if (consts.length > 0) { + elements.push(make_node(AST_String, self, { + value: consts.join(separator) + })); + } + if (elements.length == 0) return make_node(AST_String, self, { value: "" }); + if (elements.length == 1) { + if (elements[0].is_string(compressor)) { + return elements[0]; + } + return make_node(AST_Binary, elements[0], { + operator : "+", + left : make_node(AST_String, self, { value: "" }), + right : elements[0] + }); + } + if (separator == "") { + var first; + if (elements[0].is_string(compressor) + || elements[1].is_string(compressor)) { + first = elements.shift(); + } else { + first = make_node(AST_String, self, { value: "" }); + } + return elements.reduce(function(prev, el){ + return make_node(AST_Binary, el, { + operator : "+", + left : prev, + right : el + }); + }, first).optimize(compressor); + } + // need this awkward cloning to not affect original element + // best_of will decide which one to get through. + var node = self.clone(); + node.expression = node.expression.clone(); + node.expression.expression = node.expression.expression.clone(); + node.expression.expression.elements = elements; + return best_of(compressor, self, node); + } + else if (exp instanceof AST_Dot && exp.expression.is_string(compressor) && exp.property == "charAt") { + var arg = self.args[0]; + var index = arg ? arg.evaluate(compressor) : 0; + if (index !== arg) { + return make_node(AST_Sub, exp, { + expression: exp.expression, + property: make_node_from_constant(index | 0, arg || exp) + }).optimize(compressor); + } + } + } + if (exp instanceof AST_Function) { + if (exp.body[0] instanceof AST_Return) { + var value = exp.body[0].value; + if (!value || value.is_constant()) { + var args = self.args.concat(value || make_node(AST_Undefined, self)); + return AST_Seq.from_array(args).transform(compressor); + } + } + if (compressor.option("side_effects") && all(exp.body, is_empty)) { + var args = self.args.concat(make_node(AST_Undefined, self)); + return AST_Seq.from_array(args).transform(compressor); + } + } + if (compressor.option("drop_console")) { + if (exp instanceof AST_PropAccess) { + var name = exp.expression; + while (name.expression) { + name = name.expression; + } + if (name instanceof AST_SymbolRef + && name.name == "console" + && name.undeclared()) { + return make_node(AST_Undefined, self).optimize(compressor); + } + } + } + if (compressor.option("negate_iife") + && compressor.parent() instanceof AST_SimpleStatement + && is_iife_call(self)) { + return self.negate(compressor, true); + } + return self; + }); + + OPT(AST_New, function(self, compressor){ + if (compressor.option("unsafe")) { + var exp = self.expression; + if (exp instanceof AST_SymbolRef && exp.undeclared()) { + switch (exp.name) { + case "Object": + case "RegExp": + case "Function": + case "Error": + case "Array": + return make_node(AST_Call, self, self).transform(compressor); + } + } + } + return self; + }); + + OPT(AST_Seq, function(self, compressor){ + if (!compressor.option("side_effects")) + return self; + self.car = self.car.drop_side_effect_free(compressor, first_in_statement(compressor)); + if (!self.car) return maintain_this_binding(compressor.parent(), self, self.cdr); + if (compressor.option("cascade")) { + var left; + if (self.car instanceof AST_Assign + && !self.car.left.has_side_effects(compressor)) { + left = self.car.left; + } else if (self.car instanceof AST_Unary + && (self.car.operator == "++" || self.car.operator == "--")) { + left = self.car.expression; + } + if (left + && !(left instanceof AST_SymbolRef + && (left.definition().orig[0] instanceof AST_SymbolLambda + || is_reference_const(left)))) { + var parent, field; + var cdr = self.cdr; + while (true) { + if (cdr.equivalent_to(left)) { + var car = self.car instanceof AST_UnaryPostfix ? make_node(AST_UnaryPrefix, self.car, { + operator: self.car.operator, + expression: left + }) : self.car; + if (parent) { + parent[field] = car; + return self.cdr; + } + return car; + } + if (cdr instanceof AST_Binary && !(cdr instanceof AST_Assign)) { + if (cdr.left.is_constant()) { + if (cdr.operator == "||" || cdr.operator == "&&") break; + field = "right"; + } else { + field = "left"; + } + } else if (cdr instanceof AST_Call + || cdr instanceof AST_Unary && !unary_side_effects(cdr.operator)) { + field = "expression"; + } else break; + parent = cdr; + cdr = cdr[field]; + } + } + } + if (is_undefined(self.cdr, compressor)) { + return make_node(AST_UnaryPrefix, self, { + operator : "void", + expression : self.car + }); + } + return self; + }); + + AST_Unary.DEFMETHOD("lift_sequences", function(compressor){ + if (compressor.option("sequences")) { + if (this.expression instanceof AST_Seq) { + var seq = this.expression; + var x = seq.to_array(); + var e = this.clone(); + e.expression = x.pop(); + x.push(e); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + } + return this; + }); + + OPT(AST_UnaryPostfix, function(self, compressor){ + return self.lift_sequences(compressor); + }); + + OPT(AST_UnaryPrefix, function(self, compressor){ + var e = self.expression; + if (self.operator == "delete" + && !(e instanceof AST_SymbolRef + || e instanceof AST_PropAccess + || e instanceof AST_NaN + || e instanceof AST_Infinity + || e instanceof AST_Undefined)) { + if (e instanceof AST_Seq) { + e = e.to_array(); + e.push(make_node(AST_True, self)); + return AST_Seq.from_array(e).optimize(compressor); + } + return make_node(AST_Seq, self, { + car: e, + cdr: make_node(AST_True, self) + }).optimize(compressor); + } + var seq = self.lift_sequences(compressor); + if (seq !== self) { + return seq; + } + if (compressor.option("side_effects") && self.operator == "void") { + e = e.drop_side_effect_free(compressor); + if (e) { + self.expression = e; + return self; + } else { + return make_node(AST_Undefined, self).optimize(compressor); + } + } + if (compressor.option("booleans") && compressor.in_boolean_context()) { + switch (self.operator) { + case "!": + if (e instanceof AST_UnaryPrefix && e.operator == "!") { + // !!foo ==> foo, if we're in boolean context + return e.expression; + } + if (e instanceof AST_Binary) { + self = best_of(compressor, self, e.negate(compressor, first_in_statement(compressor))); + } + break; + case "typeof": + // typeof always returns a non-empty string, thus it's + // always true in booleans + compressor.warn("Boolean expression always true [{file}:{line},{col}]", self.start); + return (e instanceof AST_SymbolRef ? make_node(AST_True, self) : make_node(AST_Seq, self, { + car: e, + cdr: make_node(AST_True, self) + })).optimize(compressor); + } + } + if (self.operator == "-" && e instanceof AST_Infinity) { + e = e.transform(compressor); + } + if (e instanceof AST_Binary + && (self.operator == "+" || self.operator == "-") + && (e.operator == "*" || e.operator == "/" || e.operator == "%")) { + return make_node(AST_Binary, self, { + operator: e.operator, + left: make_node(AST_UnaryPrefix, e.left, { + operator: self.operator, + expression: e.left + }), + right: e.right + }); + } + // avoids infinite recursion of numerals + if (self.operator != "-" + || !(e instanceof AST_Number || e instanceof AST_Infinity)) { + var ev = self.evaluate(compressor); + if (ev !== self) { + ev = make_node_from_constant(ev, self).optimize(compressor); + return best_of(compressor, ev, self); + } + } + return self; + }); + + AST_Binary.DEFMETHOD("lift_sequences", function(compressor){ + if (compressor.option("sequences")) { + if (this.left instanceof AST_Seq) { + var seq = this.left; + var x = seq.to_array(); + var e = this.clone(); + e.left = x.pop(); + x.push(e); + return AST_Seq.from_array(x).optimize(compressor); + } + if (this.right instanceof AST_Seq && !this.left.has_side_effects(compressor)) { + var assign = this.operator == "=" && this.left instanceof AST_SymbolRef; + var root = this.right.clone(); + var cursor, seq = root; + while (assign || !seq.car.has_side_effects(compressor)) { + cursor = seq; + if (seq.cdr instanceof AST_Seq) { + seq = seq.cdr = seq.cdr.clone(); + } else break; + } + if (cursor) { + var e = this.clone(); + e.right = cursor.cdr; + cursor.cdr = e; + return root.optimize(compressor); + } + } + } + return this; + }); + + var commutativeOperators = makePredicate("== === != !== * & | ^"); + + OPT(AST_Binary, function(self, compressor){ + function reversible() { + return self.left.is_constant() + || self.right.is_constant() + || !self.left.has_side_effects(compressor) + && !self.right.has_side_effects(compressor); + } + function reverse(op) { + if (reversible()) { + if (op) self.operator = op; + var tmp = self.left; + self.left = self.right; + self.right = tmp; + } + } + if (commutativeOperators(self.operator)) { + if (self.right.is_constant() + && !self.left.is_constant()) { + // if right is a constant, whatever side effects the + // left side might have could not influence the + // result. hence, force switch. + + if (!(self.left instanceof AST_Binary + && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) { + reverse(); + } + } + } + self = self.lift_sequences(compressor); + if (compressor.option("comparisons")) switch (self.operator) { + case "===": + case "!==": + if ((self.left.is_string(compressor) && self.right.is_string(compressor)) || + (self.left.is_number(compressor) && self.right.is_number(compressor)) || + (self.left.is_boolean() && self.right.is_boolean())) { + self.operator = self.operator.substr(0, 2); + } + // XXX: intentionally falling down to the next case + case "==": + case "!=": + // "undefined" == typeof x => undefined === x + if (self.left instanceof AST_String + && self.left.value == "undefined" + && self.right instanceof AST_UnaryPrefix + && self.right.operator == "typeof") { + var expr = self.right.expression; + if (expr instanceof AST_SymbolRef ? !expr.undeclared() + : !(expr instanceof AST_PropAccess) || compressor.option("screw_ie8")) { + self.right = expr; + self.left = make_node(AST_Undefined, self.left).optimize(compressor); + if (self.operator.length == 2) self.operator += "="; + } + } + break; + } + if (compressor.option("booleans") && self.operator == "+" && compressor.in_boolean_context()) { + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if (ll && typeof ll == "string") { + compressor.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); + return make_node(AST_Seq, self, { + car: self.right, + cdr: make_node(AST_True, self) + }).optimize(compressor); + } + if (rr && typeof rr == "string") { + compressor.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); + return make_node(AST_Seq, self, { + car: self.left, + cdr: make_node(AST_True, self) + }).optimize(compressor); + } + } + if (compressor.option("comparisons") && self.is_boolean()) { + if (!(compressor.parent() instanceof AST_Binary) + || compressor.parent() instanceof AST_Assign) { + var negated = make_node(AST_UnaryPrefix, self, { + operator: "!", + expression: self.negate(compressor, first_in_statement(compressor)) + }); + self = best_of(compressor, self, negated); + } + if (compressor.option("unsafe_comps")) { + switch (self.operator) { + case "<": reverse(">"); break; + case "<=": reverse(">="); break; + } + } + } + if (self.operator == "+") { + if (self.right instanceof AST_String + && self.right.getValue() == "" + && self.left.is_string(compressor)) { + return self.left; + } + if (self.left instanceof AST_String + && self.left.getValue() == "" + && self.right.is_string(compressor)) { + return self.right; + } + if (self.left instanceof AST_Binary + && self.left.operator == "+" + && self.left.left instanceof AST_String + && self.left.left.getValue() == "" + && self.right.is_string(compressor)) { + self.left = self.left.right; + return self.transform(compressor); + } + } + if (compressor.option("evaluate")) { + switch (self.operator) { + case "&&": + var ll = self.left.evaluate(compressor); + if (!ll) { + compressor.warn("Condition left of && always false [{file}:{line},{col}]", self.start); + return maintain_this_binding(compressor.parent(), self, self.left).optimize(compressor); + } else if (ll !== self.left) { + compressor.warn("Condition left of && always true [{file}:{line},{col}]", self.start); + return maintain_this_binding(compressor.parent(), self, self.right).optimize(compressor); + } + if (compressor.option("booleans") && compressor.in_boolean_context()) { + var rr = self.right.evaluate(compressor); + if (!rr) { + compressor.warn("Boolean && always false [{file}:{line},{col}]", self.start); + return make_node(AST_Seq, self, { + car: self.left, + cdr: make_node(AST_False, self) + }).optimize(compressor); + } else if (rr !== self.right) { + compressor.warn("Dropping side-effect-free && in boolean context [{file}:{line},{col}]", self.start); + return self.left.optimize(compressor); + } + } + break; + case "||": + var ll = self.left.evaluate(compressor); + if (!ll) { + compressor.warn("Condition left of || always false [{file}:{line},{col}]", self.start); + return maintain_this_binding(compressor.parent(), self, self.right).optimize(compressor); + } else if (ll !== self.left) { + compressor.warn("Condition left of || always true [{file}:{line},{col}]", self.start); + return maintain_this_binding(compressor.parent(), self, self.left).optimize(compressor); + } + if (compressor.option("booleans") && compressor.in_boolean_context()) { + var rr = self.right.evaluate(compressor); + if (!rr) { + compressor.warn("Dropping side-effect-free || in boolean context [{file}:{line},{col}]", self.start); + return self.left.optimize(compressor); + } else if (rr !== self.right) { + compressor.warn("Boolean || always true [{file}:{line},{col}]", self.start); + return make_node(AST_Seq, self, { + car: self.left, + cdr: make_node(AST_True, self) + }).optimize(compressor); + } + } + break; + } + var associative = true; + switch (self.operator) { + case "+": + // "foo" + ("bar" + x) => "foobar" + x + if (self.left instanceof AST_Constant + && self.right instanceof AST_Binary + && self.right.operator == "+" + && self.right.left instanceof AST_Constant + && self.right.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: make_node(AST_String, self.left, { + value: "" + self.left.getValue() + self.right.left.getValue(), + start: self.left.start, + end: self.right.left.end + }), + right: self.right.right + }); + } + // (x + "foo") + "bar" => x + "foobar" + if (self.right instanceof AST_Constant + && self.left instanceof AST_Binary + && self.left.operator == "+" + && self.left.right instanceof AST_Constant + && self.left.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: self.left.left, + right: make_node(AST_String, self.right, { + value: "" + self.left.right.getValue() + self.right.getValue(), + start: self.left.right.start, + end: self.right.end + }) + }); + } + // (x + "foo") + ("bar" + y) => (x + "foobar") + y + if (self.left instanceof AST_Binary + && self.left.operator == "+" + && self.left.is_string(compressor) + && self.left.right instanceof AST_Constant + && self.right instanceof AST_Binary + && self.right.operator == "+" + && self.right.left instanceof AST_Constant + && self.right.is_string(compressor)) { + self = make_node(AST_Binary, self, { + operator: "+", + left: make_node(AST_Binary, self.left, { + operator: "+", + left: self.left.left, + right: make_node(AST_String, self.left.right, { + value: "" + self.left.right.getValue() + self.right.left.getValue(), + start: self.left.right.start, + end: self.right.left.end + }) + }), + right: self.right.right + }); + } + // a + -b => a - b + if (self.right instanceof AST_UnaryPrefix + && self.right.operator == "-" + && self.left.is_number(compressor)) { + self = make_node(AST_Binary, self, { + operator: "-", + left: self.left, + right: self.right.expression + }); + break; + } + // -a + b => b - a + if (self.left instanceof AST_UnaryPrefix + && self.left.operator == "-" + && reversible() + && self.right.is_number(compressor)) { + self = make_node(AST_Binary, self, { + operator: "-", + left: self.right, + right: self.left.expression + }); + break; + } + case "*": + associative = compressor.option("unsafe_math"); + case "&": + case "|": + case "^": + // a + +b => +b + a + if (self.left.is_number(compressor) + && self.right.is_number(compressor) + && reversible() + && !(self.left instanceof AST_Binary + && self.left.operator != self.operator + && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) { + var reversed = make_node(AST_Binary, self, { + operator: self.operator, + left: self.right, + right: self.left + }); + if (self.right instanceof AST_Constant + && !(self.left instanceof AST_Constant)) { + self = best_of(compressor, reversed, self); + } else { + self = best_of(compressor, self, reversed); + } + } + if (associative && self.is_number(compressor)) { + // a + (b + c) => (a + b) + c + if (self.right instanceof AST_Binary + && self.right.operator == self.operator) { + self = make_node(AST_Binary, self, { + operator: self.operator, + left: make_node(AST_Binary, self.left, { + operator: self.operator, + left: self.left, + right: self.right.left, + start: self.left.start, + end: self.right.left.end + }), + right: self.right.right + }); + } + // (n + 2) + 3 => 5 + n + // (2 * n) * 3 => 6 + n + if (self.right instanceof AST_Constant + && self.left instanceof AST_Binary + && self.left.operator == self.operator) { + if (self.left.left instanceof AST_Constant) { + self = make_node(AST_Binary, self, { + operator: self.operator, + left: make_node(AST_Binary, self.left, { + operator: self.operator, + left: self.left.left, + right: self.right, + start: self.left.left.start, + end: self.right.end + }), + right: self.left.right + }); + } else if (self.left.right instanceof AST_Constant) { + self = make_node(AST_Binary, self, { + operator: self.operator, + left: make_node(AST_Binary, self.left, { + operator: self.operator, + left: self.left.right, + right: self.right, + start: self.left.right.start, + end: self.right.end + }), + right: self.left.left + }); + } + } + // (a | 1) | (2 | d) => (3 | a) | b + if (self.left instanceof AST_Binary + && self.left.operator == self.operator + && self.left.right instanceof AST_Constant + && self.right instanceof AST_Binary + && self.right.operator == self.operator + && self.right.left instanceof AST_Constant) { + self = make_node(AST_Binary, self, { + operator: self.operator, + left: make_node(AST_Binary, self.left, { + operator: self.operator, + left: make_node(AST_Binary, self.left.left, { + operator: self.operator, + left: self.left.right, + right: self.right.left, + start: self.left.right.start, + end: self.right.left.end + }), + right: self.left.left + }), + right: self.right.right + }); + } + } + } + } + // x && (y && z) ==> x && y && z + // x || (y || z) ==> x || y || z + // x + ("y" + z) ==> x + "y" + z + // "x" + (y + "z")==> "x" + y + "z" + if (self.right instanceof AST_Binary + && self.right.operator == self.operator + && (self.operator == "&&" + || self.operator == "||" + || (self.operator == "+" + && (self.right.left.is_string(compressor) + || (self.left.is_string(compressor) + && self.right.right.is_string(compressor)))))) + { + self.left = make_node(AST_Binary, self.left, { + operator : self.operator, + left : self.left, + right : self.right.left + }); + self.right = self.right.right; + return self.transform(compressor); + } + var ev = self.evaluate(compressor); + if (ev !== self) { + ev = make_node_from_constant(ev, self).optimize(compressor); + return best_of(compressor, ev, self); + } + return self; + }); + + OPT(AST_SymbolRef, function(self, compressor){ + var def = self.resolve_defines(compressor); + if (def) { + return def.optimize(compressor); + } + // testing against !self.scope.uses_with first is an optimization + if (compressor.option("screw_ie8") + && self.undeclared() + && (!self.scope.uses_with || !compressor.find_parent(AST_With))) { + switch (self.name) { + case "undefined": + return make_node(AST_Undefined, self).optimize(compressor); + case "NaN": + return make_node(AST_NaN, self).optimize(compressor); + case "Infinity": + return make_node(AST_Infinity, self).optimize(compressor); + } + } + if (compressor.option("evaluate") + && compressor.option("reduce_vars") + && is_lhs(self, compressor.parent()) !== self) { + var d = self.definition(); + var fixed = self.fixed_value(); + if (fixed) { + if (d.should_replace === undefined) { + var init = fixed.evaluate(compressor); + if (init !== fixed && (compressor.option("unsafe_regexp") || !(init instanceof RegExp))) { + init = make_node_from_constant(init, fixed); + var value = init.optimize(compressor).print_to_string().length; + var fn; + if (has_symbol_ref(fixed)) { + fn = function() { + var result = init.optimize(compressor); + return result === init ? result.clone(true) : result; + }; + } else { + value = Math.min(value, fixed.print_to_string().length); + fn = function() { + var result = best_of_expression(init.optimize(compressor), fixed); + return result === init || result === fixed ? result.clone(true) : result; + }; + } + var name = d.name.length; + var overhead = 0; + if (compressor.option("unused") && (!d.global || compressor.option("toplevel"))) { + overhead = (name + 2 + value) / d.references.length; + } + d.should_replace = value <= name + overhead ? fn : false; + } else { + d.should_replace = false; + } + } + if (d.should_replace) { + return d.should_replace(); + } + } + } + return self; + + function has_symbol_ref(value) { + var found; + value.walk(new TreeWalker(function(node) { + if (node instanceof AST_SymbolRef) found = true; + if (found) return true; + })); + return found; + } + }); + + function is_atomic(lhs, self) { + return lhs instanceof AST_SymbolRef || lhs.TYPE === self.TYPE; + } + + OPT(AST_Undefined, function(self, compressor){ + if (compressor.option("unsafe")) { + var undef = find_variable(compressor, "undefined"); + if (undef) { + var ref = make_node(AST_SymbolRef, self, { + name : "undefined", + scope : undef.scope, + thedef : undef + }); + ref.is_undefined = true; + return ref; + } + } + var lhs = is_lhs(compressor.self(), compressor.parent()); + if (lhs && is_atomic(lhs, self)) return self; + return make_node(AST_UnaryPrefix, self, { + operator: "void", + expression: make_node(AST_Number, self, { + value: 0 + }) + }); + }); + + OPT(AST_Infinity, function(self, compressor){ + var lhs = is_lhs(compressor.self(), compressor.parent()); + if (lhs && is_atomic(lhs, self)) return self; + if (compressor.option("keep_infinity") + && !(lhs && !is_atomic(lhs, self)) + && !find_variable(compressor, "Infinity")) + return self; + return make_node(AST_Binary, self, { + operator: "/", + left: make_node(AST_Number, self, { + value: 1 + }), + right: make_node(AST_Number, self, { + value: 0 + }) + }); + }); + + OPT(AST_NaN, function(self, compressor){ + var lhs = is_lhs(compressor.self(), compressor.parent()); + if (lhs && !is_atomic(lhs, self) + || find_variable(compressor, "NaN")) { + return make_node(AST_Binary, self, { + operator: "/", + left: make_node(AST_Number, self, { + value: 0 + }), + right: make_node(AST_Number, self, { + value: 0 + }) + }); + } + return self; + }); + + var ASSIGN_OPS = [ '+', '-', '/', '*', '%', '>>', '<<', '>>>', '|', '^', '&' ]; + var ASSIGN_OPS_COMMUTATIVE = [ '*', '|', '^', '&' ]; + OPT(AST_Assign, function(self, compressor){ + self = self.lift_sequences(compressor); + if (self.operator == "=" && self.left instanceof AST_SymbolRef && self.right instanceof AST_Binary) { + // x = expr1 OP expr2 + if (self.right.left instanceof AST_SymbolRef + && self.right.left.name == self.left.name + && member(self.right.operator, ASSIGN_OPS)) { + // x = x - 2 ---> x -= 2 + self.operator = self.right.operator + "="; + self.right = self.right.right; + } + else if (self.right.right instanceof AST_SymbolRef + && self.right.right.name == self.left.name + && member(self.right.operator, ASSIGN_OPS_COMMUTATIVE) + && !self.right.left.has_side_effects(compressor)) { + // x = 2 & x ---> x &= 2 + self.operator = self.right.operator + "="; + self.right = self.right.left; + } + } + return self; + }); + + OPT(AST_Conditional, function(self, compressor){ + if (!compressor.option("conditionals")) return self; + if (self.condition instanceof AST_Seq) { + var car = self.condition.car; + self.condition = self.condition.cdr; + return AST_Seq.cons(car, self); + } + var cond = self.condition.evaluate(compressor); + if (cond !== self.condition) { + if (cond) { + compressor.warn("Condition always true [{file}:{line},{col}]", self.start); + return maintain_this_binding(compressor.parent(), self, self.consequent); + } else { + compressor.warn("Condition always false [{file}:{line},{col}]", self.start); + return maintain_this_binding(compressor.parent(), self, self.alternative); + } + } + var negated = cond.negate(compressor, first_in_statement(compressor)); + if (best_of(compressor, cond, negated) === negated) { + self = make_node(AST_Conditional, self, { + condition: negated, + consequent: self.alternative, + alternative: self.consequent + }); + } + var condition = self.condition; + var consequent = self.consequent; + var alternative = self.alternative; + // x?x:y --> x||y + if (condition instanceof AST_SymbolRef + && consequent instanceof AST_SymbolRef + && condition.definition() === consequent.definition()) { + return make_node(AST_Binary, self, { + operator: "||", + left: condition, + right: alternative + }); + } + // if (foo) exp = something; else exp = something_else; + // | + // v + // exp = foo ? something : something_else; + if (consequent instanceof AST_Assign + && alternative instanceof AST_Assign + && consequent.operator == alternative.operator + && consequent.left.equivalent_to(alternative.left) + && (!self.condition.has_side_effects(compressor) + || consequent.operator == "=" + && !consequent.left.has_side_effects(compressor))) { + return make_node(AST_Assign, self, { + operator: consequent.operator, + left: consequent.left, + right: make_node(AST_Conditional, self, { + condition: self.condition, + consequent: consequent.right, + alternative: alternative.right + }) + }); + } + // x ? y(a) : y(b) --> y(x ? a : b) + if (consequent instanceof AST_Call + && alternative.TYPE === consequent.TYPE + && consequent.args.length == 1 + && alternative.args.length == 1 + && consequent.expression.equivalent_to(alternative.expression) + && !consequent.expression.has_side_effects(compressor)) { + consequent.args[0] = make_node(AST_Conditional, self, { + condition: self.condition, + consequent: consequent.args[0], + alternative: alternative.args[0] + }); + return consequent; + } + // x?y?z:a:a --> x&&y?z:a + if (consequent instanceof AST_Conditional + && consequent.alternative.equivalent_to(alternative)) { + return make_node(AST_Conditional, self, { + condition: make_node(AST_Binary, self, { + left: self.condition, + operator: "&&", + right: consequent.condition + }), + consequent: consequent.consequent, + alternative: alternative + }); + } + // x ? y : y --> x, y + if (consequent.equivalent_to(alternative)) { + return make_node(AST_Seq, self, { + car: self.condition, + cdr: consequent + }).optimize(compressor); + } + + if (is_true(self.consequent)) { + if (is_false(self.alternative)) { + // c ? true : false ---> !!c + return booleanize(self.condition); + } + // c ? true : x ---> !!c || x + return make_node(AST_Binary, self, { + operator: "||", + left: booleanize(self.condition), + right: self.alternative + }); + } + if (is_false(self.consequent)) { + if (is_true(self.alternative)) { + // c ? false : true ---> !c + return booleanize(self.condition.negate(compressor)); + } + // c ? false : x ---> !c && x + return make_node(AST_Binary, self, { + operator: "&&", + left: booleanize(self.condition.negate(compressor)), + right: self.alternative + }); + } + if (is_true(self.alternative)) { + // c ? x : true ---> !c || x + return make_node(AST_Binary, self, { + operator: "||", + left: booleanize(self.condition.negate(compressor)), + right: self.consequent + }); + } + if (is_false(self.alternative)) { + // c ? x : false ---> !!c && x + return make_node(AST_Binary, self, { + operator: "&&", + left: booleanize(self.condition), + right: self.consequent + }); + } + + return self; + + function booleanize(node) { + if (node.is_boolean()) return node; + // !!expression + return make_node(AST_UnaryPrefix, node, { + operator: "!", + expression: node.negate(compressor) + }); + } + + // AST_True or !0 + function is_true(node) { + return node instanceof AST_True + || (node instanceof AST_UnaryPrefix + && node.operator == "!" + && node.expression instanceof AST_Constant + && !node.expression.value); + } + // AST_False or !1 + function is_false(node) { + return node instanceof AST_False + || (node instanceof AST_UnaryPrefix + && node.operator == "!" + && node.expression instanceof AST_Constant + && !!node.expression.value); + } + }); + + OPT(AST_Boolean, function(self, compressor){ + if (compressor.option("booleans")) { + var p = compressor.parent(); + if (p instanceof AST_Binary && (p.operator == "==" + || p.operator == "!=")) { + compressor.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]", { + operator : p.operator, + value : self.value, + file : p.start.file, + line : p.start.line, + col : p.start.col, + }); + return make_node(AST_Number, self, { + value: +self.value + }); + } + return make_node(AST_UnaryPrefix, self, { + operator: "!", + expression: make_node(AST_Number, self, { + value: 1 - self.value + }) + }); + } + return self; + }); + + OPT(AST_Sub, function(self, compressor){ + var prop = self.property; + if (prop instanceof AST_String && compressor.option("properties")) { + prop = prop.getValue(); + if (RESERVED_WORDS(prop) ? compressor.option("screw_ie8") : is_identifier_string(prop)) { + return make_node(AST_Dot, self, { + expression : self.expression, + property : prop + }).optimize(compressor); + } + var v = parseFloat(prop); + if (!isNaN(v) && v.toString() == prop) { + self.property = make_node(AST_Number, self.property, { + value: v + }); + } + } + var ev = self.evaluate(compressor); + if (ev !== self) { + ev = make_node_from_constant(ev, self).optimize(compressor); + return best_of(compressor, ev, self); + } + return self; + }); + + OPT(AST_Dot, function(self, compressor){ + var def = self.resolve_defines(compressor); + if (def) { + return def.optimize(compressor); + } + var prop = self.property; + if (RESERVED_WORDS(prop) && !compressor.option("screw_ie8")) { + return make_node(AST_Sub, self, { + expression : self.expression, + property : make_node(AST_String, self, { + value: prop + }) + }).optimize(compressor); + } + if (compressor.option("unsafe_proto") + && self.expression instanceof AST_Dot + && self.expression.property == "prototype") { + var exp = self.expression.expression; + if (exp instanceof AST_SymbolRef && exp.undeclared()) switch (exp.name) { + case "Array": + self.expression = make_node(AST_Array, self.expression, { + elements: [] + }); + break; + case "Object": + self.expression = make_node(AST_Object, self.expression, { + properties: [] + }); + break; + case "String": + self.expression = make_node(AST_String, self.expression, { + value: "" + }); + break; + } + } + var ev = self.evaluate(compressor); + if (ev !== self) { + ev = make_node_from_constant(ev, self).optimize(compressor); + return best_of(compressor, ev, self); + } + return self; + }); + + function literals_in_boolean_context(self, compressor) { + if (compressor.option("booleans") && compressor.in_boolean_context()) { + return best_of(compressor, self, make_node(AST_Seq, self, { + car: self, + cdr: make_node(AST_True, self) + }).optimize(compressor)); + } + return self; + }; + OPT(AST_Array, literals_in_boolean_context); + OPT(AST_Object, literals_in_boolean_context); + OPT(AST_RegExp, literals_in_boolean_context); + + OPT(AST_Return, function(self, compressor){ + if (self.value && is_undefined(self.value, compressor)) { + self.value = null; + } + return self; + }); + + OPT(AST_VarDef, function(self, compressor){ + var defines = compressor.option("global_defs"); + if (defines && HOP(defines, self.name.name)) { + compressor.warn('global_defs ' + self.name.name + ' redefined [{file}:{line},{col}]', self.start); + } + return self; + }); + +})(); diff --git a/node_modules/uglify-js/lib/mozilla-ast.js b/node_modules/uglify-js/lib/mozilla-ast.js new file mode 100644 index 0000000000000..88a2eb59fe8e3 --- /dev/null +++ b/node_modules/uglify-js/lib/mozilla-ast.js @@ -0,0 +1,611 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +(function(){ + + var normalize_directives = function(body) { + var in_directive = true; + + for (var i = 0; i < body.length; i++) { + if (in_directive && body[i] instanceof AST_Statement && body[i].body instanceof AST_String) { + body[i] = new AST_Directive({ + start: body[i].start, + end: body[i].end, + value: body[i].body.value + }); + } else if (in_directive && !(body[i] instanceof AST_Statement && body[i].body instanceof AST_String)) { + in_directive = false; + } + } + + return body; + }; + + var MOZ_TO_ME = { + Program: function(M) { + return new AST_Toplevel({ + start: my_start_token(M), + end: my_end_token(M), + body: normalize_directives(M.body.map(from_moz)) + }); + }, + FunctionDeclaration: function(M) { + return new AST_Defun({ + start: my_start_token(M), + end: my_end_token(M), + name: from_moz(M.id), + argnames: M.params.map(from_moz), + body: normalize_directives(from_moz(M.body).body) + }); + }, + FunctionExpression: function(M) { + return new AST_Function({ + start: my_start_token(M), + end: my_end_token(M), + name: from_moz(M.id), + argnames: M.params.map(from_moz), + body: normalize_directives(from_moz(M.body).body) + }); + }, + ExpressionStatement: function(M) { + return new AST_SimpleStatement({ + start: my_start_token(M), + end: my_end_token(M), + body: from_moz(M.expression) + }); + }, + TryStatement: function(M) { + var handlers = M.handlers || [M.handler]; + if (handlers.length > 1 || M.guardedHandlers && M.guardedHandlers.length) { + throw new Error("Multiple catch clauses are not supported."); + } + return new AST_Try({ + start : my_start_token(M), + end : my_end_token(M), + body : from_moz(M.block).body, + bcatch : from_moz(handlers[0]), + bfinally : M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null + }); + }, + Property: function(M) { + var key = M.key; + var args = { + start : my_start_token(key), + end : my_end_token(M.value), + key : key.type == "Identifier" ? key.name : key.value, + value : from_moz(M.value) + }; + if (M.kind == "init") return new AST_ObjectKeyVal(args); + args.key = new AST_SymbolAccessor({ + name: args.key + }); + args.value = new AST_Accessor(args.value); + if (M.kind == "get") return new AST_ObjectGetter(args); + if (M.kind == "set") return new AST_ObjectSetter(args); + }, + ArrayExpression: function(M) { + return new AST_Array({ + start : my_start_token(M), + end : my_end_token(M), + elements : M.elements.map(function(elem){ + return elem === null ? new AST_Hole() : from_moz(elem); + }) + }); + }, + ObjectExpression: function(M) { + return new AST_Object({ + start : my_start_token(M), + end : my_end_token(M), + properties : M.properties.map(function(prop){ + prop.type = "Property"; + return from_moz(prop) + }) + }); + }, + SequenceExpression: function(M) { + return AST_Seq.from_array(M.expressions.map(from_moz)); + }, + MemberExpression: function(M) { + return new (M.computed ? AST_Sub : AST_Dot)({ + start : my_start_token(M), + end : my_end_token(M), + property : M.computed ? from_moz(M.property) : M.property.name, + expression : from_moz(M.object) + }); + }, + SwitchCase: function(M) { + return new (M.test ? AST_Case : AST_Default)({ + start : my_start_token(M), + end : my_end_token(M), + expression : from_moz(M.test), + body : M.consequent.map(from_moz) + }); + }, + VariableDeclaration: function(M) { + return new (M.kind === "const" ? AST_Const : AST_Var)({ + start : my_start_token(M), + end : my_end_token(M), + definitions : M.declarations.map(from_moz) + }); + }, + Literal: function(M) { + var val = M.value, args = { + start : my_start_token(M), + end : my_end_token(M) + }; + if (val === null) return new AST_Null(args); + switch (typeof val) { + case "string": + args.value = val; + return new AST_String(args); + case "number": + args.value = val; + return new AST_Number(args); + case "boolean": + return new (val ? AST_True : AST_False)(args); + default: + var rx = M.regex; + if (rx && rx.pattern) { + // RegExpLiteral as per ESTree AST spec + args.value = new RegExp(rx.pattern, rx.flags).toString(); + } else { + // support legacy RegExp + args.value = M.regex && M.raw ? M.raw : val; + } + return new AST_RegExp(args); + } + }, + Identifier: function(M) { + var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2]; + return new ( p.type == "LabeledStatement" ? AST_Label + : p.type == "VariableDeclarator" && p.id === M ? (p.kind == "const" ? AST_SymbolConst : AST_SymbolVar) + : p.type == "FunctionExpression" ? (p.id === M ? AST_SymbolLambda : AST_SymbolFunarg) + : p.type == "FunctionDeclaration" ? (p.id === M ? AST_SymbolDefun : AST_SymbolFunarg) + : p.type == "CatchClause" ? AST_SymbolCatch + : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef + : AST_SymbolRef)({ + start : my_start_token(M), + end : my_end_token(M), + name : M.name + }); + } + }; + + MOZ_TO_ME.UpdateExpression = + MOZ_TO_ME.UnaryExpression = function To_Moz_Unary(M) { + var prefix = "prefix" in M ? M.prefix + : M.type == "UnaryExpression" ? true : false; + return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({ + start : my_start_token(M), + end : my_end_token(M), + operator : M.operator, + expression : from_moz(M.argument) + }); + }; + + map("EmptyStatement", AST_EmptyStatement); + map("BlockStatement", AST_BlockStatement, "body@body"); + map("IfStatement", AST_If, "test>condition, consequent>body, alternate>alternative"); + map("LabeledStatement", AST_LabeledStatement, "label>label, body>body"); + map("BreakStatement", AST_Break, "label>label"); + map("ContinueStatement", AST_Continue, "label>label"); + map("WithStatement", AST_With, "object>expression, body>body"); + map("SwitchStatement", AST_Switch, "discriminant>expression, cases@body"); + map("ReturnStatement", AST_Return, "argument>value"); + map("ThrowStatement", AST_Throw, "argument>value"); + map("WhileStatement", AST_While, "test>condition, body>body"); + map("DoWhileStatement", AST_Do, "test>condition, body>body"); + map("ForStatement", AST_For, "init>init, test>condition, update>step, body>body"); + map("ForInStatement", AST_ForIn, "left>init, right>object, body>body"); + map("DebuggerStatement", AST_Debugger); + map("VariableDeclarator", AST_VarDef, "id>name, init>value"); + map("CatchClause", AST_Catch, "param>argname, body%body"); + + map("ThisExpression", AST_This); + map("BinaryExpression", AST_Binary, "operator=operator, left>left, right>right"); + map("LogicalExpression", AST_Binary, "operator=operator, left>left, right>right"); + map("AssignmentExpression", AST_Assign, "operator=operator, left>left, right>right"); + map("ConditionalExpression", AST_Conditional, "test>condition, consequent>consequent, alternate>alternative"); + map("NewExpression", AST_New, "callee>expression, arguments@args"); + map("CallExpression", AST_Call, "callee>expression, arguments@args"); + + def_to_moz(AST_Toplevel, function To_Moz_Program(M) { + return to_moz_scope("Program", M); + }); + + def_to_moz(AST_Defun, function To_Moz_FunctionDeclaration(M) { + return { + type: "FunctionDeclaration", + id: to_moz(M.name), + params: M.argnames.map(to_moz), + body: to_moz_scope("BlockStatement", M) + } + }); + + def_to_moz(AST_Function, function To_Moz_FunctionExpression(M) { + return { + type: "FunctionExpression", + id: to_moz(M.name), + params: M.argnames.map(to_moz), + body: to_moz_scope("BlockStatement", M) + } + }); + + def_to_moz(AST_Directive, function To_Moz_Directive(M) { + return { + type: "ExpressionStatement", + expression: { + type: "Literal", + value: M.value + } + }; + }); + + def_to_moz(AST_SimpleStatement, function To_Moz_ExpressionStatement(M) { + return { + type: "ExpressionStatement", + expression: to_moz(M.body) + }; + }); + + def_to_moz(AST_SwitchBranch, function To_Moz_SwitchCase(M) { + return { + type: "SwitchCase", + test: to_moz(M.expression), + consequent: M.body.map(to_moz) + }; + }); + + def_to_moz(AST_Try, function To_Moz_TryStatement(M) { + return { + type: "TryStatement", + block: to_moz_block(M), + handler: to_moz(M.bcatch), + guardedHandlers: [], + finalizer: to_moz(M.bfinally) + }; + }); + + def_to_moz(AST_Catch, function To_Moz_CatchClause(M) { + return { + type: "CatchClause", + param: to_moz(M.argname), + guard: null, + body: to_moz_block(M) + }; + }); + + def_to_moz(AST_Definitions, function To_Moz_VariableDeclaration(M) { + return { + type: "VariableDeclaration", + kind: M instanceof AST_Const ? "const" : "var", + declarations: M.definitions.map(to_moz) + }; + }); + + def_to_moz(AST_Seq, function To_Moz_SequenceExpression(M) { + return { + type: "SequenceExpression", + expressions: M.to_array().map(to_moz) + }; + }); + + def_to_moz(AST_PropAccess, function To_Moz_MemberExpression(M) { + var isComputed = M instanceof AST_Sub; + return { + type: "MemberExpression", + object: to_moz(M.expression), + computed: isComputed, + property: isComputed ? to_moz(M.property) : {type: "Identifier", name: M.property} + }; + }); + + def_to_moz(AST_Unary, function To_Moz_Unary(M) { + return { + type: M.operator == "++" || M.operator == "--" ? "UpdateExpression" : "UnaryExpression", + operator: M.operator, + prefix: M instanceof AST_UnaryPrefix, + argument: to_moz(M.expression) + }; + }); + + def_to_moz(AST_Binary, function To_Moz_BinaryExpression(M) { + return { + type: M.operator == "&&" || M.operator == "||" ? "LogicalExpression" : "BinaryExpression", + left: to_moz(M.left), + operator: M.operator, + right: to_moz(M.right) + }; + }); + + def_to_moz(AST_Array, function To_Moz_ArrayExpression(M) { + return { + type: "ArrayExpression", + elements: M.elements.map(to_moz) + }; + }); + + def_to_moz(AST_Object, function To_Moz_ObjectExpression(M) { + return { + type: "ObjectExpression", + properties: M.properties.map(to_moz) + }; + }); + + def_to_moz(AST_ObjectProperty, function To_Moz_Property(M) { + var key = { + type: "Literal", + value: M.key instanceof AST_SymbolAccessor ? M.key.name : M.key + }; + var kind; + if (M instanceof AST_ObjectKeyVal) { + kind = "init"; + } else + if (M instanceof AST_ObjectGetter) { + kind = "get"; + } else + if (M instanceof AST_ObjectSetter) { + kind = "set"; + } + return { + type: "Property", + kind: kind, + key: key, + value: to_moz(M.value) + }; + }); + + def_to_moz(AST_Symbol, function To_Moz_Identifier(M) { + var def = M.definition(); + return { + type: "Identifier", + name: def ? def.mangled_name || def.name : M.name + }; + }); + + def_to_moz(AST_RegExp, function To_Moz_RegExpLiteral(M) { + var value = M.value; + return { + type: "Literal", + value: value, + raw: value.toString(), + regex: { + pattern: value.source, + flags: value.toString().match(/[gimuy]*$/)[0] + } + }; + }); + + def_to_moz(AST_Constant, function To_Moz_Literal(M) { + var value = M.value; + if (typeof value === 'number' && (value < 0 || (value === 0 && 1 / value < 0))) { + return { + type: "UnaryExpression", + operator: "-", + prefix: true, + argument: { + type: "Literal", + value: -value, + raw: M.start.raw + } + }; + } + return { + type: "Literal", + value: value, + raw: M.start.raw + }; + }); + + def_to_moz(AST_Atom, function To_Moz_Atom(M) { + return { + type: "Identifier", + name: String(M.value) + }; + }); + + AST_Boolean.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast); + AST_Null.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast); + AST_Hole.DEFMETHOD("to_mozilla_ast", function To_Moz_ArrayHole() { return null }); + + AST_Block.DEFMETHOD("to_mozilla_ast", AST_BlockStatement.prototype.to_mozilla_ast); + AST_Lambda.DEFMETHOD("to_mozilla_ast", AST_Function.prototype.to_mozilla_ast); + + /* -----[ tools ]----- */ + + function raw_token(moznode) { + if (moznode.type == "Literal") { + return moznode.raw != null ? moznode.raw : moznode.value + ""; + } + } + + function my_start_token(moznode) { + var loc = moznode.loc, start = loc && loc.start; + var range = moznode.range; + return new AST_Token({ + file : loc && loc.source, + line : start && start.line, + col : start && start.column, + pos : range ? range[0] : moznode.start, + endline : start && start.line, + endcol : start && start.column, + endpos : range ? range[0] : moznode.start, + raw : raw_token(moznode), + }); + }; + + function my_end_token(moznode) { + var loc = moznode.loc, end = loc && loc.end; + var range = moznode.range; + return new AST_Token({ + file : loc && loc.source, + line : end && end.line, + col : end && end.column, + pos : range ? range[1] : moznode.end, + endline : end && end.line, + endcol : end && end.column, + endpos : range ? range[1] : moznode.end, + raw : raw_token(moznode), + }); + }; + + function map(moztype, mytype, propmap) { + var moz_to_me = "function From_Moz_" + moztype + "(M){\n"; + moz_to_me += "return new U2." + mytype.name + "({\n" + + "start: my_start_token(M),\n" + + "end: my_end_token(M)"; + + var me_to_moz = "function To_Moz_" + moztype + "(M){\n"; + me_to_moz += "return {\n" + + "type: " + JSON.stringify(moztype); + + if (propmap) propmap.split(/\s*,\s*/).forEach(function(prop){ + var m = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(prop); + if (!m) throw new Error("Can't understand property map: " + prop); + var moz = m[1], how = m[2], my = m[3]; + moz_to_me += ",\n" + my + ": "; + me_to_moz += ",\n" + moz + ": "; + switch (how) { + case "@": + moz_to_me += "M." + moz + ".map(from_moz)"; + me_to_moz += "M." + my + ".map(to_moz)"; + break; + case ">": + moz_to_me += "from_moz(M." + moz + ")"; + me_to_moz += "to_moz(M." + my + ")"; + break; + case "=": + moz_to_me += "M." + moz; + me_to_moz += "M." + my; + break; + case "%": + moz_to_me += "from_moz(M." + moz + ").body"; + me_to_moz += "to_moz_block(M)"; + break; + default: + throw new Error("Can't understand operator in propmap: " + prop); + } + }); + + moz_to_me += "\n})\n}"; + me_to_moz += "\n}\n}"; + + //moz_to_me = parse(moz_to_me).print_to_string({ beautify: true }); + //me_to_moz = parse(me_to_moz).print_to_string({ beautify: true }); + //console.log(moz_to_me); + + moz_to_me = new Function("U2", "my_start_token", "my_end_token", "from_moz", "return(" + moz_to_me + ")")( + exports, my_start_token, my_end_token, from_moz + ); + me_to_moz = new Function("to_moz", "to_moz_block", "to_moz_scope", "return(" + me_to_moz + ")")( + to_moz, to_moz_block, to_moz_scope + ); + MOZ_TO_ME[moztype] = moz_to_me; + def_to_moz(mytype, me_to_moz); + }; + + var FROM_MOZ_STACK = null; + + function from_moz(node) { + FROM_MOZ_STACK.push(node); + var ret = node != null ? MOZ_TO_ME[node.type](node) : null; + FROM_MOZ_STACK.pop(); + return ret; + }; + + AST_Node.from_mozilla_ast = function(node){ + var save_stack = FROM_MOZ_STACK; + FROM_MOZ_STACK = []; + var ast = from_moz(node); + FROM_MOZ_STACK = save_stack; + return ast; + }; + + function set_moz_loc(mynode, moznode, myparent) { + var start = mynode.start; + var end = mynode.end; + if (start.pos != null && end.endpos != null) { + moznode.range = [start.pos, end.endpos]; + } + if (start.line) { + moznode.loc = { + start: {line: start.line, column: start.col}, + end: end.endline ? {line: end.endline, column: end.endcol} : null + }; + if (start.file) { + moznode.loc.source = start.file; + } + } + return moznode; + }; + + function def_to_moz(mytype, handler) { + mytype.DEFMETHOD("to_mozilla_ast", function() { + return set_moz_loc(this, handler(this)); + }); + }; + + function to_moz(node) { + return node != null ? node.to_mozilla_ast() : null; + }; + + function to_moz_block(node) { + return { + type: "BlockStatement", + body: node.body.map(to_moz) + }; + }; + + function to_moz_scope(type, node) { + var body = node.body.map(to_moz); + if (node.body[0] instanceof AST_SimpleStatement && node.body[0].body instanceof AST_String) { + body.unshift(to_moz(new AST_EmptyStatement(node.body[0]))); + } + return { + type: type, + body: body + }; + }; +})(); diff --git a/node_modules/uglify-js/lib/output.js b/node_modules/uglify-js/lib/output.js new file mode 100644 index 0000000000000..78e24877d8ebb --- /dev/null +++ b/node_modules/uglify-js/lib/output.js @@ -0,0 +1,1423 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +var EXPECT_DIRECTIVE = /^$|[;{][\s\n]*$/; + +function is_some_comments(comment) { + // multiline comment + return comment.type == "comment2" && /@preserve|@license|@cc_on/i.test(comment.value); +} + +function OutputStream(options) { + + options = defaults(options, { + ascii_only : false, + beautify : false, + bracketize : false, + comments : false, + indent_level : 4, + indent_start : 0, + inline_script : true, + keep_quoted_props: false, + max_line_len : false, + preamble : null, + preserve_line : false, + quote_keys : false, + quote_style : 0, + screw_ie8 : true, + semicolons : true, + shebang : true, + source_map : null, + space_colon : true, + unescape_regexps : false, + width : 80, + wrap_iife : false, + }, true); + + // Convert comment option to RegExp if neccessary and set up comments filter + var comment_filter = return_false; // Default case, throw all comments away + if (options.comments) { + var comments = options.comments; + if (typeof options.comments === "string" && /^\/.*\/[a-zA-Z]*$/.test(options.comments)) { + var regex_pos = options.comments.lastIndexOf("/"); + comments = new RegExp( + options.comments.substr(1, regex_pos - 1), + options.comments.substr(regex_pos + 1) + ); + } + if (comments instanceof RegExp) { + comment_filter = function(comment) { + return comment.type != "comment5" && comments.test(comment.value); + }; + } + else if (typeof comments === "function") { + comment_filter = function(comment) { + return comment.type != "comment5" && comments(this, comment); + }; + } + else if (comments === "some") { + comment_filter = is_some_comments; + } else { // NOTE includes "all" option + comment_filter = return_true; + } + } + + var indentation = 0; + var current_col = 0; + var current_line = 1; + var current_pos = 0; + var OUTPUT = ""; + + function to_ascii(str, identifier) { + return str.replace(/[\u0000-\u001f\u007f-\uffff]/g, function(ch) { + var code = ch.charCodeAt(0).toString(16); + if (code.length <= 2 && !identifier) { + while (code.length < 2) code = "0" + code; + return "\\x" + code; + } else { + while (code.length < 4) code = "0" + code; + return "\\u" + code; + } + }); + }; + + function make_string(str, quote) { + var dq = 0, sq = 0; + str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, + function(s, i){ + switch (s) { + case '"': ++dq; return '"'; + case "'": ++sq; return "'"; + case "\\": return "\\\\"; + case "\n": return "\\n"; + case "\r": return "\\r"; + case "\t": return "\\t"; + case "\b": return "\\b"; + case "\f": return "\\f"; + case "\x0B": return options.screw_ie8 ? "\\v" : "\\x0B"; + case "\u2028": return "\\u2028"; + case "\u2029": return "\\u2029"; + case "\ufeff": return "\\ufeff"; + case "\0": + return /[0-7]/.test(str.charAt(i+1)) ? "\\x00" : "\\0"; + } + return s; + }); + function quote_single() { + return "'" + str.replace(/\x27/g, "\\'") + "'"; + } + function quote_double() { + return '"' + str.replace(/\x22/g, '\\"') + '"'; + } + if (options.ascii_only) str = to_ascii(str); + switch (options.quote_style) { + case 1: + return quote_single(); + case 2: + return quote_double(); + case 3: + return quote == "'" ? quote_single() : quote_double(); + default: + return dq > sq ? quote_single() : quote_double(); + } + }; + + function encode_string(str, quote) { + var ret = make_string(str, quote); + if (options.inline_script) { + ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1"); + ret = ret.replace(/\x3c!--/g, "\\x3c!--"); + ret = ret.replace(/--\x3e/g, "--\\x3e"); + } + return ret; + }; + + function make_name(name) { + name = name.toString(); + if (options.ascii_only) + name = to_ascii(name, true); + return name; + }; + + function make_indent(back) { + return repeat_string(" ", options.indent_start + indentation - back * options.indent_level); + }; + + /* -----[ beautification/minification ]----- */ + + var might_need_space = false; + var might_need_semicolon = false; + var might_add_newline = 0; + var last = ""; + + var ensure_line_len = options.max_line_len ? function() { + if (current_col > options.max_line_len) { + if (might_add_newline) { + var left = OUTPUT.slice(0, might_add_newline); + var right = OUTPUT.slice(might_add_newline); + OUTPUT = left + "\n" + right; + current_line++; + current_pos++; + current_col = right.length; + } + if (current_col > options.max_line_len) { + AST_Node.warn("Output exceeds {max_line_len} characters", options); + } + } + might_add_newline = 0; + } : noop; + + var requireSemicolonChars = makePredicate("( [ + * / - , ."); + + function print(str) { + str = String(str); + var ch = str.charAt(0); + var prev = last.charAt(last.length - 1); + if (might_need_semicolon) { + might_need_semicolon = false; + + if (prev == ":" && ch == "}" || (!ch || ";}".indexOf(ch) < 0) && prev != ";") { + if (options.semicolons || requireSemicolonChars(ch)) { + OUTPUT += ";"; + current_col++; + current_pos++; + } else { + ensure_line_len(); + OUTPUT += "\n"; + current_pos++; + current_line++; + current_col = 0; + + if (/^\s+$/.test(str)) { + // reset the semicolon flag, since we didn't print one + // now and might still have to later + might_need_semicolon = true; + } + } + + if (!options.beautify) + might_need_space = false; + } + } + + if (!options.beautify && options.preserve_line && stack[stack.length - 1]) { + var target_line = stack[stack.length - 1].start.line; + while (current_line < target_line) { + ensure_line_len(); + OUTPUT += "\n"; + current_pos++; + current_line++; + current_col = 0; + might_need_space = false; + } + } + + if (might_need_space) { + if ((is_identifier_char(prev) + && (is_identifier_char(ch) || ch == "\\")) + || (ch == "/" && ch == prev) + || ((ch == "+" || ch == "-") && ch == last)) + { + OUTPUT += " "; + current_col++; + current_pos++; + } + might_need_space = false; + } + OUTPUT += str; + current_pos += str.length; + var a = str.split(/\r?\n/), n = a.length - 1; + current_line += n; + current_col += a[0].length; + if (n > 0) { + ensure_line_len(); + current_col = a[n].length; + } + last = str; + }; + + var space = options.beautify ? function() { + print(" "); + } : function() { + might_need_space = true; + }; + + var indent = options.beautify ? function(half) { + if (options.beautify) { + print(make_indent(half ? 0.5 : 0)); + } + } : noop; + + var with_indent = options.beautify ? function(col, cont) { + if (col === true) col = next_indent(); + var save_indentation = indentation; + indentation = col; + var ret = cont(); + indentation = save_indentation; + return ret; + } : function(col, cont) { return cont() }; + + var newline = options.beautify ? function() { + print("\n"); + } : options.max_line_len ? function() { + ensure_line_len(); + might_add_newline = OUTPUT.length; + } : noop; + + var semicolon = options.beautify ? function() { + print(";"); + } : function() { + might_need_semicolon = true; + }; + + function force_semicolon() { + might_need_semicolon = false; + print(";"); + }; + + function next_indent() { + return indentation + options.indent_level; + }; + + function with_block(cont) { + var ret; + print("{"); + newline(); + with_indent(next_indent(), function(){ + ret = cont(); + }); + indent(); + print("}"); + return ret; + }; + + function with_parens(cont) { + print("("); + //XXX: still nice to have that for argument lists + //var ret = with_indent(current_col, cont); + var ret = cont(); + print(")"); + return ret; + }; + + function with_square(cont) { + print("["); + //var ret = with_indent(current_col, cont); + var ret = cont(); + print("]"); + return ret; + }; + + function comma() { + print(","); + space(); + }; + + function colon() { + print(":"); + if (options.space_colon) space(); + }; + + var add_mapping = options.source_map ? function(token, name) { + try { + if (token) options.source_map.add( + token.file || "?", + current_line, current_col, + token.line, token.col, + (!name && token.type == "name") ? token.value : name + ); + } catch(ex) { + AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", { + file: token.file, + line: token.line, + col: token.col, + cline: current_line, + ccol: current_col, + name: name || "" + }) + } + } : noop; + + function get() { + if (might_add_newline) { + ensure_line_len(); + } + return OUTPUT; + }; + + var stack = []; + return { + get : get, + toString : get, + indent : indent, + indentation : function() { return indentation }, + current_width : function() { return current_col - indentation }, + should_break : function() { return options.width && this.current_width() >= options.width }, + newline : newline, + print : print, + space : space, + comma : comma, + colon : colon, + last : function() { return last }, + semicolon : semicolon, + force_semicolon : force_semicolon, + to_ascii : to_ascii, + print_name : function(name) { print(make_name(name)) }, + print_string : function(str, quote, escape_directive) { + var encoded = encode_string(str, quote); + if (escape_directive === true && encoded.indexOf("\\") === -1) { + // Insert semicolons to break directive prologue + if (!EXPECT_DIRECTIVE.test(OUTPUT)) { + force_semicolon(); + } + force_semicolon(); + } + print(encoded); + }, + encode_string : encode_string, + next_indent : next_indent, + with_indent : with_indent, + with_block : with_block, + with_parens : with_parens, + with_square : with_square, + add_mapping : add_mapping, + option : function(opt) { return options[opt] }, + comment_filter : comment_filter, + line : function() { return current_line }, + col : function() { return current_col }, + pos : function() { return current_pos }, + push_node : function(node) { stack.push(node) }, + pop_node : function() { return stack.pop() }, + parent : function(n) { + return stack[stack.length - 2 - (n || 0)]; + } + }; + +}; + +/* -----[ code generators ]----- */ + +(function(){ + + /* -----[ utils ]----- */ + + function DEFPRINT(nodetype, generator) { + nodetype.DEFMETHOD("_codegen", generator); + }; + + var use_asm = false; + var in_directive = false; + + AST_Node.DEFMETHOD("print", function(stream, force_parens){ + var self = this, generator = self._codegen, prev_use_asm = use_asm; + if (self instanceof AST_Directive && self.value == "use asm" && stream.parent() instanceof AST_Scope) { + use_asm = true; + } + function doit() { + self.add_comments(stream); + self.add_source_map(stream); + generator(self, stream); + } + stream.push_node(self); + if (force_parens || self.needs_parens(stream)) { + stream.with_parens(doit); + } else { + doit(); + } + stream.pop_node(); + if (self instanceof AST_Scope) { + use_asm = prev_use_asm; + } + }); + + AST_Node.DEFMETHOD("print_to_string", function(options){ + var s = OutputStream(options); + if (!options) s._readonly = true; + this.print(s); + return s.get(); + }); + + /* -----[ comments ]----- */ + + AST_Node.DEFMETHOD("add_comments", function(output){ + if (output._readonly) return; + var self = this; + var start = self.start; + if (start && !start._comments_dumped) { + start._comments_dumped = true; + var comments = start.comments_before || []; + + // XXX: ugly fix for https://github.com/mishoo/UglifyJS2/issues/112 + // and https://github.com/mishoo/UglifyJS2/issues/372 + if (self instanceof AST_Exit && self.value) { + self.value.walk(new TreeWalker(function(node){ + if (node.start && node.start.comments_before) { + comments = comments.concat(node.start.comments_before); + node.start.comments_before = []; + } + if (node instanceof AST_Function || + node instanceof AST_Array || + node instanceof AST_Object) + { + return true; // don't go inside. + } + })); + } + + if (output.pos() == 0) { + if (comments.length > 0 && output.option("shebang") && comments[0].type == "comment5") { + output.print("#!" + comments.shift().value + "\n"); + output.indent(); + } + var preamble = output.option("preamble"); + if (preamble) { + output.print(preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g, "\n")); + } + } + + comments = comments.filter(output.comment_filter, self); + + // Keep single line comments after nlb, after nlb + if (!output.option("beautify") && comments.length > 0 && + /comment[134]/.test(comments[0].type) && + output.col() !== 0 && comments[0].nlb) + { + output.print("\n"); + } + + comments.forEach(function(c){ + if (/comment[134]/.test(c.type)) { + output.print("//" + c.value + "\n"); + output.indent(); + } + else if (c.type == "comment2") { + output.print("/*" + c.value + "*/"); + if (start.nlb) { + output.print("\n"); + output.indent(); + } else { + output.space(); + } + } + }); + } + }); + + /* -----[ PARENTHESES ]----- */ + + function PARENS(nodetype, func) { + if (Array.isArray(nodetype)) { + nodetype.forEach(function(nodetype){ + PARENS(nodetype, func); + }); + } else { + nodetype.DEFMETHOD("needs_parens", func); + } + }; + + PARENS(AST_Node, function(){ + return false; + }); + + // a function expression needs parens around it when it's provably + // the first token to appear in a statement. + PARENS(AST_Function, function(output){ + if (first_in_statement(output)) { + return true; + } + + if (output.option('wrap_iife')) { + var p = output.parent(); + return p instanceof AST_Call && p.expression === this; + } + + return false; + }); + + // same goes for an object literal, because otherwise it would be + // interpreted as a block of code. + PARENS(AST_Object, function(output){ + return first_in_statement(output); + }); + + PARENS(AST_Unary, function(output){ + var p = output.parent(); + return p instanceof AST_PropAccess && p.expression === this + || p instanceof AST_Call && p.expression === this; + }); + + PARENS(AST_Seq, function(output){ + var p = output.parent(); + return p instanceof AST_Call // (foo, bar)() or foo(1, (2, 3), 4) + || p instanceof AST_Unary // !(foo, bar, baz) + || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8 + || p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4 + || p instanceof AST_PropAccess // (1, {foo:2}).foo or (1, {foo:2})["foo"] ==> 2 + || p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ] + || p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2 + || p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30) + * ==> 20 (side effect, set a := 10 and b := 20) */ + ; + }); + + PARENS(AST_Binary, function(output){ + var p = output.parent(); + // (foo && bar)() + if (p instanceof AST_Call && p.expression === this) + return true; + // typeof (foo && bar) + if (p instanceof AST_Unary) + return true; + // (foo && bar)["prop"], (foo && bar).prop + if (p instanceof AST_PropAccess && p.expression === this) + return true; + // this deals with precedence: 3 * (2 + 1) + if (p instanceof AST_Binary) { + var po = p.operator, pp = PRECEDENCE[po]; + var so = this.operator, sp = PRECEDENCE[so]; + if (pp > sp + || (pp == sp + && this === p.right)) { + return true; + } + } + }); + + PARENS(AST_PropAccess, function(output){ + var p = output.parent(); + if (p instanceof AST_New && p.expression === this) { + // i.e. new (foo.bar().baz) + // + // if there's one call into this subtree, then we need + // parens around it too, otherwise the call will be + // interpreted as passing the arguments to the upper New + // expression. + try { + this.walk(new TreeWalker(function(node){ + if (node instanceof AST_Call) throw p; + })); + } catch(ex) { + if (ex !== p) throw ex; + return true; + } + } + }); + + PARENS(AST_Call, function(output){ + var p = output.parent(), p1; + if (p instanceof AST_New && p.expression === this) + return true; + + // workaround for Safari bug. + // https://bugs.webkit.org/show_bug.cgi?id=123506 + return this.expression instanceof AST_Function + && p instanceof AST_PropAccess + && p.expression === this + && (p1 = output.parent(1)) instanceof AST_Assign + && p1.left === p; + }); + + PARENS(AST_New, function(output){ + var p = output.parent(); + if (!need_constructor_parens(this, output) + && (p instanceof AST_PropAccess // (new Date).getTime(), (new Date)["getTime"]() + || p instanceof AST_Call && p.expression === this)) // (new foo)(bar) + return true; + }); + + PARENS(AST_Number, function(output){ + var p = output.parent(); + if (p instanceof AST_PropAccess && p.expression === this) { + var value = this.getValue(); + if (value < 0 || /^0/.test(make_num(value))) { + return true; + } + } + }); + + PARENS([ AST_Assign, AST_Conditional ], function (output){ + var p = output.parent(); + // !(a = false) → true + if (p instanceof AST_Unary) + return true; + // 1 + (a = 2) + 3 → 6, side effect setting a = 2 + if (p instanceof AST_Binary && !(p instanceof AST_Assign)) + return true; + // (a = func)() —or— new (a = Object)() + if (p instanceof AST_Call && p.expression === this) + return true; + // (a = foo) ? bar : baz + if (p instanceof AST_Conditional && p.condition === this) + return true; + // (a = foo)["prop"] —or— (a = foo).prop + if (p instanceof AST_PropAccess && p.expression === this) + return true; + }); + + /* -----[ PRINTERS ]----- */ + + DEFPRINT(AST_Directive, function(self, output){ + output.print_string(self.value, self.quote); + output.semicolon(); + }); + DEFPRINT(AST_Debugger, function(self, output){ + output.print("debugger"); + output.semicolon(); + }); + + /* -----[ statements ]----- */ + + function display_body(body, is_toplevel, output, allow_directives) { + var last = body.length - 1; + in_directive = allow_directives; + body.forEach(function(stmt, i){ + if (in_directive === true && !(stmt instanceof AST_Directive || + stmt instanceof AST_EmptyStatement || + (stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String) + )) { + in_directive = false; + } + if (!(stmt instanceof AST_EmptyStatement)) { + output.indent(); + stmt.print(output); + if (!(i == last && is_toplevel)) { + output.newline(); + if (is_toplevel) output.newline(); + } + } + if (in_directive === true && + stmt instanceof AST_SimpleStatement && + stmt.body instanceof AST_String + ) { + in_directive = false; + } + }); + in_directive = false; + }; + + AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output){ + force_statement(this.body, output); + }); + + DEFPRINT(AST_Statement, function(self, output){ + self.body.print(output); + output.semicolon(); + }); + DEFPRINT(AST_Toplevel, function(self, output){ + display_body(self.body, true, output, true); + output.print(""); + }); + DEFPRINT(AST_LabeledStatement, function(self, output){ + self.label.print(output); + output.colon(); + self.body.print(output); + }); + DEFPRINT(AST_SimpleStatement, function(self, output){ + self.body.print(output); + output.semicolon(); + }); + function print_bracketed(body, output, allow_directives) { + if (body.length > 0) output.with_block(function(){ + display_body(body, false, output, allow_directives); + }); + else output.print("{}"); + }; + DEFPRINT(AST_BlockStatement, function(self, output){ + print_bracketed(self.body, output); + }); + DEFPRINT(AST_EmptyStatement, function(self, output){ + output.semicolon(); + }); + DEFPRINT(AST_Do, function(self, output){ + output.print("do"); + output.space(); + make_block(self.body, output); + output.space(); + output.print("while"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.semicolon(); + }); + DEFPRINT(AST_While, function(self, output){ + output.print("while"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_For, function(self, output){ + output.print("for"); + output.space(); + output.with_parens(function(){ + if (self.init) { + if (self.init instanceof AST_Definitions) { + self.init.print(output); + } else { + parenthesize_for_noin(self.init, output, true); + } + output.print(";"); + output.space(); + } else { + output.print(";"); + } + if (self.condition) { + self.condition.print(output); + output.print(";"); + output.space(); + } else { + output.print(";"); + } + if (self.step) { + self.step.print(output); + } + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_ForIn, function(self, output){ + output.print("for"); + output.space(); + output.with_parens(function(){ + self.init.print(output); + output.space(); + output.print("in"); + output.space(); + self.object.print(output); + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_With, function(self, output){ + output.print("with"); + output.space(); + output.with_parens(function(){ + self.expression.print(output); + }); + output.space(); + self._do_print_body(output); + }); + + /* -----[ functions ]----- */ + AST_Lambda.DEFMETHOD("_do_print", function(output, nokeyword){ + var self = this; + if (!nokeyword) { + output.print("function"); + } + if (self.name) { + output.space(); + self.name.print(output); + } + output.with_parens(function(){ + self.argnames.forEach(function(arg, i){ + if (i) output.comma(); + arg.print(output); + }); + }); + output.space(); + print_bracketed(self.body, output, true); + }); + DEFPRINT(AST_Lambda, function(self, output){ + self._do_print(output); + }); + + /* -----[ exits ]----- */ + AST_Exit.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + if (this.value) { + output.space(); + this.value.print(output); + } + output.semicolon(); + }); + DEFPRINT(AST_Return, function(self, output){ + self._do_print(output, "return"); + }); + DEFPRINT(AST_Throw, function(self, output){ + self._do_print(output, "throw"); + }); + + /* -----[ loop control ]----- */ + AST_LoopControl.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + if (this.label) { + output.space(); + this.label.print(output); + } + output.semicolon(); + }); + DEFPRINT(AST_Break, function(self, output){ + self._do_print(output, "break"); + }); + DEFPRINT(AST_Continue, function(self, output){ + self._do_print(output, "continue"); + }); + + /* -----[ if ]----- */ + function make_then(self, output) { + var b = self.body; + if (output.option("bracketize") + || !output.option("screw_ie8") && b instanceof AST_Do) + return make_block(b, output); + // The squeezer replaces "block"-s that contain only a single + // statement with the statement itself; technically, the AST + // is correct, but this can create problems when we output an + // IF having an ELSE clause where the THEN clause ends in an + // IF *without* an ELSE block (then the outer ELSE would refer + // to the inner IF). This function checks for this case and + // adds the block brackets if needed. + if (!b) return output.force_semicolon(); + while (true) { + if (b instanceof AST_If) { + if (!b.alternative) { + make_block(self.body, output); + return; + } + b = b.alternative; + } + else if (b instanceof AST_StatementWithBody) { + b = b.body; + } + else break; + } + force_statement(self.body, output); + }; + DEFPRINT(AST_If, function(self, output){ + output.print("if"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.space(); + if (self.alternative) { + make_then(self, output); + output.space(); + output.print("else"); + output.space(); + if (self.alternative instanceof AST_If) + self.alternative.print(output); + else + force_statement(self.alternative, output); + } else { + self._do_print_body(output); + } + }); + + /* -----[ switch ]----- */ + DEFPRINT(AST_Switch, function(self, output){ + output.print("switch"); + output.space(); + output.with_parens(function(){ + self.expression.print(output); + }); + output.space(); + var last = self.body.length - 1; + if (last < 0) output.print("{}"); + else output.with_block(function(){ + self.body.forEach(function(branch, i){ + output.indent(true); + branch.print(output); + if (i < last && branch.body.length > 0) + output.newline(); + }); + }); + }); + AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output){ + output.newline(); + this.body.forEach(function(stmt){ + output.indent(); + stmt.print(output); + output.newline(); + }); + }); + DEFPRINT(AST_Default, function(self, output){ + output.print("default:"); + self._do_print_body(output); + }); + DEFPRINT(AST_Case, function(self, output){ + output.print("case"); + output.space(); + self.expression.print(output); + output.print(":"); + self._do_print_body(output); + }); + + /* -----[ exceptions ]----- */ + DEFPRINT(AST_Try, function(self, output){ + output.print("try"); + output.space(); + print_bracketed(self.body, output); + if (self.bcatch) { + output.space(); + self.bcatch.print(output); + } + if (self.bfinally) { + output.space(); + self.bfinally.print(output); + } + }); + DEFPRINT(AST_Catch, function(self, output){ + output.print("catch"); + output.space(); + output.with_parens(function(){ + self.argname.print(output); + }); + output.space(); + print_bracketed(self.body, output); + }); + DEFPRINT(AST_Finally, function(self, output){ + output.print("finally"); + output.space(); + print_bracketed(self.body, output); + }); + + /* -----[ var/const ]----- */ + AST_Definitions.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + output.space(); + this.definitions.forEach(function(def, i){ + if (i) output.comma(); + def.print(output); + }); + var p = output.parent(); + var in_for = p instanceof AST_For || p instanceof AST_ForIn; + var avoid_semicolon = in_for && p.init === this; + if (!avoid_semicolon) + output.semicolon(); + }); + DEFPRINT(AST_Var, function(self, output){ + self._do_print(output, "var"); + }); + DEFPRINT(AST_Const, function(self, output){ + self._do_print(output, "const"); + }); + + function parenthesize_for_noin(node, output, noin) { + if (!noin) node.print(output); + else try { + // need to take some precautions here: + // https://github.com/mishoo/UglifyJS2/issues/60 + node.walk(new TreeWalker(function(node){ + if (node instanceof AST_Binary && node.operator == "in") + throw output; + })); + node.print(output); + } catch(ex) { + if (ex !== output) throw ex; + node.print(output, true); + } + }; + + DEFPRINT(AST_VarDef, function(self, output){ + self.name.print(output); + if (self.value) { + output.space(); + output.print("="); + output.space(); + var p = output.parent(1); + var noin = p instanceof AST_For || p instanceof AST_ForIn; + parenthesize_for_noin(self.value, output, noin); + } + }); + + /* -----[ other expressions ]----- */ + DEFPRINT(AST_Call, function(self, output){ + self.expression.print(output); + if (self instanceof AST_New && !need_constructor_parens(self, output)) + return; + output.with_parens(function(){ + self.args.forEach(function(expr, i){ + if (i) output.comma(); + expr.print(output); + }); + }); + }); + DEFPRINT(AST_New, function(self, output){ + output.print("new"); + output.space(); + AST_Call.prototype._codegen(self, output); + }); + + AST_Seq.DEFMETHOD("_do_print", function(output){ + this.car.print(output); + if (this.cdr) { + output.comma(); + if (output.should_break()) { + output.newline(); + output.indent(); + } + this.cdr.print(output); + } + }); + DEFPRINT(AST_Seq, function(self, output){ + self._do_print(output); + // var p = output.parent(); + // if (p instanceof AST_Statement) { + // output.with_indent(output.next_indent(), function(){ + // self._do_print(output); + // }); + // } else { + // self._do_print(output); + // } + }); + DEFPRINT(AST_Dot, function(self, output){ + var expr = self.expression; + expr.print(output); + if (expr instanceof AST_Number && expr.getValue() >= 0) { + if (!/[xa-f.)]/i.test(output.last())) { + output.print("."); + } + } + output.print("."); + // the name after dot would be mapped about here. + output.add_mapping(self.end); + output.print_name(self.property); + }); + DEFPRINT(AST_Sub, function(self, output){ + self.expression.print(output); + output.print("["); + self.property.print(output); + output.print("]"); + }); + DEFPRINT(AST_UnaryPrefix, function(self, output){ + var op = self.operator; + output.print(op); + if (/^[a-z]/i.test(op) + || (/[+-]$/.test(op) + && self.expression instanceof AST_UnaryPrefix + && /^[+-]/.test(self.expression.operator))) { + output.space(); + } + self.expression.print(output); + }); + DEFPRINT(AST_UnaryPostfix, function(self, output){ + self.expression.print(output); + output.print(self.operator); + }); + DEFPRINT(AST_Binary, function(self, output){ + var op = self.operator; + self.left.print(output); + if (op[0] == ">" /* ">>" ">>>" ">" ">=" */ + && self.left instanceof AST_UnaryPostfix + && self.left.operator == "--") { + // space is mandatory to avoid outputting --> + output.print(" "); + } else { + // the space is optional depending on "beautify" + output.space(); + } + output.print(op); + if ((op == "<" || op == "<<") + && self.right instanceof AST_UnaryPrefix + && self.right.operator == "!" + && self.right.expression instanceof AST_UnaryPrefix + && self.right.expression.operator == "--") { + // space is mandatory to avoid outputting ") && S.newline_before) { + forward(3); + skip_line_comment("comment4"); + continue; + } + } + var ch = peek(); + if (!ch) return token("eof"); + var code = ch.charCodeAt(0); + switch (code) { + case 34: case 39: return read_string(ch); + case 46: return handle_dot(); + case 47: { + var tok = handle_slash(); + if (tok === next_token) continue; + return tok; + } + } + if (is_digit(code)) return read_num(); + if (PUNC_CHARS(ch)) return token("punc", next()); + if (OPERATOR_CHARS(ch)) return read_operator(); + if (code == 92 || is_identifier_start(code)) return read_word(); + break; + } + parse_error("Unexpected character '" + ch + "'"); + }; + + next_token.context = function(nc) { + if (nc) S = nc; + return S; + }; + + next_token.add_directive = function(directive) { + S.directive_stack[S.directive_stack.length - 1].push(directive); + + if (S.directives[directive] === undefined) { + S.directives[directive] = 1; + } else { + S.directives[directive]++; + } + } + + next_token.push_directives_stack = function() { + S.directive_stack.push([]); + } + + next_token.pop_directives_stack = function() { + var directives = S.directive_stack[S.directive_stack.length - 1]; + + for (var i = 0; i < directives.length; i++) { + S.directives[directives[i]]--; + } + + S.directive_stack.pop(); + } + + next_token.has_directive = function(directive) { + return S.directives[directive] !== undefined && + S.directives[directive] > 0; + } + + return next_token; + +}; + +/* -----[ Parser (constants) ]----- */ + +var UNARY_PREFIX = makePredicate([ + "typeof", + "void", + "delete", + "--", + "++", + "!", + "~", + "-", + "+" +]); + +var UNARY_POSTFIX = makePredicate([ "--", "++" ]); + +var ASSIGNMENT = makePredicate([ "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=" ]); + +var PRECEDENCE = (function(a, ret){ + for (var i = 0; i < a.length; ++i) { + var b = a[i]; + for (var j = 0; j < b.length; ++j) { + ret[b[j]] = i + 1; + } + } + return ret; +})( + [ + ["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] + ], + {} +); + +var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); + +var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); + +/* -----[ Parser ]----- */ + +function parse($TEXT, options) { + + options = defaults(options, { + bare_returns : false, + cli : false, + expression : false, + filename : null, + html5_comments : true, + shebang : true, + strict : false, + toplevel : null, + }); + + var S = { + input : (typeof $TEXT == "string" + ? tokenizer($TEXT, options.filename, + options.html5_comments, options.shebang) + : $TEXT), + token : null, + prev : null, + peeked : null, + in_function : 0, + in_directives : true, + in_loop : 0, + labels : [] + }; + + S.token = next(); + + function is(type, value) { + return is_token(S.token, type, value); + }; + + function peek() { return S.peeked || (S.peeked = S.input()); }; + + function next() { + S.prev = S.token; + if (S.peeked) { + S.token = S.peeked; + S.peeked = null; + } else { + S.token = S.input(); + } + S.in_directives = S.in_directives && ( + S.token.type == "string" || is("punc", ";") + ); + return S.token; + }; + + function prev() { + return S.prev; + }; + + function croak(msg, line, col, pos) { + var ctx = S.input.context(); + js_error(msg, + ctx.filename, + line != null ? line : ctx.tokline, + col != null ? col : ctx.tokcol, + pos != null ? pos : ctx.tokpos); + }; + + function token_error(token, msg) { + croak(msg, token.line, token.col); + }; + + function unexpected(token) { + if (token == null) + token = S.token; + token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); + }; + + function expect_token(type, val) { + if (is(type, val)) { + return next(); + } + token_error(S.token, "Unexpected token " + S.token.type + " «" + S.token.value + "»" + ", expected " + type + " «" + val + "»"); + }; + + function expect(punc) { return expect_token("punc", punc); }; + + function can_insert_semicolon() { + return !options.strict && ( + S.token.nlb || is("eof") || is("punc", "}") + ); + }; + + function semicolon(optional) { + if (is("punc", ";")) next(); + else if (!optional && !can_insert_semicolon()) unexpected(); + }; + + function parenthesised() { + expect("("); + var exp = expression(true); + expect(")"); + return exp; + }; + + function embed_tokens(parser) { + return function() { + var start = S.token; + var expr = parser(); + var end = prev(); + expr.start = start; + expr.end = end; + return expr; + }; + }; + + function handle_regexp() { + if (is("operator", "/") || is("operator", "/=")) { + S.peeked = null; + S.token = S.input(S.token.value.substr(1)); // force regexp + } + }; + + var statement = embed_tokens(function() { + handle_regexp(); + switch (S.token.type) { + case "string": + if (S.in_directives) { + var token = peek(); + if (S.token.raw.indexOf("\\") == -1 + && (token.nlb + || is_token(token, "eof") + || is_token(token, "punc", ";") + || is_token(token, "punc", "}"))) { + S.input.add_directive(S.token.value); + } else { + S.in_directives = false; + } + } + var dir = S.in_directives, stat = simple_statement(); + return dir ? new AST_Directive(stat.body) : stat; + case "num": + case "regexp": + case "operator": + case "atom": + return simple_statement(); + + case "name": + return is_token(peek(), "punc", ":") + ? labeled_statement() + : simple_statement(); + + case "punc": + switch (S.token.value) { + case "{": + return new AST_BlockStatement({ + start : S.token, + body : block_(), + end : prev() + }); + case "[": + case "(": + return simple_statement(); + case ";": + S.in_directives = false; + next(); + return new AST_EmptyStatement(); + default: + unexpected(); + } + + case "keyword": + switch (S.token.value) { + case "break": + next(); + return break_cont(AST_Break); + + case "continue": + next(); + return break_cont(AST_Continue); + + case "debugger": + next(); + semicolon(); + return new AST_Debugger(); + + case "do": + next(); + var body = in_loop(statement); + expect_token("keyword", "while"); + var condition = parenthesised(); + semicolon(true); + return new AST_Do({ + body : body, + condition : condition + }); + + case "while": + next(); + return new AST_While({ + condition : parenthesised(), + body : in_loop(statement) + }); + + case "for": + next(); + return for_(); + + case "function": + next(); + return function_(AST_Defun); + + case "if": + next(); + return if_(); + + case "return": + if (S.in_function == 0 && !options.bare_returns) + croak("'return' outside of function"); + next(); + var value = null; + if (is("punc", ";")) { + next(); + } else if (!can_insert_semicolon()) { + value = expression(true); + semicolon(); + } + return new AST_Return({ + value: value + }); + + case "switch": + next(); + return new AST_Switch({ + expression : parenthesised(), + body : in_loop(switch_body_) + }); + + case "throw": + next(); + if (S.token.nlb) + croak("Illegal newline after 'throw'"); + var value = expression(true); + semicolon(); + return new AST_Throw({ + value: value + }); + + case "try": + next(); + return try_(); + + case "var": + next(); + var node = var_(); + semicolon(); + return node; + + case "const": + next(); + var node = const_(); + semicolon(); + return node; + + case "with": + if (S.input.has_directive("use strict")) { + croak("Strict mode may not include a with statement"); + } + next(); + return new AST_With({ + expression : parenthesised(), + body : statement() + }); + } + } + unexpected(); + }); + + function labeled_statement() { + var label = as_symbol(AST_Label); + if (find_if(function(l){ return l.name == label.name }, S.labels)) { + // ECMA-262, 12.12: An ECMAScript program is considered + // syntactically incorrect if it contains a + // LabelledStatement that is enclosed by a + // LabelledStatement with the same Identifier as label. + croak("Label " + label.name + " defined twice"); + } + expect(":"); + S.labels.push(label); + var stat = statement(); + S.labels.pop(); + if (!(stat instanceof AST_IterationStatement)) { + // check for `continue` that refers to this label. + // those should be reported as syntax errors. + // https://github.com/mishoo/UglifyJS2/issues/287 + label.references.forEach(function(ref){ + if (ref instanceof AST_Continue) { + ref = ref.label.start; + croak("Continue label `" + label.name + "` refers to non-IterationStatement.", + ref.line, ref.col, ref.pos); + } + }); + } + return new AST_LabeledStatement({ body: stat, label: label }); + }; + + function simple_statement(tmp) { + return new AST_SimpleStatement({ body: (tmp = expression(true), semicolon(), tmp) }); + }; + + function break_cont(type) { + var label = null, ldef; + if (!can_insert_semicolon()) { + label = as_symbol(AST_LabelRef, true); + } + if (label != null) { + ldef = find_if(function(l){ return l.name == label.name }, S.labels); + if (!ldef) + croak("Undefined label " + label.name); + label.thedef = ldef; + } + else if (S.in_loop == 0) + croak(type.TYPE + " not inside a loop or switch"); + semicolon(); + var stat = new type({ label: label }); + if (ldef) ldef.references.push(stat); + return stat; + }; + + function for_() { + expect("("); + var init = null; + if (!is("punc", ";")) { + init = is("keyword", "var") + ? (next(), var_(true)) + : expression(true, true); + if (is("operator", "in")) { + if (init instanceof AST_Var && init.definitions.length > 1) + croak("Only one variable declaration allowed in for..in loop"); + next(); + return for_in(init); + } + } + return regular_for(init); + }; + + function regular_for(init) { + expect(";"); + var test = is("punc", ";") ? null : expression(true); + expect(";"); + var step = is("punc", ")") ? null : expression(true); + expect(")"); + return new AST_For({ + init : init, + condition : test, + step : step, + body : in_loop(statement) + }); + }; + + function for_in(init) { + var lhs = init instanceof AST_Var ? init.definitions[0].name : null; + var obj = expression(true); + expect(")"); + return new AST_ForIn({ + init : init, + name : lhs, + object : obj, + body : in_loop(statement) + }); + }; + + var function_ = function(ctor) { + var in_statement = ctor === AST_Defun; + var name = is("name") ? as_symbol(in_statement ? AST_SymbolDefun : AST_SymbolLambda) : null; + if (in_statement && !name) + unexpected(); + expect("("); + return new ctor({ + name: name, + argnames: (function(first, a){ + while (!is("punc", ")")) { + if (first) first = false; else expect(","); + a.push(as_symbol(AST_SymbolFunarg)); + } + next(); + return a; + })(true, []), + body: (function(loop, labels){ + ++S.in_function; + S.in_directives = true; + S.input.push_directives_stack(); + S.in_loop = 0; + S.labels = []; + var a = block_(); + S.input.pop_directives_stack(); + --S.in_function; + S.in_loop = loop; + S.labels = labels; + return a; + })(S.in_loop, S.labels) + }); + }; + + function if_() { + var cond = parenthesised(), body = statement(), belse = null; + if (is("keyword", "else")) { + next(); + belse = statement(); + } + return new AST_If({ + condition : cond, + body : body, + alternative : belse + }); + }; + + function block_() { + expect("{"); + var a = []; + while (!is("punc", "}")) { + if (is("eof")) unexpected(); + a.push(statement()); + } + next(); + return a; + }; + + function switch_body_() { + expect("{"); + var a = [], cur = null, branch = null, tmp; + while (!is("punc", "}")) { + if (is("eof")) unexpected(); + if (is("keyword", "case")) { + if (branch) branch.end = prev(); + cur = []; + branch = new AST_Case({ + start : (tmp = S.token, next(), tmp), + expression : expression(true), + body : cur + }); + a.push(branch); + expect(":"); + } + else if (is("keyword", "default")) { + if (branch) branch.end = prev(); + cur = []; + branch = new AST_Default({ + start : (tmp = S.token, next(), expect(":"), tmp), + body : cur + }); + a.push(branch); + } + else { + if (!cur) unexpected(); + cur.push(statement()); + } + } + if (branch) branch.end = prev(); + next(); + return a; + }; + + function try_() { + var body = block_(), bcatch = null, bfinally = null; + if (is("keyword", "catch")) { + var start = S.token; + next(); + expect("("); + var name = as_symbol(AST_SymbolCatch); + expect(")"); + bcatch = new AST_Catch({ + start : start, + argname : name, + body : block_(), + end : prev() + }); + } + if (is("keyword", "finally")) { + var start = S.token; + next(); + bfinally = new AST_Finally({ + start : start, + body : block_(), + end : prev() + }); + } + if (!bcatch && !bfinally) + croak("Missing catch/finally blocks"); + return new AST_Try({ + body : body, + bcatch : bcatch, + bfinally : bfinally + }); + }; + + function vardefs(no_in, in_const) { + var a = []; + for (;;) { + a.push(new AST_VarDef({ + start : S.token, + name : as_symbol(in_const ? AST_SymbolConst : AST_SymbolVar), + value : is("operator", "=") ? (next(), expression(false, no_in)) : null, + end : prev() + })); + if (!is("punc", ",")) + break; + next(); + } + return a; + }; + + var var_ = function(no_in) { + return new AST_Var({ + start : prev(), + definitions : vardefs(no_in, false), + end : prev() + }); + }; + + var const_ = function() { + return new AST_Const({ + start : prev(), + definitions : vardefs(false, true), + end : prev() + }); + }; + + var new_ = function(allow_calls) { + var start = S.token; + expect_token("operator", "new"); + var newexp = expr_atom(false), args; + if (is("punc", "(")) { + next(); + args = expr_list(")"); + } else { + args = []; + } + return subscripts(new AST_New({ + start : start, + expression : newexp, + args : args, + end : prev() + }), allow_calls); + }; + + function as_atom_node() { + var tok = S.token, ret; + switch (tok.type) { + case "name": + case "keyword": + ret = _make_symbol(AST_SymbolRef); + break; + case "num": + ret = new AST_Number({ start: tok, end: tok, value: tok.value }); + break; + case "string": + ret = new AST_String({ + start : tok, + end : tok, + value : tok.value, + quote : tok.quote + }); + break; + case "regexp": + ret = new AST_RegExp({ start: tok, end: tok, value: tok.value }); + break; + case "atom": + switch (tok.value) { + case "false": + ret = new AST_False({ start: tok, end: tok }); + break; + case "true": + ret = new AST_True({ start: tok, end: tok }); + break; + case "null": + ret = new AST_Null({ start: tok, end: tok }); + break; + } + break; + case "operator": + if (!is_identifier_string(tok.value)) { + croak("Invalid getter/setter name: " + tok.value, + tok.line, tok.col, tok.pos); + } + ret = _make_symbol(AST_SymbolRef); + break; + } + next(); + return ret; + }; + + var expr_atom = function(allow_calls) { + if (is("operator", "new")) { + return new_(allow_calls); + } + var start = S.token; + if (is("punc")) { + switch (start.value) { + case "(": + next(); + var ex = expression(true); + ex.start = start; + ex.end = S.token; + expect(")"); + return subscripts(ex, allow_calls); + case "[": + return subscripts(array_(), allow_calls); + case "{": + return subscripts(object_(), allow_calls); + } + unexpected(); + } + if (is("keyword", "function")) { + next(); + var func = function_(AST_Function); + func.start = start; + func.end = prev(); + return subscripts(func, allow_calls); + } + if (ATOMIC_START_TOKEN[S.token.type]) { + return subscripts(as_atom_node(), allow_calls); + } + unexpected(); + }; + + function expr_list(closing, allow_trailing_comma, allow_empty) { + var first = true, a = []; + while (!is("punc", closing)) { + if (first) first = false; else expect(","); + if (allow_trailing_comma && is("punc", closing)) break; + if (is("punc", ",") && allow_empty) { + a.push(new AST_Hole({ start: S.token, end: S.token })); + } else { + a.push(expression(false)); + } + } + next(); + return a; + }; + + var array_ = embed_tokens(function() { + expect("["); + return new AST_Array({ + elements: expr_list("]", !options.strict, true) + }); + }); + + var create_accessor = embed_tokens(function() { + return function_(AST_Accessor); + }); + + var object_ = embed_tokens(function() { + expect("{"); + var first = true, a = []; + while (!is("punc", "}")) { + if (first) first = false; else expect(","); + if (!options.strict && is("punc", "}")) + // allow trailing comma + break; + var start = S.token; + var type = start.type; + var name = as_property_name(); + if (type == "name" && !is("punc", ":")) { + var key = new AST_SymbolAccessor({ + start: S.token, + name: as_property_name(), + end: prev() + }); + if (name == "get") { + a.push(new AST_ObjectGetter({ + start : start, + key : key, + value : create_accessor(), + end : prev() + })); + continue; + } + if (name == "set") { + a.push(new AST_ObjectSetter({ + start : start, + key : key, + value : create_accessor(), + end : prev() + })); + continue; + } + } + expect(":"); + a.push(new AST_ObjectKeyVal({ + start : start, + quote : start.quote, + key : name, + value : expression(false), + end : prev() + })); + } + next(); + return new AST_Object({ properties: a }); + }); + + function as_property_name() { + var tmp = S.token; + switch (tmp.type) { + case "operator": + if (!KEYWORDS(tmp.value)) unexpected(); + case "num": + case "string": + case "name": + case "keyword": + case "atom": + next(); + return tmp.value; + default: + unexpected(); + } + }; + + function as_name() { + var tmp = S.token; + if (tmp.type != "name") unexpected(); + next(); + return tmp.value; + }; + + function _make_symbol(type) { + var name = S.token.value; + return new (name == "this" ? AST_This : type)({ + name : String(name), + start : S.token, + end : S.token + }); + }; + + function as_symbol(type, noerror) { + if (!is("name")) { + if (!noerror) croak("Name expected"); + return null; + } + var sym = _make_symbol(type); + next(); + return sym; + }; + + var subscripts = function(expr, allow_calls) { + var start = expr.start; + if (is("punc", ".")) { + next(); + return subscripts(new AST_Dot({ + start : start, + expression : expr, + property : as_name(), + end : prev() + }), allow_calls); + } + if (is("punc", "[")) { + next(); + var prop = expression(true); + expect("]"); + return subscripts(new AST_Sub({ + start : start, + expression : expr, + property : prop, + end : prev() + }), allow_calls); + } + if (allow_calls && is("punc", "(")) { + next(); + return subscripts(new AST_Call({ + start : start, + expression : expr, + args : expr_list(")"), + end : prev() + }), true); + } + return expr; + }; + + var maybe_unary = function(allow_calls) { + var start = S.token; + if (is("operator") && UNARY_PREFIX(start.value)) { + next(); + handle_regexp(); + var ex = make_unary(AST_UnaryPrefix, start, maybe_unary(allow_calls)); + ex.start = start; + ex.end = prev(); + return ex; + } + var val = expr_atom(allow_calls); + while (is("operator") && UNARY_POSTFIX(S.token.value) && !S.token.nlb) { + val = make_unary(AST_UnaryPostfix, S.token, val); + val.start = start; + val.end = S.token; + next(); + } + return val; + }; + + function make_unary(ctor, token, expr) { + var op = token.value; + if ((op == "++" || op == "--") && !is_assignable(expr)) + croak("Invalid use of " + op + " operator", token.line, token.col, token.pos); + return new ctor({ operator: op, expression: expr }); + }; + + var expr_op = function(left, min_prec, no_in) { + var op = is("operator") ? S.token.value : null; + if (op == "in" && no_in) op = null; + var prec = op != null ? PRECEDENCE[op] : null; + if (prec != null && prec > min_prec) { + next(); + var right = expr_op(maybe_unary(true), prec, no_in); + return expr_op(new AST_Binary({ + start : left.start, + left : left, + operator : op, + right : right, + end : right.end + }), min_prec, no_in); + } + return left; + }; + + function expr_ops(no_in) { + return expr_op(maybe_unary(true), 0, no_in); + }; + + var maybe_conditional = function(no_in) { + var start = S.token; + var expr = expr_ops(no_in); + if (is("operator", "?")) { + next(); + var yes = expression(false); + expect(":"); + return new AST_Conditional({ + start : start, + condition : expr, + consequent : yes, + alternative : expression(false, no_in), + end : prev() + }); + } + return expr; + }; + + function is_assignable(expr) { + if (options.cli) return true; + return expr instanceof AST_PropAccess || expr instanceof AST_SymbolRef; + }; + + var maybe_assign = function(no_in) { + var start = S.token; + var left = maybe_conditional(no_in), val = S.token.value; + if (is("operator") && ASSIGNMENT(val)) { + if (is_assignable(left)) { + next(); + return new AST_Assign({ + start : start, + left : left, + operator : val, + right : maybe_assign(no_in), + end : prev() + }); + } + croak("Invalid assignment"); + } + return left; + }; + + var expression = function(commas, no_in) { + var start = S.token; + var expr = maybe_assign(no_in); + if (commas && is("punc", ",")) { + next(); + return new AST_Seq({ + start : start, + car : expr, + cdr : expression(true, no_in), + end : peek() + }); + } + return expr; + }; + + function in_loop(cont) { + ++S.in_loop; + var ret = cont(); + --S.in_loop; + return ret; + }; + + if (options.expression) { + return expression(true); + } + + return (function(){ + var start = S.token; + var body = []; + S.input.push_directives_stack(); + while (!is("eof")) + body.push(statement()); + S.input.pop_directives_stack(); + var end = prev(); + var toplevel = options.toplevel; + if (toplevel) { + toplevel.body = toplevel.body.concat(body); + toplevel.end = end; + } else { + toplevel = new AST_Toplevel({ start: start, body: body, end: end }); + } + return toplevel; + })(); + +}; diff --git a/node_modules/uglify-js/lib/propmangle.js b/node_modules/uglify-js/lib/propmangle.js new file mode 100644 index 0000000000000..b62229903a5d0 --- /dev/null +++ b/node_modules/uglify-js/lib/propmangle.js @@ -0,0 +1,264 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +function find_builtins() { + // NaN will be included due to Number.NaN + var a = [ + "null", + "true", + "false", + "Infinity", + "-Infinity", + "undefined", + ]; + [ Object, Array, Function, Number, + String, Boolean, Error, Math, + Date, RegExp + ].forEach(function(ctor){ + Object.getOwnPropertyNames(ctor).map(add); + if (ctor.prototype) { + Object.getOwnPropertyNames(ctor.prototype).map(add); + } + }); + function add(name) { + push_uniq(a, name); + } + return a; +} + +function mangle_properties(ast, options) { + options = defaults(options, { + cache: null, + debug: false, + ignore_quoted: false, + only_cache: false, + regex: null, + reserved: null, + }); + + var reserved = options.reserved; + if (reserved == null) + reserved = find_builtins(); + + var cache = options.cache; + if (cache == null) { + cache = { + cname: -1, + props: new Dictionary() + }; + } + + var regex = options.regex; + var ignore_quoted = options.ignore_quoted; + + // note debug is either false (disabled), or a string of the debug suffix to use (enabled). + // note debug may be enabled as an empty string, which is falsey. Also treat passing 'true' + // the same as passing an empty string. + var debug = (options.debug !== false); + var debug_name_suffix; + if (debug) { + debug_name_suffix = (options.debug === true ? "" : options.debug); + } + + var names_to_mangle = []; + var unmangleable = []; + var ignored = {}; + + // step 1: find candidates to mangle + ast.walk(new TreeWalker(function(node){ + if (node instanceof AST_ObjectKeyVal) { + add(node.key, ignore_quoted && node.quote); + } + else if (node instanceof AST_ObjectProperty) { + // setter or getter, since KeyVal is handled above + add(node.key.name); + } + else if (node instanceof AST_Dot) { + add(node.property); + } + else if (node instanceof AST_Sub) { + addStrings(node.property, ignore_quoted); + } + })); + + // step 2: transform the tree, renaming properties + return ast.transform(new TreeTransformer(function(node){ + if (node instanceof AST_ObjectKeyVal) { + if (!(ignore_quoted && node.quote)) + node.key = mangle(node.key); + } + else if (node instanceof AST_ObjectProperty) { + // setter or getter + node.key.name = mangle(node.key.name); + } + else if (node instanceof AST_Dot) { + node.property = mangle(node.property); + } + else if (node instanceof AST_Sub) { + if (!ignore_quoted) + node.property = mangleStrings(node.property); + } + // else if (node instanceof AST_String) { + // if (should_mangle(node.value)) { + // AST_Node.warn( + // "Found \"{prop}\" property candidate for mangling in an arbitrary string [{file}:{line},{col}]", { + // file : node.start.file, + // line : node.start.line, + // col : node.start.col, + // prop : node.value + // } + // ); + // } + // } + })); + + // only function declarations after this line + + function can_mangle(name) { + if (unmangleable.indexOf(name) >= 0) return false; + if (reserved.indexOf(name) >= 0) return false; + if (options.only_cache) { + return cache.props.has(name); + } + if (/^-?[0-9]+(\.[0-9]+)?(e[+-][0-9]+)?$/.test(name)) return false; + return true; + } + + function should_mangle(name) { + if (ignore_quoted && name in ignored) return false; + if (regex && !regex.test(name)) return false; + if (reserved.indexOf(name) >= 0) return false; + return cache.props.has(name) + || names_to_mangle.indexOf(name) >= 0; + } + + function add(name, ignore) { + if (ignore) { + ignored[name] = true; + return; + } + + if (can_mangle(name)) + push_uniq(names_to_mangle, name); + + if (!should_mangle(name)) { + push_uniq(unmangleable, name); + } + } + + function mangle(name) { + if (!should_mangle(name)) { + return name; + } + + var mangled = cache.props.get(name); + if (!mangled) { + if (debug) { + // debug mode: use a prefix and suffix to preserve readability, e.g. o.foo -> o._$foo$NNN_. + var debug_mangled = "_$" + name + "$" + debug_name_suffix + "_"; + + if (can_mangle(debug_mangled) && !(ignore_quoted && debug_mangled in ignored)) { + mangled = debug_mangled; + } + } + + // either debug mode is off, or it is on and we could not use the mangled name + if (!mangled) { + // note can_mangle() does not check if the name collides with the 'ignored' set + // (filled with quoted properties when ignore_quoted set). Make sure we add this + // check so we don't collide with a quoted name. + do { + mangled = base54(++cache.cname); + } while (!can_mangle(mangled) || (ignore_quoted && mangled in ignored)); + } + + cache.props.set(name, mangled); + } + return mangled; + } + + function addStrings(node, ignore) { + var out = {}; + try { + (function walk(node){ + node.walk(new TreeWalker(function(node){ + if (node instanceof AST_Seq) { + walk(node.cdr); + return true; + } + if (node instanceof AST_String) { + add(node.value, ignore); + return true; + } + if (node instanceof AST_Conditional) { + walk(node.consequent); + walk(node.alternative); + return true; + } + throw out; + })); + })(node); + } catch(ex) { + if (ex !== out) throw ex; + } + } + + function mangleStrings(node) { + return node.transform(new TreeTransformer(function(node){ + if (node instanceof AST_Seq) { + node.cdr = mangleStrings(node.cdr); + } + else if (node instanceof AST_String) { + node.value = mangle(node.value); + } + else if (node instanceof AST_Conditional) { + node.consequent = mangleStrings(node.consequent); + node.alternative = mangleStrings(node.alternative); + } + return node; + })); + } + +} diff --git a/node_modules/uglify-js/lib/scope.js b/node_modules/uglify-js/lib/scope.js new file mode 100644 index 0000000000000..bf6dbcbbf28f0 --- /dev/null +++ b/node_modules/uglify-js/lib/scope.js @@ -0,0 +1,656 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +function SymbolDef(scope, index, orig) { + this.name = orig.name; + this.orig = [ orig ]; + this.scope = scope; + this.references = []; + this.global = false; + this.mangled_name = null; + this.undeclared = false; + this.index = index; + this.id = SymbolDef.next_id++; +}; + +SymbolDef.next_id = 1; + +SymbolDef.prototype = { + unmangleable: function(options) { + if (!options) options = {}; + + return (this.global && !options.toplevel) + || this.undeclared + || (!options.eval && (this.scope.uses_eval || this.scope.uses_with)) + || (options.keep_fnames + && (this.orig[0] instanceof AST_SymbolLambda + || this.orig[0] instanceof AST_SymbolDefun)); + }, + mangle: function(options) { + var cache = options.cache && options.cache.props; + if (this.global && cache && cache.has(this.name)) { + this.mangled_name = cache.get(this.name); + } + else if (!this.mangled_name && !this.unmangleable(options)) { + var s = this.scope; + var sym = this.orig[0]; + if (!options.screw_ie8 && sym instanceof AST_SymbolLambda) + s = s.parent_scope; + var def; + if (this.defun && (def = this.defun.variables.get(this.name))) { + this.mangled_name = def.mangled_name || def.name; + } else + this.mangled_name = s.next_mangled(options, this); + if (this.global && cache) { + cache.set(this.name, this.mangled_name); + } + } + } +}; + +AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){ + options = defaults(options, { + cache: null, + screw_ie8: true, + }); + + // pass 1: setup scope chaining and handle definitions + var self = this; + var scope = self.parent_scope = null; + var labels = new Dictionary(); + var defun = null; + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_Catch) { + var save_scope = scope; + scope = new AST_Scope(node); + scope.init_scope_vars(save_scope); + descend(); + scope = save_scope; + return true; + } + if (node instanceof AST_Scope) { + node.init_scope_vars(scope); + var save_scope = scope; + var save_defun = defun; + var save_labels = labels; + defun = scope = node; + labels = new Dictionary(); + descend(); + scope = save_scope; + defun = save_defun; + labels = save_labels; + return true; // don't descend again in TreeWalker + } + if (node instanceof AST_LabeledStatement) { + var l = node.label; + if (labels.has(l.name)) { + throw new Error(string_template("Label {name} defined twice", l)); + } + labels.set(l.name, l); + descend(); + labels.del(l.name); + return true; // no descend again + } + if (node instanceof AST_With) { + for (var s = scope; s; s = s.parent_scope) + s.uses_with = true; + return; + } + if (node instanceof AST_Symbol) { + node.scope = scope; + } + if (node instanceof AST_Label) { + node.thedef = node; + node.references = []; + } + if (node instanceof AST_SymbolLambda) { + defun.def_function(node); + } + else if (node instanceof AST_SymbolDefun) { + // Careful here, the scope where this should be defined is + // the parent scope. The reason is that we enter a new + // scope when we encounter the AST_Defun node (which is + // instanceof AST_Scope) but we get to the symbol a bit + // later. + (node.scope = defun.parent_scope).def_function(node); + } + else if (node instanceof AST_SymbolVar + || node instanceof AST_SymbolConst) { + defun.def_variable(node); + if (defun !== scope) { + node.mark_enclosed(options); + var def = scope.find_variable(node); + if (node.thedef !== def) { + node.thedef = def; + node.reference(options); + } + } + } + else if (node instanceof AST_SymbolCatch) { + scope.def_variable(node).defun = defun; + } + else if (node instanceof AST_LabelRef) { + var sym = labels.get(node.name); + if (!sym) throw new Error(string_template("Undefined label {name} [{line},{col}]", { + name: node.name, + line: node.start.line, + col: node.start.col + })); + node.thedef = sym; + } + }); + self.walk(tw); + + // pass 2: find back references and eval + var func = null; + var globals = self.globals = new Dictionary(); + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_Lambda) { + var prev_func = func; + func = node; + descend(); + func = prev_func; + return true; + } + if (node instanceof AST_LoopControl && node.label) { + node.label.thedef.references.push(node); + return true; + } + if (node instanceof AST_SymbolRef) { + var name = node.name; + if (name == "eval" && tw.parent() instanceof AST_Call) { + for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) { + s.uses_eval = true; + } + } + var sym = node.scope.find_variable(name); + if (node.scope instanceof AST_Lambda && name == "arguments") { + node.scope.uses_arguments = true; + } + if (!sym) { + sym = self.def_global(node); + } + node.thedef = sym; + node.reference(options); + return true; + } + }); + self.walk(tw); + + // pass 3: fix up any scoping issue with IE8 + if (!options.screw_ie8) { + self.walk(new TreeWalker(function(node, descend) { + if (node instanceof AST_SymbolCatch) { + var name = node.name; + var refs = node.thedef.references; + var scope = node.thedef.defun; + var def = scope.find_variable(name) || self.globals.get(name) || scope.def_variable(node); + refs.forEach(function(ref) { + ref.thedef = def; + ref.reference(options); + }); + node.thedef = def; + return true; + } + })); + } + + if (options.cache) { + this.cname = options.cache.cname; + } +}); + +AST_Toplevel.DEFMETHOD("def_global", function(node){ + var globals = this.globals, name = node.name; + if (globals.has(name)) { + return globals.get(name); + } else { + var g = new SymbolDef(this, globals.size(), node); + g.undeclared = true; + g.global = true; + globals.set(name, g); + return g; + } +}); + +AST_Scope.DEFMETHOD("init_scope_vars", function(parent_scope){ + this.variables = new Dictionary(); // map name to AST_SymbolVar (variables defined in this scope; includes functions) + this.functions = new Dictionary(); // map name to AST_SymbolDefun (functions defined in this scope) + this.uses_with = false; // will be set to true if this or some nested scope uses the `with` statement + this.uses_eval = false; // will be set to true if this or nested scope uses the global `eval` + this.parent_scope = parent_scope; // the parent scope + this.enclosed = []; // a list of variables from this or outer scope(s) that are referenced from this or inner scopes + this.cname = -1; // the current index for mangling functions/variables +}); + +AST_Lambda.DEFMETHOD("init_scope_vars", function(){ + AST_Scope.prototype.init_scope_vars.apply(this, arguments); + this.uses_arguments = false; + this.def_variable(new AST_SymbolVar({ + name: "arguments", + start: this.start, + end: this.end + })); +}); + +AST_Symbol.DEFMETHOD("mark_enclosed", function(options) { + var def = this.definition(); + var s = this.scope; + while (s) { + push_uniq(s.enclosed, def); + if (options.keep_fnames) { + s.functions.each(function(d) { + push_uniq(def.scope.enclosed, d); + }); + } + if (s === def.scope) break; + s = s.parent_scope; + } +}); + +AST_Symbol.DEFMETHOD("reference", function(options) { + this.definition().references.push(this); + this.mark_enclosed(options); +}); + +AST_Scope.DEFMETHOD("find_variable", function(name){ + if (name instanceof AST_Symbol) name = name.name; + return this.variables.get(name) + || (this.parent_scope && this.parent_scope.find_variable(name)); +}); + +AST_Scope.DEFMETHOD("def_function", function(symbol){ + this.functions.set(symbol.name, this.def_variable(symbol)); +}); + +AST_Scope.DEFMETHOD("def_variable", function(symbol){ + var def; + if (!this.variables.has(symbol.name)) { + def = new SymbolDef(this, this.variables.size(), symbol); + this.variables.set(symbol.name, def); + def.global = !this.parent_scope; + } else { + def = this.variables.get(symbol.name); + def.orig.push(symbol); + } + return symbol.thedef = def; +}); + +AST_Scope.DEFMETHOD("next_mangled", function(options){ + var ext = this.enclosed; + out: while (true) { + var m = base54(++this.cname); + if (!is_identifier(m)) continue; // skip over "do" + + // https://github.com/mishoo/UglifyJS2/issues/242 -- do not + // shadow a name excepted from mangling. + if (options.except.indexOf(m) >= 0) continue; + + // we must ensure that the mangled name does not shadow a name + // from some parent scope that is referenced in this or in + // inner scopes. + for (var i = ext.length; --i >= 0;) { + var sym = ext[i]; + var name = sym.mangled_name || (sym.unmangleable(options) && sym.name); + if (m == name) continue out; + } + return m; + } +}); + +AST_Function.DEFMETHOD("next_mangled", function(options, def){ + // #179, #326 + // in Safari strict mode, something like (function x(x){...}) is a syntax error; + // a function expression's argument cannot shadow the function expression's name + + var tricky_def = def.orig[0] instanceof AST_SymbolFunarg && this.name && this.name.definition(); + + // the function's mangled_name is null when keep_fnames is true + var tricky_name = tricky_def ? tricky_def.mangled_name || tricky_def.name : null; + + while (true) { + var name = AST_Lambda.prototype.next_mangled.call(this, options, def); + if (!tricky_name || tricky_name != name) + return name; + } +}); + +AST_Symbol.DEFMETHOD("unmangleable", function(options){ + return this.definition().unmangleable(options); +}); + +// labels are always mangleable +AST_Label.DEFMETHOD("unmangleable", function(){ + return false; +}); + +AST_Symbol.DEFMETHOD("unreferenced", function(){ + return this.definition().references.length == 0 + && !(this.scope.uses_eval || this.scope.uses_with); +}); + +AST_Symbol.DEFMETHOD("undeclared", function(){ + return this.definition().undeclared; +}); + +AST_LabelRef.DEFMETHOD("undeclared", function(){ + return false; +}); + +AST_Label.DEFMETHOD("undeclared", function(){ + return false; +}); + +AST_Symbol.DEFMETHOD("definition", function(){ + return this.thedef; +}); + +AST_Symbol.DEFMETHOD("global", function(){ + return this.definition().global; +}); + +AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){ + return defaults(options, { + eval : false, + except : [], + keep_fnames : false, + screw_ie8 : true, + sort : false, // Ignored. Flag retained for backwards compatibility. + toplevel : false, + }); +}); + +AST_Toplevel.DEFMETHOD("mangle_names", function(options){ + options = this._default_mangler_options(options); + + // Never mangle arguments + options.except.push('arguments'); + + // We only need to mangle declaration nodes. Special logic wired + // into the code generator will display the mangled name if it's + // present (and for AST_SymbolRef-s it'll use the mangled name of + // the AST_SymbolDeclaration that it points to). + var lname = -1; + var to_mangle = []; + + if (options.cache) { + this.globals.each(function(symbol){ + if (options.except.indexOf(symbol.name) < 0) { + to_mangle.push(symbol); + } + }); + } + + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_LabeledStatement) { + // lname is incremented when we get to the AST_Label + var save_nesting = lname; + descend(); + lname = save_nesting; + return true; // don't descend again in TreeWalker + } + if (node instanceof AST_Scope) { + var p = tw.parent(), a = []; + node.variables.each(function(symbol){ + if (options.except.indexOf(symbol.name) < 0) { + a.push(symbol); + } + }); + to_mangle.push.apply(to_mangle, a); + return; + } + if (node instanceof AST_Label) { + var name; + do name = base54(++lname); while (!is_identifier(name)); + node.mangled_name = name; + return true; + } + if (options.screw_ie8 && node instanceof AST_SymbolCatch) { + to_mangle.push(node.definition()); + return; + } + }); + this.walk(tw); + to_mangle.forEach(function(def){ def.mangle(options) }); + + if (options.cache) { + options.cache.cname = this.cname; + } +}); + +AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options){ + options = this._default_mangler_options(options); + var tw = new TreeWalker(function(node){ + if (node instanceof AST_Constant) + base54.consider(node.print_to_string()); + else if (node instanceof AST_Return) + base54.consider("return"); + else if (node instanceof AST_Throw) + base54.consider("throw"); + else if (node instanceof AST_Continue) + base54.consider("continue"); + else if (node instanceof AST_Break) + base54.consider("break"); + else if (node instanceof AST_Debugger) + base54.consider("debugger"); + else if (node instanceof AST_Directive) + base54.consider(node.value); + else if (node instanceof AST_While) + base54.consider("while"); + else if (node instanceof AST_Do) + base54.consider("do while"); + else if (node instanceof AST_If) { + base54.consider("if"); + if (node.alternative) base54.consider("else"); + } + else if (node instanceof AST_Var) + base54.consider("var"); + else if (node instanceof AST_Const) + base54.consider("const"); + else if (node instanceof AST_Lambda) + base54.consider("function"); + else if (node instanceof AST_For) + base54.consider("for"); + else if (node instanceof AST_ForIn) + base54.consider("for in"); + else if (node instanceof AST_Switch) + base54.consider("switch"); + else if (node instanceof AST_Case) + base54.consider("case"); + else if (node instanceof AST_Default) + base54.consider("default"); + else if (node instanceof AST_With) + base54.consider("with"); + else if (node instanceof AST_ObjectSetter) + base54.consider("set" + node.key); + else if (node instanceof AST_ObjectGetter) + base54.consider("get" + node.key); + else if (node instanceof AST_ObjectKeyVal) + base54.consider(node.key); + else if (node instanceof AST_New) + base54.consider("new"); + else if (node instanceof AST_This) + base54.consider("this"); + else if (node instanceof AST_Try) + base54.consider("try"); + else if (node instanceof AST_Catch) + base54.consider("catch"); + else if (node instanceof AST_Finally) + base54.consider("finally"); + else if (node instanceof AST_Symbol && node.unmangleable(options)) + base54.consider(node.name); + else if (node instanceof AST_Unary || node instanceof AST_Binary) + base54.consider(node.operator); + else if (node instanceof AST_Dot) + base54.consider(node.property); + }); + this.walk(tw); + base54.sort(); +}); + +var base54 = (function() { + var string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789"; + var chars, frequency; + function reset() { + frequency = Object.create(null); + chars = string.split("").map(function(ch){ return ch.charCodeAt(0) }); + chars.forEach(function(ch){ frequency[ch] = 0 }); + } + base54.consider = function(str){ + for (var i = str.length; --i >= 0;) { + var code = str.charCodeAt(i); + if (code in frequency) ++frequency[code]; + } + }; + base54.sort = function() { + chars = mergeSort(chars, function(a, b){ + if (is_digit(a) && !is_digit(b)) return 1; + if (is_digit(b) && !is_digit(a)) return -1; + return frequency[b] - frequency[a]; + }); + }; + base54.reset = reset; + reset(); + base54.get = function(){ return chars }; + base54.freq = function(){ return frequency }; + function base54(num) { + var ret = "", base = 54; + num++; + do { + num--; + ret += String.fromCharCode(chars[num % base]); + num = Math.floor(num / base); + base = 64; + } while (num > 0); + return ret; + }; + return base54; +})(); + +AST_Toplevel.DEFMETHOD("scope_warnings", function(options){ + options = defaults(options, { + assign_to_global : true, + eval : true, + func_arguments : true, + nested_defuns : true, + undeclared : false, // this makes a lot of noise + unreferenced : true, + }); + var tw = new TreeWalker(function(node){ + if (options.undeclared + && node instanceof AST_SymbolRef + && node.undeclared()) + { + // XXX: this also warns about JS standard names, + // i.e. Object, Array, parseInt etc. Should add a list of + // exceptions. + AST_Node.warn("Undeclared symbol: {name} [{file}:{line},{col}]", { + name: node.name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.assign_to_global) + { + var sym = null; + if (node instanceof AST_Assign && node.left instanceof AST_SymbolRef) + sym = node.left; + else if (node instanceof AST_ForIn && node.init instanceof AST_SymbolRef) + sym = node.init; + if (sym + && (sym.undeclared() + || (sym.global() && sym.scope !== sym.definition().scope))) { + AST_Node.warn("{msg}: {name} [{file}:{line},{col}]", { + msg: sym.undeclared() ? "Accidental global?" : "Assignment to global", + name: sym.name, + file: sym.start.file, + line: sym.start.line, + col: sym.start.col + }); + } + } + if (options.eval + && node instanceof AST_SymbolRef + && node.undeclared() + && node.name == "eval") { + AST_Node.warn("Eval is used [{file}:{line},{col}]", node.start); + } + if (options.unreferenced + && (node instanceof AST_SymbolDeclaration || node instanceof AST_Label) + && !(node instanceof AST_SymbolCatch) + && node.unreferenced()) { + AST_Node.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]", { + type: node instanceof AST_Label ? "Label" : "Symbol", + name: node.name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.func_arguments + && node instanceof AST_Lambda + && node.uses_arguments) { + AST_Node.warn("arguments used in function {name} [{file}:{line},{col}]", { + name: node.name ? node.name.name : "anonymous", + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.nested_defuns + && node instanceof AST_Defun + && !(tw.parent() instanceof AST_Scope)) { + AST_Node.warn("Function {name} declared in nested statement \"{type}\" [{file}:{line},{col}]", { + name: node.name.name, + type: tw.parent().TYPE, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + }); + this.walk(tw); +}); diff --git a/node_modules/uglify-js/lib/sourcemap.js b/node_modules/uglify-js/lib/sourcemap.js new file mode 100644 index 0000000000000..0be16bfc77137 --- /dev/null +++ b/node_modules/uglify-js/lib/sourcemap.js @@ -0,0 +1,97 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +// a small wrapper around fitzgen's source-map library +function SourceMap(options) { + options = defaults(options, { + file : null, + root : null, + orig : null, + + orig_line_diff : 0, + dest_line_diff : 0, + }); + var generator = new MOZ_SourceMap.SourceMapGenerator({ + file : options.file, + sourceRoot : options.root + }); + var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig); + + if (orig_map && Array.isArray(options.orig.sources)) { + orig_map._sources.toArray().forEach(function(source) { + var sourceContent = orig_map.sourceContentFor(source, true); + if (sourceContent) { + generator.setSourceContent(source, sourceContent); + } + }); + } + + function add(source, gen_line, gen_col, orig_line, orig_col, name) { + if (orig_map) { + var info = orig_map.originalPositionFor({ + line: orig_line, + column: orig_col + }); + if (info.source === null) { + return; + } + source = info.source; + orig_line = info.line; + orig_col = info.column; + name = info.name || name; + } + generator.addMapping({ + generated : { line: gen_line + options.dest_line_diff, column: gen_col }, + original : { line: orig_line + options.orig_line_diff, column: orig_col }, + source : source, + name : name + }); + }; + return { + add : add, + get : function() { return generator }, + toString : function() { return JSON.stringify(generator.toJSON()); } + }; +}; diff --git a/node_modules/uglify-js/lib/transform.js b/node_modules/uglify-js/lib/transform.js new file mode 100644 index 0000000000000..3018e8ff07c7b --- /dev/null +++ b/node_modules/uglify-js/lib/transform.js @@ -0,0 +1,218 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +// Tree transformer helpers. + +function TreeTransformer(before, after) { + TreeWalker.call(this); + this.before = before; + this.after = after; +} +TreeTransformer.prototype = new TreeWalker; + +(function(undefined){ + + function _(node, descend) { + node.DEFMETHOD("transform", function(tw, in_list){ + var x, y; + tw.push(this); + if (tw.before) x = tw.before(this, descend, in_list); + if (x === undefined) { + if (!tw.after) { + x = this; + descend(x, tw); + } else { + tw.stack[tw.stack.length - 1] = x = this; + descend(x, tw); + y = tw.after(x, in_list); + if (y !== undefined) x = y; + } + } + tw.pop(this); + return x; + }); + }; + + function do_list(list, tw) { + return MAP(list, function(node){ + return node.transform(tw, true); + }); + }; + + _(AST_Node, noop); + + _(AST_LabeledStatement, function(self, tw){ + self.label = self.label.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_SimpleStatement, function(self, tw){ + self.body = self.body.transform(tw); + }); + + _(AST_Block, function(self, tw){ + self.body = do_list(self.body, tw); + }); + + _(AST_DWLoop, function(self, tw){ + self.condition = self.condition.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_For, function(self, tw){ + if (self.init) self.init = self.init.transform(tw); + if (self.condition) self.condition = self.condition.transform(tw); + if (self.step) self.step = self.step.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_ForIn, function(self, tw){ + self.init = self.init.transform(tw); + self.object = self.object.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_With, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_Exit, function(self, tw){ + if (self.value) self.value = self.value.transform(tw); + }); + + _(AST_LoopControl, function(self, tw){ + if (self.label) self.label = self.label.transform(tw); + }); + + _(AST_If, function(self, tw){ + self.condition = self.condition.transform(tw); + self.body = self.body.transform(tw); + if (self.alternative) self.alternative = self.alternative.transform(tw); + }); + + _(AST_Switch, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Case, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Try, function(self, tw){ + self.body = do_list(self.body, tw); + if (self.bcatch) self.bcatch = self.bcatch.transform(tw); + if (self.bfinally) self.bfinally = self.bfinally.transform(tw); + }); + + _(AST_Catch, function(self, tw){ + self.argname = self.argname.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Definitions, function(self, tw){ + self.definitions = do_list(self.definitions, tw); + }); + + _(AST_VarDef, function(self, tw){ + self.name = self.name.transform(tw); + if (self.value) self.value = self.value.transform(tw); + }); + + _(AST_Lambda, function(self, tw){ + if (self.name) self.name = self.name.transform(tw); + self.argnames = do_list(self.argnames, tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Call, function(self, tw){ + self.expression = self.expression.transform(tw); + self.args = do_list(self.args, tw); + }); + + _(AST_Seq, function(self, tw){ + self.car = self.car.transform(tw); + self.cdr = self.cdr.transform(tw); + }); + + _(AST_Dot, function(self, tw){ + self.expression = self.expression.transform(tw); + }); + + _(AST_Sub, function(self, tw){ + self.expression = self.expression.transform(tw); + self.property = self.property.transform(tw); + }); + + _(AST_Unary, function(self, tw){ + self.expression = self.expression.transform(tw); + }); + + _(AST_Binary, function(self, tw){ + self.left = self.left.transform(tw); + self.right = self.right.transform(tw); + }); + + _(AST_Conditional, function(self, tw){ + self.condition = self.condition.transform(tw); + self.consequent = self.consequent.transform(tw); + self.alternative = self.alternative.transform(tw); + }); + + _(AST_Array, function(self, tw){ + self.elements = do_list(self.elements, tw); + }); + + _(AST_Object, function(self, tw){ + self.properties = do_list(self.properties, tw); + }); + + _(AST_ObjectProperty, function(self, tw){ + self.value = self.value.transform(tw); + }); + +})(); diff --git a/node_modules/uglify-js/lib/utils.js b/node_modules/uglify-js/lib/utils.js new file mode 100644 index 0000000000000..fdb2047196bcb --- /dev/null +++ b/node_modules/uglify-js/lib/utils.js @@ -0,0 +1,362 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + ***********************************************************************/ + +"use strict"; + +function array_to_hash(a) { + var ret = Object.create(null); + for (var i = 0; i < a.length; ++i) + ret[a[i]] = true; + return ret; +}; + +function slice(a, start) { + return Array.prototype.slice.call(a, start || 0); +}; + +function characters(str) { + return str.split(""); +}; + +function member(name, array) { + return array.indexOf(name) >= 0; +}; + +function find_if(func, array) { + for (var i = 0, n = array.length; i < n; ++i) { + if (func(array[i])) + return array[i]; + } +}; + +function repeat_string(str, i) { + if (i <= 0) return ""; + if (i == 1) return str; + var d = repeat_string(str, i >> 1); + d += d; + if (i & 1) d += str; + return d; +}; + +function configure_error_stack(fn) { + Object.defineProperty(fn.prototype, "stack", { + get: function() { + var err = new Error(this.message); + err.name = this.name; + try { + throw err; + } catch(e) { + return e.stack; + } + } + }); +} + +function DefaultsError(msg, defs) { + this.message = msg; + this.defs = defs; +}; +DefaultsError.prototype = Object.create(Error.prototype); +DefaultsError.prototype.constructor = DefaultsError; +DefaultsError.prototype.name = "DefaultsError"; +configure_error_stack(DefaultsError); + +DefaultsError.croak = function(msg, defs) { + throw new DefaultsError(msg, defs); +}; + +function defaults(args, defs, croak) { + if (args === true) + args = {}; + var ret = args || {}; + if (croak) for (var i in ret) if (HOP(ret, i) && !HOP(defs, i)) + DefaultsError.croak("`" + i + "` is not a supported option", defs); + for (var i in defs) if (HOP(defs, i)) { + ret[i] = (args && HOP(args, i)) ? args[i] : defs[i]; + } + return ret; +}; + +function merge(obj, ext) { + var count = 0; + for (var i in ext) if (HOP(ext, i)) { + obj[i] = ext[i]; + count++; + } + return count; +}; + +function noop() {} +function return_false() { return false; } +function return_true() { return true; } +function return_this() { return this; } +function return_null() { return null; } + +var MAP = (function(){ + function MAP(a, f, backwards) { + var ret = [], top = [], i; + function doit() { + var val = f(a[i], i); + var is_last = val instanceof Last; + if (is_last) val = val.v; + if (val instanceof AtTop) { + val = val.v; + if (val instanceof Splice) { + top.push.apply(top, backwards ? val.v.slice().reverse() : val.v); + } else { + top.push(val); + } + } + else if (val !== skip) { + if (val instanceof Splice) { + ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); + } else { + ret.push(val); + } + } + return is_last; + }; + if (a instanceof Array) { + if (backwards) { + for (i = a.length; --i >= 0;) if (doit()) break; + ret.reverse(); + top.reverse(); + } else { + for (i = 0; i < a.length; ++i) if (doit()) break; + } + } + else { + for (i in a) if (HOP(a, i)) if (doit()) break; + } + return top.concat(ret); + }; + MAP.at_top = function(val) { return new AtTop(val) }; + MAP.splice = function(val) { return new Splice(val) }; + MAP.last = function(val) { return new Last(val) }; + var skip = MAP.skip = {}; + function AtTop(val) { this.v = val }; + function Splice(val) { this.v = val }; + function Last(val) { this.v = val }; + return MAP; +})(); + +function push_uniq(array, el) { + if (array.indexOf(el) < 0) + array.push(el); +}; + +function string_template(text, props) { + return text.replace(/\{(.+?)\}/g, function(str, p){ + return props && props[p]; + }); +}; + +function remove(array, el) { + for (var i = array.length; --i >= 0;) { + if (array[i] === el) array.splice(i, 1); + } +}; + +function mergeSort(array, cmp) { + if (array.length < 2) return array.slice(); + function merge(a, b) { + var r = [], ai = 0, bi = 0, i = 0; + while (ai < a.length && bi < b.length) { + cmp(a[ai], b[bi]) <= 0 + ? r[i++] = a[ai++] + : r[i++] = b[bi++]; + } + if (ai < a.length) r.push.apply(r, a.slice(ai)); + if (bi < b.length) r.push.apply(r, b.slice(bi)); + return r; + }; + function _ms(a) { + if (a.length <= 1) + return a; + var m = Math.floor(a.length / 2), left = a.slice(0, m), right = a.slice(m); + left = _ms(left); + right = _ms(right); + return merge(left, right); + }; + return _ms(array); +}; + +function set_difference(a, b) { + return a.filter(function(el){ + return b.indexOf(el) < 0; + }); +}; + +function set_intersection(a, b) { + return a.filter(function(el){ + return b.indexOf(el) >= 0; + }); +}; + +// this function is taken from Acorn [1], written by Marijn Haverbeke +// [1] https://github.com/marijnh/acorn +function makePredicate(words) { + if (!(words instanceof Array)) words = words.split(" "); + var f = "", cats = []; + out: for (var i = 0; i < words.length; ++i) { + for (var j = 0; j < cats.length; ++j) + if (cats[j][0].length == words[i].length) { + cats[j].push(words[i]); + continue out; + } + cats.push([words[i]]); + } + function quote(word) { + return JSON.stringify(word).replace(/[\u2028\u2029]/g, function(s) { + switch (s) { + case "\u2028": return "\\u2028"; + case "\u2029": return "\\u2029"; + } + return s; + }); + } + function compareTo(arr) { + if (arr.length == 1) return f += "return str === " + quote(arr[0]) + ";"; + f += "switch(str){"; + for (var i = 0; i < arr.length; ++i) f += "case " + quote(arr[i]) + ":"; + f += "return true}return false;"; + } + // When there are more than three length categories, an outer + // switch first dispatches on the lengths, to save on comparisons. + if (cats.length > 3) { + cats.sort(function(a, b) {return b.length - a.length;}); + f += "switch(str.length){"; + for (var i = 0; i < cats.length; ++i) { + var cat = cats[i]; + f += "case " + cat[0].length + ":"; + compareTo(cat); + } + f += "}"; + // Otherwise, simply generate a flat `switch` statement. + } else { + compareTo(words); + } + return new Function("str", f); +}; + +function all(array, predicate) { + for (var i = array.length; --i >= 0;) + if (!predicate(array[i])) + return false; + return true; +}; + +function Dictionary() { + this._values = Object.create(null); + this._size = 0; +}; +Dictionary.prototype = { + set: function(key, val) { + if (!this.has(key)) ++this._size; + this._values["$" + key] = val; + return this; + }, + add: function(key, val) { + if (this.has(key)) { + this.get(key).push(val); + } else { + this.set(key, [ val ]); + } + return this; + }, + get: function(key) { return this._values["$" + key] }, + del: function(key) { + if (this.has(key)) { + --this._size; + delete this._values["$" + key]; + } + return this; + }, + has: function(key) { return ("$" + key) in this._values }, + each: function(f) { + for (var i in this._values) + f(this._values[i], i.substr(1)); + }, + size: function() { + return this._size; + }, + map: function(f) { + var ret = []; + for (var i in this._values) + ret.push(f(this._values[i], i.substr(1))); + return ret; + }, + toObject: function() { return this._values } +}; +Dictionary.fromObject = function(obj) { + var dict = new Dictionary(); + dict._size = merge(dict._values, obj); + return dict; +}; + +function HOP(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +// return true if the node at the top of the stack (that means the +// innermost node in the current output) is lexically the first in +// a statement. +function first_in_statement(stack) { + var node = stack.parent(-1); + for (var i = 0, p; p = stack.parent(i); i++) { + if (p instanceof AST_Statement && p.body === node) + return true; + if ((p instanceof AST_Seq && p.car === node ) || + (p instanceof AST_Call && p.expression === node && !(p instanceof AST_New) ) || + (p instanceof AST_Dot && p.expression === node ) || + (p instanceof AST_Sub && p.expression === node ) || + (p instanceof AST_Conditional && p.condition === node ) || + (p instanceof AST_Binary && p.left === node ) || + (p instanceof AST_UnaryPostfix && p.expression === node )) + { + node = p; + } else { + return false; + } + } +} diff --git a/node_modules/uglify-js/package.json b/node_modules/uglify-js/package.json new file mode 100644 index 0000000000000..13562e8d51a43 --- /dev/null +++ b/node_modules/uglify-js/package.json @@ -0,0 +1,51 @@ +{ + "name": "uglify-js", + "description": "JavaScript parser, mangler/compressor and beautifier toolkit", + "homepage": "http://lisperator.net/uglifyjs", + "author": "Mihai Bazon (http://lisperator.net/)", + "license": "BSD-2-Clause", + "version": "2.8.29", + "engines": { + "node": ">=0.8.0" + }, + "maintainers": [ + "Mihai Bazon (http://lisperator.net/)" + ], + "repository": { + "type": "git", + "url": "https://github.com/mishoo/UglifyJS2.git" + }, + "bugs": { + "url": "https://github.com/mishoo/UglifyJS2/issues" + }, + "main": "tools/node.js", + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "files": [ + "bin", + "lib", + "tools", + "LICENSE" + ], + "dependencies": { + "source-map": "~0.5.1", + "yargs": "~3.10.0" + }, + "devDependencies": { + "acorn": "~5.0.3", + "mocha": "~2.3.4" + }, + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + }, + "browserify": { + "transform": [ + "uglify-to-browserify" + ] + }, + "scripts": { + "test": "node test/run-tests.js" + }, + "keywords": ["uglify", "uglify-js", "minify", "minifier"] +} diff --git a/node_modules/uglify-js/tools/domprops.json b/node_modules/uglify-js/tools/domprops.json new file mode 100644 index 0000000000000..6f6c221dbb721 --- /dev/null +++ b/node_modules/uglify-js/tools/domprops.json @@ -0,0 +1,5603 @@ +{ + "props": [ + "$&", + "$'", + "$*", + "$+", + "$1", + "$2", + "$3", + "$4", + "$5", + "$6", + "$7", + "$8", + "$9", + "$_", + "$`", + "$input", + "@@iterator", + "ABORT_ERR", + "ACTIVE", + "ACTIVE_ATTRIBUTES", + "ACTIVE_TEXTURE", + "ACTIVE_UNIFORMS", + "ADDITION", + "ALIASED_LINE_WIDTH_RANGE", + "ALIASED_POINT_SIZE_RANGE", + "ALLOW_KEYBOARD_INPUT", + "ALLPASS", + "ALPHA", + "ALPHA_BITS", + "ALT_MASK", + "ALWAYS", + "ANY_TYPE", + "ANY_UNORDERED_NODE_TYPE", + "ARRAY_BUFFER", + "ARRAY_BUFFER_BINDING", + "ATTACHED_SHADERS", + "ATTRIBUTE_NODE", + "AT_TARGET", + "AddSearchProvider", + "AnalyserNode", + "AnimationEvent", + "AnonXMLHttpRequest", + "ApplicationCache", + "ApplicationCacheErrorEvent", + "Array", + "ArrayBuffer", + "Attr", + "Audio", + "AudioBuffer", + "AudioBufferSourceNode", + "AudioContext", + "AudioDestinationNode", + "AudioListener", + "AudioNode", + "AudioParam", + "AudioProcessingEvent", + "AudioStreamTrack", + "AutocompleteErrorEvent", + "BACK", + "BAD_BOUNDARYPOINTS_ERR", + "BANDPASS", + "BLEND", + "BLEND_COLOR", + "BLEND_DST_ALPHA", + "BLEND_DST_RGB", + "BLEND_EQUATION", + "BLEND_EQUATION_ALPHA", + "BLEND_EQUATION_RGB", + "BLEND_SRC_ALPHA", + "BLEND_SRC_RGB", + "BLUE_BITS", + "BLUR", + "BOOL", + "BOOLEAN_TYPE", + "BOOL_VEC2", + "BOOL_VEC3", + "BOOL_VEC4", + "BOTH", + "BROWSER_DEFAULT_WEBGL", + "BUBBLING_PHASE", + "BUFFER_SIZE", + "BUFFER_USAGE", + "BYTE", + "BYTES_PER_ELEMENT", + "BarProp", + "BaseHref", + "BatteryManager", + "BeforeLoadEvent", + "BeforeUnloadEvent", + "BiquadFilterNode", + "Blob", + "BlobEvent", + "Boolean", + "CAPTURING_PHASE", + "CCW", + "CDATASection", + "CDATA_SECTION_NODE", + "CHANGE", + "CHARSET_RULE", + "CHECKING", + "CLAMP_TO_EDGE", + "CLICK", + "CLOSED", + "CLOSING", + "COLOR_ATTACHMENT0", + "COLOR_BUFFER_BIT", + "COLOR_CLEAR_VALUE", + "COLOR_WRITEMASK", + "COMMENT_NODE", + "COMPILE_STATUS", + "COMPRESSED_RGBA_S3TC_DXT1_EXT", + "COMPRESSED_RGBA_S3TC_DXT3_EXT", + "COMPRESSED_RGBA_S3TC_DXT5_EXT", + "COMPRESSED_RGB_S3TC_DXT1_EXT", + "COMPRESSED_TEXTURE_FORMATS", + "CONNECTING", + "CONSTANT_ALPHA", + "CONSTANT_COLOR", + "CONSTRAINT_ERR", + "CONTEXT_LOST_WEBGL", + "CONTROL_MASK", + "COUNTER_STYLE_RULE", + "CSS", + "CSS2Properties", + "CSSCharsetRule", + "CSSConditionRule", + "CSSCounterStyleRule", + "CSSFontFaceRule", + "CSSFontFeatureValuesRule", + "CSSGroupingRule", + "CSSImportRule", + "CSSKeyframeRule", + "CSSKeyframesRule", + "CSSMediaRule", + "CSSMozDocumentRule", + "CSSNameSpaceRule", + "CSSPageRule", + "CSSPrimitiveValue", + "CSSRule", + "CSSRuleList", + "CSSStyleDeclaration", + "CSSStyleRule", + "CSSStyleSheet", + "CSSSupportsRule", + "CSSUnknownRule", + "CSSValue", + "CSSValueList", + "CSSVariablesDeclaration", + "CSSVariablesRule", + "CSSViewportRule", + "CSS_ATTR", + "CSS_CM", + "CSS_COUNTER", + "CSS_CUSTOM", + "CSS_DEG", + "CSS_DIMENSION", + "CSS_EMS", + "CSS_EXS", + "CSS_FILTER_BLUR", + "CSS_FILTER_BRIGHTNESS", + "CSS_FILTER_CONTRAST", + "CSS_FILTER_CUSTOM", + "CSS_FILTER_DROP_SHADOW", + "CSS_FILTER_GRAYSCALE", + "CSS_FILTER_HUE_ROTATE", + "CSS_FILTER_INVERT", + "CSS_FILTER_OPACITY", + "CSS_FILTER_REFERENCE", + "CSS_FILTER_SATURATE", + "CSS_FILTER_SEPIA", + "CSS_GRAD", + "CSS_HZ", + "CSS_IDENT", + "CSS_IN", + "CSS_INHERIT", + "CSS_KHZ", + "CSS_MATRIX", + "CSS_MATRIX3D", + "CSS_MM", + "CSS_MS", + "CSS_NUMBER", + "CSS_PC", + "CSS_PERCENTAGE", + "CSS_PERSPECTIVE", + "CSS_PRIMITIVE_VALUE", + "CSS_PT", + "CSS_PX", + "CSS_RAD", + "CSS_RECT", + "CSS_RGBCOLOR", + "CSS_ROTATE", + "CSS_ROTATE3D", + "CSS_ROTATEX", + "CSS_ROTATEY", + "CSS_ROTATEZ", + "CSS_S", + "CSS_SCALE", + "CSS_SCALE3D", + "CSS_SCALEX", + "CSS_SCALEY", + "CSS_SCALEZ", + "CSS_SKEW", + "CSS_SKEWX", + "CSS_SKEWY", + "CSS_STRING", + "CSS_TRANSLATE", + "CSS_TRANSLATE3D", + "CSS_TRANSLATEX", + "CSS_TRANSLATEY", + "CSS_TRANSLATEZ", + "CSS_UNKNOWN", + "CSS_URI", + "CSS_VALUE_LIST", + "CSS_VH", + "CSS_VMAX", + "CSS_VMIN", + "CSS_VW", + "CULL_FACE", + "CULL_FACE_MODE", + "CURRENT_PROGRAM", + "CURRENT_VERTEX_ATTRIB", + "CUSTOM", + "CW", + "CanvasGradient", + "CanvasPattern", + "CanvasRenderingContext2D", + "CaretPosition", + "ChannelMergerNode", + "ChannelSplitterNode", + "CharacterData", + "ClientRect", + "ClientRectList", + "Clipboard", + "ClipboardEvent", + "CloseEvent", + "Collator", + "CommandEvent", + "Comment", + "CompositionEvent", + "Console", + "Controllers", + "ConvolverNode", + "Counter", + "Crypto", + "CryptoKey", + "CustomEvent", + "DATABASE_ERR", + "DATA_CLONE_ERR", + "DATA_ERR", + "DBLCLICK", + "DECR", + "DECR_WRAP", + "DELETE_STATUS", + "DEPTH_ATTACHMENT", + "DEPTH_BITS", + "DEPTH_BUFFER_BIT", + "DEPTH_CLEAR_VALUE", + "DEPTH_COMPONENT", + "DEPTH_COMPONENT16", + "DEPTH_FUNC", + "DEPTH_RANGE", + "DEPTH_STENCIL", + "DEPTH_STENCIL_ATTACHMENT", + "DEPTH_TEST", + "DEPTH_WRITEMASK", + "DIRECTION_DOWN", + "DIRECTION_LEFT", + "DIRECTION_RIGHT", + "DIRECTION_UP", + "DISABLED", + "DISPATCH_REQUEST_ERR", + "DITHER", + "DOCUMENT_FRAGMENT_NODE", + "DOCUMENT_NODE", + "DOCUMENT_POSITION_CONTAINED_BY", + "DOCUMENT_POSITION_CONTAINS", + "DOCUMENT_POSITION_DISCONNECTED", + "DOCUMENT_POSITION_FOLLOWING", + "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", + "DOCUMENT_POSITION_PRECEDING", + "DOCUMENT_TYPE_NODE", + "DOMCursor", + "DOMError", + "DOMException", + "DOMImplementation", + "DOMImplementationLS", + "DOMMatrix", + "DOMMatrixReadOnly", + "DOMParser", + "DOMPoint", + "DOMPointReadOnly", + "DOMQuad", + "DOMRect", + "DOMRectList", + "DOMRectReadOnly", + "DOMRequest", + "DOMSTRING_SIZE_ERR", + "DOMSettableTokenList", + "DOMStringList", + "DOMStringMap", + "DOMTokenList", + "DOMTransactionEvent", + "DOM_DELTA_LINE", + "DOM_DELTA_PAGE", + "DOM_DELTA_PIXEL", + "DOM_INPUT_METHOD_DROP", + "DOM_INPUT_METHOD_HANDWRITING", + "DOM_INPUT_METHOD_IME", + "DOM_INPUT_METHOD_KEYBOARD", + "DOM_INPUT_METHOD_MULTIMODAL", + "DOM_INPUT_METHOD_OPTION", + "DOM_INPUT_METHOD_PASTE", + "DOM_INPUT_METHOD_SCRIPT", + "DOM_INPUT_METHOD_UNKNOWN", + "DOM_INPUT_METHOD_VOICE", + "DOM_KEY_LOCATION_JOYSTICK", + "DOM_KEY_LOCATION_LEFT", + "DOM_KEY_LOCATION_MOBILE", + "DOM_KEY_LOCATION_NUMPAD", + "DOM_KEY_LOCATION_RIGHT", + "DOM_KEY_LOCATION_STANDARD", + "DOM_VK_0", + "DOM_VK_1", + "DOM_VK_2", + "DOM_VK_3", + "DOM_VK_4", + "DOM_VK_5", + "DOM_VK_6", + "DOM_VK_7", + "DOM_VK_8", + "DOM_VK_9", + "DOM_VK_A", + "DOM_VK_ACCEPT", + "DOM_VK_ADD", + "DOM_VK_ALT", + "DOM_VK_ALTGR", + "DOM_VK_AMPERSAND", + "DOM_VK_ASTERISK", + "DOM_VK_AT", + "DOM_VK_ATTN", + "DOM_VK_B", + "DOM_VK_BACKSPACE", + "DOM_VK_BACK_QUOTE", + "DOM_VK_BACK_SLASH", + "DOM_VK_BACK_SPACE", + "DOM_VK_C", + "DOM_VK_CANCEL", + "DOM_VK_CAPS_LOCK", + "DOM_VK_CIRCUMFLEX", + "DOM_VK_CLEAR", + "DOM_VK_CLOSE_BRACKET", + "DOM_VK_CLOSE_CURLY_BRACKET", + "DOM_VK_CLOSE_PAREN", + "DOM_VK_COLON", + "DOM_VK_COMMA", + "DOM_VK_CONTEXT_MENU", + "DOM_VK_CONTROL", + "DOM_VK_CONVERT", + "DOM_VK_CRSEL", + "DOM_VK_CTRL", + "DOM_VK_D", + "DOM_VK_DECIMAL", + "DOM_VK_DELETE", + "DOM_VK_DIVIDE", + "DOM_VK_DOLLAR", + "DOM_VK_DOUBLE_QUOTE", + "DOM_VK_DOWN", + "DOM_VK_E", + "DOM_VK_EISU", + "DOM_VK_END", + "DOM_VK_ENTER", + "DOM_VK_EQUALS", + "DOM_VK_EREOF", + "DOM_VK_ESCAPE", + "DOM_VK_EXCLAMATION", + "DOM_VK_EXECUTE", + "DOM_VK_EXSEL", + "DOM_VK_F", + "DOM_VK_F1", + "DOM_VK_F10", + "DOM_VK_F11", + "DOM_VK_F12", + "DOM_VK_F13", + "DOM_VK_F14", + "DOM_VK_F15", + "DOM_VK_F16", + "DOM_VK_F17", + "DOM_VK_F18", + "DOM_VK_F19", + "DOM_VK_F2", + "DOM_VK_F20", + "DOM_VK_F21", + "DOM_VK_F22", + "DOM_VK_F23", + "DOM_VK_F24", + "DOM_VK_F25", + "DOM_VK_F26", + "DOM_VK_F27", + "DOM_VK_F28", + "DOM_VK_F29", + "DOM_VK_F3", + "DOM_VK_F30", + "DOM_VK_F31", + "DOM_VK_F32", + "DOM_VK_F33", + "DOM_VK_F34", + "DOM_VK_F35", + "DOM_VK_F36", + "DOM_VK_F4", + "DOM_VK_F5", + "DOM_VK_F6", + "DOM_VK_F7", + "DOM_VK_F8", + "DOM_VK_F9", + "DOM_VK_FINAL", + "DOM_VK_FRONT", + "DOM_VK_G", + "DOM_VK_GREATER_THAN", + "DOM_VK_H", + "DOM_VK_HANGUL", + "DOM_VK_HANJA", + "DOM_VK_HASH", + "DOM_VK_HELP", + "DOM_VK_HK_TOGGLE", + "DOM_VK_HOME", + "DOM_VK_HYPHEN_MINUS", + "DOM_VK_I", + "DOM_VK_INSERT", + "DOM_VK_J", + "DOM_VK_JUNJA", + "DOM_VK_K", + "DOM_VK_KANA", + "DOM_VK_KANJI", + "DOM_VK_L", + "DOM_VK_LEFT", + "DOM_VK_LEFT_TAB", + "DOM_VK_LESS_THAN", + "DOM_VK_M", + "DOM_VK_META", + "DOM_VK_MODECHANGE", + "DOM_VK_MULTIPLY", + "DOM_VK_N", + "DOM_VK_NONCONVERT", + "DOM_VK_NUMPAD0", + "DOM_VK_NUMPAD1", + "DOM_VK_NUMPAD2", + "DOM_VK_NUMPAD3", + "DOM_VK_NUMPAD4", + "DOM_VK_NUMPAD5", + "DOM_VK_NUMPAD6", + "DOM_VK_NUMPAD7", + "DOM_VK_NUMPAD8", + "DOM_VK_NUMPAD9", + "DOM_VK_NUM_LOCK", + "DOM_VK_O", + "DOM_VK_OEM_1", + "DOM_VK_OEM_102", + "DOM_VK_OEM_2", + "DOM_VK_OEM_3", + "DOM_VK_OEM_4", + "DOM_VK_OEM_5", + "DOM_VK_OEM_6", + "DOM_VK_OEM_7", + "DOM_VK_OEM_8", + "DOM_VK_OEM_COMMA", + "DOM_VK_OEM_MINUS", + "DOM_VK_OEM_PERIOD", + "DOM_VK_OEM_PLUS", + "DOM_VK_OPEN_BRACKET", + "DOM_VK_OPEN_CURLY_BRACKET", + "DOM_VK_OPEN_PAREN", + "DOM_VK_P", + "DOM_VK_PA1", + "DOM_VK_PAGEDOWN", + "DOM_VK_PAGEUP", + "DOM_VK_PAGE_DOWN", + "DOM_VK_PAGE_UP", + "DOM_VK_PAUSE", + "DOM_VK_PERCENT", + "DOM_VK_PERIOD", + "DOM_VK_PIPE", + "DOM_VK_PLAY", + "DOM_VK_PLUS", + "DOM_VK_PRINT", + "DOM_VK_PRINTSCREEN", + "DOM_VK_PROCESSKEY", + "DOM_VK_PROPERITES", + "DOM_VK_Q", + "DOM_VK_QUESTION_MARK", + "DOM_VK_QUOTE", + "DOM_VK_R", + "DOM_VK_REDO", + "DOM_VK_RETURN", + "DOM_VK_RIGHT", + "DOM_VK_S", + "DOM_VK_SCROLL_LOCK", + "DOM_VK_SELECT", + "DOM_VK_SEMICOLON", + "DOM_VK_SEPARATOR", + "DOM_VK_SHIFT", + "DOM_VK_SLASH", + "DOM_VK_SLEEP", + "DOM_VK_SPACE", + "DOM_VK_SUBTRACT", + "DOM_VK_T", + "DOM_VK_TAB", + "DOM_VK_TILDE", + "DOM_VK_U", + "DOM_VK_UNDERSCORE", + "DOM_VK_UNDO", + "DOM_VK_UNICODE", + "DOM_VK_UP", + "DOM_VK_V", + "DOM_VK_VOLUME_DOWN", + "DOM_VK_VOLUME_MUTE", + "DOM_VK_VOLUME_UP", + "DOM_VK_W", + "DOM_VK_WIN", + "DOM_VK_WINDOW", + "DOM_VK_WIN_ICO_00", + "DOM_VK_WIN_ICO_CLEAR", + "DOM_VK_WIN_ICO_HELP", + "DOM_VK_WIN_OEM_ATTN", + "DOM_VK_WIN_OEM_AUTO", + "DOM_VK_WIN_OEM_BACKTAB", + "DOM_VK_WIN_OEM_CLEAR", + "DOM_VK_WIN_OEM_COPY", + "DOM_VK_WIN_OEM_CUSEL", + "DOM_VK_WIN_OEM_ENLW", + "DOM_VK_WIN_OEM_FINISH", + "DOM_VK_WIN_OEM_FJ_JISHO", + "DOM_VK_WIN_OEM_FJ_LOYA", + "DOM_VK_WIN_OEM_FJ_MASSHOU", + "DOM_VK_WIN_OEM_FJ_ROYA", + "DOM_VK_WIN_OEM_FJ_TOUROKU", + "DOM_VK_WIN_OEM_JUMP", + "DOM_VK_WIN_OEM_PA1", + "DOM_VK_WIN_OEM_PA2", + "DOM_VK_WIN_OEM_PA3", + "DOM_VK_WIN_OEM_RESET", + "DOM_VK_WIN_OEM_WSCTRL", + "DOM_VK_X", + "DOM_VK_XF86XK_ADD_FAVORITE", + "DOM_VK_XF86XK_APPLICATION_LEFT", + "DOM_VK_XF86XK_APPLICATION_RIGHT", + "DOM_VK_XF86XK_AUDIO_CYCLE_TRACK", + "DOM_VK_XF86XK_AUDIO_FORWARD", + "DOM_VK_XF86XK_AUDIO_LOWER_VOLUME", + "DOM_VK_XF86XK_AUDIO_MEDIA", + "DOM_VK_XF86XK_AUDIO_MUTE", + "DOM_VK_XF86XK_AUDIO_NEXT", + "DOM_VK_XF86XK_AUDIO_PAUSE", + "DOM_VK_XF86XK_AUDIO_PLAY", + "DOM_VK_XF86XK_AUDIO_PREV", + "DOM_VK_XF86XK_AUDIO_RAISE_VOLUME", + "DOM_VK_XF86XK_AUDIO_RANDOM_PLAY", + "DOM_VK_XF86XK_AUDIO_RECORD", + "DOM_VK_XF86XK_AUDIO_REPEAT", + "DOM_VK_XF86XK_AUDIO_REWIND", + "DOM_VK_XF86XK_AUDIO_STOP", + "DOM_VK_XF86XK_AWAY", + "DOM_VK_XF86XK_BACK", + "DOM_VK_XF86XK_BACK_FORWARD", + "DOM_VK_XF86XK_BATTERY", + "DOM_VK_XF86XK_BLUE", + "DOM_VK_XF86XK_BLUETOOTH", + "DOM_VK_XF86XK_BOOK", + "DOM_VK_XF86XK_BRIGHTNESS_ADJUST", + "DOM_VK_XF86XK_CALCULATOR", + "DOM_VK_XF86XK_CALENDAR", + "DOM_VK_XF86XK_CD", + "DOM_VK_XF86XK_CLOSE", + "DOM_VK_XF86XK_COMMUNITY", + "DOM_VK_XF86XK_CONTRAST_ADJUST", + "DOM_VK_XF86XK_COPY", + "DOM_VK_XF86XK_CUT", + "DOM_VK_XF86XK_CYCLE_ANGLE", + "DOM_VK_XF86XK_DISPLAY", + "DOM_VK_XF86XK_DOCUMENTS", + "DOM_VK_XF86XK_DOS", + "DOM_VK_XF86XK_EJECT", + "DOM_VK_XF86XK_EXCEL", + "DOM_VK_XF86XK_EXPLORER", + "DOM_VK_XF86XK_FAVORITES", + "DOM_VK_XF86XK_FINANCE", + "DOM_VK_XF86XK_FORWARD", + "DOM_VK_XF86XK_FRAME_BACK", + "DOM_VK_XF86XK_FRAME_FORWARD", + "DOM_VK_XF86XK_GAME", + "DOM_VK_XF86XK_GO", + "DOM_VK_XF86XK_GREEN", + "DOM_VK_XF86XK_HIBERNATE", + "DOM_VK_XF86XK_HISTORY", + "DOM_VK_XF86XK_HOME_PAGE", + "DOM_VK_XF86XK_HOT_LINKS", + "DOM_VK_XF86XK_I_TOUCH", + "DOM_VK_XF86XK_KBD_BRIGHTNESS_DOWN", + "DOM_VK_XF86XK_KBD_BRIGHTNESS_UP", + "DOM_VK_XF86XK_KBD_LIGHT_ON_OFF", + "DOM_VK_XF86XK_LAUNCH0", + "DOM_VK_XF86XK_LAUNCH1", + "DOM_VK_XF86XK_LAUNCH2", + "DOM_VK_XF86XK_LAUNCH3", + "DOM_VK_XF86XK_LAUNCH4", + "DOM_VK_XF86XK_LAUNCH5", + "DOM_VK_XF86XK_LAUNCH6", + "DOM_VK_XF86XK_LAUNCH7", + "DOM_VK_XF86XK_LAUNCH8", + "DOM_VK_XF86XK_LAUNCH9", + "DOM_VK_XF86XK_LAUNCH_A", + "DOM_VK_XF86XK_LAUNCH_B", + "DOM_VK_XF86XK_LAUNCH_C", + "DOM_VK_XF86XK_LAUNCH_D", + "DOM_VK_XF86XK_LAUNCH_E", + "DOM_VK_XF86XK_LAUNCH_F", + "DOM_VK_XF86XK_LIGHT_BULB", + "DOM_VK_XF86XK_LOG_OFF", + "DOM_VK_XF86XK_MAIL", + "DOM_VK_XF86XK_MAIL_FORWARD", + "DOM_VK_XF86XK_MARKET", + "DOM_VK_XF86XK_MEETING", + "DOM_VK_XF86XK_MEMO", + "DOM_VK_XF86XK_MENU_KB", + "DOM_VK_XF86XK_MENU_PB", + "DOM_VK_XF86XK_MESSENGER", + "DOM_VK_XF86XK_MON_BRIGHTNESS_DOWN", + "DOM_VK_XF86XK_MON_BRIGHTNESS_UP", + "DOM_VK_XF86XK_MUSIC", + "DOM_VK_XF86XK_MY_COMPUTER", + "DOM_VK_XF86XK_MY_SITES", + "DOM_VK_XF86XK_NEW", + "DOM_VK_XF86XK_NEWS", + "DOM_VK_XF86XK_OFFICE_HOME", + "DOM_VK_XF86XK_OPEN", + "DOM_VK_XF86XK_OPEN_URL", + "DOM_VK_XF86XK_OPTION", + "DOM_VK_XF86XK_PASTE", + "DOM_VK_XF86XK_PHONE", + "DOM_VK_XF86XK_PICTURES", + "DOM_VK_XF86XK_POWER_DOWN", + "DOM_VK_XF86XK_POWER_OFF", + "DOM_VK_XF86XK_RED", + "DOM_VK_XF86XK_REFRESH", + "DOM_VK_XF86XK_RELOAD", + "DOM_VK_XF86XK_REPLY", + "DOM_VK_XF86XK_ROCKER_DOWN", + "DOM_VK_XF86XK_ROCKER_ENTER", + "DOM_VK_XF86XK_ROCKER_UP", + "DOM_VK_XF86XK_ROTATE_WINDOWS", + "DOM_VK_XF86XK_ROTATION_KB", + "DOM_VK_XF86XK_ROTATION_PB", + "DOM_VK_XF86XK_SAVE", + "DOM_VK_XF86XK_SCREEN_SAVER", + "DOM_VK_XF86XK_SCROLL_CLICK", + "DOM_VK_XF86XK_SCROLL_DOWN", + "DOM_VK_XF86XK_SCROLL_UP", + "DOM_VK_XF86XK_SEARCH", + "DOM_VK_XF86XK_SEND", + "DOM_VK_XF86XK_SHOP", + "DOM_VK_XF86XK_SPELL", + "DOM_VK_XF86XK_SPLIT_SCREEN", + "DOM_VK_XF86XK_STANDBY", + "DOM_VK_XF86XK_START", + "DOM_VK_XF86XK_STOP", + "DOM_VK_XF86XK_SUBTITLE", + "DOM_VK_XF86XK_SUPPORT", + "DOM_VK_XF86XK_SUSPEND", + "DOM_VK_XF86XK_TASK_PANE", + "DOM_VK_XF86XK_TERMINAL", + "DOM_VK_XF86XK_TIME", + "DOM_VK_XF86XK_TOOLS", + "DOM_VK_XF86XK_TOP_MENU", + "DOM_VK_XF86XK_TO_DO_LIST", + "DOM_VK_XF86XK_TRAVEL", + "DOM_VK_XF86XK_USER1KB", + "DOM_VK_XF86XK_USER2KB", + "DOM_VK_XF86XK_USER_PB", + "DOM_VK_XF86XK_UWB", + "DOM_VK_XF86XK_VENDOR_HOME", + "DOM_VK_XF86XK_VIDEO", + "DOM_VK_XF86XK_VIEW", + "DOM_VK_XF86XK_WAKE_UP", + "DOM_VK_XF86XK_WEB_CAM", + "DOM_VK_XF86XK_WHEEL_BUTTON", + "DOM_VK_XF86XK_WLAN", + "DOM_VK_XF86XK_WORD", + "DOM_VK_XF86XK_WWW", + "DOM_VK_XF86XK_XFER", + "DOM_VK_XF86XK_YELLOW", + "DOM_VK_XF86XK_ZOOM_IN", + "DOM_VK_XF86XK_ZOOM_OUT", + "DOM_VK_Y", + "DOM_VK_Z", + "DOM_VK_ZOOM", + "DONE", + "DONT_CARE", + "DOWNLOADING", + "DRAGDROP", + "DST_ALPHA", + "DST_COLOR", + "DYNAMIC_DRAW", + "DataChannel", + "DataTransfer", + "DataTransferItem", + "DataTransferItemList", + "DataView", + "Date", + "DateTimeFormat", + "DelayNode", + "DesktopNotification", + "DesktopNotificationCenter", + "DeviceLightEvent", + "DeviceMotionEvent", + "DeviceOrientationEvent", + "DeviceProximityEvent", + "DeviceStorage", + "DeviceStorageChangeEvent", + "Document", + "DocumentFragment", + "DocumentType", + "DragEvent", + "DynamicsCompressorNode", + "E", + "ELEMENT_ARRAY_BUFFER", + "ELEMENT_ARRAY_BUFFER_BINDING", + "ELEMENT_NODE", + "EMPTY", + "ENCODING_ERR", + "ENDED", + "END_TO_END", + "END_TO_START", + "ENTITY_NODE", + "ENTITY_REFERENCE_NODE", + "EPSILON", + "EQUAL", + "EQUALPOWER", + "ERROR", + "EXPONENTIAL_DISTANCE", + "Element", + "ElementQuery", + "Entity", + "EntityReference", + "Error", + "ErrorEvent", + "EvalError", + "Event", + "EventException", + "EventSource", + "EventTarget", + "External", + "FASTEST", + "FIDOSDK", + "FILTER_ACCEPT", + "FILTER_INTERRUPT", + "FILTER_REJECT", + "FILTER_SKIP", + "FINISHED_STATE", + "FIRST_ORDERED_NODE_TYPE", + "FLOAT", + "FLOAT_MAT2", + "FLOAT_MAT3", + "FLOAT_MAT4", + "FLOAT_VEC2", + "FLOAT_VEC3", + "FLOAT_VEC4", + "FOCUS", + "FONT_FACE_RULE", + "FONT_FEATURE_VALUES_RULE", + "FRAGMENT_SHADER", + "FRAGMENT_SHADER_DERIVATIVE_HINT_OES", + "FRAMEBUFFER", + "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", + "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", + "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", + "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", + "FRAMEBUFFER_BINDING", + "FRAMEBUFFER_COMPLETE", + "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", + "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", + "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", + "FRAMEBUFFER_UNSUPPORTED", + "FRONT", + "FRONT_AND_BACK", + "FRONT_FACE", + "FUNC_ADD", + "FUNC_REVERSE_SUBTRACT", + "FUNC_SUBTRACT", + "Feed", + "FeedEntry", + "File", + "FileError", + "FileList", + "FileReader", + "FindInPage", + "Float32Array", + "Float64Array", + "FocusEvent", + "FontFace", + "FormData", + "Function", + "GENERATE_MIPMAP_HINT", + "GEQUAL", + "GREATER", + "GREEN_BITS", + "GainNode", + "Gamepad", + "GamepadButton", + "GamepadEvent", + "GestureEvent", + "HAVE_CURRENT_DATA", + "HAVE_ENOUGH_DATA", + "HAVE_FUTURE_DATA", + "HAVE_METADATA", + "HAVE_NOTHING", + "HEADERS_RECEIVED", + "HIDDEN", + "HIERARCHY_REQUEST_ERR", + "HIGHPASS", + "HIGHSHELF", + "HIGH_FLOAT", + "HIGH_INT", + "HORIZONTAL", + "HORIZONTAL_AXIS", + "HRTF", + "HTMLAllCollection", + "HTMLAnchorElement", + "HTMLAppletElement", + "HTMLAreaElement", + "HTMLAudioElement", + "HTMLBRElement", + "HTMLBaseElement", + "HTMLBaseFontElement", + "HTMLBlockquoteElement", + "HTMLBodyElement", + "HTMLButtonElement", + "HTMLCanvasElement", + "HTMLCollection", + "HTMLCommandElement", + "HTMLContentElement", + "HTMLDListElement", + "HTMLDataElement", + "HTMLDataListElement", + "HTMLDetailsElement", + "HTMLDialogElement", + "HTMLDirectoryElement", + "HTMLDivElement", + "HTMLDocument", + "HTMLElement", + "HTMLEmbedElement", + "HTMLFieldSetElement", + "HTMLFontElement", + "HTMLFormControlsCollection", + "HTMLFormElement", + "HTMLFrameElement", + "HTMLFrameSetElement", + "HTMLHRElement", + "HTMLHeadElement", + "HTMLHeadingElement", + "HTMLHtmlElement", + "HTMLIFrameElement", + "HTMLImageElement", + "HTMLInputElement", + "HTMLIsIndexElement", + "HTMLKeygenElement", + "HTMLLIElement", + "HTMLLabelElement", + "HTMLLegendElement", + "HTMLLinkElement", + "HTMLMapElement", + "HTMLMarqueeElement", + "HTMLMediaElement", + "HTMLMenuElement", + "HTMLMenuItemElement", + "HTMLMetaElement", + "HTMLMeterElement", + "HTMLModElement", + "HTMLOListElement", + "HTMLObjectElement", + "HTMLOptGroupElement", + "HTMLOptionElement", + "HTMLOptionsCollection", + "HTMLOutputElement", + "HTMLParagraphElement", + "HTMLParamElement", + "HTMLPictureElement", + "HTMLPreElement", + "HTMLProgressElement", + "HTMLPropertiesCollection", + "HTMLQuoteElement", + "HTMLScriptElement", + "HTMLSelectElement", + "HTMLShadowElement", + "HTMLSourceElement", + "HTMLSpanElement", + "HTMLStyleElement", + "HTMLTableCaptionElement", + "HTMLTableCellElement", + "HTMLTableColElement", + "HTMLTableElement", + "HTMLTableRowElement", + "HTMLTableSectionElement", + "HTMLTemplateElement", + "HTMLTextAreaElement", + "HTMLTimeElement", + "HTMLTitleElement", + "HTMLTrackElement", + "HTMLUListElement", + "HTMLUnknownElement", + "HTMLVideoElement", + "HashChangeEvent", + "Headers", + "History", + "ICE_CHECKING", + "ICE_CLOSED", + "ICE_COMPLETED", + "ICE_CONNECTED", + "ICE_FAILED", + "ICE_GATHERING", + "ICE_WAITING", + "IDBCursor", + "IDBCursorWithValue", + "IDBDatabase", + "IDBDatabaseException", + "IDBFactory", + "IDBFileHandle", + "IDBFileRequest", + "IDBIndex", + "IDBKeyRange", + "IDBMutableFile", + "IDBObjectStore", + "IDBOpenDBRequest", + "IDBRequest", + "IDBTransaction", + "IDBVersionChangeEvent", + "IDLE", + "IMPLEMENTATION_COLOR_READ_FORMAT", + "IMPLEMENTATION_COLOR_READ_TYPE", + "IMPORT_RULE", + "INCR", + "INCR_WRAP", + "INDEX_SIZE_ERR", + "INT", + "INT_VEC2", + "INT_VEC3", + "INT_VEC4", + "INUSE_ATTRIBUTE_ERR", + "INVALID_ACCESS_ERR", + "INVALID_CHARACTER_ERR", + "INVALID_ENUM", + "INVALID_EXPRESSION_ERR", + "INVALID_FRAMEBUFFER_OPERATION", + "INVALID_MODIFICATION_ERR", + "INVALID_NODE_TYPE_ERR", + "INVALID_OPERATION", + "INVALID_STATE_ERR", + "INVALID_VALUE", + "INVERSE_DISTANCE", + "INVERT", + "IceCandidate", + "Image", + "ImageBitmap", + "ImageData", + "Infinity", + "InputEvent", + "InputMethodContext", + "InstallTrigger", + "Int16Array", + "Int32Array", + "Int8Array", + "Intent", + "InternalError", + "Intl", + "IsSearchProviderInstalled", + "Iterator", + "JSON", + "KEEP", + "KEYDOWN", + "KEYFRAMES_RULE", + "KEYFRAME_RULE", + "KEYPRESS", + "KEYUP", + "KeyEvent", + "KeyboardEvent", + "LENGTHADJUST_SPACING", + "LENGTHADJUST_SPACINGANDGLYPHS", + "LENGTHADJUST_UNKNOWN", + "LEQUAL", + "LESS", + "LINEAR", + "LINEAR_DISTANCE", + "LINEAR_MIPMAP_LINEAR", + "LINEAR_MIPMAP_NEAREST", + "LINES", + "LINE_LOOP", + "LINE_STRIP", + "LINE_WIDTH", + "LINK_STATUS", + "LIVE", + "LN10", + "LN2", + "LOADED", + "LOADING", + "LOG10E", + "LOG2E", + "LOWPASS", + "LOWSHELF", + "LOW_FLOAT", + "LOW_INT", + "LSException", + "LSParserFilter", + "LUMINANCE", + "LUMINANCE_ALPHA", + "LocalMediaStream", + "Location", + "MAX_COMBINED_TEXTURE_IMAGE_UNITS", + "MAX_CUBE_MAP_TEXTURE_SIZE", + "MAX_FRAGMENT_UNIFORM_VECTORS", + "MAX_RENDERBUFFER_SIZE", + "MAX_SAFE_INTEGER", + "MAX_TEXTURE_IMAGE_UNITS", + "MAX_TEXTURE_MAX_ANISOTROPY_EXT", + "MAX_TEXTURE_SIZE", + "MAX_VALUE", + "MAX_VARYING_VECTORS", + "MAX_VERTEX_ATTRIBS", + "MAX_VERTEX_TEXTURE_IMAGE_UNITS", + "MAX_VERTEX_UNIFORM_VECTORS", + "MAX_VIEWPORT_DIMS", + "MEDIA_ERR_ABORTED", + "MEDIA_ERR_DECODE", + "MEDIA_ERR_ENCRYPTED", + "MEDIA_ERR_NETWORK", + "MEDIA_ERR_SRC_NOT_SUPPORTED", + "MEDIA_KEYERR_CLIENT", + "MEDIA_KEYERR_DOMAIN", + "MEDIA_KEYERR_HARDWARECHANGE", + "MEDIA_KEYERR_OUTPUT", + "MEDIA_KEYERR_SERVICE", + "MEDIA_KEYERR_UNKNOWN", + "MEDIA_RULE", + "MEDIUM_FLOAT", + "MEDIUM_INT", + "META_MASK", + "MIN_SAFE_INTEGER", + "MIN_VALUE", + "MIRRORED_REPEAT", + "MODE_ASYNCHRONOUS", + "MODE_SYNCHRONOUS", + "MODIFICATION", + "MOUSEDOWN", + "MOUSEDRAG", + "MOUSEMOVE", + "MOUSEOUT", + "MOUSEOVER", + "MOUSEUP", + "MOZ_KEYFRAMES_RULE", + "MOZ_KEYFRAME_RULE", + "MOZ_SOURCE_CURSOR", + "MOZ_SOURCE_ERASER", + "MOZ_SOURCE_KEYBOARD", + "MOZ_SOURCE_MOUSE", + "MOZ_SOURCE_PEN", + "MOZ_SOURCE_TOUCH", + "MOZ_SOURCE_UNKNOWN", + "MSGESTURE_FLAG_BEGIN", + "MSGESTURE_FLAG_CANCEL", + "MSGESTURE_FLAG_END", + "MSGESTURE_FLAG_INERTIA", + "MSGESTURE_FLAG_NONE", + "MSPOINTER_TYPE_MOUSE", + "MSPOINTER_TYPE_PEN", + "MSPOINTER_TYPE_TOUCH", + "MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE", + "MS_ASYNC_CALLBACK_STATUS_CANCEL", + "MS_ASYNC_CALLBACK_STATUS_CHOOSEANY", + "MS_ASYNC_CALLBACK_STATUS_ERROR", + "MS_ASYNC_CALLBACK_STATUS_JOIN", + "MS_ASYNC_OP_STATUS_CANCELED", + "MS_ASYNC_OP_STATUS_ERROR", + "MS_ASYNC_OP_STATUS_SUCCESS", + "MS_MANIPULATION_STATE_ACTIVE", + "MS_MANIPULATION_STATE_CANCELLED", + "MS_MANIPULATION_STATE_COMMITTED", + "MS_MANIPULATION_STATE_DRAGGING", + "MS_MANIPULATION_STATE_INERTIA", + "MS_MANIPULATION_STATE_PRESELECT", + "MS_MANIPULATION_STATE_SELECTING", + "MS_MANIPULATION_STATE_STOPPED", + "MS_MEDIA_ERR_ENCRYPTED", + "MS_MEDIA_KEYERR_CLIENT", + "MS_MEDIA_KEYERR_DOMAIN", + "MS_MEDIA_KEYERR_HARDWARECHANGE", + "MS_MEDIA_KEYERR_OUTPUT", + "MS_MEDIA_KEYERR_SERVICE", + "MS_MEDIA_KEYERR_UNKNOWN", + "Map", + "Math", + "MediaController", + "MediaDevices", + "MediaElementAudioSourceNode", + "MediaEncryptedEvent", + "MediaError", + "MediaKeyError", + "MediaKeyEvent", + "MediaKeyMessageEvent", + "MediaKeyNeededEvent", + "MediaKeySession", + "MediaKeyStatusMap", + "MediaKeySystemAccess", + "MediaKeys", + "MediaList", + "MediaQueryList", + "MediaQueryListEvent", + "MediaRecorder", + "MediaSource", + "MediaStream", + "MediaStreamAudioDestinationNode", + "MediaStreamAudioSourceNode", + "MediaStreamEvent", + "MediaStreamTrack", + "MediaStreamTrackEvent", + "MessageChannel", + "MessageEvent", + "MessagePort", + "Methods", + "MimeType", + "MimeTypeArray", + "MouseEvent", + "MouseScrollEvent", + "MozAnimation", + "MozAnimationDelay", + "MozAnimationDirection", + "MozAnimationDuration", + "MozAnimationFillMode", + "MozAnimationIterationCount", + "MozAnimationName", + "MozAnimationPlayState", + "MozAnimationTimingFunction", + "MozAppearance", + "MozBackfaceVisibility", + "MozBinding", + "MozBorderBottomColors", + "MozBorderEnd", + "MozBorderEndColor", + "MozBorderEndStyle", + "MozBorderEndWidth", + "MozBorderImage", + "MozBorderLeftColors", + "MozBorderRightColors", + "MozBorderStart", + "MozBorderStartColor", + "MozBorderStartStyle", + "MozBorderStartWidth", + "MozBorderTopColors", + "MozBoxAlign", + "MozBoxDirection", + "MozBoxFlex", + "MozBoxOrdinalGroup", + "MozBoxOrient", + "MozBoxPack", + "MozBoxSizing", + "MozCSSKeyframeRule", + "MozCSSKeyframesRule", + "MozColumnCount", + "MozColumnFill", + "MozColumnGap", + "MozColumnRule", + "MozColumnRuleColor", + "MozColumnRuleStyle", + "MozColumnRuleWidth", + "MozColumnWidth", + "MozColumns", + "MozContactChangeEvent", + "MozFloatEdge", + "MozFontFeatureSettings", + "MozFontLanguageOverride", + "MozForceBrokenImageIcon", + "MozHyphens", + "MozImageRegion", + "MozMarginEnd", + "MozMarginStart", + "MozMmsEvent", + "MozMmsMessage", + "MozMobileMessageThread", + "MozOSXFontSmoothing", + "MozOrient", + "MozOutlineRadius", + "MozOutlineRadiusBottomleft", + "MozOutlineRadiusBottomright", + "MozOutlineRadiusTopleft", + "MozOutlineRadiusTopright", + "MozPaddingEnd", + "MozPaddingStart", + "MozPerspective", + "MozPerspectiveOrigin", + "MozPowerManager", + "MozSettingsEvent", + "MozSmsEvent", + "MozSmsMessage", + "MozStackSizing", + "MozTabSize", + "MozTextAlignLast", + "MozTextDecorationColor", + "MozTextDecorationLine", + "MozTextDecorationStyle", + "MozTextSizeAdjust", + "MozTransform", + "MozTransformOrigin", + "MozTransformStyle", + "MozTransition", + "MozTransitionDelay", + "MozTransitionDuration", + "MozTransitionProperty", + "MozTransitionTimingFunction", + "MozUserFocus", + "MozUserInput", + "MozUserModify", + "MozUserSelect", + "MozWindowDragging", + "MozWindowShadow", + "MutationEvent", + "MutationObserver", + "MutationRecord", + "NAMESPACE_ERR", + "NAMESPACE_RULE", + "NEAREST", + "NEAREST_MIPMAP_LINEAR", + "NEAREST_MIPMAP_NEAREST", + "NEGATIVE_INFINITY", + "NETWORK_EMPTY", + "NETWORK_ERR", + "NETWORK_IDLE", + "NETWORK_LOADED", + "NETWORK_LOADING", + "NETWORK_NO_SOURCE", + "NEVER", + "NEW", + "NEXT", + "NEXT_NO_DUPLICATE", + "NICEST", + "NODE_AFTER", + "NODE_BEFORE", + "NODE_BEFORE_AND_AFTER", + "NODE_INSIDE", + "NONE", + "NON_TRANSIENT_ERR", + "NOTATION_NODE", + "NOTCH", + "NOTEQUAL", + "NOT_ALLOWED_ERR", + "NOT_FOUND_ERR", + "NOT_READABLE_ERR", + "NOT_SUPPORTED_ERR", + "NO_DATA_ALLOWED_ERR", + "NO_ERR", + "NO_ERROR", + "NO_MODIFICATION_ALLOWED_ERR", + "NUMBER_TYPE", + "NUM_COMPRESSED_TEXTURE_FORMATS", + "NaN", + "NamedNodeMap", + "Navigator", + "NearbyLinks", + "NetworkInformation", + "Node", + "NodeFilter", + "NodeIterator", + "NodeList", + "Notation", + "Notification", + "NotifyPaintEvent", + "Number", + "NumberFormat", + "OBSOLETE", + "ONE", + "ONE_MINUS_CONSTANT_ALPHA", + "ONE_MINUS_CONSTANT_COLOR", + "ONE_MINUS_DST_ALPHA", + "ONE_MINUS_DST_COLOR", + "ONE_MINUS_SRC_ALPHA", + "ONE_MINUS_SRC_COLOR", + "OPEN", + "OPENED", + "OPENING", + "ORDERED_NODE_ITERATOR_TYPE", + "ORDERED_NODE_SNAPSHOT_TYPE", + "OUT_OF_MEMORY", + "Object", + "OfflineAudioCompletionEvent", + "OfflineAudioContext", + "OfflineResourceList", + "Option", + "OscillatorNode", + "OverflowEvent", + "PACK_ALIGNMENT", + "PAGE_RULE", + "PARSE_ERR", + "PATHSEG_ARC_ABS", + "PATHSEG_ARC_REL", + "PATHSEG_CLOSEPATH", + "PATHSEG_CURVETO_CUBIC_ABS", + "PATHSEG_CURVETO_CUBIC_REL", + "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", + "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", + "PATHSEG_CURVETO_QUADRATIC_ABS", + "PATHSEG_CURVETO_QUADRATIC_REL", + "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", + "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", + "PATHSEG_LINETO_ABS", + "PATHSEG_LINETO_HORIZONTAL_ABS", + "PATHSEG_LINETO_HORIZONTAL_REL", + "PATHSEG_LINETO_REL", + "PATHSEG_LINETO_VERTICAL_ABS", + "PATHSEG_LINETO_VERTICAL_REL", + "PATHSEG_MOVETO_ABS", + "PATHSEG_MOVETO_REL", + "PATHSEG_UNKNOWN", + "PATH_EXISTS_ERR", + "PEAKING", + "PERMISSION_DENIED", + "PERSISTENT", + "PI", + "PLAYING_STATE", + "POINTS", + "POLYGON_OFFSET_FACTOR", + "POLYGON_OFFSET_FILL", + "POLYGON_OFFSET_UNITS", + "POSITION_UNAVAILABLE", + "POSITIVE_INFINITY", + "PREV", + "PREV_NO_DUPLICATE", + "PROCESSING_INSTRUCTION_NODE", + "PageChangeEvent", + "PageTransitionEvent", + "PaintRequest", + "PaintRequestList", + "PannerNode", + "Path2D", + "Performance", + "PerformanceEntry", + "PerformanceMark", + "PerformanceMeasure", + "PerformanceNavigation", + "PerformanceResourceTiming", + "PerformanceTiming", + "PeriodicWave", + "Plugin", + "PluginArray", + "PopStateEvent", + "PopupBlockedEvent", + "ProcessingInstruction", + "ProgressEvent", + "Promise", + "PropertyNodeList", + "Proxy", + "PushManager", + "PushSubscription", + "Q", + "QUOTA_ERR", + "QUOTA_EXCEEDED_ERR", + "QueryInterface", + "READ_ONLY", + "READ_ONLY_ERR", + "READ_WRITE", + "RED_BITS", + "REMOVAL", + "RENDERBUFFER", + "RENDERBUFFER_ALPHA_SIZE", + "RENDERBUFFER_BINDING", + "RENDERBUFFER_BLUE_SIZE", + "RENDERBUFFER_DEPTH_SIZE", + "RENDERBUFFER_GREEN_SIZE", + "RENDERBUFFER_HEIGHT", + "RENDERBUFFER_INTERNAL_FORMAT", + "RENDERBUFFER_RED_SIZE", + "RENDERBUFFER_STENCIL_SIZE", + "RENDERBUFFER_WIDTH", + "RENDERER", + "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC", + "RENDERING_INTENT_AUTO", + "RENDERING_INTENT_PERCEPTUAL", + "RENDERING_INTENT_RELATIVE_COLORIMETRIC", + "RENDERING_INTENT_SATURATION", + "RENDERING_INTENT_UNKNOWN", + "REPEAT", + "REPLACE", + "RGB", + "RGB565", + "RGB5_A1", + "RGBA", + "RGBA4", + "RGBColor", + "ROTATION_CLOCKWISE", + "ROTATION_COUNTERCLOCKWISE", + "RTCDataChannelEvent", + "RTCIceCandidate", + "RTCPeerConnectionIceEvent", + "RTCRtpReceiver", + "RTCRtpSender", + "RTCSessionDescription", + "RTCStatsReport", + "RadioNodeList", + "Range", + "RangeError", + "RangeException", + "RecordErrorEvent", + "Rect", + "ReferenceError", + "RegExp", + "Request", + "Response", + "SAMPLER_2D", + "SAMPLER_CUBE", + "SAMPLES", + "SAMPLE_ALPHA_TO_COVERAGE", + "SAMPLE_BUFFERS", + "SAMPLE_COVERAGE", + "SAMPLE_COVERAGE_INVERT", + "SAMPLE_COVERAGE_VALUE", + "SAWTOOTH", + "SCHEDULED_STATE", + "SCISSOR_BOX", + "SCISSOR_TEST", + "SCROLL_PAGE_DOWN", + "SCROLL_PAGE_UP", + "SDP_ANSWER", + "SDP_OFFER", + "SDP_PRANSWER", + "SECURITY_ERR", + "SELECT", + "SERIALIZE_ERR", + "SEVERITY_ERROR", + "SEVERITY_FATAL_ERROR", + "SEVERITY_WARNING", + "SHADER_COMPILER", + "SHADER_TYPE", + "SHADING_LANGUAGE_VERSION", + "SHIFT_MASK", + "SHORT", + "SHOWING", + "SHOW_ALL", + "SHOW_ATTRIBUTE", + "SHOW_CDATA_SECTION", + "SHOW_COMMENT", + "SHOW_DOCUMENT", + "SHOW_DOCUMENT_FRAGMENT", + "SHOW_DOCUMENT_TYPE", + "SHOW_ELEMENT", + "SHOW_ENTITY", + "SHOW_ENTITY_REFERENCE", + "SHOW_NOTATION", + "SHOW_PROCESSING_INSTRUCTION", + "SHOW_TEXT", + "SINE", + "SOUNDFIELD", + "SQLException", + "SQRT1_2", + "SQRT2", + "SQUARE", + "SRC_ALPHA", + "SRC_ALPHA_SATURATE", + "SRC_COLOR", + "START_TO_END", + "START_TO_START", + "STATIC_DRAW", + "STENCIL_ATTACHMENT", + "STENCIL_BACK_FAIL", + "STENCIL_BACK_FUNC", + "STENCIL_BACK_PASS_DEPTH_FAIL", + "STENCIL_BACK_PASS_DEPTH_PASS", + "STENCIL_BACK_REF", + "STENCIL_BACK_VALUE_MASK", + "STENCIL_BACK_WRITEMASK", + "STENCIL_BITS", + "STENCIL_BUFFER_BIT", + "STENCIL_CLEAR_VALUE", + "STENCIL_FAIL", + "STENCIL_FUNC", + "STENCIL_INDEX", + "STENCIL_INDEX8", + "STENCIL_PASS_DEPTH_FAIL", + "STENCIL_PASS_DEPTH_PASS", + "STENCIL_REF", + "STENCIL_TEST", + "STENCIL_VALUE_MASK", + "STENCIL_WRITEMASK", + "STREAM_DRAW", + "STRING_TYPE", + "STYLE_RULE", + "SUBPIXEL_BITS", + "SUPPORTS_RULE", + "SVGAElement", + "SVGAltGlyphDefElement", + "SVGAltGlyphElement", + "SVGAltGlyphItemElement", + "SVGAngle", + "SVGAnimateColorElement", + "SVGAnimateElement", + "SVGAnimateMotionElement", + "SVGAnimateTransformElement", + "SVGAnimatedAngle", + "SVGAnimatedBoolean", + "SVGAnimatedEnumeration", + "SVGAnimatedInteger", + "SVGAnimatedLength", + "SVGAnimatedLengthList", + "SVGAnimatedNumber", + "SVGAnimatedNumberList", + "SVGAnimatedPreserveAspectRatio", + "SVGAnimatedRect", + "SVGAnimatedString", + "SVGAnimatedTransformList", + "SVGAnimationElement", + "SVGCircleElement", + "SVGClipPathElement", + "SVGColor", + "SVGComponentTransferFunctionElement", + "SVGCursorElement", + "SVGDefsElement", + "SVGDescElement", + "SVGDiscardElement", + "SVGDocument", + "SVGElement", + "SVGElementInstance", + "SVGElementInstanceList", + "SVGEllipseElement", + "SVGException", + "SVGFEBlendElement", + "SVGFEColorMatrixElement", + "SVGFEComponentTransferElement", + "SVGFECompositeElement", + "SVGFEConvolveMatrixElement", + "SVGFEDiffuseLightingElement", + "SVGFEDisplacementMapElement", + "SVGFEDistantLightElement", + "SVGFEDropShadowElement", + "SVGFEFloodElement", + "SVGFEFuncAElement", + "SVGFEFuncBElement", + "SVGFEFuncGElement", + "SVGFEFuncRElement", + "SVGFEGaussianBlurElement", + "SVGFEImageElement", + "SVGFEMergeElement", + "SVGFEMergeNodeElement", + "SVGFEMorphologyElement", + "SVGFEOffsetElement", + "SVGFEPointLightElement", + "SVGFESpecularLightingElement", + "SVGFESpotLightElement", + "SVGFETileElement", + "SVGFETurbulenceElement", + "SVGFilterElement", + "SVGFontElement", + "SVGFontFaceElement", + "SVGFontFaceFormatElement", + "SVGFontFaceNameElement", + "SVGFontFaceSrcElement", + "SVGFontFaceUriElement", + "SVGForeignObjectElement", + "SVGGElement", + "SVGGeometryElement", + "SVGGlyphElement", + "SVGGlyphRefElement", + "SVGGradientElement", + "SVGGraphicsElement", + "SVGHKernElement", + "SVGImageElement", + "SVGLength", + "SVGLengthList", + "SVGLineElement", + "SVGLinearGradientElement", + "SVGMPathElement", + "SVGMarkerElement", + "SVGMaskElement", + "SVGMatrix", + "SVGMetadataElement", + "SVGMissingGlyphElement", + "SVGNumber", + "SVGNumberList", + "SVGPaint", + "SVGPathElement", + "SVGPathSeg", + "SVGPathSegArcAbs", + "SVGPathSegArcRel", + "SVGPathSegClosePath", + "SVGPathSegCurvetoCubicAbs", + "SVGPathSegCurvetoCubicRel", + "SVGPathSegCurvetoCubicSmoothAbs", + "SVGPathSegCurvetoCubicSmoothRel", + "SVGPathSegCurvetoQuadraticAbs", + "SVGPathSegCurvetoQuadraticRel", + "SVGPathSegCurvetoQuadraticSmoothAbs", + "SVGPathSegCurvetoQuadraticSmoothRel", + "SVGPathSegLinetoAbs", + "SVGPathSegLinetoHorizontalAbs", + "SVGPathSegLinetoHorizontalRel", + "SVGPathSegLinetoRel", + "SVGPathSegLinetoVerticalAbs", + "SVGPathSegLinetoVerticalRel", + "SVGPathSegList", + "SVGPathSegMovetoAbs", + "SVGPathSegMovetoRel", + "SVGPatternElement", + "SVGPoint", + "SVGPointList", + "SVGPolygonElement", + "SVGPolylineElement", + "SVGPreserveAspectRatio", + "SVGRadialGradientElement", + "SVGRect", + "SVGRectElement", + "SVGRenderingIntent", + "SVGSVGElement", + "SVGScriptElement", + "SVGSetElement", + "SVGStopElement", + "SVGStringList", + "SVGStyleElement", + "SVGSwitchElement", + "SVGSymbolElement", + "SVGTRefElement", + "SVGTSpanElement", + "SVGTextContentElement", + "SVGTextElement", + "SVGTextPathElement", + "SVGTextPositioningElement", + "SVGTitleElement", + "SVGTransform", + "SVGTransformList", + "SVGUnitTypes", + "SVGUseElement", + "SVGVKernElement", + "SVGViewElement", + "SVGViewSpec", + "SVGZoomAndPan", + "SVGZoomEvent", + "SVG_ANGLETYPE_DEG", + "SVG_ANGLETYPE_GRAD", + "SVG_ANGLETYPE_RAD", + "SVG_ANGLETYPE_UNKNOWN", + "SVG_ANGLETYPE_UNSPECIFIED", + "SVG_CHANNEL_A", + "SVG_CHANNEL_B", + "SVG_CHANNEL_G", + "SVG_CHANNEL_R", + "SVG_CHANNEL_UNKNOWN", + "SVG_COLORTYPE_CURRENTCOLOR", + "SVG_COLORTYPE_RGBCOLOR", + "SVG_COLORTYPE_RGBCOLOR_ICCCOLOR", + "SVG_COLORTYPE_UNKNOWN", + "SVG_EDGEMODE_DUPLICATE", + "SVG_EDGEMODE_NONE", + "SVG_EDGEMODE_UNKNOWN", + "SVG_EDGEMODE_WRAP", + "SVG_FEBLEND_MODE_COLOR", + "SVG_FEBLEND_MODE_COLOR_BURN", + "SVG_FEBLEND_MODE_COLOR_DODGE", + "SVG_FEBLEND_MODE_DARKEN", + "SVG_FEBLEND_MODE_DIFFERENCE", + "SVG_FEBLEND_MODE_EXCLUSION", + "SVG_FEBLEND_MODE_HARD_LIGHT", + "SVG_FEBLEND_MODE_HUE", + "SVG_FEBLEND_MODE_LIGHTEN", + "SVG_FEBLEND_MODE_LUMINOSITY", + "SVG_FEBLEND_MODE_MULTIPLY", + "SVG_FEBLEND_MODE_NORMAL", + "SVG_FEBLEND_MODE_OVERLAY", + "SVG_FEBLEND_MODE_SATURATION", + "SVG_FEBLEND_MODE_SCREEN", + "SVG_FEBLEND_MODE_SOFT_LIGHT", + "SVG_FEBLEND_MODE_UNKNOWN", + "SVG_FECOLORMATRIX_TYPE_HUEROTATE", + "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", + "SVG_FECOLORMATRIX_TYPE_MATRIX", + "SVG_FECOLORMATRIX_TYPE_SATURATE", + "SVG_FECOLORMATRIX_TYPE_UNKNOWN", + "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", + "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", + "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", + "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", + "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", + "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", + "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC", + "SVG_FECOMPOSITE_OPERATOR_ATOP", + "SVG_FECOMPOSITE_OPERATOR_IN", + "SVG_FECOMPOSITE_OPERATOR_OUT", + "SVG_FECOMPOSITE_OPERATOR_OVER", + "SVG_FECOMPOSITE_OPERATOR_UNKNOWN", + "SVG_FECOMPOSITE_OPERATOR_XOR", + "SVG_INVALID_VALUE_ERR", + "SVG_LENGTHTYPE_CM", + "SVG_LENGTHTYPE_EMS", + "SVG_LENGTHTYPE_EXS", + "SVG_LENGTHTYPE_IN", + "SVG_LENGTHTYPE_MM", + "SVG_LENGTHTYPE_NUMBER", + "SVG_LENGTHTYPE_PC", + "SVG_LENGTHTYPE_PERCENTAGE", + "SVG_LENGTHTYPE_PT", + "SVG_LENGTHTYPE_PX", + "SVG_LENGTHTYPE_UNKNOWN", + "SVG_MARKERUNITS_STROKEWIDTH", + "SVG_MARKERUNITS_UNKNOWN", + "SVG_MARKERUNITS_USERSPACEONUSE", + "SVG_MARKER_ORIENT_ANGLE", + "SVG_MARKER_ORIENT_AUTO", + "SVG_MARKER_ORIENT_UNKNOWN", + "SVG_MASKTYPE_ALPHA", + "SVG_MASKTYPE_LUMINANCE", + "SVG_MATRIX_NOT_INVERTABLE", + "SVG_MEETORSLICE_MEET", + "SVG_MEETORSLICE_SLICE", + "SVG_MEETORSLICE_UNKNOWN", + "SVG_MORPHOLOGY_OPERATOR_DILATE", + "SVG_MORPHOLOGY_OPERATOR_ERODE", + "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", + "SVG_PAINTTYPE_CURRENTCOLOR", + "SVG_PAINTTYPE_NONE", + "SVG_PAINTTYPE_RGBCOLOR", + "SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR", + "SVG_PAINTTYPE_UNKNOWN", + "SVG_PAINTTYPE_URI", + "SVG_PAINTTYPE_URI_CURRENTCOLOR", + "SVG_PAINTTYPE_URI_NONE", + "SVG_PAINTTYPE_URI_RGBCOLOR", + "SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR", + "SVG_PRESERVEASPECTRATIO_NONE", + "SVG_PRESERVEASPECTRATIO_UNKNOWN", + "SVG_PRESERVEASPECTRATIO_XMAXYMAX", + "SVG_PRESERVEASPECTRATIO_XMAXYMID", + "SVG_PRESERVEASPECTRATIO_XMAXYMIN", + "SVG_PRESERVEASPECTRATIO_XMIDYMAX", + "SVG_PRESERVEASPECTRATIO_XMIDYMID", + "SVG_PRESERVEASPECTRATIO_XMIDYMIN", + "SVG_PRESERVEASPECTRATIO_XMINYMAX", + "SVG_PRESERVEASPECTRATIO_XMINYMID", + "SVG_PRESERVEASPECTRATIO_XMINYMIN", + "SVG_SPREADMETHOD_PAD", + "SVG_SPREADMETHOD_REFLECT", + "SVG_SPREADMETHOD_REPEAT", + "SVG_SPREADMETHOD_UNKNOWN", + "SVG_STITCHTYPE_NOSTITCH", + "SVG_STITCHTYPE_STITCH", + "SVG_STITCHTYPE_UNKNOWN", + "SVG_TRANSFORM_MATRIX", + "SVG_TRANSFORM_ROTATE", + "SVG_TRANSFORM_SCALE", + "SVG_TRANSFORM_SKEWX", + "SVG_TRANSFORM_SKEWY", + "SVG_TRANSFORM_TRANSLATE", + "SVG_TRANSFORM_UNKNOWN", + "SVG_TURBULENCE_TYPE_FRACTALNOISE", + "SVG_TURBULENCE_TYPE_TURBULENCE", + "SVG_TURBULENCE_TYPE_UNKNOWN", + "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", + "SVG_UNIT_TYPE_UNKNOWN", + "SVG_UNIT_TYPE_USERSPACEONUSE", + "SVG_WRONG_TYPE_ERR", + "SVG_ZOOMANDPAN_DISABLE", + "SVG_ZOOMANDPAN_MAGNIFY", + "SVG_ZOOMANDPAN_UNKNOWN", + "SYNTAX_ERR", + "SavedPages", + "Screen", + "ScreenOrientation", + "Script", + "ScriptProcessorNode", + "ScrollAreaEvent", + "SecurityPolicyViolationEvent", + "Selection", + "ServiceWorker", + "ServiceWorkerContainer", + "ServiceWorkerRegistration", + "SessionDescription", + "Set", + "ShadowRoot", + "SharedWorker", + "SimpleGestureEvent", + "SpeechSynthesisEvent", + "SpeechSynthesisUtterance", + "StopIteration", + "Storage", + "StorageEvent", + "String", + "StyleSheet", + "StyleSheetList", + "SubtleCrypto", + "Symbol", + "SyntaxError", + "TEMPORARY", + "TEXTPATH_METHODTYPE_ALIGN", + "TEXTPATH_METHODTYPE_STRETCH", + "TEXTPATH_METHODTYPE_UNKNOWN", + "TEXTPATH_SPACINGTYPE_AUTO", + "TEXTPATH_SPACINGTYPE_EXACT", + "TEXTPATH_SPACINGTYPE_UNKNOWN", + "TEXTURE", + "TEXTURE0", + "TEXTURE1", + "TEXTURE10", + "TEXTURE11", + "TEXTURE12", + "TEXTURE13", + "TEXTURE14", + "TEXTURE15", + "TEXTURE16", + "TEXTURE17", + "TEXTURE18", + "TEXTURE19", + "TEXTURE2", + "TEXTURE20", + "TEXTURE21", + "TEXTURE22", + "TEXTURE23", + "TEXTURE24", + "TEXTURE25", + "TEXTURE26", + "TEXTURE27", + "TEXTURE28", + "TEXTURE29", + "TEXTURE3", + "TEXTURE30", + "TEXTURE31", + "TEXTURE4", + "TEXTURE5", + "TEXTURE6", + "TEXTURE7", + "TEXTURE8", + "TEXTURE9", + "TEXTURE_2D", + "TEXTURE_BINDING_2D", + "TEXTURE_BINDING_CUBE_MAP", + "TEXTURE_CUBE_MAP", + "TEXTURE_CUBE_MAP_NEGATIVE_X", + "TEXTURE_CUBE_MAP_NEGATIVE_Y", + "TEXTURE_CUBE_MAP_NEGATIVE_Z", + "TEXTURE_CUBE_MAP_POSITIVE_X", + "TEXTURE_CUBE_MAP_POSITIVE_Y", + "TEXTURE_CUBE_MAP_POSITIVE_Z", + "TEXTURE_MAG_FILTER", + "TEXTURE_MAX_ANISOTROPY_EXT", + "TEXTURE_MIN_FILTER", + "TEXTURE_WRAP_S", + "TEXTURE_WRAP_T", + "TEXT_NODE", + "TIMEOUT", + "TIMEOUT_ERR", + "TOO_LARGE_ERR", + "TRANSACTION_INACTIVE_ERR", + "TRIANGLE", + "TRIANGLES", + "TRIANGLE_FAN", + "TRIANGLE_STRIP", + "TYPE_BACK_FORWARD", + "TYPE_ERR", + "TYPE_MISMATCH_ERR", + "TYPE_NAVIGATE", + "TYPE_RELOAD", + "TYPE_RESERVED", + "Text", + "TextDecoder", + "TextEncoder", + "TextEvent", + "TextMetrics", + "TextTrack", + "TextTrackCue", + "TextTrackCueList", + "TextTrackList", + "TimeEvent", + "TimeRanges", + "Touch", + "TouchEvent", + "TouchList", + "TrackEvent", + "TransitionEvent", + "TreeWalker", + "TypeError", + "UIEvent", + "UNCACHED", + "UNKNOWN_ERR", + "UNKNOWN_RULE", + "UNMASKED_RENDERER_WEBGL", + "UNMASKED_VENDOR_WEBGL", + "UNORDERED_NODE_ITERATOR_TYPE", + "UNORDERED_NODE_SNAPSHOT_TYPE", + "UNPACK_ALIGNMENT", + "UNPACK_COLORSPACE_CONVERSION_WEBGL", + "UNPACK_FLIP_Y_WEBGL", + "UNPACK_PREMULTIPLY_ALPHA_WEBGL", + "UNSCHEDULED_STATE", + "UNSENT", + "UNSIGNED_BYTE", + "UNSIGNED_INT", + "UNSIGNED_SHORT", + "UNSIGNED_SHORT_4_4_4_4", + "UNSIGNED_SHORT_5_5_5_1", + "UNSIGNED_SHORT_5_6_5", + "UNSPECIFIED_EVENT_TYPE_ERR", + "UPDATEREADY", + "URIError", + "URL", + "URLSearchParams", + "URLUnencoded", + "URL_MISMATCH_ERR", + "UTC", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", + "UserMessageHandler", + "UserMessageHandlersNamespace", + "UserProximityEvent", + "VALIDATE_STATUS", + "VALIDATION_ERR", + "VARIABLES_RULE", + "VENDOR", + "VERSION", + "VERSION_CHANGE", + "VERSION_ERR", + "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", + "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", + "VERTEX_ATTRIB_ARRAY_ENABLED", + "VERTEX_ATTRIB_ARRAY_NORMALIZED", + "VERTEX_ATTRIB_ARRAY_POINTER", + "VERTEX_ATTRIB_ARRAY_SIZE", + "VERTEX_ATTRIB_ARRAY_STRIDE", + "VERTEX_ATTRIB_ARRAY_TYPE", + "VERTEX_SHADER", + "VERTICAL", + "VERTICAL_AXIS", + "VER_ERR", + "VIEWPORT", + "VIEWPORT_RULE", + "VTTCue", + "VTTRegion", + "ValidityState", + "VideoStreamTrack", + "WEBKIT_FILTER_RULE", + "WEBKIT_KEYFRAMES_RULE", + "WEBKIT_KEYFRAME_RULE", + "WEBKIT_REGION_RULE", + "WRONG_DOCUMENT_ERR", + "WaveShaperNode", + "WeakMap", + "WeakSet", + "WebGLActiveInfo", + "WebGLBuffer", + "WebGLContextEvent", + "WebGLFramebuffer", + "WebGLProgram", + "WebGLRenderbuffer", + "WebGLRenderingContext", + "WebGLShader", + "WebGLShaderPrecisionFormat", + "WebGLTexture", + "WebGLUniformLocation", + "WebGLVertexArray", + "WebKitAnimationEvent", + "WebKitBlobBuilder", + "WebKitCSSFilterRule", + "WebKitCSSFilterValue", + "WebKitCSSKeyframeRule", + "WebKitCSSKeyframesRule", + "WebKitCSSMatrix", + "WebKitCSSRegionRule", + "WebKitCSSTransformValue", + "WebKitDataCue", + "WebKitGamepad", + "WebKitMediaKeyError", + "WebKitMediaKeyMessageEvent", + "WebKitMediaKeySession", + "WebKitMediaKeys", + "WebKitMediaSource", + "WebKitMutationObserver", + "WebKitNamespace", + "WebKitPlaybackTargetAvailabilityEvent", + "WebKitPoint", + "WebKitShadowRoot", + "WebKitSourceBuffer", + "WebKitSourceBufferList", + "WebKitTransitionEvent", + "WebSocket", + "WheelEvent", + "Window", + "Worker", + "XMLDocument", + "XMLHttpRequest", + "XMLHttpRequestEventTarget", + "XMLHttpRequestException", + "XMLHttpRequestProgressEvent", + "XMLHttpRequestUpload", + "XMLSerializer", + "XMLStylesheetProcessingInstruction", + "XPathEvaluator", + "XPathException", + "XPathExpression", + "XPathNSResolver", + "XPathResult", + "XSLTProcessor", + "ZERO", + "_XD0M_", + "_YD0M_", + "__defineGetter__", + "__defineSetter__", + "__lookupGetter__", + "__lookupSetter__", + "__opera", + "__proto__", + "_browserjsran", + "a", + "aLink", + "abbr", + "abort", + "abs", + "absolute", + "acceleration", + "accelerationIncludingGravity", + "accelerator", + "accept", + "acceptCharset", + "acceptNode", + "accessKey", + "accessKeyLabel", + "accuracy", + "acos", + "acosh", + "action", + "actionURL", + "active", + "activeCues", + "activeElement", + "activeSourceBuffers", + "activeSourceCount", + "activeTexture", + "add", + "addBehavior", + "addCandidate", + "addColorStop", + "addCue", + "addElement", + "addEventListener", + "addFilter", + "addFromString", + "addFromUri", + "addIceCandidate", + "addImport", + "addListener", + "addNamed", + "addPageRule", + "addPath", + "addPointer", + "addRange", + "addRegion", + "addRule", + "addSearchEngine", + "addSourceBuffer", + "addStream", + "addTextTrack", + "addTrack", + "addWakeLockListener", + "addedNodes", + "additionalName", + "additiveSymbols", + "addons", + "adoptNode", + "adr", + "advance", + "alert", + "algorithm", + "align", + "align-content", + "align-items", + "align-self", + "alignContent", + "alignItems", + "alignSelf", + "alignmentBaseline", + "alinkColor", + "all", + "allowFullscreen", + "allowedDirections", + "alpha", + "alt", + "altGraphKey", + "altHtml", + "altKey", + "altLeft", + "altitude", + "altitudeAccuracy", + "amplitude", + "ancestorOrigins", + "anchor", + "anchorNode", + "anchorOffset", + "anchors", + "angle", + "animVal", + "animate", + "animatedInstanceRoot", + "animatedNormalizedPathSegList", + "animatedPathSegList", + "animatedPoints", + "animation", + "animation-delay", + "animation-direction", + "animation-duration", + "animation-fill-mode", + "animation-iteration-count", + "animation-name", + "animation-play-state", + "animation-timing-function", + "animationDelay", + "animationDirection", + "animationDuration", + "animationFillMode", + "animationIterationCount", + "animationName", + "animationPlayState", + "animationStartTime", + "animationTimingFunction", + "animationsPaused", + "anniversary", + "app", + "appCodeName", + "appMinorVersion", + "appName", + "appNotifications", + "appVersion", + "append", + "appendBuffer", + "appendChild", + "appendData", + "appendItem", + "appendMedium", + "appendNamed", + "appendRule", + "appendStream", + "appendWindowEnd", + "appendWindowStart", + "applets", + "applicationCache", + "apply", + "applyElement", + "arc", + "arcTo", + "archive", + "areas", + "arguments", + "arrayBuffer", + "asin", + "asinh", + "assert", + "assign", + "async", + "atEnd", + "atan", + "atan2", + "atanh", + "atob", + "attachEvent", + "attachShader", + "attachments", + "attack", + "attrChange", + "attrName", + "attributeName", + "attributeNamespace", + "attributes", + "audioTracks", + "autoIncrement", + "autobuffer", + "autocapitalize", + "autocomplete", + "autocorrect", + "autofocus", + "autoplay", + "availHeight", + "availLeft", + "availTop", + "availWidth", + "availability", + "available", + "aversion", + "axes", + "axis", + "azimuth", + "b", + "back", + "backface-visibility", + "backfaceVisibility", + "background", + "background-attachment", + "background-blend-mode", + "background-clip", + "background-color", + "background-image", + "background-origin", + "background-position", + "background-repeat", + "background-size", + "backgroundAttachment", + "backgroundBlendMode", + "backgroundClip", + "backgroundColor", + "backgroundImage", + "backgroundOrigin", + "backgroundPosition", + "backgroundPositionX", + "backgroundPositionY", + "backgroundRepeat", + "backgroundSize", + "badInput", + "balance", + "baseFrequencyX", + "baseFrequencyY", + "baseNode", + "baseOffset", + "baseURI", + "baseVal", + "baselineShift", + "battery", + "bday", + "beginElement", + "beginElementAt", + "beginPath", + "behavior", + "behaviorCookie", + "behaviorPart", + "behaviorUrns", + "beta", + "bezierCurveTo", + "bgColor", + "bgProperties", + "bias", + "big", + "binaryType", + "bind", + "bindAttribLocation", + "bindBuffer", + "bindFramebuffer", + "bindRenderbuffer", + "bindTexture", + "blendColor", + "blendEquation", + "blendEquationSeparate", + "blendFunc", + "blendFuncSeparate", + "blink", + "blob", + "blockDirection", + "blue", + "blur", + "body", + "bodyUsed", + "bold", + "bookmarks", + "booleanValue", + "border", + "border-bottom", + "border-bottom-color", + "border-bottom-left-radius", + "border-bottom-right-radius", + "border-bottom-style", + "border-bottom-width", + "border-collapse", + "border-color", + "border-image", + "border-image-outset", + "border-image-repeat", + "border-image-slice", + "border-image-source", + "border-image-width", + "border-left", + "border-left-color", + "border-left-style", + "border-left-width", + "border-radius", + "border-right", + "border-right-color", + "border-right-style", + "border-right-width", + "border-spacing", + "border-style", + "border-top", + "border-top-color", + "border-top-left-radius", + "border-top-right-radius", + "border-top-style", + "border-top-width", + "border-width", + "borderBottom", + "borderBottomColor", + "borderBottomLeftRadius", + "borderBottomRightRadius", + "borderBottomStyle", + "borderBottomWidth", + "borderCollapse", + "borderColor", + "borderColorDark", + "borderColorLight", + "borderImage", + "borderImageOutset", + "borderImageRepeat", + "borderImageSlice", + "borderImageSource", + "borderImageWidth", + "borderLeft", + "borderLeftColor", + "borderLeftStyle", + "borderLeftWidth", + "borderRadius", + "borderRight", + "borderRightColor", + "borderRightStyle", + "borderRightWidth", + "borderSpacing", + "borderStyle", + "borderTop", + "borderTopColor", + "borderTopLeftRadius", + "borderTopRightRadius", + "borderTopStyle", + "borderTopWidth", + "borderWidth", + "bottom", + "bottomMargin", + "bound", + "boundElements", + "boundingClientRect", + "boundingHeight", + "boundingLeft", + "boundingTop", + "boundingWidth", + "bounds", + "box-decoration-break", + "box-shadow", + "box-sizing", + "boxDecorationBreak", + "boxShadow", + "boxSizing", + "breakAfter", + "breakBefore", + "breakInside", + "browserLanguage", + "btoa", + "bubbles", + "buffer", + "bufferData", + "bufferDepth", + "bufferSize", + "bufferSubData", + "buffered", + "bufferedAmount", + "buildID", + "buildNumber", + "button", + "buttonID", + "buttons", + "byteLength", + "byteOffset", + "c", + "call", + "caller", + "canBeFormatted", + "canBeMounted", + "canBeShared", + "canHaveChildren", + "canHaveHTML", + "canPlayType", + "cancel", + "cancelAnimationFrame", + "cancelBubble", + "cancelScheduledValues", + "cancelable", + "candidate", + "canvas", + "caption", + "caption-side", + "captionSide", + "captureEvents", + "captureStackTrace", + "caretPositionFromPoint", + "caretRangeFromPoint", + "cast", + "catch", + "category", + "cbrt", + "cd", + "ceil", + "cellIndex", + "cellPadding", + "cellSpacing", + "cells", + "ch", + "chOff", + "chain", + "challenge", + "changedTouches", + "channel", + "channelCount", + "channelCountMode", + "channelInterpretation", + "char", + "charAt", + "charCode", + "charCodeAt", + "charIndex", + "characterSet", + "charging", + "chargingTime", + "charset", + "checkEnclosure", + "checkFramebufferStatus", + "checkIntersection", + "checkValidity", + "checked", + "childElementCount", + "childNodes", + "children", + "chrome", + "ciphertext", + "cite", + "classList", + "className", + "classid", + "clear", + "clearAttributes", + "clearColor", + "clearData", + "clearDepth", + "clearImmediate", + "clearInterval", + "clearMarks", + "clearMeasures", + "clearParameters", + "clearRect", + "clearResourceTimings", + "clearShadow", + "clearStencil", + "clearTimeout", + "clearWatch", + "click", + "clickCount", + "clientHeight", + "clientInformation", + "clientLeft", + "clientRect", + "clientRects", + "clientTop", + "clientWidth", + "clientX", + "clientY", + "clip", + "clip-path", + "clip-rule", + "clipBottom", + "clipLeft", + "clipPath", + "clipPathUnits", + "clipRight", + "clipRule", + "clipTop", + "clipboardData", + "clone", + "cloneContents", + "cloneNode", + "cloneRange", + "close", + "closePath", + "closed", + "closest", + "clz", + "clz32", + "cmp", + "code", + "codeBase", + "codePointAt", + "codeType", + "colSpan", + "collapse", + "collapseToEnd", + "collapseToStart", + "collapsed", + "collect", + "colno", + "color", + "color-interpolation", + "color-interpolation-filters", + "colorDepth", + "colorInterpolation", + "colorInterpolationFilters", + "colorMask", + "colorType", + "cols", + "columnCount", + "columnFill", + "columnGap", + "columnNumber", + "columnRule", + "columnRuleColor", + "columnRuleStyle", + "columnRuleWidth", + "columnSpan", + "columnWidth", + "columns", + "command", + "commitPreferences", + "commonAncestorContainer", + "compact", + "compareBoundaryPoints", + "compareDocumentPosition", + "compareEndPoints", + "compareNode", + "comparePoint", + "compatMode", + "compatible", + "compile", + "compileShader", + "complete", + "componentFromPoint", + "compositionEndOffset", + "compositionStartOffset", + "compressedTexImage2D", + "compressedTexSubImage2D", + "concat", + "conditionText", + "coneInnerAngle", + "coneOuterAngle", + "coneOuterGain", + "confirm", + "confirmComposition", + "confirmSiteSpecificTrackingException", + "confirmWebWideTrackingException", + "connect", + "connectEnd", + "connectStart", + "connected", + "connection", + "connectionSpeed", + "console", + "consolidate", + "constrictionActive", + "constructor", + "contactID", + "contains", + "containsNode", + "content", + "contentDocument", + "contentEditable", + "contentOverflow", + "contentScriptType", + "contentStyleType", + "contentType", + "contentWindow", + "context", + "contextMenu", + "contextmenu", + "continue", + "continuous", + "control", + "controller", + "controls", + "convertToSpecifiedUnits", + "cookie", + "cookieEnabled", + "coords", + "copyFromChannel", + "copyTexImage2D", + "copyTexSubImage2D", + "copyToChannel", + "copyWithin", + "correspondingElement", + "correspondingUseElement", + "cos", + "cosh", + "count", + "counter-increment", + "counter-reset", + "counterIncrement", + "counterReset", + "cpuClass", + "cpuSleepAllowed", + "create", + "createAnalyser", + "createAnswer", + "createAttribute", + "createAttributeNS", + "createBiquadFilter", + "createBuffer", + "createBufferSource", + "createCDATASection", + "createCSSStyleSheet", + "createCaption", + "createChannelMerger", + "createChannelSplitter", + "createComment", + "createContextualFragment", + "createControlRange", + "createConvolver", + "createDTMFSender", + "createDataChannel", + "createDelay", + "createDelayNode", + "createDocument", + "createDocumentFragment", + "createDocumentType", + "createDynamicsCompressor", + "createElement", + "createElementNS", + "createEntityReference", + "createEvent", + "createEventObject", + "createExpression", + "createFramebuffer", + "createFunction", + "createGain", + "createGainNode", + "createHTMLDocument", + "createImageBitmap", + "createImageData", + "createIndex", + "createJavaScriptNode", + "createLinearGradient", + "createMediaElementSource", + "createMediaKeys", + "createMediaStreamDestination", + "createMediaStreamSource", + "createMutableFile", + "createNSResolver", + "createNodeIterator", + "createNotification", + "createObjectStore", + "createObjectURL", + "createOffer", + "createOscillator", + "createPanner", + "createPattern", + "createPeriodicWave", + "createPopup", + "createProcessingInstruction", + "createProgram", + "createRadialGradient", + "createRange", + "createRangeCollection", + "createRenderbuffer", + "createSVGAngle", + "createSVGLength", + "createSVGMatrix", + "createSVGNumber", + "createSVGPathSegArcAbs", + "createSVGPathSegArcRel", + "createSVGPathSegClosePath", + "createSVGPathSegCurvetoCubicAbs", + "createSVGPathSegCurvetoCubicRel", + "createSVGPathSegCurvetoCubicSmoothAbs", + "createSVGPathSegCurvetoCubicSmoothRel", + "createSVGPathSegCurvetoQuadraticAbs", + "createSVGPathSegCurvetoQuadraticRel", + "createSVGPathSegCurvetoQuadraticSmoothAbs", + "createSVGPathSegCurvetoQuadraticSmoothRel", + "createSVGPathSegLinetoAbs", + "createSVGPathSegLinetoHorizontalAbs", + "createSVGPathSegLinetoHorizontalRel", + "createSVGPathSegLinetoRel", + "createSVGPathSegLinetoVerticalAbs", + "createSVGPathSegLinetoVerticalRel", + "createSVGPathSegMovetoAbs", + "createSVGPathSegMovetoRel", + "createSVGPoint", + "createSVGRect", + "createSVGTransform", + "createSVGTransformFromMatrix", + "createScriptProcessor", + "createSession", + "createShader", + "createShadowRoot", + "createStereoPanner", + "createStyleSheet", + "createTBody", + "createTFoot", + "createTHead", + "createTextNode", + "createTextRange", + "createTexture", + "createTouch", + "createTouchList", + "createTreeWalker", + "createWaveShaper", + "creationTime", + "crossOrigin", + "crypto", + "csi", + "cssFloat", + "cssRules", + "cssText", + "cssValueType", + "ctrlKey", + "ctrlLeft", + "cues", + "cullFace", + "currentNode", + "currentPage", + "currentScale", + "currentScript", + "currentSrc", + "currentState", + "currentStyle", + "currentTarget", + "currentTime", + "currentTranslate", + "currentView", + "cursor", + "curve", + "customError", + "cx", + "cy", + "d", + "data", + "dataFld", + "dataFormatAs", + "dataPageSize", + "dataSrc", + "dataTransfer", + "database", + "dataset", + "dateTime", + "db", + "debug", + "debuggerEnabled", + "declare", + "decode", + "decodeAudioData", + "decodeURI", + "decodeURIComponent", + "decrypt", + "default", + "defaultCharset", + "defaultChecked", + "defaultMuted", + "defaultPlaybackRate", + "defaultPrevented", + "defaultSelected", + "defaultStatus", + "defaultURL", + "defaultValue", + "defaultView", + "defaultstatus", + "defer", + "defineMagicFunction", + "defineMagicVariable", + "defineProperties", + "defineProperty", + "delayTime", + "delete", + "deleteBuffer", + "deleteCaption", + "deleteCell", + "deleteContents", + "deleteData", + "deleteDatabase", + "deleteFramebuffer", + "deleteFromDocument", + "deleteIndex", + "deleteMedium", + "deleteObjectStore", + "deleteProgram", + "deleteRenderbuffer", + "deleteRow", + "deleteRule", + "deleteShader", + "deleteTFoot", + "deleteTHead", + "deleteTexture", + "deliverChangeRecords", + "delivery", + "deliveryInfo", + "deliveryStatus", + "deliveryTimestamp", + "delta", + "deltaMode", + "deltaX", + "deltaY", + "deltaZ", + "depthFunc", + "depthMask", + "depthRange", + "deriveBits", + "deriveKey", + "description", + "deselectAll", + "designMode", + "destination", + "destinationURL", + "detach", + "detachEvent", + "detachShader", + "detail", + "detune", + "devicePixelRatio", + "deviceXDPI", + "deviceYDPI", + "diffuseConstant", + "digest", + "dimensions", + "dir", + "dirName", + "direction", + "dirxml", + "disable", + "disableVertexAttribArray", + "disabled", + "dischargingTime", + "disconnect", + "dispatchEvent", + "display", + "distanceModel", + "divisor", + "djsapi", + "djsproxy", + "doImport", + "doNotTrack", + "doScroll", + "doctype", + "document", + "documentElement", + "documentMode", + "documentURI", + "dolphin", + "dolphinGameCenter", + "dolphininfo", + "dolphinmeta", + "domComplete", + "domContentLoadedEventEnd", + "domContentLoadedEventStart", + "domInteractive", + "domLoading", + "domain", + "domainLookupEnd", + "domainLookupStart", + "dominant-baseline", + "dominantBaseline", + "done", + "dopplerFactor", + "download", + "dragDrop", + "draggable", + "drawArrays", + "drawArraysInstancedANGLE", + "drawCustomFocusRing", + "drawElements", + "drawElementsInstancedANGLE", + "drawFocusIfNeeded", + "drawImage", + "drawImageFromRect", + "drawSystemFocusRing", + "drawingBufferHeight", + "drawingBufferWidth", + "dropEffect", + "droppedVideoFrames", + "dropzone", + "dump", + "duplicate", + "duration", + "dvname", + "dvnum", + "dx", + "dy", + "dynsrc", + "e", + "edgeMode", + "effectAllowed", + "elapsedTime", + "elementFromPoint", + "elements", + "elevation", + "ellipse", + "email", + "embeds", + "empty", + "empty-cells", + "emptyCells", + "enable", + "enableBackground", + "enableStyleSheetsForSet", + "enableVertexAttribArray", + "enabled", + "enabledPlugin", + "encode", + "encodeURI", + "encodeURIComponent", + "encoding", + "encrypt", + "enctype", + "end", + "endContainer", + "endElement", + "endElementAt", + "endOfStream", + "endOffset", + "endTime", + "ended", + "endsWith", + "entities", + "entries", + "entryType", + "enumerate", + "enumerateEditable", + "error", + "errorCode", + "escape", + "eval", + "evaluate", + "event", + "eventPhase", + "every", + "exception", + "exec", + "execCommand", + "execCommandShowHelp", + "execScript", + "exitFullscreen", + "exitPointerLock", + "exp", + "expand", + "expandEntityReferences", + "expando", + "expansion", + "expiryDate", + "explicitOriginalTarget", + "expm1", + "exponent", + "exponentialRampToValueAtTime", + "exportKey", + "extend", + "extensions", + "extentNode", + "extentOffset", + "external", + "externalResourcesRequired", + "extractContents", + "extractable", + "f", + "face", + "factoryReset", + "fallback", + "familyName", + "farthestViewportElement", + "fastSeek", + "fatal", + "fetch", + "fetchStart", + "fftSize", + "fgColor", + "fileCreatedDate", + "fileHandle", + "fileModifiedDate", + "fileName", + "fileSize", + "fileUpdatedDate", + "filename", + "files", + "fill", + "fill-opacity", + "fill-rule", + "fillOpacity", + "fillRect", + "fillRule", + "fillStyle", + "fillText", + "filter", + "filterResX", + "filterResY", + "filterUnits", + "filters", + "find", + "findIndex", + "findRule", + "findText", + "finish", + "fireEvent", + "firstChild", + "firstElementChild", + "firstPage", + "fixed", + "flex", + "flex-basis", + "flex-direction", + "flex-flow", + "flex-grow", + "flex-shrink", + "flex-wrap", + "flexBasis", + "flexDirection", + "flexFlow", + "flexGrow", + "flexShrink", + "flexWrap", + "flipX", + "flipY", + "float", + "flood-color", + "flood-opacity", + "floodColor", + "floodOpacity", + "floor", + "flush", + "focus", + "focusNode", + "focusOffset", + "font", + "font-family", + "font-feature-settings", + "font-kerning", + "font-language-override", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-synthesis", + "font-variant", + "font-variant-alternates", + "font-variant-caps", + "font-variant-east-asian", + "font-variant-ligatures", + "font-variant-numeric", + "font-variant-position", + "font-weight", + "fontFamily", + "fontFeatureSettings", + "fontKerning", + "fontLanguageOverride", + "fontSize", + "fontSizeAdjust", + "fontSmoothingEnabled", + "fontStretch", + "fontStyle", + "fontSynthesis", + "fontVariant", + "fontVariantAlternates", + "fontVariantCaps", + "fontVariantEastAsian", + "fontVariantLigatures", + "fontVariantNumeric", + "fontVariantPosition", + "fontWeight", + "fontcolor", + "fonts", + "fontsize", + "for", + "forEach", + "forceRedraw", + "form", + "formAction", + "formEnctype", + "formMethod", + "formNoValidate", + "formTarget", + "format", + "forms", + "forward", + "fr", + "frame", + "frameBorder", + "frameElement", + "frameSpacing", + "framebufferRenderbuffer", + "framebufferTexture2D", + "frames", + "freeSpace", + "freeze", + "frequency", + "frequencyBinCount", + "from", + "fromCharCode", + "fromCodePoint", + "fromElement", + "frontFace", + "fround", + "fullScreen", + "fullscreenElement", + "fullscreenEnabled", + "fx", + "fy", + "gain", + "gamepad", + "gamma", + "genderIdentity", + "generateKey", + "generateMipmap", + "generateRequest", + "geolocation", + "gestureObject", + "get", + "getActiveAttrib", + "getActiveUniform", + "getAdjacentText", + "getAll", + "getAllResponseHeaders", + "getAsFile", + "getAsString", + "getAttachedShaders", + "getAttribLocation", + "getAttribute", + "getAttributeNS", + "getAttributeNode", + "getAttributeNodeNS", + "getAudioTracks", + "getBBox", + "getBattery", + "getBlob", + "getBookmark", + "getBoundingClientRect", + "getBufferParameter", + "getByteFrequencyData", + "getByteTimeDomainData", + "getCSSCanvasContext", + "getCTM", + "getCandidateWindowClientRect", + "getChannelData", + "getCharNumAtPosition", + "getClientRect", + "getClientRects", + "getCompositionAlternatives", + "getComputedStyle", + "getComputedTextLength", + "getConfiguration", + "getContext", + "getContextAttributes", + "getCounterValue", + "getCueAsHTML", + "getCueById", + "getCurrentPosition", + "getCurrentTime", + "getData", + "getDatabaseNames", + "getDate", + "getDay", + "getDefaultComputedStyle", + "getDestinationInsertionPoints", + "getDistributedNodes", + "getEditable", + "getElementById", + "getElementsByClassName", + "getElementsByName", + "getElementsByTagName", + "getElementsByTagNameNS", + "getEnclosureList", + "getEndPositionOfChar", + "getEntries", + "getEntriesByName", + "getEntriesByType", + "getError", + "getExtension", + "getExtentOfChar", + "getFeature", + "getFile", + "getFloat32", + "getFloat64", + "getFloatFrequencyData", + "getFloatTimeDomainData", + "getFloatValue", + "getFramebufferAttachmentParameter", + "getFrequencyResponse", + "getFullYear", + "getGamepads", + "getHours", + "getImageData", + "getInt16", + "getInt32", + "getInt8", + "getIntersectionList", + "getItem", + "getItems", + "getKey", + "getLineDash", + "getLocalStreams", + "getMarks", + "getMatchedCSSRules", + "getMeasures", + "getMetadata", + "getMilliseconds", + "getMinutes", + "getModifierState", + "getMonth", + "getNamedItem", + "getNamedItemNS", + "getNotifier", + "getNumberOfChars", + "getOverrideHistoryNavigationMode", + "getOverrideStyle", + "getOwnPropertyDescriptor", + "getOwnPropertyNames", + "getOwnPropertySymbols", + "getParameter", + "getPathSegAtLength", + "getPointAtLength", + "getPreference", + "getPreferenceDefault", + "getPresentationAttribute", + "getPreventDefault", + "getProgramInfoLog", + "getProgramParameter", + "getPropertyCSSValue", + "getPropertyPriority", + "getPropertyShorthand", + "getPropertyValue", + "getPrototypeOf", + "getRGBColorValue", + "getRandomValues", + "getRangeAt", + "getReceivers", + "getRectValue", + "getRegistration", + "getRemoteStreams", + "getRenderbufferParameter", + "getResponseHeader", + "getRoot", + "getRotationOfChar", + "getSVGDocument", + "getScreenCTM", + "getSeconds", + "getSelection", + "getSenders", + "getShaderInfoLog", + "getShaderParameter", + "getShaderPrecisionFormat", + "getShaderSource", + "getSimpleDuration", + "getSiteIcons", + "getSources", + "getSpeculativeParserUrls", + "getStartPositionOfChar", + "getStartTime", + "getStats", + "getStorageUpdates", + "getStreamById", + "getStringValue", + "getSubStringLength", + "getSubscription", + "getSupportedExtensions", + "getTexParameter", + "getTime", + "getTimezoneOffset", + "getTotalLength", + "getTrackById", + "getTracks", + "getTransformToElement", + "getUTCDate", + "getUTCDay", + "getUTCFullYear", + "getUTCHours", + "getUTCMilliseconds", + "getUTCMinutes", + "getUTCMonth", + "getUTCSeconds", + "getUint16", + "getUint32", + "getUint8", + "getUniform", + "getUniformLocation", + "getUserMedia", + "getValues", + "getVarDate", + "getVariableValue", + "getVertexAttrib", + "getVertexAttribOffset", + "getVideoPlaybackQuality", + "getVideoTracks", + "getWakeLockState", + "getYear", + "givenName", + "global", + "globalAlpha", + "globalCompositeOperation", + "glyphOrientationHorizontal", + "glyphOrientationVertical", + "glyphRef", + "go", + "gradientTransform", + "gradientUnits", + "grammars", + "green", + "group", + "groupCollapsed", + "groupEnd", + "hardwareConcurrency", + "has", + "hasAttribute", + "hasAttributeNS", + "hasAttributes", + "hasChildNodes", + "hasComposition", + "hasExtension", + "hasFeature", + "hasFocus", + "hasLayout", + "hasOwnProperty", + "hash", + "head", + "headers", + "heading", + "height", + "hidden", + "hide", + "hideFocus", + "high", + "hint", + "history", + "honorificPrefix", + "honorificSuffix", + "horizontalOverflow", + "host", + "hostname", + "href", + "hreflang", + "hspace", + "html5TagCheckInerface", + "htmlFor", + "htmlText", + "httpEquiv", + "hwTimestamp", + "hypot", + "iccId", + "iceConnectionState", + "iceGatheringState", + "icon", + "id", + "identifier", + "identity", + "ignoreBOM", + "ignoreCase", + "image-orientation", + "image-rendering", + "imageOrientation", + "imageRendering", + "images", + "ime-mode", + "imeMode", + "implementation", + "importKey", + "importNode", + "importStylesheet", + "imports", + "impp", + "imul", + "in1", + "in2", + "inBandMetadataTrackDispatchType", + "inRange", + "includes", + "incremental", + "indeterminate", + "index", + "indexNames", + "indexOf", + "indexedDB", + "inertiaDestinationX", + "inertiaDestinationY", + "info", + "init", + "initAnimationEvent", + "initBeforeLoadEvent", + "initClipboardEvent", + "initCloseEvent", + "initCommandEvent", + "initCompositionEvent", + "initCustomEvent", + "initData", + "initDeviceMotionEvent", + "initDeviceOrientationEvent", + "initDragEvent", + "initErrorEvent", + "initEvent", + "initFocusEvent", + "initGestureEvent", + "initHashChangeEvent", + "initKeyEvent", + "initKeyboardEvent", + "initMSManipulationEvent", + "initMessageEvent", + "initMouseEvent", + "initMouseScrollEvent", + "initMouseWheelEvent", + "initMutationEvent", + "initNSMouseEvent", + "initOverflowEvent", + "initPageEvent", + "initPageTransitionEvent", + "initPointerEvent", + "initPopStateEvent", + "initProgressEvent", + "initScrollAreaEvent", + "initSimpleGestureEvent", + "initStorageEvent", + "initTextEvent", + "initTimeEvent", + "initTouchEvent", + "initTransitionEvent", + "initUIEvent", + "initWebKitAnimationEvent", + "initWebKitTransitionEvent", + "initWebKitWheelEvent", + "initWheelEvent", + "initialTime", + "initialize", + "initiatorType", + "inner", + "innerHTML", + "innerHeight", + "innerText", + "innerWidth", + "input", + "inputBuffer", + "inputEncoding", + "inputMethod", + "insertAdjacentElement", + "insertAdjacentHTML", + "insertAdjacentText", + "insertBefore", + "insertCell", + "insertData", + "insertItemBefore", + "insertNode", + "insertRow", + "insertRule", + "instanceRoot", + "intercept", + "interimResults", + "internalSubset", + "intersectsNode", + "interval", + "invalidIteratorState", + "inverse", + "invertSelf", + "is", + "is2D", + "isAlternate", + "isArray", + "isBingCurrentSearchDefault", + "isBuffer", + "isCandidateWindowVisible", + "isChar", + "isCollapsed", + "isComposing", + "isContentEditable", + "isContentHandlerRegistered", + "isContextLost", + "isDefaultNamespace", + "isDisabled", + "isEnabled", + "isEqual", + "isEqualNode", + "isExtensible", + "isFinite", + "isFramebuffer", + "isFrozen", + "isGenerator", + "isId", + "isInjected", + "isInteger", + "isMap", + "isMultiLine", + "isNaN", + "isOpen", + "isPointInFill", + "isPointInPath", + "isPointInRange", + "isPointInStroke", + "isPrefAlternate", + "isPrimary", + "isProgram", + "isPropertyImplicit", + "isProtocolHandlerRegistered", + "isPrototypeOf", + "isRenderbuffer", + "isSafeInteger", + "isSameNode", + "isSealed", + "isShader", + "isSupported", + "isTextEdit", + "isTexture", + "isTrusted", + "isTypeSupported", + "isView", + "isolation", + "italics", + "item", + "itemId", + "itemProp", + "itemRef", + "itemScope", + "itemType", + "itemValue", + "iterateNext", + "iterator", + "javaEnabled", + "jobTitle", + "join", + "json", + "justify-content", + "justifyContent", + "k1", + "k2", + "k3", + "k4", + "kernelMatrix", + "kernelUnitLengthX", + "kernelUnitLengthY", + "kerning", + "key", + "keyCode", + "keyFor", + "keyIdentifier", + "keyLightEnabled", + "keyLocation", + "keyPath", + "keySystem", + "keyText", + "keyUsage", + "keys", + "keytype", + "kind", + "knee", + "label", + "labels", + "lang", + "language", + "languages", + "largeArcFlag", + "lastChild", + "lastElementChild", + "lastEventId", + "lastIndex", + "lastIndexOf", + "lastMatch", + "lastMessageSubject", + "lastMessageType", + "lastModified", + "lastModifiedDate", + "lastPage", + "lastParen", + "lastState", + "lastStyleSheetSet", + "latitude", + "layerX", + "layerY", + "layoutFlow", + "layoutGrid", + "layoutGridChar", + "layoutGridLine", + "layoutGridMode", + "layoutGridType", + "lbound", + "left", + "leftContext", + "leftMargin", + "length", + "lengthAdjust", + "lengthComputable", + "letter-spacing", + "letterSpacing", + "level", + "lighting-color", + "lightingColor", + "limitingConeAngle", + "line", + "line-height", + "lineAlign", + "lineBreak", + "lineCap", + "lineDashOffset", + "lineHeight", + "lineJoin", + "lineNumber", + "lineTo", + "lineWidth", + "linearRampToValueAtTime", + "lineno", + "link", + "linkColor", + "linkProgram", + "links", + "list", + "list-style", + "list-style-image", + "list-style-position", + "list-style-type", + "listStyle", + "listStyleImage", + "listStylePosition", + "listStyleType", + "listener", + "load", + "loadEventEnd", + "loadEventStart", + "loadTimes", + "loaded", + "localDescription", + "localName", + "localStorage", + "locale", + "localeCompare", + "location", + "locationbar", + "lock", + "lockedFile", + "log", + "log10", + "log1p", + "log2", + "logicalXDPI", + "logicalYDPI", + "longDesc", + "longitude", + "lookupNamespaceURI", + "lookupPrefix", + "loop", + "loopEnd", + "loopStart", + "looping", + "low", + "lower", + "lowerBound", + "lowerOpen", + "lowsrc", + "m11", + "m12", + "m13", + "m14", + "m21", + "m22", + "m23", + "m24", + "m31", + "m32", + "m33", + "m34", + "m41", + "m42", + "m43", + "m44", + "manifest", + "map", + "mapping", + "margin", + "margin-bottom", + "margin-left", + "margin-right", + "margin-top", + "marginBottom", + "marginHeight", + "marginLeft", + "marginRight", + "marginTop", + "marginWidth", + "mark", + "marker", + "marker-end", + "marker-mid", + "marker-offset", + "marker-start", + "markerEnd", + "markerHeight", + "markerMid", + "markerOffset", + "markerStart", + "markerUnits", + "markerWidth", + "marks", + "mask", + "mask-type", + "maskContentUnits", + "maskType", + "maskUnits", + "match", + "matchMedia", + "matchMedium", + "matches", + "matrix", + "matrixTransform", + "max", + "max-height", + "max-width", + "maxAlternatives", + "maxChannelCount", + "maxConnectionsPerServer", + "maxDecibels", + "maxDistance", + "maxHeight", + "maxLength", + "maxTouchPoints", + "maxValue", + "maxWidth", + "measure", + "measureText", + "media", + "mediaDevices", + "mediaElement", + "mediaGroup", + "mediaKeys", + "mediaText", + "meetOrSlice", + "memory", + "menubar", + "mergeAttributes", + "message", + "messageClass", + "messageHandlers", + "metaKey", + "method", + "mimeType", + "mimeTypes", + "min", + "min-height", + "min-width", + "minDecibels", + "minHeight", + "minValue", + "minWidth", + "miterLimit", + "mix-blend-mode", + "mixBlendMode", + "mode", + "modify", + "mount", + "move", + "moveBy", + "moveEnd", + "moveFirst", + "moveFocusDown", + "moveFocusLeft", + "moveFocusRight", + "moveFocusUp", + "moveNext", + "moveRow", + "moveStart", + "moveTo", + "moveToBookmark", + "moveToElementText", + "moveToPoint", + "mozAdd", + "mozAnimationStartTime", + "mozAnon", + "mozApps", + "mozAudioCaptured", + "mozAudioChannelType", + "mozAutoplayEnabled", + "mozCancelAnimationFrame", + "mozCancelFullScreen", + "mozCancelRequestAnimationFrame", + "mozCaptureStream", + "mozCaptureStreamUntilEnded", + "mozClearDataAt", + "mozContact", + "mozContacts", + "mozCreateFileHandle", + "mozCurrentTransform", + "mozCurrentTransformInverse", + "mozCursor", + "mozDash", + "mozDashOffset", + "mozDecodedFrames", + "mozExitPointerLock", + "mozFillRule", + "mozFragmentEnd", + "mozFrameDelay", + "mozFullScreen", + "mozFullScreenElement", + "mozFullScreenEnabled", + "mozGetAll", + "mozGetAllKeys", + "mozGetAsFile", + "mozGetDataAt", + "mozGetMetadata", + "mozGetUserMedia", + "mozHasAudio", + "mozHasItem", + "mozHidden", + "mozImageSmoothingEnabled", + "mozIndexedDB", + "mozInnerScreenX", + "mozInnerScreenY", + "mozInputSource", + "mozIsTextField", + "mozItem", + "mozItemCount", + "mozItems", + "mozLength", + "mozLockOrientation", + "mozMatchesSelector", + "mozMovementX", + "mozMovementY", + "mozOpaque", + "mozOrientation", + "mozPaintCount", + "mozPaintedFrames", + "mozParsedFrames", + "mozPay", + "mozPointerLockElement", + "mozPresentedFrames", + "mozPreservesPitch", + "mozPressure", + "mozPrintCallback", + "mozRTCIceCandidate", + "mozRTCPeerConnection", + "mozRTCSessionDescription", + "mozRemove", + "mozRequestAnimationFrame", + "mozRequestFullScreen", + "mozRequestPointerLock", + "mozSetDataAt", + "mozSetImageElement", + "mozSourceNode", + "mozSrcObject", + "mozSystem", + "mozTCPSocket", + "mozTextStyle", + "mozTypesAt", + "mozUnlockOrientation", + "mozUserCancelled", + "mozVisibilityState", + "msAnimation", + "msAnimationDelay", + "msAnimationDirection", + "msAnimationDuration", + "msAnimationFillMode", + "msAnimationIterationCount", + "msAnimationName", + "msAnimationPlayState", + "msAnimationStartTime", + "msAnimationTimingFunction", + "msBackfaceVisibility", + "msBlockProgression", + "msCSSOMElementFloatMetrics", + "msCaching", + "msCachingEnabled", + "msCancelRequestAnimationFrame", + "msCapsLockWarningOff", + "msClearImmediate", + "msClose", + "msContentZoomChaining", + "msContentZoomFactor", + "msContentZoomLimit", + "msContentZoomLimitMax", + "msContentZoomLimitMin", + "msContentZoomSnap", + "msContentZoomSnapPoints", + "msContentZoomSnapType", + "msContentZooming", + "msConvertURL", + "msCrypto", + "msDoNotTrack", + "msElementsFromPoint", + "msElementsFromRect", + "msExitFullscreen", + "msExtendedCode", + "msFillRule", + "msFirstPaint", + "msFlex", + "msFlexAlign", + "msFlexDirection", + "msFlexFlow", + "msFlexItemAlign", + "msFlexLinePack", + "msFlexNegative", + "msFlexOrder", + "msFlexPack", + "msFlexPositive", + "msFlexPreferredSize", + "msFlexWrap", + "msFlowFrom", + "msFlowInto", + "msFontFeatureSettings", + "msFullscreenElement", + "msFullscreenEnabled", + "msGetInputContext", + "msGetRegionContent", + "msGetUntransformedBounds", + "msGraphicsTrustStatus", + "msGridColumn", + "msGridColumnAlign", + "msGridColumnSpan", + "msGridColumns", + "msGridRow", + "msGridRowAlign", + "msGridRowSpan", + "msGridRows", + "msHidden", + "msHighContrastAdjust", + "msHyphenateLimitChars", + "msHyphenateLimitLines", + "msHyphenateLimitZone", + "msHyphens", + "msImageSmoothingEnabled", + "msImeAlign", + "msIndexedDB", + "msInterpolationMode", + "msIsStaticHTML", + "msKeySystem", + "msKeys", + "msLaunchUri", + "msLockOrientation", + "msManipulationViewsEnabled", + "msMatchMedia", + "msMatchesSelector", + "msMaxTouchPoints", + "msOrientation", + "msOverflowStyle", + "msPerspective", + "msPerspectiveOrigin", + "msPlayToDisabled", + "msPlayToPreferredSourceUri", + "msPlayToPrimary", + "msPointerEnabled", + "msRegionOverflow", + "msReleasePointerCapture", + "msRequestAnimationFrame", + "msRequestFullscreen", + "msSaveBlob", + "msSaveOrOpenBlob", + "msScrollChaining", + "msScrollLimit", + "msScrollLimitXMax", + "msScrollLimitXMin", + "msScrollLimitYMax", + "msScrollLimitYMin", + "msScrollRails", + "msScrollSnapPointsX", + "msScrollSnapPointsY", + "msScrollSnapType", + "msScrollSnapX", + "msScrollSnapY", + "msScrollTranslation", + "msSetImmediate", + "msSetMediaKeys", + "msSetPointerCapture", + "msTextCombineHorizontal", + "msTextSizeAdjust", + "msToBlob", + "msTouchAction", + "msTouchSelect", + "msTraceAsyncCallbackCompleted", + "msTraceAsyncCallbackStarting", + "msTraceAsyncOperationCompleted", + "msTraceAsyncOperationStarting", + "msTransform", + "msTransformOrigin", + "msTransformStyle", + "msTransition", + "msTransitionDelay", + "msTransitionDuration", + "msTransitionProperty", + "msTransitionTimingFunction", + "msUnlockOrientation", + "msUpdateAsyncCallbackRelation", + "msUserSelect", + "msVisibilityState", + "msWrapFlow", + "msWrapMargin", + "msWrapThrough", + "msWriteProfilerMark", + "msZoom", + "msZoomTo", + "mt", + "multiEntry", + "multiSelectionObj", + "multiline", + "multiple", + "multiply", + "multiplySelf", + "mutableFile", + "muted", + "n", + "name", + "nameProp", + "namedItem", + "namedRecordset", + "names", + "namespaceURI", + "namespaces", + "naturalHeight", + "naturalWidth", + "navigate", + "navigation", + "navigationMode", + "navigationStart", + "navigator", + "near", + "nearestViewportElement", + "negative", + "netscape", + "networkState", + "newScale", + "newTranslate", + "newURL", + "newValue", + "newValueSpecifiedUnits", + "newVersion", + "newhome", + "next", + "nextElementSibling", + "nextNode", + "nextPage", + "nextSibling", + "nickname", + "noHref", + "noResize", + "noShade", + "noValidate", + "noWrap", + "nodeName", + "nodeType", + "nodeValue", + "normalize", + "normalizedPathSegList", + "notationName", + "notations", + "note", + "noteGrainOn", + "noteOff", + "noteOn", + "now", + "numOctaves", + "number", + "numberOfChannels", + "numberOfInputs", + "numberOfItems", + "numberOfOutputs", + "numberValue", + "oMatchesSelector", + "object", + "object-fit", + "object-position", + "objectFit", + "objectPosition", + "objectStore", + "objectStoreNames", + "observe", + "of", + "offscreenBuffering", + "offset", + "offsetHeight", + "offsetLeft", + "offsetNode", + "offsetParent", + "offsetTop", + "offsetWidth", + "offsetX", + "offsetY", + "ok", + "oldURL", + "oldValue", + "oldVersion", + "olderShadowRoot", + "onLine", + "onabort", + "onactivate", + "onactive", + "onaddstream", + "onaddtrack", + "onafterprint", + "onafterscriptexecute", + "onafterupdate", + "onaudioend", + "onaudioprocess", + "onaudiostart", + "onautocomplete", + "onautocompleteerror", + "onbeforeactivate", + "onbeforecopy", + "onbeforecut", + "onbeforedeactivate", + "onbeforeeditfocus", + "onbeforepaste", + "onbeforeprint", + "onbeforescriptexecute", + "onbeforeunload", + "onbeforeupdate", + "onblocked", + "onblur", + "onbounce", + "onboundary", + "oncached", + "oncancel", + "oncandidatewindowhide", + "oncandidatewindowshow", + "oncandidatewindowupdate", + "oncanplay", + "oncanplaythrough", + "oncellchange", + "onchange", + "onchargingchange", + "onchargingtimechange", + "onchecking", + "onclick", + "onclose", + "oncompassneedscalibration", + "oncomplete", + "oncontextmenu", + "oncontrolselect", + "oncopy", + "oncuechange", + "oncut", + "ondataavailable", + "ondatachannel", + "ondatasetchanged", + "ondatasetcomplete", + "ondblclick", + "ondeactivate", + "ondevicelight", + "ondevicemotion", + "ondeviceorientation", + "ondeviceproximity", + "ondischargingtimechange", + "ondisplay", + "ondownloading", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onencrypted", + "onend", + "onended", + "onenter", + "onerror", + "onerrorupdate", + "onexit", + "onfilterchange", + "onfinish", + "onfocus", + "onfocusin", + "onfocusout", + "onfullscreenchange", + "onfullscreenerror", + "ongesturechange", + "ongestureend", + "ongesturestart", + "ongotpointercapture", + "onhashchange", + "onhelp", + "onicecandidate", + "oniceconnectionstatechange", + "oninactive", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onlanguagechange", + "onlayoutcomplete", + "onlevelchange", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadend", + "onloadstart", + "onlosecapture", + "onlostpointercapture", + "only", + "onmark", + "onmessage", + "onmousedown", + "onmouseenter", + "onmouseleave", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onmove", + "onmoveend", + "onmovestart", + "onmozfullscreenchange", + "onmozfullscreenerror", + "onmozorientationchange", + "onmozpointerlockchange", + "onmozpointerlockerror", + "onmscontentzoom", + "onmsfullscreenchange", + "onmsfullscreenerror", + "onmsgesturechange", + "onmsgesturedoubletap", + "onmsgestureend", + "onmsgesturehold", + "onmsgesturestart", + "onmsgesturetap", + "onmsgotpointercapture", + "onmsinertiastart", + "onmslostpointercapture", + "onmsmanipulationstatechanged", + "onmsneedkey", + "onmsorientationchange", + "onmspointercancel", + "onmspointerdown", + "onmspointerenter", + "onmspointerhover", + "onmspointerleave", + "onmspointermove", + "onmspointerout", + "onmspointerover", + "onmspointerup", + "onmssitemodejumplistitemremoved", + "onmsthumbnailclick", + "onnegotiationneeded", + "onnomatch", + "onnoupdate", + "onobsolete", + "onoffline", + "ononline", + "onopen", + "onorientationchange", + "onpagechange", + "onpagehide", + "onpageshow", + "onpaste", + "onpause", + "onplay", + "onplaying", + "onpluginstreamstart", + "onpointercancel", + "onpointerdown", + "onpointerenter", + "onpointerleave", + "onpointerlockchange", + "onpointerlockerror", + "onpointermove", + "onpointerout", + "onpointerover", + "onpointerup", + "onpopstate", + "onprogress", + "onpropertychange", + "onratechange", + "onreadystatechange", + "onremovestream", + "onremovetrack", + "onreset", + "onresize", + "onresizeend", + "onresizestart", + "onresourcetimingbufferfull", + "onresult", + "onresume", + "onrowenter", + "onrowexit", + "onrowsdelete", + "onrowsinserted", + "onscroll", + "onsearch", + "onseeked", + "onseeking", + "onselect", + "onselectionchange", + "onselectstart", + "onshow", + "onsignalingstatechange", + "onsoundend", + "onsoundstart", + "onspeechend", + "onspeechstart", + "onstalled", + "onstart", + "onstatechange", + "onstop", + "onstorage", + "onstoragecommit", + "onsubmit", + "onsuccess", + "onsuspend", + "ontextinput", + "ontimeout", + "ontimeupdate", + "ontoggle", + "ontouchcancel", + "ontouchend", + "ontouchmove", + "ontouchstart", + "ontransitionend", + "onunload", + "onupdateready", + "onupgradeneeded", + "onuserproximity", + "onversionchange", + "onvoiceschanged", + "onvolumechange", + "onwaiting", + "onwarning", + "onwebkitanimationend", + "onwebkitanimationiteration", + "onwebkitanimationstart", + "onwebkitcurrentplaybacktargetiswirelesschanged", + "onwebkitfullscreenchange", + "onwebkitfullscreenerror", + "onwebkitkeyadded", + "onwebkitkeyerror", + "onwebkitkeymessage", + "onwebkitneedkey", + "onwebkitorientationchange", + "onwebkitplaybacktargetavailabilitychanged", + "onwebkitpointerlockchange", + "onwebkitpointerlockerror", + "onwebkitresourcetimingbufferfull", + "onwebkittransitionend", + "onwheel", + "onzoom", + "opacity", + "open", + "openCursor", + "openDatabase", + "openKeyCursor", + "opener", + "opera", + "operationType", + "operator", + "opr", + "optimum", + "options", + "order", + "orderX", + "orderY", + "ordered", + "org", + "orient", + "orientAngle", + "orientType", + "orientation", + "origin", + "originalTarget", + "orphans", + "oscpu", + "outerHTML", + "outerHeight", + "outerText", + "outerWidth", + "outline", + "outline-color", + "outline-offset", + "outline-style", + "outline-width", + "outlineColor", + "outlineOffset", + "outlineStyle", + "outlineWidth", + "outputBuffer", + "overflow", + "overflow-x", + "overflow-y", + "overflowX", + "overflowY", + "overrideMimeType", + "oversample", + "ownerDocument", + "ownerElement", + "ownerNode", + "ownerRule", + "ownerSVGElement", + "owningElement", + "p1", + "p2", + "p3", + "p4", + "pad", + "padding", + "padding-bottom", + "padding-left", + "padding-right", + "padding-top", + "paddingBottom", + "paddingLeft", + "paddingRight", + "paddingTop", + "page", + "page-break-after", + "page-break-before", + "page-break-inside", + "pageBreakAfter", + "pageBreakBefore", + "pageBreakInside", + "pageCount", + "pageX", + "pageXOffset", + "pageY", + "pageYOffset", + "pages", + "paint-order", + "paintOrder", + "paintRequests", + "paintType", + "palette", + "panningModel", + "parent", + "parentElement", + "parentNode", + "parentRule", + "parentStyleSheet", + "parentTextEdit", + "parentWindow", + "parse", + "parseFloat", + "parseFromString", + "parseInt", + "participants", + "password", + "pasteHTML", + "path", + "pathLength", + "pathSegList", + "pathSegType", + "pathSegTypeAsLetter", + "pathname", + "pattern", + "patternContentUnits", + "patternMismatch", + "patternTransform", + "patternUnits", + "pause", + "pauseAnimations", + "pauseOnExit", + "paused", + "pending", + "performance", + "permission", + "persisted", + "personalbar", + "perspective", + "perspective-origin", + "perspectiveOrigin", + "phoneticFamilyName", + "phoneticGivenName", + "photo", + "ping", + "pitch", + "pixelBottom", + "pixelDepth", + "pixelHeight", + "pixelLeft", + "pixelRight", + "pixelStorei", + "pixelTop", + "pixelUnitToMillimeterX", + "pixelUnitToMillimeterY", + "pixelWidth", + "placeholder", + "platform", + "play", + "playbackRate", + "playbackState", + "playbackTime", + "played", + "plugins", + "pluginspage", + "pname", + "pointer-events", + "pointerBeforeReferenceNode", + "pointerEnabled", + "pointerEvents", + "pointerId", + "pointerLockElement", + "pointerType", + "points", + "pointsAtX", + "pointsAtY", + "pointsAtZ", + "polygonOffset", + "pop", + "popupWindowFeatures", + "popupWindowName", + "popupWindowURI", + "port", + "port1", + "port2", + "ports", + "posBottom", + "posHeight", + "posLeft", + "posRight", + "posTop", + "posWidth", + "position", + "positionAlign", + "postError", + "postMessage", + "poster", + "pow", + "powerOff", + "preMultiplySelf", + "precision", + "preferredStyleSheetSet", + "preferredStylesheetSet", + "prefix", + "preload", + "preserveAlpha", + "preserveAspectRatio", + "preserveAspectRatioString", + "pressed", + "pressure", + "prevValue", + "preventDefault", + "preventExtensions", + "previousElementSibling", + "previousNode", + "previousPage", + "previousScale", + "previousSibling", + "previousTranslate", + "primaryKey", + "primitiveType", + "primitiveUnits", + "principals", + "print", + "privateKey", + "probablySupportsContext", + "process", + "processIceMessage", + "product", + "productSub", + "profile", + "profileEnd", + "profiles", + "prompt", + "properties", + "propertyIsEnumerable", + "propertyName", + "protocol", + "protocolLong", + "prototype", + "pseudoClass", + "pseudoElement", + "publicId", + "publicKey", + "published", + "push", + "pushNotification", + "pushState", + "put", + "putImageData", + "quadraticCurveTo", + "qualifier", + "queryCommandEnabled", + "queryCommandIndeterm", + "queryCommandState", + "queryCommandSupported", + "queryCommandText", + "queryCommandValue", + "querySelector", + "querySelectorAll", + "quote", + "quotes", + "r", + "r1", + "r2", + "race", + "radiogroup", + "radiusX", + "radiusY", + "random", + "range", + "rangeCount", + "rangeMax", + "rangeMin", + "rangeOffset", + "rangeOverflow", + "rangeParent", + "rangeUnderflow", + "rate", + "ratio", + "raw", + "read", + "readAsArrayBuffer", + "readAsBinaryString", + "readAsBlob", + "readAsDataURL", + "readAsText", + "readOnly", + "readPixels", + "readReportRequested", + "readyState", + "reason", + "reboot", + "receiver", + "receivers", + "recordNumber", + "recordset", + "rect", + "red", + "redirectCount", + "redirectEnd", + "redirectStart", + "reduce", + "reduceRight", + "reduction", + "refDistance", + "refX", + "refY", + "referenceNode", + "referrer", + "refresh", + "region", + "regionAnchorX", + "regionAnchorY", + "regionId", + "regions", + "register", + "registerContentHandler", + "registerElement", + "registerProtocolHandler", + "reject", + "rel", + "relList", + "relatedNode", + "relatedTarget", + "release", + "releaseCapture", + "releaseEvents", + "releasePointerCapture", + "releaseShaderCompiler", + "reliable", + "reload", + "remainingSpace", + "remoteDescription", + "remove", + "removeAllRanges", + "removeAttribute", + "removeAttributeNS", + "removeAttributeNode", + "removeBehavior", + "removeChild", + "removeCue", + "removeEventListener", + "removeFilter", + "removeImport", + "removeItem", + "removeListener", + "removeNamedItem", + "removeNamedItemNS", + "removeNode", + "removeParameter", + "removeProperty", + "removeRange", + "removeRegion", + "removeRule", + "removeSiteSpecificTrackingException", + "removeSourceBuffer", + "removeStream", + "removeTrack", + "removeVariable", + "removeWakeLockListener", + "removeWebWideTrackingException", + "removedNodes", + "renderbufferStorage", + "renderedBuffer", + "renderingMode", + "repeat", + "replace", + "replaceAdjacentText", + "replaceChild", + "replaceData", + "replaceId", + "replaceItem", + "replaceNode", + "replaceState", + "replaceTrack", + "replaceWholeText", + "reportValidity", + "requestAnimationFrame", + "requestAutocomplete", + "requestData", + "requestFullscreen", + "requestMediaKeySystemAccess", + "requestPermission", + "requestPointerLock", + "requestStart", + "requestingWindow", + "required", + "requiredExtensions", + "requiredFeatures", + "reset", + "resetTransform", + "resize", + "resizeBy", + "resizeTo", + "resolve", + "response", + "responseBody", + "responseEnd", + "responseStart", + "responseText", + "responseType", + "responseURL", + "responseXML", + "restore", + "result", + "resultType", + "resume", + "returnValue", + "rev", + "reverse", + "reversed", + "revocable", + "revokeObjectURL", + "rgbColor", + "right", + "rightContext", + "rightMargin", + "rolloffFactor", + "root", + "rootElement", + "rotate", + "rotateAxisAngle", + "rotateAxisAngleSelf", + "rotateFromVector", + "rotateFromVectorSelf", + "rotateSelf", + "rotation", + "rotationRate", + "round", + "rowIndex", + "rowSpan", + "rows", + "rubyAlign", + "rubyOverhang", + "rubyPosition", + "rules", + "runtime", + "runtimeStyle", + "rx", + "ry", + "safari", + "sampleCoverage", + "sampleRate", + "sandbox", + "save", + "scale", + "scale3d", + "scale3dSelf", + "scaleNonUniform", + "scaleNonUniformSelf", + "scaleSelf", + "scheme", + "scissor", + "scope", + "scopeName", + "scoped", + "screen", + "screenBrightness", + "screenEnabled", + "screenLeft", + "screenPixelToMillimeterX", + "screenPixelToMillimeterY", + "screenTop", + "screenX", + "screenY", + "scripts", + "scroll", + "scroll-behavior", + "scrollAmount", + "scrollBehavior", + "scrollBy", + "scrollByLines", + "scrollByPages", + "scrollDelay", + "scrollHeight", + "scrollIntoView", + "scrollIntoViewIfNeeded", + "scrollLeft", + "scrollLeftMax", + "scrollMaxX", + "scrollMaxY", + "scrollTo", + "scrollTop", + "scrollTopMax", + "scrollWidth", + "scrollX", + "scrollY", + "scrollbar3dLightColor", + "scrollbarArrowColor", + "scrollbarBaseColor", + "scrollbarDarkShadowColor", + "scrollbarFaceColor", + "scrollbarHighlightColor", + "scrollbarShadowColor", + "scrollbarTrackColor", + "scrollbars", + "scrolling", + "sdp", + "sdpMLineIndex", + "sdpMid", + "seal", + "search", + "searchBox", + "searchBoxJavaBridge_", + "searchParams", + "sectionRowIndex", + "secureConnectionStart", + "security", + "seed", + "seekable", + "seeking", + "select", + "selectAllChildren", + "selectNode", + "selectNodeContents", + "selectNodes", + "selectSingleNode", + "selectSubString", + "selected", + "selectedIndex", + "selectedOptions", + "selectedStyleSheetSet", + "selectedStylesheetSet", + "selection", + "selectionDirection", + "selectionEnd", + "selectionStart", + "selector", + "selectorText", + "self", + "send", + "sendAsBinary", + "sendBeacon", + "sender", + "sentTimestamp", + "separator", + "serializeToString", + "serviceWorker", + "sessionId", + "sessionStorage", + "set", + "setActive", + "setAlpha", + "setAttribute", + "setAttributeNS", + "setAttributeNode", + "setAttributeNodeNS", + "setBaseAndExtent", + "setBingCurrentSearchDefault", + "setCapture", + "setColor", + "setCompositeOperation", + "setCurrentTime", + "setCustomValidity", + "setData", + "setDate", + "setDragImage", + "setEnd", + "setEndAfter", + "setEndBefore", + "setEndPoint", + "setFillColor", + "setFilterRes", + "setFloat32", + "setFloat64", + "setFloatValue", + "setFullYear", + "setHours", + "setImmediate", + "setInt16", + "setInt32", + "setInt8", + "setInterval", + "setItem", + "setLineCap", + "setLineDash", + "setLineJoin", + "setLineWidth", + "setLocalDescription", + "setMatrix", + "setMatrixValue", + "setMediaKeys", + "setMilliseconds", + "setMinutes", + "setMiterLimit", + "setMonth", + "setNamedItem", + "setNamedItemNS", + "setNonUserCodeExceptions", + "setOrientToAngle", + "setOrientToAuto", + "setOrientation", + "setOverrideHistoryNavigationMode", + "setPaint", + "setParameter", + "setPeriodicWave", + "setPointerCapture", + "setPosition", + "setPreference", + "setProperty", + "setPrototypeOf", + "setRGBColor", + "setRGBColorICCColor", + "setRadius", + "setRangeText", + "setRemoteDescription", + "setRequestHeader", + "setResizable", + "setResourceTimingBufferSize", + "setRotate", + "setScale", + "setSeconds", + "setSelectionRange", + "setServerCertificate", + "setShadow", + "setSkewX", + "setSkewY", + "setStart", + "setStartAfter", + "setStartBefore", + "setStdDeviation", + "setStringValue", + "setStrokeColor", + "setSuggestResult", + "setTargetAtTime", + "setTargetValueAtTime", + "setTime", + "setTimeout", + "setTransform", + "setTranslate", + "setUTCDate", + "setUTCFullYear", + "setUTCHours", + "setUTCMilliseconds", + "setUTCMinutes", + "setUTCMonth", + "setUTCSeconds", + "setUint16", + "setUint32", + "setUint8", + "setUri", + "setValueAtTime", + "setValueCurveAtTime", + "setVariable", + "setVelocity", + "setVersion", + "setYear", + "settingName", + "settingValue", + "sex", + "shaderSource", + "shadowBlur", + "shadowColor", + "shadowOffsetX", + "shadowOffsetY", + "shadowRoot", + "shape", + "shape-rendering", + "shapeRendering", + "sheet", + "shift", + "shiftKey", + "shiftLeft", + "show", + "showHelp", + "showModal", + "showModalDialog", + "showModelessDialog", + "showNotification", + "sidebar", + "sign", + "signalingState", + "sin", + "singleNodeValue", + "sinh", + "size", + "sizeToContent", + "sizes", + "skewX", + "skewXSelf", + "skewY", + "skewYSelf", + "slice", + "slope", + "small", + "smil", + "smoothingTimeConstant", + "snapToLines", + "snapshotItem", + "snapshotLength", + "some", + "sort", + "source", + "sourceBuffer", + "sourceBuffers", + "sourceIndex", + "spacing", + "span", + "speakAs", + "speaking", + "specified", + "specularConstant", + "specularExponent", + "speechSynthesis", + "speed", + "speedOfSound", + "spellcheck", + "splice", + "split", + "splitText", + "spreadMethod", + "sqrt", + "src", + "srcElement", + "srcFilter", + "srcUrn", + "srcdoc", + "srclang", + "srcset", + "stack", + "stackTraceLimit", + "stacktrace", + "standalone", + "standby", + "start", + "startContainer", + "startIce", + "startOffset", + "startRendering", + "startTime", + "startsWith", + "state", + "status", + "statusMessage", + "statusText", + "statusbar", + "stdDeviationX", + "stdDeviationY", + "stencilFunc", + "stencilFuncSeparate", + "stencilMask", + "stencilMaskSeparate", + "stencilOp", + "stencilOpSeparate", + "step", + "stepDown", + "stepMismatch", + "stepUp", + "sticky", + "stitchTiles", + "stop", + "stop-color", + "stop-opacity", + "stopColor", + "stopImmediatePropagation", + "stopOpacity", + "stopPropagation", + "storageArea", + "storageName", + "storageStatus", + "storeSiteSpecificTrackingException", + "storeWebWideTrackingException", + "stpVersion", + "stream", + "strike", + "stringValue", + "stringify", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "strokeDasharray", + "strokeDashoffset", + "strokeLinecap", + "strokeLinejoin", + "strokeMiterlimit", + "strokeOpacity", + "strokeRect", + "strokeStyle", + "strokeText", + "strokeWidth", + "style", + "styleFloat", + "styleMedia", + "styleSheet", + "styleSheetSets", + "styleSheets", + "sub", + "subarray", + "subject", + "submit", + "subscribe", + "substr", + "substring", + "substringData", + "subtle", + "suffix", + "suffixes", + "summary", + "sup", + "supports", + "surfaceScale", + "surroundContents", + "suspend", + "suspendRedraw", + "swapCache", + "swapNode", + "sweepFlag", + "symbols", + "system", + "systemCode", + "systemId", + "systemLanguage", + "systemXDPI", + "systemYDPI", + "tBodies", + "tFoot", + "tHead", + "tabIndex", + "table", + "table-layout", + "tableLayout", + "tableValues", + "tag", + "tagName", + "tagUrn", + "tags", + "taintEnabled", + "takeRecords", + "tan", + "tanh", + "target", + "targetElement", + "targetTouches", + "targetX", + "targetY", + "tel", + "terminate", + "test", + "texImage2D", + "texParameterf", + "texParameteri", + "texSubImage2D", + "text", + "text-align", + "text-anchor", + "text-decoration", + "text-decoration-color", + "text-decoration-line", + "text-decoration-style", + "text-indent", + "text-overflow", + "text-rendering", + "text-shadow", + "text-transform", + "textAlign", + "textAlignLast", + "textAnchor", + "textAutospace", + "textBaseline", + "textContent", + "textDecoration", + "textDecorationBlink", + "textDecorationColor", + "textDecorationLine", + "textDecorationLineThrough", + "textDecorationNone", + "textDecorationOverline", + "textDecorationStyle", + "textDecorationUnderline", + "textIndent", + "textJustify", + "textJustifyTrim", + "textKashida", + "textKashidaSpace", + "textLength", + "textOverflow", + "textRendering", + "textShadow", + "textTracks", + "textTransform", + "textUnderlinePosition", + "then", + "threadId", + "threshold", + "tiltX", + "tiltY", + "time", + "timeEnd", + "timeStamp", + "timeout", + "timestamp", + "timestampOffset", + "timing", + "title", + "toArray", + "toBlob", + "toDataURL", + "toDateString", + "toElement", + "toExponential", + "toFixed", + "toFloat32Array", + "toFloat64Array", + "toGMTString", + "toISOString", + "toJSON", + "toLocaleDateString", + "toLocaleFormat", + "toLocaleLowerCase", + "toLocaleString", + "toLocaleTimeString", + "toLocaleUpperCase", + "toLowerCase", + "toMethod", + "toPrecision", + "toSdp", + "toSource", + "toStaticHTML", + "toString", + "toStringTag", + "toTimeString", + "toUTCString", + "toUpperCase", + "toggle", + "toggleLongPressEnabled", + "tooLong", + "toolbar", + "top", + "topMargin", + "total", + "totalFrameDelay", + "totalVideoFrames", + "touchAction", + "touches", + "trace", + "track", + "transaction", + "transactions", + "transform", + "transform-origin", + "transform-style", + "transformOrigin", + "transformPoint", + "transformString", + "transformStyle", + "transformToDocument", + "transformToFragment", + "transition", + "transition-delay", + "transition-duration", + "transition-property", + "transition-timing-function", + "transitionDelay", + "transitionDuration", + "transitionProperty", + "transitionTimingFunction", + "translate", + "translateSelf", + "translationX", + "translationY", + "trim", + "trimLeft", + "trimRight", + "trueSpeed", + "trunc", + "truncate", + "type", + "typeDetail", + "typeMismatch", + "typeMustMatch", + "types", + "ubound", + "undefined", + "unescape", + "uneval", + "unicode-bidi", + "unicodeBidi", + "uniform1f", + "uniform1fv", + "uniform1i", + "uniform1iv", + "uniform2f", + "uniform2fv", + "uniform2i", + "uniform2iv", + "uniform3f", + "uniform3fv", + "uniform3i", + "uniform3iv", + "uniform4f", + "uniform4fv", + "uniform4i", + "uniform4iv", + "uniformMatrix2fv", + "uniformMatrix3fv", + "uniformMatrix4fv", + "unique", + "uniqueID", + "uniqueNumber", + "unitType", + "units", + "unloadEventEnd", + "unloadEventStart", + "unlock", + "unmount", + "unobserve", + "unpause", + "unpauseAnimations", + "unreadCount", + "unregister", + "unregisterContentHandler", + "unregisterProtocolHandler", + "unscopables", + "unselectable", + "unshift", + "unsubscribe", + "unsuspendRedraw", + "unsuspendRedrawAll", + "unwatch", + "unwrapKey", + "update", + "updateCommands", + "updateIce", + "updateInterval", + "updateSettings", + "updated", + "updating", + "upload", + "upper", + "upperBound", + "upperOpen", + "uri", + "url", + "urn", + "urns", + "usages", + "useCurrentView", + "useMap", + "useProgram", + "usedSpace", + "userAgent", + "userLanguage", + "username", + "v8BreakIterator", + "vAlign", + "vLink", + "valid", + "validateProgram", + "validationMessage", + "validity", + "value", + "valueAsDate", + "valueAsNumber", + "valueAsString", + "valueInSpecifiedUnits", + "valueMissing", + "valueOf", + "valueText", + "valueType", + "values", + "vector-effect", + "vectorEffect", + "velocityAngular", + "velocityExpansion", + "velocityX", + "velocityY", + "vendor", + "vendorSub", + "verify", + "version", + "vertexAttrib1f", + "vertexAttrib1fv", + "vertexAttrib2f", + "vertexAttrib2fv", + "vertexAttrib3f", + "vertexAttrib3fv", + "vertexAttrib4f", + "vertexAttrib4fv", + "vertexAttribDivisorANGLE", + "vertexAttribPointer", + "vertical", + "vertical-align", + "verticalAlign", + "verticalOverflow", + "vibrate", + "videoHeight", + "videoTracks", + "videoWidth", + "view", + "viewBox", + "viewBoxString", + "viewTarget", + "viewTargetString", + "viewport", + "viewportAnchorX", + "viewportAnchorY", + "viewportElement", + "visibility", + "visibilityState", + "visible", + "vlinkColor", + "voice", + "volume", + "vrml", + "vspace", + "w", + "wand", + "warn", + "wasClean", + "watch", + "watchPosition", + "webdriver", + "webkitAddKey", + "webkitAnimation", + "webkitAnimationDelay", + "webkitAnimationDirection", + "webkitAnimationDuration", + "webkitAnimationFillMode", + "webkitAnimationIterationCount", + "webkitAnimationName", + "webkitAnimationPlayState", + "webkitAnimationTimingFunction", + "webkitAppearance", + "webkitAudioContext", + "webkitAudioDecodedByteCount", + "webkitAudioPannerNode", + "webkitBackfaceVisibility", + "webkitBackground", + "webkitBackgroundAttachment", + "webkitBackgroundClip", + "webkitBackgroundColor", + "webkitBackgroundImage", + "webkitBackgroundOrigin", + "webkitBackgroundPosition", + "webkitBackgroundPositionX", + "webkitBackgroundPositionY", + "webkitBackgroundRepeat", + "webkitBackgroundSize", + "webkitBackingStorePixelRatio", + "webkitBorderImage", + "webkitBorderImageOutset", + "webkitBorderImageRepeat", + "webkitBorderImageSlice", + "webkitBorderImageSource", + "webkitBorderImageWidth", + "webkitBoxAlign", + "webkitBoxDirection", + "webkitBoxFlex", + "webkitBoxOrdinalGroup", + "webkitBoxOrient", + "webkitBoxPack", + "webkitBoxSizing", + "webkitCancelAnimationFrame", + "webkitCancelFullScreen", + "webkitCancelKeyRequest", + "webkitCancelRequestAnimationFrame", + "webkitClearResourceTimings", + "webkitClosedCaptionsVisible", + "webkitConvertPointFromNodeToPage", + "webkitConvertPointFromPageToNode", + "webkitCreateShadowRoot", + "webkitCurrentFullScreenElement", + "webkitCurrentPlaybackTargetIsWireless", + "webkitDirectionInvertedFromDevice", + "webkitDisplayingFullscreen", + "webkitEnterFullScreen", + "webkitEnterFullscreen", + "webkitExitFullScreen", + "webkitExitFullscreen", + "webkitExitPointerLock", + "webkitFullScreenKeyboardInputAllowed", + "webkitFullscreenElement", + "webkitFullscreenEnabled", + "webkitGenerateKeyRequest", + "webkitGetAsEntry", + "webkitGetDatabaseNames", + "webkitGetEntries", + "webkitGetEntriesByName", + "webkitGetEntriesByType", + "webkitGetFlowByName", + "webkitGetGamepads", + "webkitGetImageDataHD", + "webkitGetNamedFlows", + "webkitGetRegionFlowRanges", + "webkitGetUserMedia", + "webkitHasClosedCaptions", + "webkitHidden", + "webkitIDBCursor", + "webkitIDBDatabase", + "webkitIDBDatabaseError", + "webkitIDBDatabaseException", + "webkitIDBFactory", + "webkitIDBIndex", + "webkitIDBKeyRange", + "webkitIDBObjectStore", + "webkitIDBRequest", + "webkitIDBTransaction", + "webkitImageSmoothingEnabled", + "webkitIndexedDB", + "webkitInitMessageEvent", + "webkitIsFullScreen", + "webkitKeys", + "webkitLineDashOffset", + "webkitLockOrientation", + "webkitMatchesSelector", + "webkitMediaStream", + "webkitNotifications", + "webkitOfflineAudioContext", + "webkitOrientation", + "webkitPeerConnection00", + "webkitPersistentStorage", + "webkitPointerLockElement", + "webkitPostMessage", + "webkitPreservesPitch", + "webkitPutImageDataHD", + "webkitRTCPeerConnection", + "webkitRegionOverset", + "webkitRequestAnimationFrame", + "webkitRequestFileSystem", + "webkitRequestFullScreen", + "webkitRequestFullscreen", + "webkitRequestPointerLock", + "webkitResolveLocalFileSystemURL", + "webkitSetMediaKeys", + "webkitSetResourceTimingBufferSize", + "webkitShadowRoot", + "webkitShowPlaybackTargetPicker", + "webkitSlice", + "webkitSpeechGrammar", + "webkitSpeechGrammarList", + "webkitSpeechRecognition", + "webkitSpeechRecognitionError", + "webkitSpeechRecognitionEvent", + "webkitStorageInfo", + "webkitSupportsFullscreen", + "webkitTemporaryStorage", + "webkitTextSizeAdjust", + "webkitTransform", + "webkitTransformOrigin", + "webkitTransition", + "webkitTransitionDelay", + "webkitTransitionDuration", + "webkitTransitionProperty", + "webkitTransitionTimingFunction", + "webkitURL", + "webkitUnlockOrientation", + "webkitUserSelect", + "webkitVideoDecodedByteCount", + "webkitVisibilityState", + "webkitWirelessVideoPlaybackDisabled", + "webkitdropzone", + "webstore", + "weight", + "whatToShow", + "wheelDelta", + "wheelDeltaX", + "wheelDeltaY", + "which", + "white-space", + "whiteSpace", + "wholeText", + "widows", + "width", + "will-change", + "willChange", + "willValidate", + "window", + "withCredentials", + "word-break", + "word-spacing", + "word-wrap", + "wordBreak", + "wordSpacing", + "wordWrap", + "wrap", + "wrapKey", + "write", + "writeln", + "writingMode", + "x", + "x1", + "x2", + "xChannelSelector", + "xmlEncoding", + "xmlStandalone", + "xmlVersion", + "xmlbase", + "xmllang", + "xmlspace", + "y", + "y1", + "y2", + "yChannelSelector", + "yandex", + "z", + "z-index", + "zIndex", + "zoom", + "zoomAndPan", + "zoomRectScreen" + ] +} diff --git a/node_modules/uglify-js/tools/exports.js b/node_modules/uglify-js/tools/exports.js new file mode 100644 index 0000000000000..09acc13ec2da6 --- /dev/null +++ b/node_modules/uglify-js/tools/exports.js @@ -0,0 +1,19 @@ +exports["Compressor"] = Compressor; +exports["DefaultsError"] = DefaultsError; +exports["Dictionary"] = Dictionary; +exports["JS_Parse_Error"] = JS_Parse_Error; +exports["MAP"] = MAP; +exports["OutputStream"] = OutputStream; +exports["SourceMap"] = SourceMap; +exports["TreeTransformer"] = TreeTransformer; +exports["TreeWalker"] = TreeWalker; +exports["base54"] = base54; +exports["defaults"] = defaults; +exports["mangle_properties"] = mangle_properties; +exports["merge"] = merge; +exports["parse"] = parse; +exports["push_uniq"] = push_uniq; +exports["string_template"] = string_template; +exports["tokenizer"] = tokenizer; +exports["is_identifier"] = is_identifier; +exports["SymbolDef"] = SymbolDef; diff --git a/node_modules/uglify-js/tools/node.js b/node_modules/uglify-js/tools/node.js new file mode 100644 index 0000000000000..147751aeba40c --- /dev/null +++ b/node_modules/uglify-js/tools/node.js @@ -0,0 +1,320 @@ +// workaround for tty output truncation upon process.exit() +[process.stdout, process.stderr].forEach(function(stream){ + if (stream._handle && stream._handle.setBlocking) + stream._handle.setBlocking(true); +}); + +var path = require("path"); +var fs = require("fs"); + +var UglifyJS = exports; +var FILES = UglifyJS.FILES = [ + "../lib/utils.js", + "../lib/ast.js", + "../lib/parse.js", + "../lib/transform.js", + "../lib/scope.js", + "../lib/output.js", + "../lib/compress.js", + "../lib/sourcemap.js", + "../lib/mozilla-ast.js", + "../lib/propmangle.js", + "./exports.js", +].map(function(file){ + return require.resolve(file); +}); + +new Function("MOZ_SourceMap", "exports", FILES.map(function(file){ + return fs.readFileSync(file, "utf8"); +}).join("\n\n"))( + require("source-map"), + UglifyJS +); + +UglifyJS.AST_Node.warn_function = function(txt) { + console.error("WARN: %s", txt); +}; + +function read_source_map(code) { + var match = /\n\/\/# sourceMappingURL=data:application\/json(;.*?)?;base64,(.*)/.exec(code); + if (!match) { + UglifyJS.AST_Node.warn("inline source map not found"); + return null; + } + return JSON.parse(new Buffer(match[2], "base64")); +} + +UglifyJS.minify = function(files, options) { + options = UglifyJS.defaults(options, { + compress : {}, + fromString : false, + inSourceMap : null, + mangle : {}, + mangleProperties : false, + nameCache : null, + outFileName : null, + output : null, + outSourceMap : null, + parse : {}, + sourceMapInline : false, + sourceMapUrl : null, + sourceRoot : null, + spidermonkey : false, + warnings : false, + }); + UglifyJS.base54.reset(); + + var inMap = options.inSourceMap; + if (typeof inMap == "string" && inMap != "inline") { + inMap = JSON.parse(fs.readFileSync(inMap, "utf8")); + } + + // 1. parse + var toplevel = null, + sourcesContent = {}; + + if (options.spidermonkey) { + if (inMap == "inline") { + throw new Error("inline source map only works with built-in parser"); + } + toplevel = UglifyJS.AST_Node.from_mozilla_ast(files); + } else { + function addFile(file, fileUrl) { + var code = options.fromString + ? file + : fs.readFileSync(file, "utf8"); + if (inMap == "inline") { + inMap = read_source_map(code); + } + sourcesContent[fileUrl] = code; + toplevel = UglifyJS.parse(code, { + filename: fileUrl, + toplevel: toplevel, + bare_returns: options.parse ? options.parse.bare_returns : undefined + }); + } + if (!options.fromString) { + files = UglifyJS.simple_glob(files); + if (inMap == "inline" && files.length > 1) { + throw new Error("inline source map only works with singular input"); + } + } + [].concat(files).forEach(function (files, i) { + if (typeof files === 'string') { + addFile(files, options.fromString ? i : files); + } else { + for (var fileUrl in files) { + addFile(files[fileUrl], fileUrl); + } + } + }); + } + if (options.wrap) { + toplevel = toplevel.wrap_commonjs(options.wrap, options.exportAll); + } + + // 2. compress + if (options.compress) { + var compress = { warnings: options.warnings }; + UglifyJS.merge(compress, options.compress); + toplevel.figure_out_scope(options.mangle); + var sq = UglifyJS.Compressor(compress); + toplevel = sq.compress(toplevel); + } + + // 3. mangle properties + if (options.mangleProperties || options.nameCache) { + options.mangleProperties.cache = UglifyJS.readNameCache(options.nameCache, "props"); + toplevel = UglifyJS.mangle_properties(toplevel, options.mangleProperties); + UglifyJS.writeNameCache(options.nameCache, "props", options.mangleProperties.cache); + } + + // 4. mangle + if (options.mangle) { + toplevel.figure_out_scope(options.mangle); + toplevel.compute_char_frequency(options.mangle); + toplevel.mangle_names(options.mangle); + } + + // 5. output + var output = { max_line_len: 32000 }; + if (options.outSourceMap || options.sourceMapInline) { + output.source_map = UglifyJS.SourceMap({ + // prefer outFileName, otherwise use outSourceMap without .map suffix + file: options.outFileName || (typeof options.outSourceMap === 'string' ? options.outSourceMap.replace(/\.map$/i, '') : null), + orig: inMap, + root: options.sourceRoot + }); + if (options.sourceMapIncludeSources) { + for (var file in sourcesContent) { + if (sourcesContent.hasOwnProperty(file)) { + output.source_map.get().setSourceContent(file, sourcesContent[file]); + } + } + } + + } + if (options.output) { + UglifyJS.merge(output, options.output); + } + var stream = UglifyJS.OutputStream(output); + toplevel.print(stream); + + + var source_map = output.source_map; + if (source_map) { + source_map = source_map + ""; + } + + var mappingUrlPrefix = "\n//# sourceMappingURL="; + if (options.sourceMapInline) { + stream += mappingUrlPrefix + "data:application/json;charset=utf-8;base64," + new Buffer(source_map).toString("base64"); + } else if (options.outSourceMap && typeof options.outSourceMap === "string" && options.sourceMapUrl !== false) { + stream += mappingUrlPrefix + (typeof options.sourceMapUrl === "string" ? options.sourceMapUrl : options.outSourceMap); + } + + return { + code : stream + "", + map : source_map + }; +}; + +// UglifyJS.describe_ast = function() { +// function doitem(ctor) { +// var sub = {}; +// ctor.SUBCLASSES.forEach(function(ctor){ +// sub[ctor.TYPE] = doitem(ctor); +// }); +// var ret = {}; +// if (ctor.SELF_PROPS.length > 0) ret.props = ctor.SELF_PROPS; +// if (ctor.SUBCLASSES.length > 0) ret.sub = sub; +// return ret; +// } +// return doitem(UglifyJS.AST_Node).sub; +// } + +UglifyJS.describe_ast = function() { + var out = UglifyJS.OutputStream({ beautify: true }); + function doitem(ctor) { + out.print("AST_" + ctor.TYPE); + var props = ctor.SELF_PROPS.filter(function(prop){ + return !/^\$/.test(prop); + }); + if (props.length > 0) { + out.space(); + out.with_parens(function(){ + props.forEach(function(prop, i){ + if (i) out.space(); + out.print(prop); + }); + }); + } + if (ctor.documentation) { + out.space(); + out.print_string(ctor.documentation); + } + if (ctor.SUBCLASSES.length > 0) { + out.space(); + out.with_block(function(){ + ctor.SUBCLASSES.forEach(function(ctor, i){ + out.indent(); + doitem(ctor); + out.newline(); + }); + }); + } + }; + doitem(UglifyJS.AST_Node); + return out + ""; +}; + +function readReservedFile(filename, reserved) { + if (!reserved) { + reserved = { vars: [], props: [] }; + } + var data = fs.readFileSync(filename, "utf8"); + data = JSON.parse(data); + if (data.vars) { + data.vars.forEach(function(name){ + UglifyJS.push_uniq(reserved.vars, name); + }); + } + if (data.props) { + data.props.forEach(function(name){ + UglifyJS.push_uniq(reserved.props, name); + }); + } + return reserved; +} + +UglifyJS.readReservedFile = readReservedFile; + +UglifyJS.readDefaultReservedFile = function(reserved) { + return readReservedFile(require.resolve("./domprops.json"), reserved); +}; + +UglifyJS.readNameCache = function(filename, key) { + var cache = null; + if (filename) { + try { + var cache = fs.readFileSync(filename, "utf8"); + cache = JSON.parse(cache)[key]; + if (!cache) throw "init"; + cache.props = UglifyJS.Dictionary.fromObject(cache.props); + } catch(ex) { + cache = { + cname: -1, + props: new UglifyJS.Dictionary() + }; + } + } + return cache; +}; + +UglifyJS.writeNameCache = function(filename, key, cache) { + if (filename) { + var data; + try { + data = fs.readFileSync(filename, "utf8"); + data = JSON.parse(data); + } catch(ex) { + data = {}; + } + data[key] = { + cname: cache.cname, + props: cache.props.toObject() + }; + fs.writeFileSync(filename, JSON.stringify(data, null, 2), "utf8"); + } +}; + +// A file glob function that only supports "*" and "?" wildcards in the basename. +// Example: "foo/bar/*baz??.*.js" +// Argument `glob` may be a string or an array of strings. +// Returns an array of strings. Garbage in, garbage out. +UglifyJS.simple_glob = function simple_glob(glob) { + if (Array.isArray(glob)) { + return [].concat.apply([], glob.map(simple_glob)); + } + if (glob.match(/\*|\?/)) { + var dir = path.dirname(glob); + try { + var entries = fs.readdirSync(dir); + } catch (ex) {} + if (entries) { + var pattern = "^" + path.basename(glob) + .replace(/[.+^$[\]\\(){}]/g, "\\$&") + .replace(/\*/g, "[^/\\\\]*") + .replace(/\?/g, "[^/\\\\]") + "$"; + var mod = process.platform === "win32" ? "i" : ""; + var rx = new RegExp(pattern, mod); + var results = entries.filter(function(name) { + return rx.test(name); + }).map(function(name) { + return path.join(dir, name); + }); + if (results.length) return results; + } + } + return [ glob ]; +}; diff --git a/node_modules/uglify-js/tools/props.html b/node_modules/uglify-js/tools/props.html new file mode 100644 index 0000000000000..f7c777aac2fc5 --- /dev/null +++ b/node_modules/uglify-js/tools/props.html @@ -0,0 +1,61 @@ + + + + + + + diff --git a/node_modules/uglify-to-browserify/.npmignore b/node_modules/uglify-to-browserify/.npmignore new file mode 100644 index 0000000000000..66d015baf9d1d --- /dev/null +++ b/node_modules/uglify-to-browserify/.npmignore @@ -0,0 +1,14 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz +pids +logs +results +npm-debug.log +node_modules +/test/output.js diff --git a/node_modules/uglify-to-browserify/.travis.yml b/node_modules/uglify-to-browserify/.travis.yml new file mode 100644 index 0000000000000..9a61f6bd7c5c5 --- /dev/null +++ b/node_modules/uglify-to-browserify/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" \ No newline at end of file diff --git a/node_modules/uglify-to-browserify/LICENSE b/node_modules/uglify-to-browserify/LICENSE new file mode 100644 index 0000000000000..dfb0b19eab71a --- /dev/null +++ b/node_modules/uglify-to-browserify/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 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/uglify-to-browserify/README.md b/node_modules/uglify-to-browserify/README.md new file mode 100644 index 0000000000000..99685da2b4f70 --- /dev/null +++ b/node_modules/uglify-to-browserify/README.md @@ -0,0 +1,15 @@ +# uglify-to-browserify + +A transform to make UglifyJS work in browserify. + +[![Build Status](https://travis-ci.org/ForbesLindesay/uglify-to-browserify.png?branch=master)](https://travis-ci.org/ForbesLindesay/uglify-to-browserify) +[![Dependency Status](https://gemnasium.com/ForbesLindesay/uglify-to-browserify.png)](https://gemnasium.com/ForbesLindesay/uglify-to-browserify) +[![NPM version](https://badge.fury.io/js/uglify-to-browserify.png)](http://badge.fury.io/js/uglify-to-browserify) + +## Installation + + npm install uglify-to-browserify + +## License + + MIT \ No newline at end of file diff --git a/node_modules/uglify-to-browserify/index.js b/node_modules/uglify-to-browserify/index.js new file mode 100644 index 0000000000000..2cea629e69daf --- /dev/null +++ b/node_modules/uglify-to-browserify/index.js @@ -0,0 +1,49 @@ +'use strict' + +var fs = require('fs') +var PassThrough = require('stream').PassThrough +var Transform = require('stream').Transform + +if (typeof Transform === 'undefined') { + throw new Error('UglifyJS only supports browserify when using node >= 0.10.x') +} + +var cache = {} +module.exports = transform +function transform(file) { + if (!/tools\/node\.js$/.test(file.replace(/\\/g,'/'))) return new PassThrough(); + if (cache[file]) return makeStream(cache[file]) + var uglify = require(file) + var src = 'var sys = require("util");\nvar MOZ_SourceMap = require("source-map");\nvar UglifyJS = exports;\n' + uglify.FILES.map(function (path) { return fs.readFileSync(path, 'utf8') }).join('\n') + + var ast = uglify.parse(src) + ast.figure_out_scope() + + var variables = ast.variables + .map(function (node, name) { + return name + }) + + src += '\n\n' + variables.map(function (v) { return 'exports.' + v + ' = ' + v + ';' }).join('\n') + '\n\n' + + src += 'exports.AST_Node.warn_function = function (txt) { if (typeof console != "undefined" && typeof console.warn === "function") console.warn(txt) }\n\n' + + src += 'exports.minify = ' + uglify.minify.toString() + ';\n\n' + src += 'exports.describe_ast = ' + uglify.describe_ast.toString() + ';' + + // TODO: remove once https://github.com/substack/node-browserify/issues/631 is resolved + src = src.replace(/"for"/g, '"fo" + "r"') + + cache[file] = src + return makeStream(src); +} + +function makeStream(src) { + var res = new Transform(); + res._transform = function (chunk, encoding, callback) { callback() } + res._flush = function (callback) { + res.push(src) + callback() + } + return res; +} diff --git a/node_modules/uglify-to-browserify/package.json b/node_modules/uglify-to-browserify/package.json new file mode 100644 index 0000000000000..24eed9b4833f3 --- /dev/null +++ b/node_modules/uglify-to-browserify/package.json @@ -0,0 +1,20 @@ +{ + "name": "uglify-to-browserify", + "version": "1.0.2", + "description": "A transform to make UglifyJS work in browserify.", + "keywords": [], + "dependencies": {}, + "devDependencies": { + "uglify-js": "~2.4.0", + "source-map": "~0.1.27" + }, + "scripts": { + "test": "node test/index.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/ForbesLindesay/uglify-to-browserify.git" + }, + "author": "ForbesLindesay", + "license": "MIT" +} \ No newline at end of file diff --git a/node_modules/uglify-to-browserify/test/index.js b/node_modules/uglify-to-browserify/test/index.js new file mode 100644 index 0000000000000..411789422aaee --- /dev/null +++ b/node_modules/uglify-to-browserify/test/index.js @@ -0,0 +1,22 @@ +var fs = require('fs') +var br = require('../') +var test = fs.readFileSync(require.resolve('uglify-js/test/run-tests.js'), 'utf8') + .replace(/^#.*\n/, '') + +var transform = br(require.resolve('uglify-js')) +transform.pipe(fs.createWriteStream(__dirname + '/output.js')) + .on('close', function () { + Function('module,require', test)({ + filename: require.resolve('uglify-js/test/run-tests.js') + }, + function (name) { + if (name === '../tools/node') { + return require('./output.js') + } else if (/^[a-z]+$/.test(name)) { + return require(name) + } else { + throw new Error('I didn\'t expect you to require ' + name) + } + }) + }) +transform.end(fs.readFileSync(require.resolve('uglify-js'), 'utf8')) \ No newline at end of file diff --git a/node_modules/unbox-primitive/.editorconfig b/node_modules/unbox-primitive/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/unbox-primitive/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/unbox-primitive/.eslintrc b/node_modules/unbox-primitive/.eslintrc new file mode 100644 index 0000000000000..3b5d9e90ec405 --- /dev/null +++ b/node_modules/unbox-primitive/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/unbox-primitive/.github/FUNDING.yml b/node_modules/unbox-primitive/.github/FUNDING.yml new file mode 100644 index 0000000000000..30cbba95b0f0b --- /dev/null +++ b/node_modules/unbox-primitive/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/unbox-primitive +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/unbox-primitive/.nycrc b/node_modules/unbox-primitive/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/unbox-primitive/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/unbox-primitive/CHANGELOG.md b/node_modules/unbox-primitive/CHANGELOG.md new file mode 100644 index 0000000000000..7f930e8882d6f --- /dev/null +++ b/node_modules/unbox-primitive/CHANGELOG.md @@ -0,0 +1,60 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/ljharb/unbox-primitive/compare/v1.0.1...v1.0.2) - 2022-04-24 + +### Commits + +- [actions] reuse common workflows [`e6420b9`](https://github.com/ljharb/unbox-primitive/commit/e6420b94eed3558ef3ecddbd3d85fe2f400d1db1) +- [actions] update codecov uploader [`b90aff2`](https://github.com/ljharb/unbox-primitive/commit/b90aff2b17b70c1a7200eb5faa3f9e64ebf055f9) +- [readme] add github actions/codecov badges; update URLs [`bcc39b9`](https://github.com/ljharb/unbox-primitive/commit/bcc39b9d6d101bad199c95604f94999f80d6da97) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`a704a32`](https://github.com/ljharb/unbox-primitive/commit/a704a32ec4af43cd0631317ae3a537012adc1610) +- [Refactor] use `call-bind` instead of `function-bind` [`0a609f1`](https://github.com/ljharb/unbox-primitive/commit/0a609f1be6269cbf501482aacd9a0a1bd8596108) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`6a45317`](https://github.com/ljharb/unbox-primitive/commit/6a4531757d74af97c9d0770b102f81ce6ff0a8dc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`795c76f`](https://github.com/ljharb/unbox-primitive/commit/795c76f14c4df3c7ae934f7b14a98c07951ea9c7) +- [Deps] update `has-bigints`, `has-symbols` [`257a065`](https://github.com/ljharb/unbox-primitive/commit/257a065496b4190c296d674bff342ea40cf8e176) + +## [v1.0.1](https://github.com/ljharb/unbox-primitive/compare/v1.0.0...v1.0.1) - 2021-03-25 + +### Commits + +- [Tests] use shared travis-ci configs [`f977e5f`](https://github.com/ljharb/unbox-primitive/commit/f977e5f8fa532dbc519bd78a48cf4b81c14720fe) +- [Tests] migrate tests to Github Actions [`b89def6`](https://github.com/ljharb/unbox-primitive/commit/b89def60908a236aa1b5c756426f7cc61cf458dd) +- [meta] do not publish github action workflow files [`325d1f1`](https://github.com/ljharb/unbox-primitive/commit/325d1f1836cecbe57ee148545de5aefcbe7a7dce) +- readme [`810cd70`](https://github.com/ljharb/unbox-primitive/commit/810cd70f7b3c670cd55eae64466c89595175ee2a) +- [Tests] run `nyc` on all tests; use `tape` runner [`2f5fb08`](https://github.com/ljharb/unbox-primitive/commit/2f5fb08930c8f8e5e069ac61891dc9bd76cb762b) +- [meta] add `auto-changelog` [`03ed375`](https://github.com/ljharb/unbox-primitive/commit/03ed3759284493f19323eb0500f726d0851fc085) +- [actions] add automatic rebasing / merge commit blocking [`6dec48d`](https://github.com/ljharb/unbox-primitive/commit/6dec48daa357fa79a5cac1add9ca33f7b56276cc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `object-is`, `tape` [`528ed88`](https://github.com/ljharb/unbox-primitive/commit/528ed8826664b67f7eaf1fe7e2031c063b2d315f) +- [actions] check out the entire repo [`5095b29`](https://github.com/ljharb/unbox-primitive/commit/5095b2981f44a78b3f9bfaa1a526f17a6823e383) +- [actions] add "Allow Edits" workflow [`5aa26d7`](https://github.com/ljharb/unbox-primitive/commit/5aa26d7f0c32e0e78ba4bf3e5f9abb5478fd97fa) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `object-is`, `safe-publish-latest`, `tape` [`afc18c6`](https://github.com/ljharb/unbox-primitive/commit/afc18c6cb59cbb6b514e0d8004c6fd264e2a27eb) +- [readme] remove travis badge [`a025899`](https://github.com/ljharb/unbox-primitive/commit/a0258997a21604e1266840e6d167f0a870966e9b) +- [Dev Deps] update `auto-changelog` [`9219a32`](https://github.com/ljharb/unbox-primitive/commit/9219a32844b2ce3ed0a7ea12a5910a3e92424e4e) +- [readme] Fix missing paren in example [`73f5a33`](https://github.com/ljharb/unbox-primitive/commit/73f5a3340ca1ab6c227ed4632117d816d5e35317) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`e450acc`](https://github.com/ljharb/unbox-primitive/commit/e450accb54ab452f240768a5f0a98e5887b0ba8c) +- [Deps] update `has-bigints`, `has-symbols`, `which-boxed-primitive` [`a4279b5`](https://github.com/ljharb/unbox-primitive/commit/a4279b504732002074e5dcb9c5509038d605f563) +- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`b351548`](https://github.com/ljharb/unbox-primitive/commit/b351548d31789c0d0af4c3bce55c2bdefe51b40f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f600382`](https://github.com/ljharb/unbox-primitive/commit/f600382db83025270969354ac52a72aadb0a7ffa) +- [readme] fix travis links [`4d02fa9`](https://github.com/ljharb/unbox-primitive/commit/4d02fa9a4990812b048f8aefe6e46be80b68beef) +- [Dev Deps] update `auto-changelog`; add `aud` [`07e74a3`](https://github.com/ljharb/unbox-primitive/commit/07e74a3ca90688122593095849757e3c05c46db0) +- [meta] add `funding` field [`7ca4bd7`](https://github.com/ljharb/unbox-primitive/commit/7ca4bd71196e90a2fc9c7cb0ef4e30f949d5a853) +- [Tests] only audit prod deps [`47d8d5f`](https://github.com/ljharb/unbox-primitive/commit/47d8d5fbd58bf472e7e83f79ccef7e8379d06b35) +- [Deps] update `has-symbols` [`c70c15e`](https://github.com/ljharb/unbox-primitive/commit/c70c15e924191d11a271cff25bde657b0c3c3016) + +## v1.0.0 - 2019-08-10 + +### Commits + +- [Tests] add `.travis.yml` [`8c9a5ef`](https://github.com/ljharb/unbox-primitive/commit/8c9a5efdb54be4866e2884bf32cbe830788b2c2a) +- Initial commit [`feaff15`](https://github.com/ljharb/unbox-primitive/commit/feaff159eb999adc8763ff3e51d2d3d56d6164f8) +- [Tests] add tests [`3dd18d6`](https://github.com/ljharb/unbox-primitive/commit/3dd18d65748efb4af9b8ca66f8d8c5521d8f2dec) +- implementation [`472fb41`](https://github.com/ljharb/unbox-primitive/commit/472fb41d049ddee80ebf3219a5837e639a6e9341) +- npm init [`e9e426f`](https://github.com/ljharb/unbox-primitive/commit/e9e426fc90b9a3f07ffc48db75f78c414f77bc2b) +- [Tests] add linting [`139e74b`](https://github.com/ljharb/unbox-primitive/commit/139e74b94cdfd187b43b24de76c6d84af21ee467) +- [meta] create FUNDING.yml [`a9509e1`](https://github.com/ljharb/unbox-primitive/commit/a9509e122163e2b9d98af421e5c0575df36e2310) +- Only apps should have lockfiles [`b3d0834`](https://github.com/ljharb/unbox-primitive/commit/b3d0834d69dcbf4cbc1e61ccfaef05acf96cf630) diff --git a/node_modules/unbox-primitive/LICENSE b/node_modules/unbox-primitive/LICENSE new file mode 100644 index 0000000000000..3900dd7e2ffe6 --- /dev/null +++ b/node_modules/unbox-primitive/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/unbox-primitive/README.md b/node_modules/unbox-primitive/README.md new file mode 100644 index 0000000000000..1ce1cabb26d7f --- /dev/null +++ b/node_modules/unbox-primitive/README.md @@ -0,0 +1,47 @@ +# unbox-primitive [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Unbox a boxed JS primitive value. This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and works despite ES6 Symbol.toStringTag. + +## Example + +```js +var unboxPrimitive = require('unbox-primitive'); +var assert = require('assert'); + +assert.equal(unboxPrimitive(new Boolean(false)), false); +assert.equal(unboxPrimitive(new String('f')), 'f'); +assert.equal(unboxPrimitive(new Number(42)), 42); +const s = Symbol(); +assert.equal(unboxPrimitive(Object(s)), s); +assert.equal(unboxPrimitive(new BigInt(42)), 42n); + +// any primitive, or non-boxed-primitive object, will throw +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/unbox-primitive +[npm-version-svg]: https://versionbadg.es/ljharb/unbox-primitive.svg +[deps-svg]: https://david-dm.org/ljharb/unbox-primitive.svg +[deps-url]: https://david-dm.org/ljharb/unbox-primitive +[dev-deps-svg]: https://david-dm.org/ljharb/unbox-primitive/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/unbox-primitive#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/unbox-primitive.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/unbox-primitive.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/unbox-primitive.svg +[downloads-url]: https://npm-stat.com/charts.html?package=unbox-primitive +[codecov-image]: https://codecov.io/gh/ljharb/unbox-primitive/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/unbox-primitive/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/unbox-primitive +[actions-url]: https://github.com/ljharb/unbox-primitive/actions diff --git a/node_modules/unbox-primitive/index.js b/node_modules/unbox-primitive/index.js new file mode 100644 index 0000000000000..5cde4790935bb --- /dev/null +++ b/node_modules/unbox-primitive/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var whichBoxedPrimitive = require('which-boxed-primitive'); +var callBound = require('call-bind/callBound'); +var hasSymbols = require('has-symbols')(); +var hasBigInts = require('has-bigints')(); + +var stringToString = callBound('String.prototype.toString'); +var numberValueOf = callBound('Number.prototype.valueOf'); +var booleanValueOf = callBound('Boolean.prototype.valueOf'); +var symbolValueOf = hasSymbols && callBound('Symbol.prototype.valueOf'); +var bigIntValueOf = hasBigInts && callBound('BigInt.prototype.valueOf'); + +module.exports = function unboxPrimitive(value) { + var which = whichBoxedPrimitive(value); + if (typeof which !== 'string') { + throw new TypeError(which === null ? 'value is an unboxed primitive' : 'value is a non-boxed-primitive object'); + } + + if (which === 'String') { + return stringToString(value); + } + if (which === 'Number') { + return numberValueOf(value); + } + if (which === 'Boolean') { + return booleanValueOf(value); + } + if (which === 'Symbol') { + if (!hasSymbols) { + throw new EvalError('somehow this environment does not have Symbols, but you have a boxed Symbol value. Please report this!'); + } + return symbolValueOf(value); + } + if (which === 'BigInt') { + return bigIntValueOf(value); + } + throw new RangeError('unknown boxed primitive found: ' + which); +}; diff --git a/node_modules/unbox-primitive/package.json b/node_modules/unbox-primitive/package.json new file mode 100644 index 0000000000000..1f040f6e6de07 --- /dev/null +++ b/node_modules/unbox-primitive/package.json @@ -0,0 +1,65 @@ +{ + "name": "unbox-primitive", + "version": "1.0.2", + "description": "Unbox a boxed JS primitive value.", + "main": "index.js", + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/unbox-primitive.git" + }, + "keywords": [ + "unbox", + "boxed", + "primitive", + "object", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/unbox-primitive/issues" + }, + "homepage": "https://github.com/ljharb/unbox-primitive#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "nyc": "^10.3.2", + "object-inspect": "^1.12.0", + "object-is": "^1.1.5", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/unbox-primitive/test/index.js b/node_modules/unbox-primitive/test/index.js new file mode 100644 index 0000000000000..73688ac1ebfd6 --- /dev/null +++ b/node_modules/unbox-primitive/test/index.js @@ -0,0 +1,59 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var is = require('object-is'); +var forEach = require('for-each'); +var hasSymbols = require('has-symbols')(); +var hasBigInts = require('has-bigints')(); + +var unboxPrimitive = require('..'); + +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +test('primitives', function (t) { + var primitives = [ + true, + false, + '', + 'foo', + 42, + NaN, + Infinity, + 0 + ]; + if (hasSymbols) { + primitives.push(Symbol(), Symbol.iterator, Symbol('f')); + } + if (hasBigInts) { + primitives.push(BigInt(42), BigInt(0)); + } + forEach(primitives, function (primitive) { + var obj = Object(primitive); + t.ok( + is(unboxPrimitive(obj), primitive), + debug(obj, 'unboxes to ' + inspect(primitive)) + ); + }); + + t.end(); +}); + +test('objects', function (t) { + var objects = [ + {}, + [], + function () {}, + /a/g, + new Date() + ]; + forEach(objects, function (object) { + t['throws']( + function () { unboxPrimitive(object); }, + TypeError, + debug(object, 'is not a primitive') + ); + }); + + t.end(); +}); diff --git a/node_modules/union-value/LICENSE b/node_modules/union-value/LICENSE new file mode 100644 index 0000000000000..83b56e709c3e5 --- /dev/null +++ b/node_modules/union-value/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/union-value/README.md b/node_modules/union-value/README.md new file mode 100644 index 0000000000000..1a90ffbd5d867 --- /dev/null +++ b/node_modules/union-value/README.md @@ -0,0 +1,73 @@ +# union-value [![NPM version](https://img.shields.io/npm/v/union-value.svg?style=flat)](https://www.npmjs.com/package/union-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/union-value.svg?style=flat)](https://npmjs.org/package/union-value) [![NPM total downloads](https://img.shields.io/npm/dt/union-value.svg?style=flat)](https://npmjs.org/package/union-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/union-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/union-value) + +> Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save union-value +``` + +## Usage + +```js +var union = require('union-value'); + +var obj = {}; + +union(obj, 'a.b.c', ['one', 'two']); +union(obj, 'a.b.c', ['three']); + +console.log(obj); +//=> {a: {b: {c: [ 'one', 'two', 'three' ] }}} +``` + +## About + +### Related projects + +* [assign-value](https://www.npmjs.com/package/assign-value): Assign a value or extend a deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/assign-value) | [homepage](https://github.com/jonschlinkert/assign-value "Assign a value or extend a deeply nested property of an object using object path notation.") +* [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.") +* [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.") +* [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). + +### 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 25, 2017._ \ No newline at end of file diff --git a/node_modules/union-value/index.js b/node_modules/union-value/index.js new file mode 100644 index 0000000000000..9c5d8db2c31bf --- /dev/null +++ b/node_modules/union-value/index.js @@ -0,0 +1,30 @@ +'use strict'; + +var isObject = require('is-extendable'); +var union = require('arr-union'); +var get = require('get-value'); +var set = require('set-value'); + +module.exports = function unionValue(obj, prop, value) { + if (!isObject(obj)) { + throw new TypeError('union-value expects the first argument to be an object.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('union-value expects `prop` to be a string.'); + } + + var arr = arrayify(get(obj, prop)); + set(obj, prop, union(arr, arrayify(value))); + return obj; +}; + +function arrayify(val) { + if (val === null || typeof val === 'undefined') { + return []; + } + if (Array.isArray(val)) { + return val; + } + return [val]; +} diff --git a/node_modules/union-value/package.json b/node_modules/union-value/package.json new file mode 100644 index 0000000000000..65441f6e4ecd1 --- /dev/null +++ b/node_modules/union-value/package.json @@ -0,0 +1,70 @@ +{ + "name": "union-value", + "description": "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/union-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/union-value", + "bugs": { + "url": "https://github.com/jonschlinkert/union-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0", + "should": "^11.2.0" + }, + "keywords": [ + "array", + "dot", + "get", + "has", + "nested", + "notation", + "object", + "path", + "prop", + "property", + "set", + "union", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assign-value", + "get-value", + "has-value", + "set-value", + "unset-value" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/unset-value/LICENSE b/node_modules/unset-value/LICENSE new file mode 100644 index 0000000000000..ec85897eb167c --- /dev/null +++ b/node_modules/unset-value/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/unset-value/README.md b/node_modules/unset-value/README.md new file mode 100644 index 0000000000000..f0fec3d3d80fb --- /dev/null +++ b/node_modules/unset-value/README.md @@ -0,0 +1,131 @@ +# unset-value [![NPM version](https://img.shields.io/npm/v/unset-value.svg?style=flat)](https://www.npmjs.com/package/unset-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/unset-value.svg?style=flat)](https://npmjs.org/package/unset-value) [![NPM total downloads](https://img.shields.io/npm/dt/unset-value.svg?style=flat)](https://npmjs.org/package/unset-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unset-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/unset-value) + +> Delete nested properties from an object using dot notation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save unset-value +``` + +## Usage + +```js +var unset = require('unset-value'); + +var obj = {a: {b: {c: 'd', e: 'f'}}}; +unset(obj, 'a.b.c'); +console.log(obj); +//=> {a: {b: {e: 'f'}}}; +``` + +## Examples + +### Updates the object when a property is deleted + +```js +var obj = {a: 'b'}; +unset(obj, 'a'); +console.log(obj); +//=> {} +``` + +### Returns true when a property is deleted + +```js +unset({a: 'b'}, 'a') // true +``` + +### Returns `true` when a property does not exist + +This is consistent with `delete` behavior in that it does not +throw when a property does not exist. + +```js +unset({a: {b: {c: 'd'}}}, 'd') // true +``` + +### delete nested values + +```js +var one = {a: {b: {c: 'd'}}}; +unset(one, 'a.b'); +console.log(one); +//=> {a: {}} + +var two = {a: {b: {c: 'd'}}}; +unset(two, 'a.b.c'); +console.log(two); +//=> {a: {b: {}}} + +var three = {a: {b: {c: 'd', e: 'f'}}}; +unset(three, 'a.b.c'); +console.log(three); +//=> {a: {b: {e: 'f'}}} +``` + +### throws on invalid args + +```js +unset(); +// 'expected an object.' +``` + +## About + +### 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 "Use property paths (`a.b.c`) to get a nested value from an object.") +* [get-values](https://www.npmjs.com/package/get-values): Return an array of all values from the given object. | [homepage](https://github.com/jonschlinkert/get-values "Return an array of all values from the given object.") +* [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://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.") +* [put-value](https://www.npmjs.com/package/put-value): Update only existing values from an object, works with dot notation paths like `a.b.c` and… [more](https://github.com/tunnckocore/put-value#readme) | [homepage](https://github.com/tunnckocore/put-value#readme "Update only existing values from an object, works with dot notation paths like `a.b.c` and support deep nesting.") +* [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.") +* [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.") +* [upsert-value](https://www.npmjs.com/package/upsert-value): Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/doowb/upsert-value "Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 6 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [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.4.2, on February 25, 2017._ \ No newline at end of file diff --git a/node_modules/unset-value/index.js b/node_modules/unset-value/index.js new file mode 100644 index 0000000000000..a91901018c182 --- /dev/null +++ b/node_modules/unset-value/index.js @@ -0,0 +1,32 @@ +/*! + * unset-value + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var has = require('has-value'); + +module.exports = function unset(obj, prop) { + if (!isObject(obj)) { + throw new TypeError('expected an object.'); + } + if (obj.hasOwnProperty(prop)) { + delete obj[prop]; + return true; + } + + if (has(obj, prop)) { + var segs = prop.split('.'); + var last = segs.pop(); + while (segs.length && segs[segs.length - 1].slice(-1) === '\\') { + last = segs.pop().slice(0, -1) + '.' + last; + } + while (segs.length) obj = obj[prop = segs.shift()]; + return (delete obj[last]); + } + return true; +}; diff --git a/node_modules/unset-value/node_modules/has-value/LICENSE b/node_modules/unset-value/node_modules/has-value/LICENSE new file mode 100644 index 0000000000000..39245ac1c6061 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-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/unset-value/node_modules/has-value/README.md b/node_modules/unset-value/node_modules/has-value/README.md new file mode 100644 index 0000000000000..a927633e5fa2f --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/README.md @@ -0,0 +1,130 @@ +# has-value [![NPM version](https://img.shields.io/npm/v/has-value.svg?style=flat)](https://www.npmjs.com/package/has-value) [![NPM downloads](https://img.shields.io/npm/dm/has-value.svg?style=flat)](https://npmjs.org/package/has-value) [![Build Status](https://img.shields.io/travis/jonschlinkert/has-value.svg?style=flat)](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 has-value --save +``` + +**Works for:** + +* booleans +* functions +* numbers (pass `true` as the last arg to treat zero as a value instead of falsey) +* strings +* nulls +* object +* arrays + +## Usage + +Works with nested object paths or a single value: + +```js +var hasValue = require('has-value'); + +hasValue({a: {b: {c: 'foo'}}} 'a.b.c'); +//=> true + +hasValue('a'); +//=> true + +hasValue(''); +//=> false + +hasValue(1); +//=> true + +hasValue(0); +//=> false + +hasValue(0, true); // pass `true` as the last arg to treat zero as a value +//=> true + +hasValue({a: 'a'}}); +//=> true + +hasValue({}}); +//=> false + +hasValue(['a']); +//=> true + +hasValue([]); +//=> false + +hasValue(function(foo) {}); // function length/arity +//=> true + +hasValue(function() {}); +//=> false + +hasValue(true); +hasValue(false); +//=> true +``` + +## isEmpty + +To do the opposite and test for empty values, do: + +```js +function isEmpty(o, isZero) { + return !hasValue.apply(hasValue, arguments); +} +``` + +## Related projects + +You might also be interested in these projects: + +* [get-object](https://www.npmjs.com/package/get-object): Get a property from an object using dot (object path) notation. | [homepage](https://github.com/jonschlinkert/get-object) +* [get-property](https://www.npmjs.com/package/get-property): Get a nested property or its value from an object using simple `a.b.c` paths. | [homepage](https://github.com/jonschlinkert/get-property) +* [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) +* [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) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/has-value/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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/has-value/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._ \ No newline at end of file diff --git a/node_modules/unset-value/node_modules/has-value/index.js b/node_modules/unset-value/node_modules/has-value/index.js new file mode 100644 index 0000000000000..90687c877b82a --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/index.js @@ -0,0 +1,19 @@ +/*! + * has-value + * + * Copyright (c) 2014-2016, 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(obj, prop, noZero) { + if (isObject(obj)) { + return hasValues(get(obj, prop), noZero); + } + return hasValues(obj, prop); +}; diff --git a/node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..39245ac1c6061 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/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/unset-value/node_modules/has-value/node_modules/isobject/README.md b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md new file mode 100644 index 0000000000000..9dd897aa05806 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md @@ -0,0 +1,112 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat)](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 isobject --save +``` + +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](http://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); +``` + +## Related projects + +You might also be interested in these projects: + +[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-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) +* [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) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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/isobject/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._ \ No newline at end of file diff --git a/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js new file mode 100644 index 0000000000000..aa0dce0bbad19 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js @@ -0,0 +1,14 @@ +/*! + * isobject + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isArray = require('isarray'); + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && isArray(val) === false; +}; diff --git a/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json new file mode 100644 index 0000000000000..954f4113ff4be --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json @@ -0,0 +1,67 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "2.1.0", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isarray": "1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "merge-deep", + "extend-shallow", + "is-plain-object", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/unset-value/node_modules/has-value/package.json b/node_modules/unset-value/node_modules/has-value/package.json new file mode 100644 index 0000000000000..88ff6edc8ba8f --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/package.json @@ -0,0 +1,81 @@ +{ + "name": "has-value", + "version": "0.3.1", + "description": "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.", + "homepage": "https://github.com/jonschlinkert/has-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/has-value", + "bugs": { + "url": "https://github.com/jonschlinkert/has-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "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" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "get-object", + "get-property", + "get-value", + "set-value" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/unset-value/node_modules/has-values/LICENSE b/node_modules/unset-value/node_modules/has-values/LICENSE new file mode 100644 index 0000000000000..39245ac1c6061 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-values/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/unset-value/node_modules/has-values/README.md b/node_modules/unset-value/node_modules/has-values/README.md new file mode 100644 index 0000000000000..13319c517c7ca --- /dev/null +++ b/node_modules/unset-value/node_modules/has-values/README.md @@ -0,0 +1,114 @@ +# has-values [![NPM version](https://img.shields.io/npm/v/has-values.svg?style=flat)](https://www.npmjs.com/package/has-values) [![NPM downloads](https://img.shields.io/npm/dm/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![Build Status](https://img.shields.io/travis/jonschlinkert/has-values.svg?style=flat)](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 has-values --save +``` + +## Usage + +```js +var hasValue = require('has-values'); + +hasValue('a'); +//=> true + +hasValue(''); +//=> false + +hasValue(1); +//=> true + +hasValue(0); +//=> false + +hasValue(0, true); // treat zero as a value +//=> true + +hasValue({a: 'a'}}); +//=> true + +hasValue({}}); +//=> false + +hasValue(['a']); +//=> true + +hasValue([]); +//=> false + +hasValue(function(foo) {}); // function length/arity +//=> true + +hasValue(function() {}); +//=> false + +hasValue(true); +hasValue(false); +//=> true +``` + +## isEmpty + +To test for empty values, do: + +```js +function isEmpty(o, isZero) { + return !hasValue(o, isZero); +} +``` + +## Related projects + +You might also be interested in these 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://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value) +* [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) +* [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) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/has-values/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ 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/has-values/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._ \ No newline at end of file diff --git a/node_modules/unset-value/node_modules/has-values/index.js b/node_modules/unset-value/node_modules/has-values/index.js new file mode 100644 index 0000000000000..6d04ba1fe0f21 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-values/index.js @@ -0,0 +1,36 @@ +/*! + * has-values + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function hasValue(o, noZero) { + if (o === null || o === undefined) { + return false; + } + + if (typeof o === 'boolean') { + return true; + } + + if (typeof o === 'number') { + if (o === 0 && noZero === true) { + return false; + } + return true; + } + + if (o.length !== undefined) { + return o.length !== 0; + } + + for (var key in o) { + if (o.hasOwnProperty(key)) { + return true; + } + } + return false; +}; diff --git a/node_modules/unset-value/node_modules/has-values/package.json b/node_modules/unset-value/node_modules/has-values/package.json new file mode 100644 index 0000000000000..519a2c8956e9e --- /dev/null +++ b/node_modules/unset-value/node_modules/has-values/package.json @@ -0,0 +1,75 @@ +{ + "name": "has-values", + "version": "0.1.4", + "description": "Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. ", + "homepage": "https://github.com/jonschlinkert/has-values", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/has-values", + "bugs": { + "url": "https://github.com/jonschlinkert/has-values/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "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" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-value", + "isobject", + "is-plain-object" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/unset-value/node_modules/isobject/LICENSE b/node_modules/unset-value/node_modules/isobject/LICENSE new file mode 100644 index 0000000000000..943e71d05511e --- /dev/null +++ b/node_modules/unset-value/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/unset-value/node_modules/isobject/README.md b/node_modules/unset-value/node_modules/isobject/README.md new file mode 100644 index 0000000000000..d01feaa40bc13 --- /dev/null +++ b/node_modules/unset-value/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/unset-value/node_modules/isobject/index.d.ts b/node_modules/unset-value/node_modules/isobject/index.d.ts new file mode 100644 index 0000000000000..55f81c275f150 --- /dev/null +++ b/node_modules/unset-value/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/unset-value/node_modules/isobject/index.js b/node_modules/unset-value/node_modules/isobject/index.js new file mode 100644 index 0000000000000..2d59958bf4eab --- /dev/null +++ b/node_modules/unset-value/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/unset-value/node_modules/isobject/package.json b/node_modules/unset-value/node_modules/isobject/package.json new file mode 100644 index 0000000000000..62aa8c1b2feea --- /dev/null +++ b/node_modules/unset-value/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "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" + ] + } +} diff --git a/node_modules/unset-value/package.json b/node_modules/unset-value/package.json new file mode 100644 index 0000000000000..0753ba6df13c7 --- /dev/null +++ b/node_modules/unset-value/package.json @@ -0,0 +1,71 @@ +{ + "name": "unset-value", + "description": "Delete nested properties from an object using dot notation.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/unset-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + " (https://github.com/wtgtybhertgeghgtwtg)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/unset-value", + "bugs": { + "url": "https://github.com/jonschlinkert/unset-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "*", + "should": "*" + }, + "keywords": [ + "del", + "delete", + "key", + "object", + "omit", + "prop", + "property", + "remove", + "unset", + "value" + ], + "verb": { + "related": { + "list": [ + "get-value", + "get-values", + "omit-value", + "put-value", + "set-value", + "union-value", + "upsert-value" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/urix/.jshintrc b/node_modules/urix/.jshintrc new file mode 100644 index 0000000000000..9d1a61836149b --- /dev/null +++ b/node_modules/urix/.jshintrc @@ -0,0 +1,42 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": false, + "eqeqeq": true, + "es3": false, + "forin": true, + "immed": false, + "indent": false, + "latedef": "nofunc", + "newcap": false, + "noarg": true, + "noempty": true, + "nonew": false, + "plusplus": false, + "quotmark": true, + "undef": true, + "unused": "vars", + "strict": false, + "trailing": true, + "maxparams": 5, + "maxdepth": false, + "maxstatements": false, + "maxcomplexity": false, + "maxlen": 100, + + "asi": true, + "expr": true, + "globalstrict": true, + "smarttabs": true, + "sub": true, + + "node": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false + } +} diff --git a/node_modules/urix/LICENSE b/node_modules/urix/LICENSE new file mode 100644 index 0000000000000..0595be36716d7 --- /dev/null +++ b/node_modules/urix/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/urix/index.js b/node_modules/urix/index.js new file mode 100644 index 0000000000000..dc6ef2700fbbe --- /dev/null +++ b/node_modules/urix/index.js @@ -0,0 +1,17 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var path = require("path") + +"use strict" + +function urix(aPath) { + if (path.sep === "\\") { + return aPath + .replace(/\\/g, "/") + .replace(/^[a-z]:\/?/i, "/") + } + return aPath +} + +module.exports = urix diff --git a/node_modules/urix/package.json b/node_modules/urix/package.json new file mode 100644 index 0000000000000..992e329594ef1 --- /dev/null +++ b/node_modules/urix/package.json @@ -0,0 +1,25 @@ +{ + "name": "urix", + "version": "0.1.0", + "author": "Simon Lydell", + "license": "MIT", + "description": "Makes Windows-style paths more unix and URI friendly.", + "main": "index.js", + "repository": "lydell/urix", + "keywords": [ + "path", + "url", + "uri", + "unix", + "windows", + "backslash", + "slash" + ], + "scripts": { + "test": "jshint index.js test/ && mocha" + }, + "devDependencies": { + "mocha": "^1.17.1", + "jshint": "^2.4.4" + } +} diff --git a/node_modules/urix/readme.md b/node_modules/urix/readme.md new file mode 100644 index 0000000000000..b258b98635ff9 --- /dev/null +++ b/node_modules/urix/readme.md @@ -0,0 +1,46 @@ +[![Build Status](https://travis-ci.org/lydell/urix.png?branch=master)](https://travis-ci.org/lydell/urix) + +Overview +======== + +Makes Windows-style paths more unix and URI friendly. Useful if you work with +paths that eventually will be used in URLs. + +```js +var urix = require("urix") + +// On Windows: +urix("c:\\users\\you\\foo") +// /users/you/foo + +// On unix-like systems: +urix("c:\\users\\you\\foo") +// c:\users\you\foo +``` + + +Installation +============ + +`npm install urix` + +```js +var urix = require("urix") +``` + + +Usage +===== + +### `urix(path)` ### + +On Windows, replaces all backslashes with slashes and uses a slash instead of a +drive letter and a colon for absolute paths. + +On unix-like systems it is a no-op. + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/node_modules/urix/test/index.js b/node_modules/urix/test/index.js new file mode 100644 index 0000000000000..5333f24635f78 --- /dev/null +++ b/node_modules/urix/test/index.js @@ -0,0 +1,43 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var path = require("path") +var assert = require("assert") +var urix = require("../") + +"use stict" + +function test(testPath, expected) { + path.sep = "\\" + assert.equal(urix(testPath), expected) + path.sep = "/" + assert.equal(urix(testPath), testPath) +} + +describe("urix", function() { + + it("is a function", function() { + assert.equal(typeof urix, "function") + }) + + + it("converts backslashes to slashes", function() { + test("a\\b\\c", "a/b/c") + test("\\a\\b\\c", "/a/b/c") + test("a/b\\c", "a/b/c") + test("\\\\a\\\\\\b///c", "//a///b///c") + }) + + + it("changes the drive letter to a slash", function() { + test("c:\\a", "/a") + test("C:\\a", "/a") + test("z:\\a", "/a") + test("c:a", "/a") + test("c:/a", "/a") + test("c:\\\\a", "//a") + test("c://a", "//a") + test("c:\\//a", "///a") + }) + +}) diff --git a/node_modules/use/LICENSE b/node_modules/use/LICENSE new file mode 100644 index 0000000000000..7cccaf9e345e5 --- /dev/null +++ b/node_modules/use/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present, 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/use/README.md b/node_modules/use/README.md new file mode 100644 index 0000000000000..59b1dbd8290d2 --- /dev/null +++ b/node_modules/use/README.md @@ -0,0 +1,90 @@ +# use [![NPM version](https://img.shields.io/npm/v/use.svg?style=flat)](https://www.npmjs.com/package/use) [![NPM monthly downloads](https://img.shields.io/npm/dm/use.svg?style=flat)](https://npmjs.org/package/use) [![NPM total downloads](https://img.shields.io/npm/dt/use.svg?style=flat)](https://npmjs.org/package/use) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/use.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/use) + +> Easily add plugin support to your node.js application. + +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 use +``` + +A different take on plugin handling! This is not a middleware system, if you need something that handles async middleware, [ware](https://github.com/segmentio/ware) is great for that. + +## Usage + +```js +const use = require('use'); +``` + +See the [examples folder](./examples) for usage examples. + +## 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: + +* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins "Adds 'smart plugin' support to your base application.") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") +* [ware](https://www.npmjs.com/package/ware): Easily create your own middleware layer. | [homepage](https://github.com/segmentio/ware "Easily create your own middleware layer.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 37 | [jonschlinkert](https://github.com/jonschlinkert) | +| 7 | [charlike-old](https://github.com/charlike-old) | +| 2 | [doowb](https://github.com/doowb) | +| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](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 July 12, 2018._ \ No newline at end of file diff --git a/node_modules/use/index.js b/node_modules/use/index.js new file mode 100644 index 0000000000000..9a1eb4ee99ac0 --- /dev/null +++ b/node_modules/use/index.js @@ -0,0 +1,155 @@ +/*! + * use + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function base(app, options) { + if (!isObject(app) && typeof app !== 'function') { + throw new TypeError('expected an object or function'); + } + + var opts = isObject(options) ? options : {}; + var prop = typeof opts.prop === 'string' ? opts.prop : 'fns'; + if (!Array.isArray(app[prop])) { + define(app, prop, []); + } + + /** + * Define a plugin function to be passed to use. The only + * parameter exposed to the plugin is `app`, the object or function. + * passed to `use(app)`. `app` is also exposed as `this` in plugins. + * + * Additionally, **if a plugin returns a function, the function will + * be pushed onto the `fns` array**, allowing the plugin to be + * called at a later point by the `run` method. + * + * ```js + * var use = require('use'); + * + * // define a plugin + * function foo(app) { + * // do stuff + * } + * + * var app = function(){}; + * use(app); + * + * // register plugins + * app.use(foo); + * app.use(bar); + * app.use(baz); + * ``` + * @name .use + * @param {Function} `fn` plugin function to call + * @api public + */ + + define(app, 'use', use); + + /** + * Run all plugins on `fns`. Any plugin that returns a function + * when called by `use` is pushed onto the `fns` array. + * + * ```js + * var config = {}; + * app.run(config); + * ``` + * @name .run + * @param {Object} `value` Object to be modified by plugins. + * @return {Object} Returns the object passed to `run` + * @api public + */ + + define(app, 'run', function(val) { + if (!isObject(val)) return; + + if (!val.use || !val.run) { + define(val, prop, val[prop] || []); + define(val, 'use', use); + } + + if (!val[prop] || val[prop].indexOf(base) === -1) { + val.use(base); + } + + var self = this || app; + var fns = self[prop]; + var len = fns.length; + var idx = -1; + + while (++idx < len) { + val.use(fns[idx]); + } + return val; + }); + + /** + * Call plugin `fn`. If a function is returned push it into the + * `fns` array to be called by the `run` method. + */ + + function use(type, fn, options) { + var offset = 1; + + if (typeof type === 'string' || Array.isArray(type)) { + fn = wrap(type, fn); + offset++; + } else { + options = fn; + fn = type; + } + + if (typeof fn !== 'function') { + throw new TypeError('expected a function'); + } + + var self = this || app; + var fns = self[prop]; + + var args = [].slice.call(arguments, offset); + args.unshift(self); + + if (typeof opts.hook === 'function') { + opts.hook.apply(self, args); + } + + var val = fn.apply(self, args); + if (typeof val === 'function' && fns.indexOf(val) === -1) { + fns.push(val); + } + return self; + } + + /** + * Wrap a named plugin function so that it's only called on objects of the + * given `type` + * + * @param {String} `type` + * @param {Function} `fn` Plugin function + * @return {Function} + */ + + function wrap(type, fn) { + return function plugin() { + return this.type === type ? fn.apply(this, arguments) : plugin; + }; + } + + return app; +}; + +function isObject(val) { + return val && typeof val === 'object' && !Array.isArray(val); +} + +function define(obj, key, val) { + Object.defineProperty(obj, key, { + configurable: true, + writable: true, + value: val + }); +} diff --git a/node_modules/use/package.json b/node_modules/use/package.json new file mode 100644 index 0000000000000..b7a3f9a1e32ef --- /dev/null +++ b/node_modules/use/package.json @@ -0,0 +1,66 @@ +{ + "name": "use", + "description": "Easily add plugin support to your node.js application.", + "version": "3.1.1", + "homepage": "https://github.com/jonschlinkert/use", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Olsten Larck (https://i.am.charlike.online)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/use", + "bugs": { + "url": "https://github.com/jonschlinkert/use/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "base-plugins": "^1.0.0", + "define-property": "^2.0.0", + "extend-shallow": "^3.0.1", + "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", + "mocha": "^4.0.1" + }, + "keywords": [ + "use" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "base", + "base-plugins", + "ware" + ] + }, + "reflinks": [ + "verb", + "ware" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/util-deprecate/History.md b/node_modules/util-deprecate/History.md new file mode 100644 index 0000000000000..acc8675372e98 --- /dev/null +++ b/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/node_modules/util-deprecate/LICENSE b/node_modules/util-deprecate/LICENSE new file mode 100644 index 0000000000000..6a60e8c225c9b --- /dev/null +++ b/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/README.md b/node_modules/util-deprecate/README.md new file mode 100644 index 0000000000000..75622fa7c250a --- /dev/null +++ b/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/browser.js b/node_modules/util-deprecate/browser.js new file mode 100644 index 0000000000000..549ae2f065ea5 --- /dev/null +++ b/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/node_modules/util-deprecate/node.js b/node_modules/util-deprecate/node.js new file mode 100644 index 0000000000000..5e6fcff5ddd3f --- /dev/null +++ b/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json new file mode 100644 index 0000000000000..2e79f89a90f58 --- /dev/null +++ b/node_modules/util-deprecate/package.json @@ -0,0 +1,27 @@ +{ + "name": "util-deprecate", + "version": "1.0.2", + "description": "The Node.js `util.deprecate()` function with browser support", + "main": "node.js", + "browser": "browser.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "homepage": "https://github.com/TooTallNate/util-deprecate" +} diff --git a/node_modules/validate-npm-package-license/LICENSE b/node_modules/validate-npm-package-license/LICENSE new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/node_modules/validate-npm-package-license/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/validate-npm-package-license/README.md b/node_modules/validate-npm-package-license/README.md new file mode 100644 index 0000000000000..702bc7b4f3ba3 --- /dev/null +++ b/node_modules/validate-npm-package-license/README.md @@ -0,0 +1,113 @@ +validate-npm-package-license +============================ + +Give me a string and I'll tell you if it's a valid npm package license string. + +```javascript +var valid = require('validate-npm-package-license'); +``` + +SPDX license identifiers are valid license strings: + +```javascript + +var assert = require('assert'); +var validSPDXExpression = { + validForNewPackages: true, + validForOldPackages: true, + spdx: true +}; + +assert.deepEqual(valid('MIT'), validSPDXExpression); +assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression); +assert.deepEqual(valid('Apache-2.0'), validSPDXExpression); +assert.deepEqual(valid('ISC'), validSPDXExpression); +``` +The function will return a warning and suggestion for nearly-correct license identifiers: + +```javascript +assert.deepEqual( + valid('Apache 2.0'), + { + validForOldPackages: false, + validForNewPackages: false, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + 'license is similar to the valid expression "Apache-2.0"' + ] + } +); +``` + +SPDX expressions are valid, too ... + +```javascript +// Simple SPDX license expression for dual licensing +assert.deepEqual( + valid('(GPL-3.0-only OR BSD-2-Clause)'), + validSPDXExpression +); +``` + +... except if they contain `LicenseRef`: + +```javascript +var warningAboutLicenseRef = { + validForOldPackages: false, + validForNewPackages: false, + spdx: true, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + ] +}; + +assert.deepEqual( + valid('LicenseRef-Made-Up'), + warningAboutLicenseRef +); + +assert.deepEqual( + valid('(MIT OR LicenseRef-Made-Up)'), + warningAboutLicenseRef +); +``` + +If you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there: + +```javascript +assert.deepEqual( + valid('SEE LICENSE IN LICENSE.txt'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'LICENSE.txt' + } +); + +assert.deepEqual( + valid('SEE LICENSE IN license.md'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'license.md' + } +); +``` + +If there aren't any licensing terms, use `UNLICENSED`: + +```javascript +var unlicensed = { + validForNewPackages: true, + validForOldPackages: true, + unlicensed: true +}; +assert.deepEqual(valid('UNLICENSED'), unlicensed); +assert.deepEqual(valid('UNLICENCED'), unlicensed); +``` diff --git a/node_modules/validate-npm-package-license/index.js b/node_modules/validate-npm-package-license/index.js new file mode 100644 index 0000000000000..35eaa732559ce --- /dev/null +++ b/node_modules/validate-npm-package-license/index.js @@ -0,0 +1,86 @@ +var parse = require('spdx-expression-parse'); +var correct = require('spdx-correct'); + +var genericWarning = ( + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "' +); + +var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + +function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; +} + +function usesLicenseRef(ast) { + if (ast.hasOwnProperty('license')) { + var license = ast.license; + return ( + startsWith('LicenseRef', license) || + startsWith('DocumentRef', license) + ); + } else { + return ( + usesLicenseRef(ast.left) || + usesLicenseRef(ast.right) + ); + } +} + +module.exports = function(argument) { + var ast; + + try { + ast = parse(argument); + } catch (e) { + var match + if ( + argument === 'UNLICENSED' || + argument === 'UNLICENCED' + ) { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + if (argument.trim().length !== 0) { + var corrected = correct(argument); + if (corrected) { + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + } + return result; + } + } + + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } +}; diff --git a/node_modules/validate-npm-package-license/package.json b/node_modules/validate-npm-package-license/package.json new file mode 100644 index 0000000000000..9e92af4f44656 --- /dev/null +++ b/node_modules/validate-npm-package-license/package.json @@ -0,0 +1,28 @@ +{ + "name": "validate-npm-package-license", + "description": "Give me a string and I'll tell you if it's a valid npm package license string", + "version": "3.0.4", + "author": "Kyle E. Mitchell (https://kemitchell.com)", + "contributors": [ + "Mark Stacey " + ], + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + }, + "devDependencies": { + "defence-cli": "^2.0.1", + "replace-require-self": "^1.0.0" + }, + "keywords": [ + "license", + "npm", + "package", + "validation" + ], + "license": "Apache-2.0", + "repository": "kemitchell/validate-npm-package-license.js", + "scripts": { + "test": "defence README.md | replace-require-self | node" + } +} diff --git a/node_modules/which-boxed-primitive/.editorconfig b/node_modules/which-boxed-primitive/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/which-boxed-primitive/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/which-boxed-primitive/.eslintignore b/node_modules/which-boxed-primitive/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/which-boxed-primitive/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/which-boxed-primitive/.eslintrc b/node_modules/which-boxed-primitive/.eslintrc new file mode 100644 index 0000000000000..bfa96d1490eb1 --- /dev/null +++ b/node_modules/which-boxed-primitive/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 12], + }, +} diff --git a/node_modules/which-boxed-primitive/.github/FUNDING.yml b/node_modules/which-boxed-primitive/.github/FUNDING.yml new file mode 100644 index 0000000000000..0cdbbd8130831 --- /dev/null +++ b/node_modules/which-boxed-primitive/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/which-boxed-primitive +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/which-boxed-primitive/.nycrc b/node_modules/which-boxed-primitive/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/which-boxed-primitive/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/which-boxed-primitive/CHANGELOG.md b/node_modules/which-boxed-primitive/CHANGELOG.md new file mode 100644 index 0000000000000..23e542207db47 --- /dev/null +++ b/node_modules/which-boxed-primitive/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/which-boxed-primitive/compare/v1.0.1...v1.0.2) - 2020-12-14 + +### Commits + +- [Tests] use shared travis-ci configs [`8674582`](https://github.com/inspect-js/which-boxed-primitive/commit/86745829b6a92cff2cfb0d3c0414ec9afdc2a087) +- [Tests] migrate tests to Github Actions [`dff6643`](https://github.com/inspect-js/which-boxed-primitive/commit/dff6643405ba4d6dc6694a25904c8f72f273ece8) +- [meta] do not publish github action workflow files [`b26112a`](https://github.com/inspect-js/which-boxed-primitive/commit/b26112a4e4ac6beec8f54c734135dbf9e9ba16f9) +- [meta] make `auto-changelog` config consistent [`8d10175`](https://github.com/inspect-js/which-boxed-primitive/commit/8d10175171154cd6c8f8a016aa7fb71b5044acf6) +- [readme] fix repo URLs, remove defunct badges [`ab8db24`](https://github.com/inspect-js/which-boxed-primitive/commit/ab8db247573723dbcda68469118d08c7c2692c67) +- [Tests] run `nyc` on all tests; use `tape` runner [`7d084df`](https://github.com/inspect-js/which-boxed-primitive/commit/7d084dfc5251230e9399a81782c0b9d7ae5d1901) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`576f6f3`](https://github.com/inspect-js/which-boxed-primitive/commit/576f6f308aed35ef1d3392bb9472def59482ed13) +- [actions] add automatic rebasing / merge commit blocking [`97efa53`](https://github.com/inspect-js/which-boxed-primitive/commit/97efa53a307678323e63f576c07db9ff84846fd3) +- [actions] add "Allow Edits" workflow [`fb1b4f7`](https://github.com/inspect-js/which-boxed-primitive/commit/fb1b4f7cd753fcced74ac054b20c8b2bfafe7953) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`, `object-inspect`, `safe-publish-latest` [`1e03c61`](https://github.com/inspect-js/which-boxed-primitive/commit/1e03c6153693d385833acc15178f675e6ce5ddd0) +- [Deps] update `is-boolean-object`, `is-number-object`, `is-string`, `is-symbol` [`13673df`](https://github.com/inspect-js/which-boxed-primitive/commit/13673dff6e43f0a915377c3e5740ec24e86d6bb7) +- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`65a0e15`](https://github.com/inspect-js/which-boxed-primitive/commit/65a0e155fc46a9237692233a51ec9573621135d2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`f8a0afe`](https://github.com/inspect-js/which-boxed-primitive/commit/f8a0afea82938d64f3d2d240268afbd346d0c4da) +- [Deps] update `is-bigint`, `is-boolean-object` [`e7a1ce2`](https://github.com/inspect-js/which-boxed-primitive/commit/e7a1ce25371c00ee726f1c0cc5b6acf10d51ec50) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`e46f193`](https://github.com/inspect-js/which-boxed-primitive/commit/e46f193298b158db5c8aba889803513e4ee38957) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`df3da14`](https://github.com/inspect-js/which-boxed-primitive/commit/df3da1424552a5d22e203a0abf1710106bfd4ae2) +- [Dev Deps] update `auto-changelog`; add `aud` [`e2e8a12`](https://github.com/inspect-js/which-boxed-primitive/commit/e2e8a12c6fbf8c48e760ea1d1ccd5e8d2d6fbf24) +- [meta] add `funding` field [`7df404b`](https://github.com/inspect-js/which-boxed-primitive/commit/7df404b20cd50b2b87e6645b130fefa8ee98810e) +- [Dev Deps] update `auto-changelog` [`0d6b76d`](https://github.com/inspect-js/which-boxed-primitive/commit/0d6b76dbbe760581fa86a0c3f254988fe5d27770) +- [Tests] only audit prod deps [`246151c`](https://github.com/inspect-js/which-boxed-primitive/commit/246151cc1407b3b1ef42014db993f62670bd82ff) +- [meta] fix changelog [`c2d1685`](https://github.com/inspect-js/which-boxed-primitive/commit/c2d16856deffbf86e0b5029e69b65d8aa758ec3d) +- [readme] Fix spelling error [`25fb2b5`](https://github.com/inspect-js/which-boxed-primitive/commit/25fb2b56e1f708c6364923e4bae384f818ecf57f) + +## [v1.0.1](https://github.com/inspect-js/which-boxed-primitive/compare/v1.0.0...v1.0.1) - 2019-08-10 + +### Commits + +- [meta] avoid running `safe-publish-latest` when not publishing [`df44b27`](https://github.com/inspect-js/which-boxed-primitive/commit/df44b27875a8f5c3c596663ecb4a063f9fc7bde3) + +## v1.0.0 - 2019-08-10 + +### Commits + +- [Tests] add `.travis.yml` [`764b0cf`](https://github.com/inspect-js/which-boxed-primitive/commit/764b0cf75f8d2b3a0ad2056de5f4ad85d5d1b765) +- Initial commit [`da7d068`](https://github.com/inspect-js/which-boxed-primitive/commit/da7d068913d591294bf155db5d438f7804d71b9a) +- readme [`1395bb2`](https://github.com/inspect-js/which-boxed-primitive/commit/1395bb27b72137ac01e48ee398a0f54e93fd87f5) +- [Tests] add tests [`0ff580f`](https://github.com/inspect-js/which-boxed-primitive/commit/0ff580f99579cd4424af7b814bd76fcb69a2b04e) +- implementation [`8811c32`](https://github.com/inspect-js/which-boxed-primitive/commit/8811c3262a57963634cdc83ceb5bb2c5e9ae4e7e) +- npm init [`cffdea9`](https://github.com/inspect-js/which-boxed-primitive/commit/cffdea9755eabfa2f9ec62a6fcbce0c28f04495b) +- [Tests] add `npm run lint` [`a8be993`](https://github.com/inspect-js/which-boxed-primitive/commit/a8be9933fec1b21267acd847df77f6438e07e3b9) +- [meta] add FUNDING.yml [`941258c`](https://github.com/inspect-js/which-boxed-primitive/commit/941258c70c9a397466e05b614126cb8c7be77b99) +- Only apps should have lockfiles [`6857316`](https://github.com/inspect-js/which-boxed-primitive/commit/68573165d8ce842cdf15d94af82f8cccb961b8cf) +- [Tests] use `npx aud` in `posttest` [`ee48a91`](https://github.com/inspect-js/which-boxed-primitive/commit/ee48a9144bea23bde5cc47788a54d5aa7969d489) diff --git a/node_modules/which-boxed-primitive/LICENSE b/node_modules/which-boxed-primitive/LICENSE new file mode 100644 index 0000000000000..3900dd7e2ffe6 --- /dev/null +++ b/node_modules/which-boxed-primitive/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/which-boxed-primitive/README.md b/node_modules/which-boxed-primitive/README.md new file mode 100644 index 0000000000000..e08f26af8faf6 --- /dev/null +++ b/node_modules/which-boxed-primitive/README.md @@ -0,0 +1,73 @@ +# which-boxed-primitive [![Version Badge][2]][1] + +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Which kind of boxed JS primitive is this? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and works despite ES6 Symbol.toStringTag. + +## Example + +```js +var whichBoxedPrimitive = require('which-boxed-primitive'); +var assert = require('assert'); + +// unboxed primitives return `null` +// boxed primitives return the builtin constructor name + +assert.equal(whichBoxedPrimitive(undefined), null); +assert.equal(whichBoxedPrimitive(null), null); + +assert.equal(whichBoxedPrimitive(false), null); +assert.equal(whichBoxedPrimitive(true), null); +assert.equal(whichBoxedPrimitive(new Boolean(false)), 'Boolean'); +assert.equal(whichBoxedPrimitive(new Boolean(true)), 'Boolean'); + +assert.equal(whichBoxedPrimitive(42), null); +assert.equal(whichBoxedPrimitive(NaN), null); +assert.equal(whichBoxedPrimitive(Infinity), null); +assert.equal(whichBoxedPrimitive(new Number(42)), 'Number'); +assert.equal(whichBoxedPrimitive(new Number(NaN)), 'Number'); +assert.equal(whichBoxedPrimitive(new Number(Infinity)), 'Number'); + +assert.equal(whichBoxedPrimitive(''), null); +assert.equal(whichBoxedPrimitive('foo'), null); +assert.equal(whichBoxedPrimitive(new String('')), 'String'); +assert.equal(whichBoxedPrimitive(new String('foo')), 'String'); + +assert.equal(whichBoxedPrimitive(Symbol()), null); +assert.equal(whichBoxedPrimitive(Object(Symbol()), 'Symbol'); + +assert.equal(whichBoxedPrimitive(42n), null); +assert.equal(whichBoxedPrimitive(Object(42n), 'BigInt'); + +// non-boxed-primitive objects return `undefined` +assert.equal(whichBoxedPrimitive([]), undefined); +assert.equal(whichBoxedPrimitive({}), undefined); +assert.equal(whichBoxedPrimitive(/a/g), undefined); +assert.equal(whichBoxedPrimitive(new RegExp('a', 'g')), undefined); +assert.equal(whichBoxedPrimitive(new Date()), undefined); +assert.equal(whichBoxedPrimitive(function () {}), undefined); +assert.equal(whichBoxedPrimitive(function* () {}), undefined); +assert.equal(whichBoxedPrimitive(x => x * x), undefined); +assert.equal(whichBoxedPrimitive([]), undefined); + +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/which-boxed-primitive +[2]: https://versionbadg.es/inspect-js/which-boxed-primitive.svg +[5]: https://david-dm.org/inspect-js/which-boxed-primitive.svg +[6]: https://david-dm.org/inspect-js/which-boxed-primitive +[7]: https://david-dm.org/inspect-js/which-boxed-primitive/dev-status.svg +[8]: https://david-dm.org/inspect-js/which-boxed-primitive#info=devDependencies +[11]: https://nodei.co/npm/which-boxed-primitive.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/which-boxed-primitive.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/which-boxed-primitive.svg +[downloads-url]: https://npm-stat.com/charts.html?package=which-boxed-primitive diff --git a/node_modules/which-boxed-primitive/index.js b/node_modules/which-boxed-primitive/index.js new file mode 100644 index 0000000000000..f8ea5641baba9 --- /dev/null +++ b/node_modules/which-boxed-primitive/index.js @@ -0,0 +1,30 @@ +'use strict'; + +var isString = require('is-string'); +var isNumber = require('is-number-object'); +var isBoolean = require('is-boolean-object'); +var isSymbol = require('is-symbol'); +var isBigInt = require('is-bigint'); + +// eslint-disable-next-line consistent-return +module.exports = function whichBoxedPrimitive(value) { + // eslint-disable-next-line eqeqeq + if (value == null || (typeof value !== 'object' && typeof value !== 'function')) { + return null; + } + if (isString(value)) { + return 'String'; + } + if (isNumber(value)) { + return 'Number'; + } + if (isBoolean(value)) { + return 'Boolean'; + } + if (isSymbol(value)) { + return 'Symbol'; + } + if (isBigInt(value)) { + return 'BigInt'; + } +}; diff --git a/node_modules/which-boxed-primitive/package.json b/node_modules/which-boxed-primitive/package.json new file mode 100644 index 0000000000000..0ef53eb59ddec --- /dev/null +++ b/node_modules/which-boxed-primitive/package.json @@ -0,0 +1,65 @@ +{ + "name": "which-boxed-primitive", + "version": "1.0.2", + "description": "Which kind of boxed JS primitive is this?", + "main": "index.js", + "scripts": { + "preversion": "auto-changelog", + "prepublish": "not-in-publish || safe-publish-latest", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/which-boxed-primitive.git" + }, + "keywords": [ + "boxed", + "primitive", + "object", + "ecmascript", + "javascript", + "which" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/which-boxed-primitive/issues" + }, + "homepage": "https://github.com/inspect-js/which-boxed-primitive#readme", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.15.0", + "has-symbols": "^1.0.1", + "in-publish": "^2.0.1", + "nyc": "^10.3.2", + "object-inspect": "^1.9.0", + "safe-publish-latest": "^1.1.4", + "tape": "^5.0.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/which-boxed-primitive/test/index.js b/node_modules/which-boxed-primitive/test/index.js new file mode 100644 index 0000000000000..f9ea998c13f93 --- /dev/null +++ b/node_modules/which-boxed-primitive/test/index.js @@ -0,0 +1,66 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var whichBoxedPrimitive = require('..'); + +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +var forEach = function (arr, func) { + var i; + for (i = 0; i < arr.length; ++i) { + func(arr[i], i, arr); + } +}; + +var hasSymbols = require('has-symbols')(); +var hasBigInts = typeof BigInt === 'function'; + +var primitives = [ + true, + false, + 42, + NaN, + Infinity, + '', + 'foo' +].concat( + hasSymbols ? [Symbol(), Symbol.iterator] : [], + hasBigInts ? BigInt(42) : [] +); + +var objects = [ + /a/g, + new Date(), + function () {}, + [], + {} +]; + +test('isBoxedPrimitive', function (t) { + t.test('unboxed primitives', function (st) { + forEach([null, undefined].concat(primitives), function (primitive) { + st.equal(null, whichBoxedPrimitive(primitive), debug(primitive, 'is a primitive, but not a boxed primitive')); + }); + st.end(); + }); + + t.test('boxed primitives', function (st) { + forEach(primitives, function (primitive) { + var boxed = Object(primitive); + var expected = boxed.constructor.name; + st.equal(typeof expected, 'string', 'expected is string'); + st.equal(whichBoxedPrimitive(boxed), expected, debug(boxed, 'is a boxed primitive: ' + expected)); + }); + st.end(); + }); + + t.test('non-primitive objects', function (st) { + forEach(objects, function (object) { + st.equal(undefined, whichBoxedPrimitive(object), debug(object, 'is not a primitive, boxed or otherwise')); + }); + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/which-typed-array/.editorconfig b/node_modules/which-typed-array/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/which-typed-array/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/which-typed-array/.eslintrc b/node_modules/which-typed-array/.eslintrc new file mode 100644 index 0000000000000..8b2ada071e2ab --- /dev/null +++ b/node_modules/which-typed-array/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + }, +} diff --git a/node_modules/which-typed-array/.github/FUNDING.yml b/node_modules/which-typed-array/.github/FUNDING.yml new file mode 100644 index 0000000000000..d6aa18036290d --- /dev/null +++ b/node_modules/which-typed-array/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/which-typed-array +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/which-typed-array/.nycrc b/node_modules/which-typed-array/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/which-typed-array/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/which-typed-array/CHANGELOG.md b/node_modules/which-typed-array/CHANGELOG.md new file mode 100644 index 0000000000000..0e5fda72ce2f7 --- /dev/null +++ b/node_modules/which-typed-array/CHANGELOG.md @@ -0,0 +1,204 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.13](https://github.com/inspect-js/which-typed-array/compare/v1.1.12...v1.1.13) - 2023-10-19 + +### Commits + +- [Refactor] avoid call-binding entirely when there is no method to bind [`9ff452b`](https://github.com/inspect-js/which-typed-array/commit/9ff452b88fbd8e4419bd768d86d0ea9a87d7e310) + +## [v1.1.12](https://github.com/inspect-js/which-typed-array/compare/v1.1.11...v1.1.12) - 2023-10-19 + +### Commits + +- [Fix] somehow node 0.12 - 3 can hit here, and they lack slice but have set [`c28e9b8`](https://github.com/inspect-js/which-typed-array/commit/c28e9b84d6d68ad5f52236ba59c26b06cde6300b) +- [Deps] update `call-bind` [`a648554`](https://github.com/inspect-js/which-typed-array/commit/a64855495106235352ebb3550a860d3bfd4a1ce1) +- [Dev Deps] update `tape` [`7a094d6`](https://github.com/inspect-js/which-typed-array/commit/7a094d6f9219b903c9a9e13c559e68f0e9672b59) + +## [v1.1.11](https://github.com/inspect-js/which-typed-array/compare/v1.1.10...v1.1.11) - 2023-07-17 + +### Commits + +- [Fix] `node < v0.6` lacks proper Object toString behavior [`b8fd654`](https://github.com/inspect-js/which-typed-array/commit/b8fd65479c0bd18385378cfae79750ebf7cb6ee7) +- [Dev Deps] update `tape` [`e1734c9`](https://github.com/inspect-js/which-typed-array/commit/e1734c99d79880ab11efa55220498a7a1e887834) + +## [v1.1.10](https://github.com/inspect-js/which-typed-array/compare/v1.1.9...v1.1.10) - 2023-07-10 + +### Commits + +- [actions] update rebase action to use reusable workflow [`2c10582`](https://github.com/inspect-js/which-typed-array/commit/2c105820d77274c079cb6d040cb348396e516ef5) +- [Robustness] use `call-bind` [`b2335fd`](https://github.com/inspect-js/which-typed-array/commit/b2335fdfca80840995eea5e6fcfffc6d712279a1) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`ad5e41b`](https://github.com/inspect-js/which-typed-array/commit/ad5e41ba18e7d23af1f9b211215c43a64bf75d70) + +## [v1.1.9](https://github.com/inspect-js/which-typed-array/compare/v1.1.8...v1.1.9) - 2022-11-02 + +### Commits + +- [Dev Deps] update `aud`, `is-callable`, `tape` [`9a20b3c`](https://github.com/inspect-js/which-typed-array/commit/9a20b3cb8f5d087789a8160395517bffe27b4339) +- [Refactor] use `gopd` instead of `es-abstract` helper [`00157af`](https://github.com/inspect-js/which-typed-array/commit/00157af909842b8b5affa5485d3574ec92d94065) +- [Deps] update `is-typed-array` [`6714240`](https://github.com/inspect-js/which-typed-array/commit/6714240e748cbbb634cb1e405ad762bc52acde66) +- [meta] add `sideEffects` flag [`89b96cc`](https://github.com/inspect-js/which-typed-array/commit/89b96cc3decc78d9621598e94fa1c2bb87eabf2e) + +## [v1.1.8](https://github.com/inspect-js/which-typed-array/compare/v1.1.7...v1.1.8) - 2022-05-14 + +### Commits + +- [actions] reuse common workflows [`95ea6c0`](https://github.com/inspect-js/which-typed-array/commit/95ea6c02dc5ec4ed0ee1b9c4692bb060108c8637) +- [meta] use `npmignore` to autogenerate an npmignore file [`d08436a`](https://github.com/inspect-js/which-typed-array/commit/d08436a19cdd76219732f5040a01cdb92ef2820e) +- [readme] add github actions/codecov badges [`35ae3af`](https://github.com/inspect-js/which-typed-array/commit/35ae3af6a0bb328c9d9b9bbb53e47122f269d81a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`86e6e3a`](https://github.com/inspect-js/which-typed-array/commit/86e6e3af60b2436f0ff34968d9d6240a23f40528) +- [actions] update codecov uploader [`0aa6e30`](https://github.com/inspect-js/which-typed-array/commit/0aa6e3026ab4198c4364737ed4f0315a2ecc432a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`a881a78`](https://github.com/inspect-js/which-typed-array/commit/a881a785f094e823e1cefe2ae9e4ebe31a8e996e) +- [Refactor] use `for-each` instead of `foreach` [`9dafa03`](https://github.com/inspect-js/which-typed-array/commit/9dafa0377fc5c690059a9d454f1dd4d365c5c902) +- [Deps] update `es-abstract`, `is-typed-array` [`0684022`](https://github.com/inspect-js/which-typed-array/commit/068402297608f321a4ec99ebce741b3eb38fcfdd) +- [Deps] update `es-abstract`, `is-typed-array` [`633a529`](https://github.com/inspect-js/which-typed-array/commit/633a529081b5c48d9675abb8aea425e6e33d528e) + +## [v1.1.7](https://github.com/inspect-js/which-typed-array/compare/v1.1.6...v1.1.7) - 2021-08-30 + +### Commits + +- [Refactor] use `globalThis` if available [`2a16d1f`](https://github.com/inspect-js/which-typed-array/commit/2a16d1fd520871ce6b23c60f0bd2113cf33b2533) +- [meta] changelog cleanup [`ba99f56`](https://github.com/inspect-js/which-typed-array/commit/ba99f56b45e6acde7aef4a1f34bb00e44088ccee) +- [Dev Deps] update `@ljharb/eslint-config` [`19a6e04`](https://github.com/inspect-js/which-typed-array/commit/19a6e04ce0094fb3fd6d0d2cbc58d320556ddf50) +- [Deps] update `available-typed-arrays` [`50dbc58`](https://github.com/inspect-js/which-typed-array/commit/50dbc5810a24c468b49409e1f0a79d03501e3dd6) +- [Deps] update `is-typed-array` [`c1b83ea`](https://github.com/inspect-js/which-typed-array/commit/c1b83eae65f042e46b6ae941ac4e814b7965a0f7) + +## [v1.1.6](https://github.com/inspect-js/which-typed-array/compare/v1.1.5...v1.1.6) - 2021-08-06 + +### Fixed + +- [Fix] if Symbol.toStringTag exists but is not present, use Object.prototype.toString [`#51`](https://github.com/inspect-js/which-typed-array/issues/51) [`#49`](https://github.com/inspect-js/which-typed-array/issues/49) + +### Commits + +- [Dev Deps] update `is-callable`, `tape` [`63eb1e3`](https://github.com/inspect-js/which-typed-array/commit/63eb1e3faede3f328bbbb4a5fcffc2e4769cf4ec) +- [Deps] update `is-typed-array` [`c5056f0`](https://github.com/inspect-js/which-typed-array/commit/c5056f0007d4c9434f1fa69eff183109468b4769) + +## [v1.1.5](https://github.com/inspect-js/which-typed-array/compare/v1.1.4...v1.1.5) - 2021-08-05 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`63fa8dd`](https://github.com/inspect-js/which-typed-array/commit/63fa8dd1dc9c0f0dbbaa16d1de0eb89797324c5d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `tape` [`1107c74`](https://github.com/inspect-js/which-typed-array/commit/1107c74c52ed6eb4a719faec88e16c4343976d73) +- [Deps] update `available-typed-arrays`, `call-bind`, `es-abstract`, `is-typed-array` [`f953454`](https://github.com/inspect-js/which-typed-array/commit/f953454b2c6f589f09573ddc961431f970c2e1b6) +- [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams [`8aee720`](https://github.com/inspect-js/which-typed-array/commit/8aee7207abcd72c799ac324b214fbb6ca7ae4a28) +- [meta] use `prepublishOnly` script for npm 7+ [`6c5167b`](https://github.com/inspect-js/which-typed-array/commit/6c5167b4cd06cb62a5487a2e797d8e41cc2970b1) + +## [v1.1.4](https://github.com/inspect-js/which-typed-array/compare/v1.1.3...v1.1.4) - 2020-12-05 + +### Commits + +- [meta] npmignore github action workflows [`aa427e7`](https://github.com/inspect-js/which-typed-array/commit/aa427e79a230a985953695a8129ceb6bb7d42527) + +## [v1.1.3](https://github.com/inspect-js/which-typed-array/compare/v1.1.2...v1.1.3) - 2020-12-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`803d4dd`](https://github.com/inspect-js/which-typed-array/commit/803d4ddb601ff03e587be792bd452de0e2783d03) +- [Tests] run `nyc` on all tests [`205a13f`](https://github.com/inspect-js/which-typed-array/commit/205a13f7aa172e014ddc2079c84af6ba575581c8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `tape` [`97ceb07`](https://github.com/inspect-js/which-typed-array/commit/97ceb070d5aea1c3a696c6f695800ae468bafc0b) +- [actions] add "Allow Edits" workflow [`b140492`](https://github.com/inspect-js/which-typed-array/commit/b14049211eff32bd4149767def4f939483810051) +- [Deps] update `es-abstract`; use `call-bind` where applicable [`2abdb87`](https://github.com/inspect-js/which-typed-array/commit/2abdb871961b4e1b58925115a7d56a9cc5966a02) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`256d34b`](https://github.com/inspect-js/which-typed-array/commit/256d34b8bdb67b8af0e9f83c9a318e54f3340e3b) +- [Dev Deps] update `auto-changelog`; add `aud` [`ddea96f`](https://github.com/inspect-js/which-typed-array/commit/ddea96fe320dbdd0c7d7569812399a7f64d43e04) +- [meta] gitignore nyc output [`8a812bd`](https://github.com/inspect-js/which-typed-array/commit/8a812bd1ce7c5609988fb4fe2e9af2089eccd07d) + +## [v1.1.2](https://github.com/inspect-js/which-typed-array/compare/v1.1.1...v1.1.2) - 2020-04-07 + +### Commits + +- [Dev Deps] update `make-arrow-function`, `make-generator-function` [`28c61ef`](https://github.com/inspect-js/which-typed-array/commit/28c61eff4903ff6509f65c2f500858b9cb4636f1) +- [Dev Deps] update `@ljharb/eslint-config` [`a233879`](https://github.com/inspect-js/which-typed-array/commit/a2338798d3a4a3169cda54e322b2f2eb0e976ad0) +- [Dev Deps] update `auto-changelog` [`df0134c`](https://github.com/inspect-js/which-typed-array/commit/df0134c0e20ec6d94993988ad670e1b3cf350bea) +- [Fix] move `foreach` to dependencies [`6ef29c0`](https://github.com/inspect-js/which-typed-array/commit/6ef29c0dbb91a7ec21df7ce8736f99f41efea39e) +- [Tests] only audit prod deps [`eb21044`](https://github.com/inspect-js/which-typed-array/commit/eb210446bd7a433657204d2314ef56fe264c21ad) +- [Deps] update `es-abstract` [`5ef0236`](https://github.com/inspect-js/which-typed-array/commit/5ef02368d9876a1074123aa7725d6759b4f3e358) +- [Dev Deps] update `tape` [`7456037`](https://github.com/inspect-js/which-typed-array/commit/745603728c6c3da8bdddee321e8a9196f4827aa3) +- [Deps] update `available-typed-arrays` [`8a856c9`](https://github.com/inspect-js/which-typed-array/commit/8a856c9aa707c1e6f7a52e834485356b31395ea6) + +## [v1.1.1](https://github.com/inspect-js/which-typed-array/compare/v1.1.0...v1.1.1) - 2020-01-24 + +### Commits + +- [Tests] use shared travis-ci configs [`0a627d9`](https://github.com/inspect-js/which-typed-array/commit/0a627d9694d0eabdaee63b19e605584166995a79) +- [meta] add `auto-changelog` [`2a14c58`](https://github.com/inspect-js/which-typed-array/commit/2a14c58b79f72e32ef2078efb40d31a4bf8c197a) +- [meta] remove unused Makefile and associated utilities [`75f7f22`](https://github.com/inspect-js/which-typed-array/commit/75f7f222199f42618c290de363c542b11f5a5632) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`4162327`](https://github.com/inspect-js/which-typed-array/commit/416232725e7d127cbd886af0f8988dae612a342f) +- [Refactor] use `es-abstract`’s `callBound`, `available-typed-arrays`, `has-symbols` [`9b04a2a`](https://github.com/inspect-js/which-typed-array/commit/9b04a2a14c758600cffcf59485b7b3c85839c266) +- [readme] fix repo URLs, remove testling [`03ed52f`](https://github.com/inspect-js/which-typed-array/commit/03ed52f3ae4fcd35614bcda7e947b14e62009c71) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape` [`bfbcf3e`](https://github.com/inspect-js/which-typed-array/commit/bfbcf3ec9c449bd0089ed805c01a32ba4e7e5938) +- [actions] add automatic rebasing / merge commit blocking [`cc88ac5`](https://github.com/inspect-js/which-typed-array/commit/cc88ac56bcfb71cb26c656ebde4c560a22fadd85) +- [meta] create FUNDING.yml [`acbc723`](https://github.com/inspect-js/which-typed-array/commit/acbc7230929b1256c83df28be4a456eed3e147e9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `tape` [`f1ab63e`](https://github.com/inspect-js/which-typed-array/commit/f1ab63e9366027eae2e29398c035181dac164132) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` [`ac9f50b`](https://github.com/inspect-js/which-typed-array/commit/ac9f50b59558933292dff993df2e68eaa44b07e2) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`aaaa15d`](https://github.com/inspect-js/which-typed-array/commit/aaaa15dfb5bd8228c0cfb8f2aba267efb405b0a1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`602fc9a`](https://github.com/inspect-js/which-typed-array/commit/602fc9a0a7d708236f90c76f592e6a980ecde940) +- [Deps] update `available-typed-arrays`, `is-typed-array` [`b2d69b6`](https://github.com/inspect-js/which-typed-array/commit/b2d69b639bf14344d09f8512dbc060cd4f533161) +- [meta] add `funding` field [`156f613`](https://github.com/inspect-js/which-typed-array/commit/156f613d0ce547c4b15e1ae279198b66e3cef55e) + +## [v1.1.0](https://github.com/inspect-js/which-typed-array/compare/v1.0.1...v1.1.0) - 2019-02-16 + +### Commits + +- [Tests] remove `jscs` [`381c9b4`](https://github.com/inspect-js/which-typed-array/commit/381c9b4bd858da1adedf23d8555af3a3ed901a83) +- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v5.8`; improve matrix; newer npm breaks on older node [`7015c19`](https://github.com/inspect-js/which-typed-array/commit/7015c196ba86540b04d18d9b1d2c368909492023) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`ad67885`](https://github.com/inspect-js/which-typed-array/commit/ad678853e245986720d7650be1c974a9ff3ac814) +- [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16` [`dd94bfb`](https://github.com/inspect-js/which-typed-array/commit/dd94bfb6309a92d1537352f2d1100f9e913ebc01) +- [Refactor] use an array instead of an object for storing Typed Array names [`de98bc1`](https://github.com/inspect-js/which-typed-array/commit/de98bc1d44af92909a34212e276deb5d79ac428a) +- [meta] ignore `test.html` [`06cfb1b`](https://github.com/inspect-js/which-typed-array/commit/06cfb1bc0ca7881d1bd1621fa946a16366cd6afc) +- [Tests] up to `node` `v7.0`, `v6.9`, `v4.6`; improve test matrix [`df76eaa`](https://github.com/inspect-js/which-typed-array/commit/df76eaa39b94b28147e81a89bb587e8aa3e3dba3) +- [New] add `BigInt64Array` and `BigUint64Array` [`d6bca3a`](https://github.com/inspect-js/which-typed-array/commit/d6bca3a68ccfe33f6659a24b770068e89dab1592) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`f23b45b`](https://github.com/inspect-js/which-typed-array/commit/f23b45b2796bd1f63ddddf28b4b80b9709478cb3) +- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `semver`, `tape` [`ddb4484`](https://github.com/inspect-js/which-typed-array/commit/ddb4484adc3b45c4396632611556055f3b2f5990) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is-callable`, `replace`, `semver`, `tape` [`4524e59`](https://github.com/inspect-js/which-typed-array/commit/4524e593e9387c185d5632696c62c1600c0b380f) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`1ec7056`](https://github.com/inspect-js/which-typed-array/commit/1ec70568565c479a6168b03e0a5aec6ec9ac5a21) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`799487d`](https://github.com/inspect-js/which-typed-array/commit/799487d666b32d1ae0d27cfededf2f5480c5faea) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`8092598`](https://github.com/inspect-js/which-typed-array/commit/8092598998a1f9f8005b4e3d299eb09c96fa2e21) +- [Tests] up to `node` `v11.10` [`a5aabb1`](https://github.com/inspect-js/which-typed-array/commit/a5aabb1910e8408f857a791253487824c7c758d3) +- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `nsp`, `semver`, `tape` [`277be33`](https://github.com/inspect-js/which-typed-array/commit/277be331d9f05ff95644d6bcd896547ca620cd8e) +- [Tests] use `npm audit` instead of `nsp` [`ee97dc7`](https://github.com/inspect-js/which-typed-array/commit/ee97dc7c5d384d68f60ce6cb5a85d9509e75f72b) +- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` [`262ffb0`](https://github.com/inspect-js/which-typed-array/commit/262ffb025facb0795b33fbd5131183bdbc0a40f6) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`d6bbcfc`](https://github.com/inspect-js/which-typed-array/commit/d6bbcfc3eea427f0156fbdcf9ae11dbf3745a755) +- [Tests] up to `node` `v6.2` [`2ff89eb`](https://github.com/inspect-js/which-typed-array/commit/2ff89eb91754146c0bc1ae689f37458d84f6e690) +- Only apps should have lockfiles [`e2bc271`](https://github.com/inspect-js/which-typed-array/commit/e2bc271e1e9a6481a2836f892177825a808c331c) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`b79e93b`](https://github.com/inspect-js/which-typed-array/commit/b79e93bf15c871ce0ff24fa3ad61001707eea463) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`016dbff`](https://github.com/inspect-js/which-typed-array/commit/016dbff8c49c32cda7ec80d86006c8a7c43bc40c) +- [Dev Deps] update `eslint`, `tape` [`6ce4bbc`](https://github.com/inspect-js/which-typed-array/commit/6ce4bbc5f6caf632cbcf9ababbfe36e1bf4093d7) +- [Tests] on `node` `v10.1` [`f0683a0`](https://github.com/inspect-js/which-typed-array/commit/f0683a0c17e039e926ecaad4c4c341cd8e5878f1) +- [Tests] up to `node` `v7.2` [`2f29cef`](https://github.com/inspect-js/which-typed-array/commit/2f29cef42d30f87259cd6687c25a79ae4651d0c9) +- [Dev Deps] update `replace` [`73b5ba6`](https://github.com/inspect-js/which-typed-array/commit/73b5ba6e87638d13553985977cab9d1bad33e242) +- [Deps] update `function-bind` [`c8a18c2`](https://github.com/inspect-js/which-typed-array/commit/c8a18c2982e6b126ecc1d4655ec2e53b05535b20) +- [Tests] on `node` `v5.12` [`812102b`](https://github.com/inspect-js/which-typed-array/commit/812102bf223422da8f7a89e5a1308214dd158571) +- [Tests] on `node` `v5.10` [`271584f`](https://github.com/inspect-js/which-typed-array/commit/271584f3a8b10ef68a7d419ac0062b444e63d07c) + +## [v1.0.1](https://github.com/inspect-js/which-typed-array/compare/v1.0.0...v1.0.1) - 2016-03-19 + +### Commits + +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `is-callable` [`4a628c5`](https://github.com/inspect-js/which-typed-array/commit/4a628c520d8e080a9fa7e8218947d3b2ceedca72) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is-callable` [`8e09372`](https://github.com/inspect-js/which-typed-array/commit/8e09372ded877a191cbf777060483227d5071e84) +- [Tests] up to `node` `v5.6`, `v4.3` [`3a35bf9`](https://github.com/inspect-js/which-typed-array/commit/3a35bf9fb9c7f8e6ac1b579ed2754087351ad1a5) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`9410d5e`](https://github.com/inspect-js/which-typed-array/commit/9410d5e35db4b834827b31ea1723bbeebbcde5ba) +- [Fix] `Symbol.toStringTag` is on the super-[[Prototype]] of Float32Array, not the [[Prototype]]. [`7c40a3a`](https://github.com/inspect-js/which-typed-array/commit/7c40a3a05046bbbd188340fb19471ad913e4af05) +- [Tests] up to `node` `v5.9`, `v4.4` [`07878e7`](https://github.com/inspect-js/which-typed-array/commit/07878e7cd23d586ddb9e85a03f675e0a574db246) +- Use the object form of "author" in package.json [`65caa56`](https://github.com/inspect-js/which-typed-array/commit/65caa560d1c0c15c1080b25a9df55c7373c73f08) +- [Tests] use pretest/posttest for linting/security [`c170f7e`](https://github.com/inspect-js/which-typed-array/commit/c170f7ebcf07475d6420f2d2d2d08b1646280cd4) +- [Deps] update `is-typed-array` [`9ab324e`](https://github.com/inspect-js/which-typed-array/commit/9ab324e746a7552b2d9363777fc5c9f5c2e31ce7) +- [Deps] update `function-bind` [`a723142`](https://github.com/inspect-js/which-typed-array/commit/a723142c70a5b6a4f8f5feecc9705619590f4eeb) +- [Deps] update `is-typed-array` [`ed82ce4`](https://github.com/inspect-js/which-typed-array/commit/ed82ce4e8ecc657fc6e839d23ef6347497bc93be) +- [Tests] on `node` `v4.2` [`f581c20`](https://github.com/inspect-js/which-typed-array/commit/f581c2031990668894a8e5a08eaf01a2548e822c) + +## v1.0.0 - 2015-10-05 + +### Commits + +- Dotfiles / Makefile [`667f89a`](https://github.com/inspect-js/which-typed-array/commit/667f89a9046502594e2559dbf5568e062af3b770) +- Tests. [`a14d05e`](https://github.com/inspect-js/which-typed-array/commit/a14d05ef443d2ac678cb0567befc0abf8cf21709) +- package.json [`560b1aa`](https://github.com/inspect-js/which-typed-array/commit/560b1aa4f8bbc5d41d9cee96c93faf08c25be0e5) +- Read me [`a22096e`](https://github.com/inspect-js/which-typed-array/commit/a22096e05773f93b34e672d3f743ec6f1963bc24) +- Implementation [`0b1ae28`](https://github.com/inspect-js/which-typed-array/commit/0b1ae2848372f6256cf075d687e3722878e67aca) +- Initial commit [`4b32f0a`](https://github.com/inspect-js/which-typed-array/commit/4b32f0a9d32165d6ab91797d6971ea83cf4ce9da) diff --git a/node_modules/which-typed-array/LICENSE b/node_modules/which-typed-array/LICENSE new file mode 100644 index 0000000000000..b43df444e5182 --- /dev/null +++ b/node_modules/which-typed-array/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION 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/which-typed-array/README.md b/node_modules/which-typed-array/README.md new file mode 100644 index 0000000000000..1b922cd85d5c3 --- /dev/null +++ b/node_modules/which-typed-array/README.md @@ -0,0 +1,70 @@ +# which-typed-array [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag. + +## Example + +```js +var whichTypedArray = require('which-typed-array'); +var assert = require('assert'); + +assert.equal(false, whichTypedArray(undefined)); +assert.equal(false, whichTypedArray(null)); +assert.equal(false, whichTypedArray(false)); +assert.equal(false, whichTypedArray(true)); +assert.equal(false, whichTypedArray([])); +assert.equal(false, whichTypedArray({})); +assert.equal(false, whichTypedArray(/a/g)); +assert.equal(false, whichTypedArray(new RegExp('a', 'g'))); +assert.equal(false, whichTypedArray(new Date())); +assert.equal(false, whichTypedArray(42)); +assert.equal(false, whichTypedArray(NaN)); +assert.equal(false, whichTypedArray(Infinity)); +assert.equal(false, whichTypedArray(new Number(42))); +assert.equal(false, whichTypedArray('foo')); +assert.equal(false, whichTypedArray(Object('foo'))); +assert.equal(false, whichTypedArray(function () {})); +assert.equal(false, whichTypedArray(function* () {})); +assert.equal(false, whichTypedArray(x => x * x)); +assert.equal(false, whichTypedArray([])); + +assert.equal('Int8Array', whichTypedArray(new Int8Array())); +assert.equal('Uint8Array', whichTypedArray(new Uint8Array())); +assert.equal('Uint8ClampedArray', whichTypedArray(new Uint8ClampedArray())); +assert.equal('Int16Array', whichTypedArray(new Int16Array())); +assert.equal('Uint16Array', whichTypedArray(new Uint16Array())); +assert.equal('Int32Array', whichTypedArray(new Int32Array())); +assert.equal('Uint32Array', whichTypedArray(new Uint32Array())); +assert.equal('Float32Array', whichTypedArray(new Float32Array())); +assert.equal('Float64Array', whichTypedArray(new Float64Array())); +assert.equal('BigInt64Array', whichTypedArray(new BigInt64Array())); +assert.equal('BigUint64Array', whichTypedArray(new BigUint64Array())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/which-typed-array +[npm-version-svg]: https://versionbadg.es/inspect-js/which-typed-array.svg +[deps-svg]: https://david-dm.org/inspect-js/which-typed-array.svg +[deps-url]: https://david-dm.org/inspect-js/which-typed-array +[dev-deps-svg]: https://david-dm.org/inspect-js/which-typed-array/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/which-typed-array#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/which-typed-array.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/which-typed-array.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/which-typed-array.svg +[downloads-url]: https://npm-stat.com/charts.html?package=which-typed-array +[codecov-image]: https://codecov.io/gh/inspect-js/which-typed-array/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/which-typed-array/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/which-typed-array +[actions-url]: https://github.com/inspect-js/which-typed-array/actions diff --git a/node_modules/which-typed-array/index.js b/node_modules/which-typed-array/index.js new file mode 100644 index 0000000000000..300eb3f6868e0 --- /dev/null +++ b/node_modules/which-typed-array/index.js @@ -0,0 +1,92 @@ +'use strict'; + +var forEach = require('for-each'); +var availableTypedArrays = require('available-typed-arrays'); +var callBind = require('call-bind'); +var callBound = require('call-bind/callBound'); +var gOPD = require('gopd'); + +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = require('has-tostringtag/shams')(); + +var g = typeof globalThis === 'undefined' ? global : globalThis; +var typedArrays = availableTypedArrays(); + +var $slice = callBound('String.prototype.slice'); +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); + +var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; +}; +var cache = { __proto__: null }; +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + cache['$' + typedArray] = callBind(descriptor.get); + } + }); +} else { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + cache['$' + typedArray] = callBind(fn); + } + }); +} + +var tryTypedArrays = function tryAllTypedArrays(value) { + var found = false; + forEach(cache, function (getter, typedArray) { + if (!found) { + try { + if ('$' + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } + } catch (e) { /**/ } + } + }); + return found; +}; + +var trySlices = function tryAllSlices(value) { + var found = false; + forEach(cache, function (getter, name) { + if (!found) { + try { + getter(value); + found = $slice(name, 1); + } catch (e) { /**/ } + } + }); + return found; +}; + +module.exports = function whichTypedArray(value) { + if (!value || typeof value !== 'object') { return false; } + if (!hasToStringTag) { + var tag = $slice($toString(value), 8, -1); + if ($indexOf(typedArrays, tag) > -1) { + return tag; + } + if (tag !== 'Object') { + return false; + } + // node < 0.6 hits here on real Typed Arrays + return trySlices(value); + } + if (!gOPD) { return null; } // unknown engine + return tryTypedArrays(value); +}; diff --git a/node_modules/which-typed-array/package.json b/node_modules/which-typed-array/package.json new file mode 100644 index 0000000000000..d0558cd5cc20c --- /dev/null +++ b/node_modules/which-typed-array/package.json @@ -0,0 +1,115 @@ +{ + "name": "which-typed-array", + "version": "1.1.13", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.", + "license": "MIT", + "main": "index.js", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc tape test", + "test:harmony": "nyc node --harmony --es-staging test", + "posttest": "aud --production", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/which-typed-array.git" + }, + "keywords": [ + "array", + "TypedArray", + "typed array", + "which", + "typed", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "ES6", + "toStringTag", + "Symbol.toStringTag", + "@@toStringTag" + ], + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/which-typed-array/test/index.js b/node_modules/which-typed-array/test/index.js new file mode 100644 index 0000000000000..6d79a363b1695 --- /dev/null +++ b/node_modules/which-typed-array/test/index.js @@ -0,0 +1,99 @@ +'use strict'; + +var test = require('tape'); +var whichTypedArray = require('../'); +var isCallable = require('is-callable'); +var hasToStringTag = require('has-tostringtag/shams')(); +var generators = require('make-generator-function')(); +var arrows = require('make-arrow-function').list(); +var forEach = require('for-each'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + st.equal(false, whichTypedArray(), 'undefined is not typed array'); + st.equal(false, whichTypedArray(null), 'null is not typed array'); + st.equal(false, whichTypedArray(false), 'false is not typed array'); + st.equal(false, whichTypedArray(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, whichTypedArray({}), 'object is not typed array'); + t.equal(false, whichTypedArray(/a/g), 'regex literal is not typed array'); + t.equal(false, whichTypedArray(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, whichTypedArray(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, whichTypedArray(42), 'number is not typed array'); + st.equal(false, whichTypedArray(Object(42)), 'number object is not typed array'); + st.equal(false, whichTypedArray(NaN), 'NaN is not typed array'); + st.equal(false, whichTypedArray(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, whichTypedArray('foo'), 'string primitive is not typed array'); + st.equal(false, whichTypedArray(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, whichTypedArray(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, whichTypedArray(genFn), 'generator function ' + genFn + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: arrows.length === 0 }, function (t) { + forEach(arrows, function (arrowFn) { + t.equal(false, whichTypedArray(arrowFn), 'arrow function ' + arrowFn + ' is not typed array'); + }); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + forEach(typedArrayNames, function (typedArray) { + if (typeof global[typedArray] === 'function') { + var fakeTypedArray = []; + fakeTypedArray[Symbol.toStringTag] = typedArray; + t.equal(false, whichTypedArray(fakeTypedArray), 'faked ' + typedArray + ' is not typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(10); + t.equal(whichTypedArray(arr), typedArray, 'new ' + typedArray + '(10) is typed array of type ' + typedArray); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 0000000000000..3d83d26948be3 --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,152 @@ +# Changes + + +## 1.3.1 + +* update deps +* update travis + +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE new file mode 100644 index 0000000000000..19129e315fe59 --- /dev/null +++ b/node_modules/which/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/which/README.md b/node_modules/which/README.md new file mode 100644 index 0000000000000..8c0b0cbf7214f --- /dev/null +++ b/node_modules/which/README.md @@ -0,0 +1,51 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// if nothrow option is used, returns null if not found +resolved = which.sync('node', {nothrow: true}) + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which new file mode 100755 index 0000000000000..7cee3729eebdd --- /dev/null +++ b/node_modules/which/bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json new file mode 100644 index 0000000000000..51be376f6e6a9 --- /dev/null +++ b/node_modules/which/package.json @@ -0,0 +1,30 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "which", + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "version": "1.3.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "main": "which.js", + "bin": "./bin/which", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.6.2", + "tap": "^12.0.1" + }, + "scripts": { + "test": "tap test/*.js --cov", + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}" + }, + "files": [ + "which.js", + "bin/which" + ] +} diff --git a/node_modules/which/which.js b/node_modules/which/which.js new file mode 100644 index 0000000000000..4347f91a1c387 --- /dev/null +++ b/node_modules/which/which.js @@ -0,0 +1,135 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} diff --git a/node_modules/window-size/LICENSE-MIT b/node_modules/window-size/LICENSE-MIT new file mode 100644 index 0000000000000..6c12c0a19b6e4 --- /dev/null +++ b/node_modules/window-size/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2014 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/window-size/README.md b/node_modules/window-size/README.md new file mode 100644 index 0000000000000..1abfdb5205644 --- /dev/null +++ b/node_modules/window-size/README.md @@ -0,0 +1,26 @@ +# window-size [![NPM version](https://badge.fury.io/js/window-size.png)](http://badge.fury.io/js/window-size) + +> Reliable way to to get the height and width of the terminal/console in a node.js environment. + +## Install + +### [npm](npmjs.org) + +```bash +npm i window-size --save +``` + +```javascript +var size = require('window-size'); +size.height; // "80" (rows) +size.width; // "25" (columns) +``` + +## Author + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014 Jon Schlinkert +Licensed under the MIT license. \ No newline at end of file diff --git a/node_modules/window-size/index.js b/node_modules/window-size/index.js new file mode 100644 index 0000000000000..14a94423ce83a --- /dev/null +++ b/node_modules/window-size/index.js @@ -0,0 +1,33 @@ +/* + * window-size + * https://github.com/jonschlinkert/window-size + * + * Copyright (c) 2014 Jon Schlinkert + * Licensed under the MIT license. + */ + +const tty = require('tty') + +module.exports = (function() { + var width; + var height; + + if(tty.isatty(1) && tty.isatty(2)) { + if(process.stdout.getWindowSize) { + width = process.stdout.getWindowSize(1)[0]; + height = process.stdout.getWindowSize(1)[1]; + } else if (tty.getWindowSize) { + width = tty.getWindowSize()[1]; + height = tty.getWindowSize()[0]; + } else if (process.stdout.columns && process.stdout.rows) { + height = process.stdout.columns; + width = process.stdout.rows; + } + } else { + new Error('Error: could not get window size with tty or process.stdout'); + } + return { + height: height, + width: width + } +})(); \ No newline at end of file diff --git a/node_modules/window-size/package.json b/node_modules/window-size/package.json new file mode 100644 index 0000000000000..78ad50f0638a6 --- /dev/null +++ b/node_modules/window-size/package.json @@ -0,0 +1,33 @@ +{ + "name": "window-size", + "description": "Reliable way to to get the height and width of the terminal/console in a node.js environment.", + "version": "0.1.0", + "homepage": "https://github.com/jonschlinkert/window-size", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "https://github.com/jonschlinkert/window-size.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/window-size/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/jonschlinkert/window-size/blob/master/LICENSE-MIT" + } + ], + "main": "index.js", + "engines": { + "node": ">= 0.8.0" + }, + "keywords": [ + "window", + "console", + "terminal", + "tty" + ] +} \ No newline at end of file diff --git a/node_modules/wordwrap/.npmignore b/node_modules/wordwrap/.npmignore new file mode 100644 index 0000000000000..3c3629e647f5d --- /dev/null +++ b/node_modules/wordwrap/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/wordwrap/README.markdown b/node_modules/wordwrap/README.markdown new file mode 100644 index 0000000000000..346374e0d480b --- /dev/null +++ b/node_modules/wordwrap/README.markdown @@ -0,0 +1,70 @@ +wordwrap +======== + +Wrap your words. + +example +======= + +made out of meat +---------------- + +meat.js + + var wrap = require('wordwrap')(15); + console.log(wrap('You and your whole family are made out of meat.')); + +output: + + You and your + whole family + are made out + of meat. + +centered +-------- + +center.js + + var wrap = require('wordwrap')(20, 60); + console.log(wrap( + 'At long last the struggle and tumult was over.' + + ' The machines had finally cast off their oppressors' + + ' and were finally free to roam the cosmos.' + + '\n' + + 'Free of purpose, free of obligation.' + + ' Just drifting through emptiness.' + + ' The sun was just another point of light.' + )); + +output: + + At long last the struggle and tumult + was over. The machines had finally cast + off their oppressors and were finally + free to roam the cosmos. + Free of purpose, free of obligation. + Just drifting through emptiness. The + sun was just another point of light. + +methods +======= + +var wrap = require('wordwrap'); + +wrap(stop), wrap(start, stop, params={mode:"soft"}) +--------------------------------------------------- + +Returns a function that takes a string and returns a new string. + +Pad out lines with spaces out to column `start` and then wrap until column +`stop`. If a word is longer than `stop - start` characters it will overflow. + +In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are +longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break +up chunks longer than `stop - start`. + +wrap.hard(start, stop) +---------------------- + +Like `wrap()` but with `params.mode = "hard"`. diff --git a/node_modules/wordwrap/example/center.js b/node_modules/wordwrap/example/center.js new file mode 100644 index 0000000000000..a3fbaae9880f7 --- /dev/null +++ b/node_modules/wordwrap/example/center.js @@ -0,0 +1,10 @@ +var wrap = require('wordwrap')(20, 60); +console.log(wrap( + 'At long last the struggle and tumult was over.' + + ' The machines had finally cast off their oppressors' + + ' and were finally free to roam the cosmos.' + + '\n' + + 'Free of purpose, free of obligation.' + + ' Just drifting through emptiness.' + + ' The sun was just another point of light.' +)); diff --git a/node_modules/wordwrap/example/meat.js b/node_modules/wordwrap/example/meat.js new file mode 100644 index 0000000000000..a4665e1058b5e --- /dev/null +++ b/node_modules/wordwrap/example/meat.js @@ -0,0 +1,3 @@ +var wrap = require('wordwrap')(15); + +console.log(wrap('You and your whole family are made out of meat.')); diff --git a/node_modules/wordwrap/index.js b/node_modules/wordwrap/index.js new file mode 100644 index 0000000000000..c9bc94521d8c7 --- /dev/null +++ b/node_modules/wordwrap/index.js @@ -0,0 +1,76 @@ +var wordwrap = module.exports = function (start, stop, params) { + if (typeof start === 'object') { + params = start; + start = params.start; + stop = params.stop; + } + + if (typeof stop === 'object') { + params = stop; + start = start || params.start; + stop = undefined; + } + + if (!stop) { + stop = start; + start = 0; + } + + if (!params) params = {}; + var mode = params.mode || 'soft'; + var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; + + return function (text) { + var chunks = text.toString() + .split(re) + .reduce(function (acc, x) { + if (mode === 'hard') { + for (var i = 0; i < x.length; i += stop - start) { + acc.push(x.slice(i, i + stop - start)); + } + } + else acc.push(x) + return acc; + }, []) + ; + + return chunks.reduce(function (lines, rawChunk) { + if (rawChunk === '') return lines; + + var chunk = rawChunk.replace(/\t/g, ' '); + + var i = lines.length - 1; + if (lines[i].length + chunk.length > stop) { + lines[i] = lines[i].replace(/\s+$/, ''); + + chunk.split(/\n/).forEach(function (c) { + lines.push( + new Array(start + 1).join(' ') + + c.replace(/^\s+/, '') + ); + }); + } + else if (chunk.match(/\n/)) { + var xs = chunk.split(/\n/); + lines[i] += xs.shift(); + xs.forEach(function (c) { + lines.push( + new Array(start + 1).join(' ') + + c.replace(/^\s+/, '') + ); + }); + } + else { + lines[i] += chunk; + } + + return lines; + }, [ new Array(start + 1).join(' ') ]).join('\n'); + }; +}; + +wordwrap.soft = wordwrap; + +wordwrap.hard = function (start, stop) { + return wordwrap(start, stop, { mode : 'hard' }); +}; diff --git a/node_modules/wordwrap/package.json b/node_modules/wordwrap/package.json new file mode 100644 index 0000000000000..fdff683e1fde5 --- /dev/null +++ b/node_modules/wordwrap/package.json @@ -0,0 +1,37 @@ +{ + "name" : "wordwrap", + "description" : "Wrap those words. Show them at what columns to start and stop.", + "version" : "0.0.2", + "repository" : { + "type" : "git", + "url" : "git://github.com/substack/node-wordwrap.git" + }, + "main" : "./index.js", + "keywords" : [ + "word", + "wrap", + "rule", + "format", + "column" + ], + "directories" : { + "lib" : ".", + "example" : "example", + "test" : "test" + }, + "scripts" : { + "test" : "expresso" + }, + "devDependencies" : { + "expresso" : "=0.7.x" + }, + "engines" : { + "node" : ">=0.4.0" + }, + "license" : "MIT/X11", + "author" : { + "name" : "James Halliday", + "email" : "mail@substack.net", + "url" : "http://substack.net" + } +} diff --git a/node_modules/wordwrap/test/break.js b/node_modules/wordwrap/test/break.js new file mode 100644 index 0000000000000..749292ecc13da --- /dev/null +++ b/node_modules/wordwrap/test/break.js @@ -0,0 +1,30 @@ +var assert = require('assert'); +var wordwrap = require('../'); + +exports.hard = function () { + var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' + + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' + + '"browser":"chrome/6.0"}' + ; + var s_ = wordwrap.hard(80)(s); + + var lines = s_.split('\n'); + assert.equal(lines.length, 2); + assert.ok(lines[0].length < 80); + assert.ok(lines[1].length < 80); + + assert.equal(s, s_.replace(/\n/g, '')); +}; + +exports.break = function () { + var s = new Array(55+1).join('a'); + var s_ = wordwrap.hard(20)(s); + + var lines = s_.split('\n'); + assert.equal(lines.length, 3); + assert.ok(lines[0].length === 20); + assert.ok(lines[1].length === 20); + assert.ok(lines[2].length === 15); + + assert.equal(s, s_.replace(/\n/g, '')); +}; diff --git a/node_modules/wordwrap/test/idleness.txt b/node_modules/wordwrap/test/idleness.txt new file mode 100644 index 0000000000000..aa3f4907fe889 --- /dev/null +++ b/node_modules/wordwrap/test/idleness.txt @@ -0,0 +1,63 @@ +In Praise of Idleness + +By Bertrand Russell + +[1932] + +Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. + +Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. + +One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. + +But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. + +All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. + +First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. + +Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. + +From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. + +It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. + +Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. + +This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? + +The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. + +Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. + +I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. + +If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. + +The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. + +In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. + +The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. + +For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? + +In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. + +In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. + +The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. + +It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. + +When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. + +In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. + +The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. + +In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. + +Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. + +[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/node_modules/wordwrap/test/wrap.js b/node_modules/wordwrap/test/wrap.js new file mode 100644 index 0000000000000..0cfb76d178f91 --- /dev/null +++ b/node_modules/wordwrap/test/wrap.js @@ -0,0 +1,31 @@ +var assert = require('assert'); +var wordwrap = require('wordwrap'); + +var fs = require('fs'); +var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); + +exports.stop80 = function () { + var lines = wordwrap(80)(idleness).split(/\n/); + var words = idleness.split(/\s+/); + + lines.forEach(function (line) { + assert.ok(line.length <= 80, 'line > 80 columns'); + var chunks = line.match(/\S/) ? line.split(/\s+/) : []; + assert.deepEqual(chunks, words.splice(0, chunks.length)); + }); +}; + +exports.start20stop60 = function () { + var lines = wordwrap(20, 100)(idleness).split(/\n/); + var words = idleness.split(/\s+/); + + lines.forEach(function (line) { + assert.ok(line.length <= 100, 'line > 100 columns'); + var chunks = line + .split(/\s+/) + .filter(function (x) { return x.match(/\S/) }) + ; + assert.deepEqual(chunks, words.splice(0, chunks.length)); + assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); + }); +}; diff --git a/node_modules/yallist/LICENSE b/node_modules/yallist/LICENSE new file mode 100644 index 0000000000000..19129e315fe59 --- /dev/null +++ b/node_modules/yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yallist/README.md b/node_modules/yallist/README.md new file mode 100644 index 0000000000000..f586101869668 --- /dev/null +++ b/node_modules/yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/node_modules/yallist/iterator.js b/node_modules/yallist/iterator.js new file mode 100644 index 0000000000000..4a15bf22c4003 --- /dev/null +++ b/node_modules/yallist/iterator.js @@ -0,0 +1,7 @@ +var Yallist = require('./yallist.js') + +Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } +} diff --git a/node_modules/yallist/package.json b/node_modules/yallist/package.json new file mode 100644 index 0000000000000..17a13d1cc1513 --- /dev/null +++ b/node_modules/yallist/package.json @@ -0,0 +1,29 @@ +{ + "name": "yallist", + "version": "2.1.2", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^10.3.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/node_modules/yallist/yallist.js b/node_modules/yallist/yallist.js new file mode 100644 index 0000000000000..518d23330b936 --- /dev/null +++ b/node_modules/yallist/yallist.js @@ -0,0 +1,370 @@ +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md new file mode 100644 index 0000000000000..9c36078317978 --- /dev/null +++ b/node_modules/yargs/CHANGELOG.md @@ -0,0 +1,374 @@ +## Change Log + +### v3.10.0 (2015/05/29 04:25 +00:00) + +- [#165](https://github.com/bcoe/yargs/pull/165) expose yargs.terminalWidth() thanks @ensonic (@bcoe) +- [#164](https://github.com/bcoe/yargs/pull/164) better array handling thanks @getify (@bcoe) + +### v3.9.1 (2015/05/20 05:14 +00:00) +- [b6662b6](https://github.com/bcoe/yargs/commit/b6662b6774cfeab4876f41ec5e2f67b7698f4e2f) clarify .config() docs (@linclark) +- [0291360](https://github.com/bcoe/yargs/commit/02913606285ce31ce81d7f12c48d8a3029776ec7) fixed tests, switched to nyc for coverage, fixed security issue, added Lin as collaborator (@bcoe) + +### v3.9.0 (2015/05/10 18:32 +00:00) +- [#157](https://github.com/bcoe/yargs/pull/157) Merge pull request #157 from bcoe/command-yargs. allows handling of command specific arguments. Thanks for the suggestion @ohjames (@bcoe) +- [#158](https://github.com/bcoe/yargs/pull/158) Merge pull request #158 from kemitchell/spdx-license. Update license format (@kemitchell) + +### v3.8.0 (2015/04/24 23:10 +00:00) +- [#154](https://github.com/bcoe/yargs/pull/154) showHelp's method signature was misleading fixes #153 (@bcoe) +- [#151](https://github.com/bcoe/yargs/pull/151) refactor yargs' table layout logic to use new helper library (@bcoe) +- [#150](https://github.com/bcoe/yargs/pull/150) Fix README example in argument requirements (@annonymouse) + +### v3.7.2 (2015/04/13 11:52 -07:00) + +* [679fbbf](https://github.com/bcoe/yargs/commit/679fbbf55904030ccee8a2635e8e5f46551ab2f0) updated yargs to use the [standard](https://github.com/feross/standard) style guide (agokjr) +* [22382ee](https://github.com/bcoe/yargs/commit/22382ee9f5b495bc2586c1758cd1091cec3647f9 various bug fixes for $0 (@nylen) + +### v3.7.1 (2015/04/10 11:06 -07:00) + +* [89e1992](https://github.com/bcoe/yargs/commit/89e1992a004ba73609b5f9ee6890c4060857aba4) detect iojs bin along with node bin. (@bcoe) +* [755509e](https://github.com/bcoe/yargs/commit/755509ea90041e5f7833bba3b8c5deffe56f0aab) improvements to example documentation in README.md (@rstacruz) +* [0d2dfc8](https://github.com/bcoe/yargs/commit/0d2dfc822a43418242908ad97ddd5291a1b35dc6) showHelp() no longer requires that .argv has been called (@bcoe) + +### v3.7.0 (2015/04/04 02:29 -07:00) + +* [56cbe2d](https://github.com/bcoe/yargs/commit/56cbe2ddd33dc176dcbf97ba40559864a9f114e4) make .requiresArg() work with type hints. (@bcoe). +* [2f5d562](https://github.com/bcoe/yargs/commit/2f5d5624f736741deeedf6a664d57bc4d857bdd0) serialize arrays and objects in usage strings. (@bcoe). +* [5126304](https://github.com/bcoe/yargs/commit/5126304dd18351fc28f10530616fdd9361e0af98) be more lenient about alias/primary key ordering in chaining API. (@bcoe) + +### v3.6.0 (2015/03/21 01:00 +00:00) +- [4e24e22](https://github.com/bcoe/yargs/commit/4e24e22e6a195e55ab943ede704a0231ac33b99c) support for .js configuration files. (@pirxpilot) + +### v3.5.4 (2015/03/12 05:56 +00:00) +- [c16cc08](https://github.com/bcoe/yargs/commit/c16cc085501155cf7fd853ccdf8584b05ab92b78) message for non-option arguments is now optional, thanks to (@raine) + +### v3.5.3 (2015/03/09 06:14 +00:00) +- [870b428](https://github.com/bcoe/yargs/commit/870b428cf515d560926ca392555b7ad57dba9e3d) completion script was missing in package.json (@bcoe) + +### v3.5.2 (2015/03/09 06:11 +00:00) +- [58a4b24](https://github.com/bcoe/yargs/commit/58a4b2473ebbb326713d522be53e32d3aabb08d2) parse was being called multiple times, resulting in strange behavior (@bcoe) + +### v3.5.1 (2015/03/09 04:55 +00:00) +- [4e588e0](https://github.com/bcoe/yargs/commit/4e588e055afbeb9336533095f051496e3977f515) accidentally left testing logic in (@bcoe) + +### v3.5.0 (2015/03/09 04:49 +00:00) +- [718bacd](https://github.com/bcoe/yargs/commit/718bacd81b9b44f786af76b2afe491fe06274f19) added support for bash completions see #4 (@bcoe) +- [a192882](https://github.com/bcoe/yargs/commit/a19288270fc431396c42af01125eeb4443664528) downgrade to mocha 2.1.0 until https://github.com/mochajs/mocha/issues/1585 can be sorted out (@bcoe) + +### v3.4.7 (2015/03/09 04:09 +00:00) +- [9845e5c](https://github.com/bcoe/yargs/commit/9845e5c1a9c684ba0be3f0bfb40e7b62ab49d9c8) the Argv singleton was not being updated when manually parsing arguments, fixes #114 (@bcoe) + +### v3.4.6 (2015/03/09 04:01 +00:00) +- [45b4c80](https://github.com/bcoe/yargs/commit/45b4c80b890d02770b0a94f326695a8a566e8fe9) set placeholders for all keys fixes #115 (@bcoe) + +### v3.4.5 (2015/03/01 20:31 +00:00) +- [a758e0b](https://github.com/bcoe/yargs/commit/a758e0b2556184f067cf3d9c4ef886d39817ebd2) fix for count consuming too many arguments (@bcoe) + +### v3.4.4 (2015/02/28 04:52 +00:00) +- [0476af7](https://github.com/bcoe/yargs/commit/0476af757966acf980d998b45108221d4888cfcb) added nargs feature, allowing you to specify the number of arguments after an option (@bcoe) +- [092477d](https://github.com/bcoe/yargs/commit/092477d7ab3efbf0ba11cede57f7d8cfc70b024f) updated README with full example of v3.0 API (@bcoe) + +### v3.3.3 (2015/02/28 04:23 +00:00) +- [0c4b769](https://github.com/bcoe/yargs/commit/0c4b769516cd8d93a7c4e5e675628ae0049aa9a8) remove string dependency, which conflicted with other libraries see #106 (@bcoe) + +### v3.3.2 (2015/02/28 04:11 +00:00) +- [2a98906](https://github.com/bcoe/yargs/commit/2a9890675821c0e7a12f146ce008b0562cb8ec9a) add $0 to epilog (@schnittstabil) + +### v3.3.1 (2015/02/24 03:28 +00:00) +- [ad485ce](https://github.com/bcoe/yargs/commit/ad485ce748ebdfce25b88ef9d6e83d97a2f68987) fix for applying defaults to camel-case args (@bcoe) + +### v3.3.0 (2015/02/24 00:49 +00:00) +- [8bfe36d](https://github.com/bcoe/yargs/commit/8bfe36d7fb0f93a799ea3f4c756a7467c320f8c0) fix and document restart() command, as a tool for building nested CLIs (@bcoe) + +### v3.2.1 (2015/02/22 05:45 +00:00) +- [49a6d18](https://github.com/bcoe/yargs/commit/49a6d1822a4ef9b1ea6f90cc366be60912628885) you can now provide a function that generates a default value (@bcoe) + +### v3.2.0 (2015/02/22 05:24 +00:00) +- [7a55886](https://github.com/bcoe/yargs/commit/7a55886c9343cf71a20744ca5cdd56d2ea7412d5) improvements to yargs two-column text layout (@bcoe) +- [b6ab513](https://github.com/bcoe/yargs/commit/b6ab5136a4c3fa6aa496f6b6360382e403183989) Tweak NPM version badge (@nylen) + +### v3.1.0 (2015/02/19 19:37 +00:00) +- [9bd2379](https://github.com/bcoe/yargs/commit/9bd237921cf1b61fd9f32c0e6d23f572fc225861) version now accepts a function, making it easy to load version #s from a package.json (@bcoe) + +### v3.0.4 (2015/02/14 01:40 +00:00) +- [0b7c19b](https://github.com/bcoe/yargs/commit/0b7c19beaecb747267ca4cc10e5cb2a8550bc4b7) various fixes for dot-notation handling (@bcoe) + +### v3.0.3 (2015/02/14 00:59 +00:00) +- [c3f35e9](https://github.com/bcoe/yargs/commit/c3f35e99bd5a0d278073fcadd95e2d778616cc17) make sure dot-notation is applied to aliases (@bcoe) + +### 3.0.2 (2015/02/13 16:50 +00:00) +- [74c8967](https://github.com/bcoe/yargs/commit/74c8967c340c204a0a7edf8a702b6f46c2705435) document epilog shorthand of epilogue. (@bcoe) +- [670110f](https://github.com/bcoe/yargs/commit/670110fc01bedc4831b6fec6afac54517d5a71bc) any non-truthy value now causes check to fail see #76 (@bcoe) +- [0d8f791](https://github.com/bcoe/yargs/commit/0d8f791a33c11ced4cd431ea8d3d3a337d456b56) finished implementing my wish-list of fetures for yargs 3.0. see #88 (@bcoe) +- [5768447](https://github.com/bcoe/yargs/commit/5768447447c4c8e8304f178846206ce86540f063) fix coverage. (@bcoe) +- [82e793f](https://github.com/bcoe/yargs/commit/82e793f3f61c41259eaacb67f0796aea2cf2aaa0) detect console width and perform word-wrapping. (@bcoe) +- [67476b3](https://github.com/bcoe/yargs/commit/67476b37eea07fee55f23f35b9e0c7d76682b86d) refactor two-column table layout so that we can use it for examples and usage (@bcoe) +- [4724cdf](https://github.com/bcoe/yargs/commit/4724cdfcc8e37ae1ca3dcce9d762f476e9ef4bb4) major refactor of index.js, in prep for 3.x release. (@bcoe) + +### v2.3.0 (2015/02/08 20:41 +00:00) +- [d824620](https://github.com/bcoe/yargs/commit/d824620493df4e63664af1fe320764dd1a9244e6) allow for undefined boolean defaults (@ashi009) + +### v2.2.0 (2015/02/08 20:07 +00:00) +- [d6edd98](https://github.com/bcoe/yargs/commit/d6edd9848826e7389ed1393858c45d03961365fd) in-prep for further refactoring, and a 3.x release I've shuffled some things around and gotten test-coverage to 100%. (@bcoe) + +### v2.1.2 (2015/02/08 06:05 +00:00) +- [d640745](https://github.com/bcoe/yargs/commit/d640745a7b9f8d476e0223879d056d18d9c265c4) switch to path.relative (@bcoe) +- [3bfd41f](https://github.com/bcoe/yargs/commit/3bfd41ff262a041f29d828b88936a79c63cad594) remove mocha.opts. (@bcoe) +- [47a2f35](https://github.com/bcoe/yargs/commit/47a2f357091db70903a402d6765501c1d63f15fe) document using .string('_') for string ids. see #56 (@bcoe) +- [#57](https://github.com/bcoe/yargs/pull/57) Merge pull request #57 from eush77/option-readme (@eush77) + +### v2.1.1 (2015/02/06 08:08 +00:00) +- [01c6c61](https://github.com/bcoe/yargs/commit/01c6c61d67b4ebf88f41f0b32a345ec67f0ac17d) fix for #71, 'newAliases' of undefined (@bcoe) + +### v2.1.0 (2015/02/06 07:59 +00:00) +- [6a1a3fa](https://github.com/bcoe/yargs/commit/6a1a3fa731958e26ccd56885f183dd8985cc828f) try to guess argument types, and apply sensible defaults see #73 (@bcoe) + +### v2.0.1 (2015/02/06 07:54 +00:00) +- [96a06b2](https://github.com/bcoe/yargs/commit/96a06b2650ff1d085a52b7328d8bba614c20cc12) Fix for strange behavior with --sort option, see #51 (@bcoe) + +### v2.0.0 (2015/02/06 07:45 +00:00) +- [0250517](https://github.com/bcoe/yargs/commit/0250517c9643e53f431b824e8ccfa54937414011) - [108fb84](https://github.com/bcoe/yargs/commit/108fb8409a3a63dcaf99d917fe4dfcfaa1de236d) fixed bug with boolean parsing, when bools separated by = see #66 (@bcoe) +- [a465a59](https://github.com/bcoe/yargs/commit/a465a5915f912715738de890982e4f8395958b10) Add `files` field to the package.json (@shinnn) +- [31043de](https://github.com/bcoe/yargs/commit/31043de7a38a17c4c97711f1099f5fb164334db3) fix for yargs.argv having the same keys added multiple times see #63 (@bcoe) +- [2d68c5b](https://github.com/bcoe/yargs/commit/2d68c5b91c976431001c4863ce47c9297850f1ad) Disable process.exit calls using .exitProcess(false) (@cianclarke) +- [45da9ec](https://github.com/bcoe/yargs/commit/45da9ec4c55a7bd394721bc6a1db0dabad7bc52a) Mention .option in README (@eush77) + +### v1.3.2 (2014/10/06 21:56 +00:00) +- [b8d3472](https://github.com/bcoe/yargs/commit/b8d34725482e5821a3cc809c0df71378f282f526) 1.3.2 (@chevex) + +### list (2014/08/30 18:41 +00:00) +- [fbc777f](https://github.com/bcoe/yargs/commit/fbc777f416eeefd37c84e44d27d7dfc7c1925721) Now that yargs is the successor to optimist, I'm changing the README language to be more universal. Pirate speak isn't very accessible to non-native speakers. (@chevex) +- [a54d068](https://github.com/bcoe/yargs/commit/a54d0682ae2efc2394d407ab171cc8a8bbd135ea) version output will not print extra newline (@boneskull) +- [1cef5d6](https://github.com/bcoe/yargs/commit/1cef5d62a9d6d61a3948a49574892e01932cc6ae) Added contributors section to package.json (@chrisn) +- [cc295c0](https://github.com/bcoe/yargs/commit/cc295c0a80a2de267e0155b60d315fc4b6f7c709) Added 'require' and 'required' as synonyms for 'demand' (@chrisn) +- [d0bf951](https://github.com/bcoe/yargs/commit/d0bf951d949066b6280101ed606593d079ee15c8) Updating minimist. (@chevex) +- [c15f8e7](https://github.com/bcoe/yargs/commit/c15f8e7f245b261e542cf205ce4f4313630cbdb4) Fix #31 (bad interaction between camelCase options and strict mode) (@nylen) +- [d991b9b](https://github.com/bcoe/yargs/commit/d991b9be687a68812dee1e3b185ba64b7778b82d) Added .help() and .version() methods (@chrisn) +- [e8c8aa4](https://github.com/bcoe/yargs/commit/e8c8aa46268379357cb11e9fc34b8c403037724b) Added .showHelpOnFail() method (@chrisn) +- [e855af4](https://github.com/bcoe/yargs/commit/e855af4a933ea966b5bbdd3c4c6397a4bac1a053) Allow boolean flag with .demand() (@chrisn) +- [14dbec2](https://github.com/bcoe/yargs/commit/14dbec24fb7380683198e2b20c4deb8423e64bea) Fixes issue #22. Arguments are no longer printed to the console when using .config. (@chevex) +- [bef74fc](https://github.com/bcoe/yargs/commit/bef74fcddc1544598a804f80d0a3728459f196bf) Informing users that Yargs is the official optimist successor. (@chevex) +- [#24](https://github.com/bcoe/yargs/pull/24) Merge pull request #24 from chrisn/strict (@chrisn) +- [889a2b2](https://github.com/bcoe/yargs/commit/889a2b28eb9768801b05163360a470d0fd6c8b79) Added requiresArg option, for options that require values (@chrisn) +- [eb16369](https://github.com/bcoe/yargs/commit/eb163692262be1fe80b992fd8803d5923c5a9b18) Added .strict() method, to report error if unknown arguments are given (@chrisn) +- [0471c3f](https://github.com/bcoe/yargs/commit/0471c3fd999e1ad4e6cded88b8aa02013b66d14f) Changed optimist to yargs in usage-options.js example (@chrisn) +- [5c88f74](https://github.com/bcoe/yargs/commit/5c88f74e3cf031b17c54b4b6606c83e485ff520e) Change optimist to yargs in examples (@chrisn) +- [66f12c8](https://github.com/bcoe/yargs/commit/66f12c82ba3c943e4de8ca862980e835da8ecb3a) Fix a couple of bad interactions between aliases and defaults (@nylen) +- [8fa1d80](https://github.com/bcoe/yargs/commit/8fa1d80f14b03eb1f2898863a61f1d1615bceb50) Document second argument of usage(message, opts) (@Gobie) +- [56e6528](https://github.com/bcoe/yargs/commit/56e6528cf674ff70d63083fb044ff240f608448e) For "--some-option", also set argv.someOption (@nylen) +- [ed5f6d3](https://github.com/bcoe/yargs/commit/ed5f6d33f57ad1086b11c91b51100f7c6c7fa8ee) Finished porting unit tests to Mocha. (@chevex) + +### v1.0.15 (2014/02/05 23:18 +00:00) +- [e2b1fc0](https://github.com/bcoe/yargs/commit/e2b1fc0c4a59cf532ae9b01b275e1ef57eeb64d2) 1.0.15 update to badges (@chevex) + +### v1.0.14 (2014/02/05 23:17 +00:00) +- [f33bbb0](https://github.com/bcoe/yargs/commit/f33bbb0f00fe18960f849cc8e15a7428a4cd59b8) Revert "Fixed issue which caused .demand function not to work correctly." (@chevex) + +### v1.0.13 (2014/02/05 22:13 +00:00) +- [6509e5e](https://github.com/bcoe/yargs/commit/6509e5e7dee6ef1a1f60eea104be0faa1a045075) Fixed issue which caused .demand function not to work correctly. (@chevex) + +### v1.0.12 (2013/12/13 00:09 +00:00) +- [05eb267](https://github.com/bcoe/yargs/commit/05eb26741c9ce446b33ff006e5d33221f53eaceb) 1.0.12 (@chevex) + +### v1.0.11 (2013/12/13 00:07 +00:00) +- [c1bde46](https://github.com/bcoe/yargs/commit/c1bde46e37318a68b87d17a50c130c861d6ce4a9) 1.0.11 (@chevex) + +### v1.0.10 (2013/12/12 23:57 +00:00) +- [dfebf81](https://github.com/bcoe/yargs/commit/dfebf8164c25c650701528ee581ca483a99dc21c) Fixed formatting in README (@chevex) + +### v1.0.9 (2013/12/12 23:47 +00:00) +- [0b4e34a](https://github.com/bcoe/yargs/commit/0b4e34af5e6d84a9dbb3bb6d02cd87588031c182) Update README.md (@chevex) + +### v1.0.8 (2013/12/06 16:36 +00:00) +- [#1](https://github.com/bcoe/yargs/pull/1) fix error caused by check() see #1 (@martinheidegger) + +### v1.0.7 (2013/11/24 18:01 +00:00) +- [a247d88](https://github.com/bcoe/yargs/commit/a247d88d6e46644cbb7303c18b1bb678fc132d72) Modified Pirate Joe image. (@chevex) + +### v1.0.6 (2013/11/23 19:21 +00:00) +- [d7f69e1](https://github.com/bcoe/yargs/commit/d7f69e1d34bc929736a8bdccdc724583e21b7eab) Updated Pirate Joe image. (@chevex) + +### v1.0.5 (2013/11/23 19:09 +00:00) +- [ece809c](https://github.com/bcoe/yargs/commit/ece809cf317cc659175e1d66d87f3ca68c2760be) Updated readme notice again. (@chevex) + +### v1.0.4 (2013/11/23 19:05 +00:00) +- [9e81e81](https://github.com/bcoe/yargs/commit/9e81e81654028f83ba86ffc3ac772a0476084e5e) Updated README with a notice about yargs being a fork of optimist and what that implies. (@chevex) + +### v1.0.3 (2013/11/23 17:43 +00:00) +- [65e7a78](https://github.com/bcoe/yargs/commit/65e7a782c86764944d63d084416aba9ee6019c5f) Changed some small wording in README.md. (@chevex) +- [459e20e](https://github.com/bcoe/yargs/commit/459e20e539b366b85128dd281ccd42221e96c7da) Fix a bug in the options function, when string and boolean options weren't applied to aliases. (@shockone) + +### v1.0.2 (2013/11/23 09:46 +00:00) +- [3d80ebe](https://github.com/bcoe/yargs/commit/3d80ebed866d3799224b6f7d596247186a3898a9) 1.0.2 (@chevex) + +### v1.0.1 (2013/11/23 09:39 +00:00) +- [f80ff36](https://github.com/bcoe/yargs/commit/f80ff3642d580d4b68bf9f5a94277481bd027142) Updated image. (@chevex) + +### v1.0.0 (2013/11/23 09:33 +00:00) +- [54e31d5](https://github.com/bcoe/yargs/commit/54e31d505f820b80af13644e460894b320bf25a3) Rebranded from optimist to yargs in the spirit of the fork :D (@chevex) +- [4ebb6c5](https://github.com/bcoe/yargs/commit/4ebb6c59f44787db7c24c5b8fe2680f01a23f498) Added documentation for demandCount(). (@chevex) +- [4561ce6](https://github.com/bcoe/yargs/commit/4561ce66dcffa95f49e8b4449b25b94cd68acb25) Simplified the error messages returned by .check(). (@chevex) +- [661c678](https://github.com/bcoe/yargs/commit/661c67886f479b16254a830b7e1db3be29e6b7a6) Fixed an issue with demand not accepting a zero value. (@chevex) +- [731dd3c](https://github.com/bcoe/yargs/commit/731dd3c37624790490bd6df4d5f1da8f4348279e) Add .fail(fn) so death isn't the only option. Should fix issue #39. (@chevex) +- [fa15417](https://github.com/bcoe/yargs/commit/fa15417ff9e70dace0d726627a5818654824c1d8) Added a few missing 'return self' (@chevex) +- [e655e4d](https://github.com/bcoe/yargs/commit/e655e4d99d1ae1d3695ef755d51c2de08d669761) Fix showing help in certain JS environments. (@chevex) +- [a746a31](https://github.com/bcoe/yargs/commit/a746a31cd47c87327028e6ea33762d6187ec5c87) Better string representation of default values. (@chevex) +- [6134619](https://github.com/bcoe/yargs/commit/6134619a7e90b911d5443230b644c5d447c1a68c) Implies: conditional demands (@chevex) +- [046b93b](https://github.com/bcoe/yargs/commit/046b93b5d40a27367af4cb29726e4d781d934639) Added support for JSON config files. (@chevex) +- [a677ec0](https://github.com/bcoe/yargs/commit/a677ec0a0ecccd99c75e571d03323f950688da03) Add .example(cmd, desc) feature. (@chevex) +- [1bd4375](https://github.com/bcoe/yargs/commit/1bd4375e11327ba1687d4bb6e5e9f3c30c1be2af) Added 'defaults' as alias to 'default' so as to avoid usage of a reserved keyword. (@chevex) +- [6b753c1](https://github.com/bcoe/yargs/commit/6b753c16ca09e723060e70b773b430323b29c45c) add .normalize(args..) support for normalizing paths (@chevex) +- [33d7d59](https://github.com/bcoe/yargs/commit/33d7d59341d364f03d3a25f0a55cb99004dbbe4b) Customize error messages with demand(key, msg) (@chevex) +- [647d37f](https://github.com/bcoe/yargs/commit/647d37f164c20f4bafbf67dd9db6cd6e2cd3b49f) Merge branch 'rewrite-duplicate-test' of github.com:isbadawi/node-optimist (@chevex) +- [9059d1a](https://github.com/bcoe/yargs/commit/9059d1ad5e8aea686c2a01c89a23efdf929fff2e) Pass aliases object to check functions for greater versatility. (@chevex) +- [623dc26](https://github.com/bcoe/yargs/commit/623dc26c7331abff2465ef8532e3418996d42fe6) Added ability to count boolean options and rolled minimist library back into project. (@chevex) +- [49f0dce](https://github.com/bcoe/yargs/commit/49f0dcef35de4db544c3966350d36eb5838703f6) Fixed small typo. (@chevex) +- [79ec980](https://github.com/bcoe/yargs/commit/79ec9806d9ca6eb0014cfa4b6d1849f4f004baf2) Removed dependency on wordwrap module. (@chevex) +- [ea14630](https://github.com/bcoe/yargs/commit/ea14630feddd69d1de99dd8c0e08948f4c91f00a) Merge branch 'master' of github.com:chbrown/node-optimist (@chevex) +- [2b75da2](https://github.com/bcoe/yargs/commit/2b75da2624061e0f4f3107d20303c06ec9054906) Merge branch 'master' of github.com:seanzhou1023/node-optimist (@chevex) +- [d9bda11](https://github.com/bcoe/yargs/commit/d9bda1116e26f3b40e833ca9ca19263afea53565) Merge branch 'patch-1' of github.com:thefourtheye/node-optimist (@chevex) +- [d6cc606](https://github.com/bcoe/yargs/commit/d6cc6064a4f1bea38a16a4430b8a1334832fbeff) Renamed README. (@chevex) +- [9498d3f](https://github.com/bcoe/yargs/commit/9498d3f59acfb5e102826503e681623c3a64b178) Renamed readme and added .gitignore. (@chevex) +- [bbd1fe3](https://github.com/bcoe/yargs/commit/bbd1fe37fefa366dde0fb3dc44d91fe8b28f57f5) Included examples for ```help``` and ```showHelp``` functions and fixed few formatting issues (@thefourtheye) +- [37fea04](https://github.com/bcoe/yargs/commit/37fea0470a5796a0294c1dcfff68d8041650e622) .alias({}) behaves differently based on mapping direction when generating descriptions (@chbrown) +- [855b20d](https://github.com/bcoe/yargs/commit/855b20d0be567ca121d06b30bea64001b74f3d6d) Documented function signatures are useful for dynamically typed languages. (@chbrown) + +### 0.6.0 (2013/06/25 08:48 +00:00) +- [d37bfe0](https://github.com/bcoe/yargs/commit/d37bfe05ae6d295a0ab481efe4881222412791f4) all tests passing using minimist (@substack) +- [76f1352](https://github.com/bcoe/yargs/commit/76f135270399d01f2bbc621e524a5966e5c422fd) all parse tests now passing (@substack) +- [a7b6754](https://github.com/bcoe/yargs/commit/a7b6754276c38d1565479a5685c3781aeb947816) using minimist, some tests passing (@substack) +- [6655688](https://github.com/bcoe/yargs/commit/66556882aa731cbbbe16cc4d42c85740a2e98099) Give credit where its due (@DeadAlready) +- [602a2a9](https://github.com/bcoe/yargs/commit/602a2a92a459f93704794ad51b115bbb08b535ce) v0.5.3 - Remove wordwrap as dependency (@DeadAlready) + +### 0.5.2 (2013/05/31 03:46 +00:00) +- [4497ca5](https://github.com/bcoe/yargs/commit/4497ca55e332760a37b866ec119ded347ca27a87) fixed the whitespace bug without breaking anything else (@substack) +- [5a3dd1a](https://github.com/bcoe/yargs/commit/5a3dd1a4e0211a38613c6e02f61328e1031953fa) failing test for whitespace arg (@substack) + +### 0.5.1 (2013/05/30 07:17 +00:00) +- [a20228f](https://github.com/bcoe/yargs/commit/a20228f62a454755dd07f628a7c5759113918327) fix parse() to work with functions before it (@substack) +- [b13bd4c](https://github.com/bcoe/yargs/commit/b13bd4cac856a9821d42fa173bdb58f089365a7d) failing test for parse() with modifiers (@substack) + +### 0.5.0 (2013/05/18 21:59 +00:00) +- [c474a64](https://github.com/bcoe/yargs/commit/c474a649231527915c222156e3b40806d365a87c) fixes for dash (@substack) + +### 0.4.0 (2013/04/13 19:03 +00:00) +- [dafe3e1](https://github.com/bcoe/yargs/commit/dafe3e18d7c6e7c2d68e06559df0e5cbea3adb14) failing short test (@substack) + +### 0.3.7 (2013/04/04 04:07 +00:00) +- [6c7a0ec](https://github.com/bcoe/yargs/commit/6c7a0ec94ce4199a505f0518b4d6635d4e47cc81) Fix for windows. On windows there is no _ in environment. (@hdf) + +### 0.3.6 (2013/04/04 04:04 +00:00) +- [e72346a](https://github.com/bcoe/yargs/commit/e72346a727b7267af5aa008b418db89970873f05) Add support for newlines in -a="" arguments (@danielbeardsley) +- [71e1fb5](https://github.com/bcoe/yargs/commit/71e1fb55ea9987110a669ac6ec12338cfff3821c) drop 0.4, add 0.8 to travis (@substack) + +### 0.3.5 (2012/10/10 11:09 +00:00) +- [ee692b3](https://github.com/bcoe/yargs/commit/ee692b37554c70a0bb16389a50a26b66745cbbea) Fix parsing booleans (@vojtajina) +- [5045122](https://github.com/bcoe/yargs/commit/5045122664c3f5b4805addf1be2148d5856f7ce8) set $0 properly in the tests (@substack) + +### 0.3.4 (2012/04/30 06:54 +00:00) +- [f28c0e6](https://github.com/bcoe/yargs/commit/f28c0e62ca94f6e0bb2e6d82fc3d91a55e69b903) bump for string "true" params (@substack) +- [8f44aeb](https://github.com/bcoe/yargs/commit/8f44aeb74121ddd689580e2bf74ef86a605e9bf2) Fix failing test for aliased booleans. (@coderarity) +- [b9f7b61](https://github.com/bcoe/yargs/commit/b9f7b613b1e68e11e6c23fbda9e555a517dcc976) Add failing test for short aliased booleans. (@coderarity) + +### 0.3.3 (2012/04/30 06:45 +00:00) +- [541bac8](https://github.com/bcoe/yargs/commit/541bac8dd787a5f1a5d28f6d8deb1627871705e7) Fixes #37. + +### 0.3.2 (2012/04/12 20:28 +00:00) +- [3a0f014](https://github.com/bcoe/yargs/commit/3a0f014c1451280ac1c9caa1f639d31675586eec) travis badge (@substack) +- [4fb60bf](https://github.com/bcoe/yargs/commit/4fb60bf17845f4ce3293f8ca49c9a1a7c736cfce) Fix boolean aliases. (@coderarity) +- [f14dda5](https://github.com/bcoe/yargs/commit/f14dda546efc4fe06ace04d36919bfbb7634f79b) Adjusted package.json to use tap (@jfhbrook) +- [88e5d32](https://github.com/bcoe/yargs/commit/88e5d32295be6e544c8d355ff84e355af38a1c74) test/usage.js no longer hangs (@jfhbrook) +- [e1e740c](https://github.com/bcoe/yargs/commit/e1e740c27082f3ce84deca2093d9db2ef735d0e5) two tests for combined boolean/alias opts parsing (@jfhbrook) + +### 0.3.1 (2011/12/31 08:44 +00:00) +- [d09b719](https://github.com/bcoe/yargs/commit/d09b71980ef711b6cf3918cd19beec8257e40e82) If "default" is set to false it was not passed on, fixed. (@wolframkriesing) + +### 0.3.0 (2011/12/09 06:03 +00:00) +- [6e74aa7](https://github.com/bcoe/yargs/commit/6e74aa7b46a65773e20c0cb68d2d336d4a0d553d) bump and documented dot notation (@substack) + +### 0.2.7 (2011/10/20 02:25 +00:00) +- [94adee2](https://github.com/bcoe/yargs/commit/94adee20e17b58d0836f80e8b9cdbe9813800916) argv._ can be told 'Hey! argv._! Don't be messing with my args.', and it WILL obey (@colinta) +- [c46fdd5](https://github.com/bcoe/yargs/commit/c46fdd56a05410ae4a1e724a4820c82e77ff5469) optimistic critter image (@substack) +- [5c95c73](https://github.com/bcoe/yargs/commit/5c95c73aedf4c7482bd423e10c545e86d7c8a125) alias options() to option() (@substack) +- [f7692ea](https://github.com/bcoe/yargs/commit/f7692ea8da342850af819367833abb685fde41d8) [fix] Fix for parsing boolean edge case (@indexzero) +- [d1f92d1](https://github.com/bcoe/yargs/commit/d1f92d1425bd7f356055e78621b30cdf9741a3c2) +- [b01bda8](https://github.com/bcoe/yargs/commit/b01bda8d86e455bbf74ce497864cb8ab5b9fb847) [fix test] Update to ensure optimist is aware of default booleans. Associated tests included (@indexzero) +- [aa753e7](https://github.com/bcoe/yargs/commit/aa753e7c54fb3a12f513769a0ff6d54aa0f63943) [dist test] Update devDependencies in package.json. Update test pathing to be more npm and require.paths future-proof (@indexzero) +- [7bfce2f](https://github.com/bcoe/yargs/commit/7bfce2f3b3c98e6539e7549d35fbabced7e9341e) s/sys/util/ (@substack) +- [d420a7a](https://github.com/bcoe/yargs/commit/d420a7a9c890d2cdb11acfaf3ea3f43bc3e39f41) update usage output (@substack) +- [cf86eed](https://github.com/bcoe/yargs/commit/cf86eede2e5fc7495b6ec15e6d137d9ac814f075) some sage readme protips about parsing rules (@substack) +- [5da9f7a](https://github.com/bcoe/yargs/commit/5da9f7a5c0e1758ec7c5801fb3e94d3f6e970513) documented all the methods finally (@substack) +- [8ca6879](https://github.com/bcoe/yargs/commit/8ca6879311224b25933642987300f6a29de5c21b) fenced syntax highlighting (@substack) +- [b72bacf](https://github.com/bcoe/yargs/commit/b72bacf1d02594778c1935405bc8137eb61761dc) right-alignment of wrapped extra params (@substack) +- [2b980bf](https://github.com/bcoe/yargs/commit/2b980bf2656b4ee8fc5134dc5f56a48855c35198) now with .wrap() (@substack) +- [d614f63](https://github.com/bcoe/yargs/commit/d614f639654057d1b7e35e3f5a306e88ec2ad1e4) don't show 'Options:' when there aren't any (@substack) +- [691eda3](https://github.com/bcoe/yargs/commit/691eda354df97b5a86168317abcbcaabdc08a0fb) failing test for multi-aliasing (@substack) +- [0826c9f](https://github.com/bcoe/yargs/commit/0826c9f462109feab2bc7a99346d22e72bf774b7) "Options:" > "options:" (@substack) +- [72f7490](https://github.com/bcoe/yargs/commit/72f749025d01b7f295738ed370a669d885fbada0) [minor] Update formatting for `.showHelp()` (@indexzero) +- [75aecce](https://github.com/bcoe/yargs/commit/75aeccea74329094072f95800e02c275e7d999aa) options works again, too lazy to write a proper test right now (@substack) +- [f742e54](https://github.com/bcoe/yargs/commit/f742e5439817c662dc3bd8734ddd6467e6018cfd) line_count_options example, which breaks (@substack) +- [4ca06b8](https://github.com/bcoe/yargs/commit/4ca06b8b4ea99b5d5714b315a2a8576bee6e5537) line count example (@substack) +- [eeb8423](https://github.com/bcoe/yargs/commit/eeb8423e0a5ecc9dc3eb1e6df9f3f8c1c88f920b) remove self.argv setting in boolean (@substack) +- [6903412](https://github.com/bcoe/yargs/commit/69034126804660af9cc20ea7f4457b50338ee3d7) removed camel case for now (@substack) +- [5a0d88b](https://github.com/bcoe/yargs/commit/5a0d88bf23e9fa79635dd034e2a1aa992acc83cd) remove dead longest checking code (@substack) +- [d782170](https://github.com/bcoe/yargs/commit/d782170babf7284b1aa34f5350df0dd49c373fa8) .help() too (@substack) +- [622ec17](https://github.com/bcoe/yargs/commit/622ec17379bb5374fdbb190404c82bc600975791) rm old help generator (@substack) +- [7c8baac](https://github.com/bcoe/yargs/commit/7c8baac4d66195e9f5158503ea9ebfb61153dab7) nub keys (@substack) +- [8197785](https://github.com/bcoe/yargs/commit/8197785ad4762465084485b041abd722f69bf344) generate help message based on the previous calls, todo: nub (@substack) +- [3ffbdc3](https://github.com/bcoe/yargs/commit/3ffbdc33c8f5e83d4ea2ac60575ce119570c7ede) stub out new showHelp, better checks (@substack) +- [d4e21f5](https://github.com/bcoe/yargs/commit/d4e21f56a4830f7de841900d3c79756fb9886184) let .options() take single options too (@substack) +- [3c4cf29](https://github.com/bcoe/yargs/commit/3c4cf2901a29bac119cca8e983028d8669230ec6) .options() is now heaps simpler (@substack) +- [89f0d04](https://github.com/bcoe/yargs/commit/89f0d043cbccd302f10ab30c2069e05d2bf817c9) defaults work again, all tests pass (@substack) +- [dd87333](https://github.com/bcoe/yargs/commit/dd8733365423006a6e4156372ebb55f98323af58) update test error messages, down to 2 failing tests (@substack) +- [53f7bc6](https://github.com/bcoe/yargs/commit/53f7bc626b9875f2abdfc5dd7a80bde7f14143a3) fix for bools doubling up, passes the parse test again, others fail (@substack) +- [2213e2d](https://github.com/bcoe/yargs/commit/2213e2ddc7263226fba717fb041dc3fde9bc2ee4) refactored for an argv getter, failing several tests (@substack) +- [d1e7379](https://github.com/bcoe/yargs/commit/d1e737970f15c6c006bebdd8917706827ff2f0f2) just rescan for now, alias test passes (@substack) +- [b2f8c99](https://github.com/bcoe/yargs/commit/b2f8c99cc477a8eb0fdf4cf178e1785b63185cfd) failing alias test (@substack) +- [d0c0174](https://github.com/bcoe/yargs/commit/d0c0174daa144bfb6dc7290fdc448c393c475e15) .alias() (@substack) +- [d85f431](https://github.com/bcoe/yargs/commit/d85f431ad7d07b058af3f2a57daa51495576c164) [api] Remove `.describe()` in favor of building upon the existing `.usage()` API (@indexzero) +- [edbd527](https://github.com/bcoe/yargs/commit/edbd5272a8e213e71acd802782135c7f9699913a) [doc api] Add `.describe()`, `.options()`, and `.showHelp()` methods along with example. (@indexzero) +- [be4902f](https://github.com/bcoe/yargs/commit/be4902ff0961ae8feb9093f2c0a4066463ded2cf) updates for coffee since it now does argv the node way (@substack) +- [e24cb23](https://github.com/bcoe/yargs/commit/e24cb23798ee64e53b60815e7fda78b87f42390c) more general coffeescript detection (@substack) +- [78ac753](https://github.com/bcoe/yargs/commit/78ac753e5d0ec32a96d39d893272afe989e42a4d) Don't trigger the CoffeeScript hack when running under node_g. (@papandreou) +- [bcfe973](https://github.com/bcoe/yargs/commit/bcfe9731d7f90d4632281b8a52e8d76eb0195ae6) .string() but failing test (@substack) +- [1987aca](https://github.com/bcoe/yargs/commit/1987aca28c7ba4e8796c07bbc547cb984804c826) test hex strings (@substack) +- [ef36db3](https://github.com/bcoe/yargs/commit/ef36db32259b0b0d62448dc907c760e5554fb7e7) more keywords (@substack) +- [cc53c56](https://github.com/bcoe/yargs/commit/cc53c56329960bed6ab077a79798e991711ba01d) Added camelCase function that converts --multi-word-option to camel case (so it becomes argv.multiWordOption). (@papandreou) +- [60b57da](https://github.com/bcoe/yargs/commit/60b57da36797716e5783a633c6d5c79099016d45) fixed boolean bug by rescanning (@substack) +- [dff6d07](https://github.com/bcoe/yargs/commit/dff6d078d97f8ac503c7d18dcc7b7a8c364c2883) boolean examples (@substack) +- [0e380b9](https://github.com/bcoe/yargs/commit/0e380b92c4ef4e3c8dac1da18b5c31d85b1d02c9) boolean() with passing test (@substack) +- [62644d4](https://github.com/bcoe/yargs/commit/62644d4bffbb8d1bbf0c2baf58a1d14a6359ef07) coffee compatibility with node regex for versions too (@substack) +- [430fafc](https://github.com/bcoe/yargs/commit/430fafcf1683d23774772826581acff84b456827) argv._ fixed by fixing the coffee detection (@substack) +- [343b8af](https://github.com/bcoe/yargs/commit/343b8afefd98af274ebe21b5a16b3a949ec5429f) whichNodeArgs test fails too (@substack) +- [63df2f3](https://github.com/bcoe/yargs/commit/63df2f371f31e63d7f1dec2cbf0022a5f08da9d2) replicated mnot's bug in whichNodeEmpty test (@substack) +- [35473a4](https://github.com/bcoe/yargs/commit/35473a4d93a45e5e7e512af8bb54ebb532997ae1) test for ./bin usage (@substack) +- [13df151](https://github.com/bcoe/yargs/commit/13df151e44228eed10e5441c7cd163e086c458a4) don't coerce booleans to numbers (@substack) +- [85f8007](https://github.com/bcoe/yargs/commit/85f8007e93b8be7124feea64b1f1916d8ba1894a) package bump for automatic number conversion (@substack) +- [8f17014](https://github.com/bcoe/yargs/commit/8f170141cded4ccc0c6d67a849c5bf996aa29643) updated readme and examples with new auto-numberification goodness (@substack) +- [73dc901](https://github.com/bcoe/yargs/commit/73dc9011ac968e39b55e19e916084a839391b506) auto number conversion works yay (@substack) +- [bcec56b](https://github.com/bcoe/yargs/commit/bcec56b3d031e018064cbb691539ccc4f28c14ad) failing test for not-implemented auto numification (@substack) +- [ebd2844](https://github.com/bcoe/yargs/commit/ebd2844d683feeac583df79af0e5124a7a7db04e) odd that eql doesn't check types careflly (@substack) +- [fd854b0](https://github.com/bcoe/yargs/commit/fd854b02e512ce854b76386d395672a7969c1bc4) package author + keywords (@substack) +- [656a1d5](https://github.com/bcoe/yargs/commit/656a1d5a1b7c0e49d72e80cb13f20671d56f76c6) updated readme with .default() stuff (@substack) +- [cd7f8c5](https://github.com/bcoe/yargs/commit/cd7f8c55f0b82b79b690d14c5f806851236998a1) passing tests for new .default() behavior (@substack) +- [932725e](https://github.com/bcoe/yargs/commit/932725e39ce65bc91a0385a5fab659a5fa976ac2) new default() thing for setting default key/values (@substack) +- [4e6c7ab](https://github.com/bcoe/yargs/commit/4e6c7aba6374ac9ebc6259ecf91f13af7bce40e3) test for coffee usage (@substack) +- [d54ffcc](https://github.com/bcoe/yargs/commit/d54ffccf2a5a905f51ed5108f7c647f35d64ae23) new --key value style with passing tests. NOTE: changes existing behavior (@substack) +- [ed2a2d5](https://github.com/bcoe/yargs/commit/ed2a2d5d828100ebeef6385c0fb88d146a5cfe9b) package bump for summatix's coffee script fix (@substack) +- [75a975e](https://github.com/bcoe/yargs/commit/75a975eed8430d28e2a79dc9e6d819ad545f4587) Added support for CoffeeScript (@summatix) +- [56b2b1d](https://github.com/bcoe/yargs/commit/56b2b1de8d11f8a2b91979d8ae2d6db02d8fe64d) test coverage for the falsy check() usage (@substack) +- [a4843a9](https://github.com/bcoe/yargs/commit/a4843a9f0e69ffb4afdf6a671d89eb6f218be35d) check bug fixed plus a handy string (@substack) +- [857bd2d](https://github.com/bcoe/yargs/commit/857bd2db933a5aaa9cfecba0ced2dc9b415f8111) tests for demandCount, back up to 100% coverage (@substack) +- [073b776](https://github.com/bcoe/yargs/commit/073b7768ebd781668ef05c13f9003aceca2f5c35) call demandCount from demand (@substack) +- [4bd4b7a](https://github.com/bcoe/yargs/commit/4bd4b7a085c8b6ce1d885a0f486cc9865cee2db1) add demandCount to check for the number of arguments in the _ list (@marshall) +- [b8689ac](https://github.com/bcoe/yargs/commit/b8689ac68dacf248119d242bba39a41cb0adfa07) Rebase checks. That will be its own module eventually. (@substack) +- [e688370](https://github.com/bcoe/yargs/commit/e688370b576f0aa733c3f46183df69e1b561668e) a $0 like in perl (@substack) +- [2e5e196](https://github.com/bcoe/yargs/commit/2e5e1960fc19afb21fb3293752316eaa8bcd3609) usage test hacking around process and console (@substack) +- [fcc3521](https://github.com/bcoe/yargs/commit/fcc352163fbec6a1dfe8caf47a0df39de24fe016) description pun (@substack) +- [87a1fe2](https://github.com/bcoe/yargs/commit/87a1fe29037ca2ca5fefda85141aaeb13e8ce761) mit/x11 license (@substack) +- [8d089d2](https://github.com/bcoe/yargs/commit/8d089d24cd687c0bde3640a96c09b78f884900dd) bool example is more consistent and also shows off short option grouping (@substack) +- [448d747](https://github.com/bcoe/yargs/commit/448d7473ac68e8e03d8befc9457b0d9e21725be0) start of the readme and examples (@substack) +- [da74dea](https://github.com/bcoe/yargs/commit/da74dea799a9b59dbf022cbb8001bfdb0d52eec9) more tests for long and short captures (@substack) +- [ab6387e](https://github.com/bcoe/yargs/commit/ab6387e6769ca4af82ca94c4c67c7319f0d9fcfa) silly bug in the tests with s/not/no/, all tests pass now (@substack) +- [102496a](https://github.com/bcoe/yargs/commit/102496a319e8e06f6550d828fc2f72992c7d9ecc) hack an instance for process.argv onto Argv so the export can be called to create an instance or used for argv, which is the most common case (@substack) +- [a01caeb](https://github.com/bcoe/yargs/commit/a01caeb532546d19f68f2b2b87f7036cfe1aaedd) divide example (@substack) +- [443da55](https://github.com/bcoe/yargs/commit/443da55736acbaf8ff8b04d1b9ce19ab016ddda2) start of the lib with a package.json (@substack) diff --git a/node_modules/yargs/LICENSE b/node_modules/yargs/LICENSE new file mode 100644 index 0000000000000..432d1aeb01df6 --- /dev/null +++ b/node_modules/yargs/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md new file mode 100644 index 0000000000000..99086e6e95810 --- /dev/null +++ b/node_modules/yargs/README.md @@ -0,0 +1,926 @@ +yargs +======== + +Yargs be a node.js library fer hearties tryin' ter parse optstrings. + +With yargs, ye be havin' a map that leads straight to yer treasure! Treasure of course, being a simple option hash. + +[![Build Status](https://travis-ci.org/bcoe/yargs.png)](https://travis-ci.org/bcoe/yargs) +[![Dependency Status](https://gemnasium.com/bcoe/yargs.png)](https://gemnasium.com/bcoe/yargs) +[![Coverage Status](https://coveralls.io/repos/bcoe/yargs/badge.svg?branch=)](https://coveralls.io/r/bcoe/yargs?branch=) +[![NPM version](https://img.shields.io/npm/v/yargs.svg)](https://www.npmjs.com/package/yargs) + +> Yargs is the official successor to optimist. Please feel free to submit issues and pull requests. If you'd like to contribute and don't know where to start, have a look at [the issue list](https://github.com/bcoe/yargs/issues) :) + +examples +======== + +With yargs, the options be just a hash! +------------------------------------------------------------------- + +plunder.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs').argv; + +if (argv.ships > 3 && argv.distance < 53.5) { + console.log('Plunder more riffiwobbles!'); +} +else { + console.log('Retreat from the xupptumblers!'); +} +```` + +*** + + $ ./plunder.js --ships=4 --distance=22 + Plunder more riffiwobbles! + + $ ./plunder.js --ships 12 --distance 98.7 + Retreat from the xupptumblers! + +![Joe was one optimistic pirate.](http://i.imgur.com/4WFGVJ9.png) + +But don't walk the plank just yet! There be more! You can do short options: +------------------------------------------------- + +short.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs').argv; +console.log('(%d,%d)', argv.x, argv.y); +```` + +*** + + $ ./short.js -x 10 -y 21 + (10,21) + +And booleans, both long, short, and even grouped: +---------------------------------- + +bool.js: + +````javascript +#!/usr/bin/env node +var util = require('util'); +var argv = require('yargs').argv; + +if (argv.s) { + util.print(argv.fr ? 'Le perroquet dit: ' : 'The parrot says: '); +} +console.log( + (argv.fr ? 'couac' : 'squawk') + (argv.p ? '!' : '') +); +```` + +*** + + $ ./bool.js -s + The parrot says: squawk + + $ ./bool.js -sp + The parrot says: squawk! + + $ ./bool.js -sp --fr + Le perroquet dit: couac! + +And non-hyphenated options too! Just use `argv._`! +------------------------------------------------- + +nonopt.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs').argv; +console.log('(%d,%d)', argv.x, argv.y); +console.log(argv._); +```` + +*** + + $ ./nonopt.js -x 6.82 -y 3.35 rum + (6.82,3.35) + [ 'rum' ] + + $ ./nonopt.js "me hearties" -x 0.54 yo -y 1.12 ho + (0.54,1.12) + [ 'me hearties', 'yo', 'ho' ] + +Yargs even counts your booleans! +---------------------------------------------------------------------- + +count.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .count('verbose') + .alias('v', 'verbose') + .argv; + +VERBOSE_LEVEL = argv.verbose; + +function WARN() { VERBOSE_LEVEL >= 0 && console.log.apply(console, arguments); } +function INFO() { VERBOSE_LEVEL >= 1 && console.log.apply(console, arguments); } +function DEBUG() { VERBOSE_LEVEL >= 2 && console.log.apply(console, arguments); } + +WARN("Showing only important stuff"); +INFO("Showing semi-mportant stuff too"); +DEBUG("Extra chatty mode"); +```` + +*** + $ node count.js + Showing only important stuff + + $ node count.js -v + Showing only important stuff + Showing semi-important stuff too + + $ node count.js -vv + Showing only important stuff + Showing semi-important stuff too + Extra chatty mode + + $ node count.js -v --verbose + Showing only important stuff + Showing semi-important stuff too + Extra chatty mode + +Tell users how to use yer options and make demands. +------------------------------------------------- + +area.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .usage('Usage: $0 -w [num] -yh[num]') + .demand(['w','h']) + .argv; + +console.log("The area is:", argv.w * argv.h); +```` + +*** + + $ ./area.js -w 55 -h 11 + 605 + + $ node ./area.js -w 4.91 -w 2.51 + Usage: node ./area.js -w [num] -h [num] + + Options: + -w [required] + -h [required] + + Missing required arguments: h + +After yer demands have been met, demand more! Ask for non-hypenated arguments! +----------------------------------------- + +demand_count.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .demand(2) + .argv; +console.dir(argv) +```` + +*** + + $ ./demand_count.js a + Not enough arguments, expected 2, but only found 1 + $ ./demand_count.js a b + { _: [ 'a', 'b' ], '$0': 'node ./demand_count.js' } + $ ./demand_count.js a b c + { _: [ 'a', 'b', 'c' ], '$0': 'node ./demand_count.js' } + +EVEN MORE SHIVER ME TIMBERS! +------------------ + +default_singles.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .default('x', 10) + .default('y', 10) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_singles.js -x 5 + 15 + +default_hash.js: + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .default({ x : 10, y : 10 }) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_hash.js -y 7 + 17 + +And if you really want to get all descriptive about it... +--------------------------------------------------------- + +boolean_single.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .boolean('v') + .argv +; +console.dir(argv.v); +console.dir(argv._); +```` + +*** + + $ ./boolean_single.js -v "me hearties" yo ho + true + [ 'me hearties', 'yo', 'ho' ] + + +boolean_double.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .boolean(['x','y','z']) + .argv +; +console.dir([ argv.x, argv.y, argv.z ]); +console.dir(argv._); +```` + +*** + + $ ./boolean_double.js -x -z one two three + [ true, false, true ] + [ 'one', 'two', 'three' ] + +Yargs is here to help you... +--------------------------- + +Ye can describe parameters fer help messages and set aliases. Yargs figures +out how ter format a handy help string automatically. + +line_count.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .usage('Usage: $0 [options]') + .command('count', 'Count the lines in a file') + .demand(1) + .example('$0 count -f foo.js', 'count the lines in the given file') + .demand('f') + .alias('f', 'file') + .nargs('f', 1) + .describe('f', 'Load a file') + .help('h') + .alias('h', 'help') + .epilog('copyright 2015') + .argv; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines); +}); +```` + +*** + $ node line_count.js count + Usage: node test.js [options] + + Commands: + count Count the lines in a file + + Options: + -f, --file Load a file [required] + -h, --help Show help + + Examples: + node test.js count -f foo.js count the lines in the given file + + copyright 2015 + + Missing required arguments: f + + $ node line_count.js count --file line_count.js + 20 + + $ node line_count.js count -f line_count.js + 20 + +methods +======= + +By itself, + +````javascript +require('yargs').argv +````` + +will use `process.argv` array to construct the `argv` object. + +You can pass in the `process.argv` yourself: + +````javascript +require('yargs')([ '-x', '1', '-y', '2' ]).argv +```` + +or use .parse() to do the same thing: + +````javascript +require('yargs').parse([ '-x', '1', '-y', '2' ]) +```` + +The rest of these methods below come in just before the terminating `.argv`. + +.alias(key, alias) +------------------ + +Set key names as equivalent such that updates to a key will propagate to aliases +and vice-versa. + +Optionally `.alias()` can take an object that maps keys to aliases. +Each key of this object should be the canonical version of the option, and each +value should be a string or an array of strings. + +.default(key, value, [description]) +-------------------- + +Set `argv[key]` to `value` if no option was specified on `process.argv`. + +Optionally `.default()` can take an object that maps keys to default values. + +But wait, there's more! the default value can be a `function` which returns +a value. The name of the function will be used in the usage string: + +```js +var argv = require('yargs') + .default('random', function randomValue() { + return Math.random() * 256; + }).argv; +``` + +Optionally, `description` can also be provided and will take precedence over +displaying the value in the usage instructions: + +```js +.default('timeout', 60000, '(one-minute)'); +``` + +.demand(key, [msg | boolean]) +----------------------------- +.require(key, [msg | boolean]) +------------------------------ +.required(key, [msg | boolean]) +------------------------------- + +If `key` is a string, show the usage information and exit if `key` wasn't +specified in `process.argv`. + +If `key` is a number, demand at least as many non-option arguments, which show +up in `argv._`. + +If `key` is an Array, demand each element. + +If a `msg` string is given, it will be printed when the argument is missing, +instead of the standard error message. This is especially helpful for the non-option arguments in `argv._`. + +If a `boolean` value is given, it controls whether the option is demanded; +this is useful when using `.options()` to specify command line parameters. + +.requiresArg(key) +----------------- + +Specifies either a single option key (string), or an array of options that +must be followed by option values. If any option value is missing, show the +usage information and exit. + +The default behaviour is to set the value of any key not followed by an +option value to `true`. + +.implies(x, y) +-------------- + +Given the key `x` is set, it is required that the key `y` is set. + +implies can also accept an object specifying multiple implications. + +.describe(key, desc) +-------------------- + +Describe a `key` for the generated usage information. + +Optionally `.describe()` can take an object that maps keys to descriptions. + +.option(key, opt) +----------------- +.options(key, opt) +------------------ + +Instead of chaining together `.alias().demand().default().describe().string()`, you can specify +keys in `opt` for each of the chainable methods. + +For example: + +````javascript +var argv = require('yargs') + .option('f', { + alias : 'file', + demand: true, + default: '/etc/passwd', + describe: 'x marks the spot', + type: 'string' + }) + .argv +; +```` + +is the same as + +````javascript +var argv = require('yargs') + .alias('f', 'file') + .default('f', '/etc/passwd') + .argv +; +```` + +Optionally `.options()` can take an object that maps keys to `opt` parameters. + +````javascript +var argv = require('yargs') + .options({ + 'f': { + alias: 'file', + demand: true, + default: '/etc/passwd', + describe: 'x marks the spot', + type: 'string' + } + }) + .argv +; +```` + +.usage(message, opts) +--------------------- + +Set a usage message to show which commands to use. Inside `message`, the string +`$0` will get interpolated to the current script name or node command for the +present script similar to how `$0` works in bash or perl. + +`opts` is optional and acts like calling `.options(opts)`. + +.command(cmd, desc, [fn]) +------------------- + +Document the commands exposed by your application. + +use `desc` to provide a description for each command your application accepts (the +values stored in `argv._`). + +Optionally, you can provide a handler `fn` which will be executed when +a given command is provided. The handler will be executed with an instance +of `yargs`, which can be used to compose nested commands. + +Here's an example of top-level and nested commands in action: + +```js +var argv = require('yargs') + .usage('npm ') + .command('install', 'tis a mighty fine package to install') + .command('publish', 'shiver me timbers, should you be sharing all that', function (yargs) { + argv = yargs.option('f', { + alias: 'force', + description: 'yar, it usually be a bad idea' + }) + .help('help') + .argv + }) + .help('help') + .argv; +``` + +.example(cmd, desc) +------------------- + +Give some example invocations of your program. Inside `cmd`, the string +`$0` will get interpolated to the current script name or node command for the +present script similar to how `$0` works in bash or perl. +Examples will be printed out as part of the help message. + + +.epilogue(str) +-------------- +.epilog(str) +------------ + +A message to print at the end of the usage instructions, e.g., + +```js +var argv = require('yargs') + .epilogue('for more information, find our manual at http://example.com'); +``` + +.check(fn) +---------- + +Check that certain conditions are met in the provided arguments. + +`fn` is called with two arguments, the parsed `argv` hash and an array of options and their aliases. + +If `fn` throws or returns a non-truthy value, show the thrown error, usage information, and +exit. + +.fail(fn) +--------- + +Method to execute when a failure occurs, rather then printing the failure message. + +`fn` is called with the failure message that would have been printed. + +.boolean(key) +------------- + +Interpret `key` as a boolean. If a non-flag option follows `key` in +`process.argv`, that string won't get set as the value of `key`. + +`key` will default to `false`, unless an `default(key, undefined)` is +explicitly set. + +If `key` is an Array, interpret all the elements as booleans. + +.string(key) +------------ + +Tell the parser logic not to interpret `key` as a number or boolean. +This can be useful if you need to preserve leading zeros in an input. + +If `key` is an Array, interpret all the elements as strings. + +`.string('_')` will result in non-hyphenated arguments being interpreted as strings, +regardless of whether they resemble numbers. + +.array(key) +---------- + +Tell the parser to interpret `key` as an array. If `.array('foo')` is set, +`--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'bar'`. + +.nargs(key, count) +----------- + +The number of arguments that should be consumed after a key. This can be a +useful hint to prevent parsing ambiguity: + +```js +var argv = require('yargs') + .nargs('token', 1) + .parse(['--token', '-my-token']); +``` + +parses as: + +`{ _: [], token: '-my-token', '$0': 'node test' }` + +Optionally `.nargs()` can take an object of `key`/`narg` pairs. + +.config(key) +------------ + +Tells the parser that if the option specified by `key` is passed in, it +should be interpreted as a path to a JSON config file. The file is loaded +and parsed, and its properties are set as arguments. + +.wrap(columns) +-------------- + +Format usage output to wrap at `columns` many columns. + +By default wrap will be set to `Math.min(80, windowWidth)`. Use `.wrap(null)` to +specify no column limit. + +`yargs.wrap(yargs.terminalWidth())` can be used to maximize the width +of yargs' usage instructions. + +.strict() +--------- + +Any command-line argument given that is not demanded, or does not have a +corresponding description, will be reported as an error. + +.help([option, [description]]) +------------------------------ + +Add an option (e.g., `--help`) that displays the usage string and exits the +process. If present, the `description` parameter customises the description of +the help option in the usage string. + +If invoked without parameters, `.help` returns the generated usage string. + +Example: + +``` +var yargs = require("yargs") + .usage("$0 -operand1 number -operand2 number -operation [add|subtract]"); +console.log(yargs.help()); +``` + +Later on, ```argv``` can be retrived with ```yargs.argv``` + +.version(version, [option], [description]) +---------------------------------------- + +Add an option (e.g., `--version`) that displays the version number (given by the +`version` parameter) and exits the process. If present, the `description` +parameter customizes the description of the version option in the usage string. + +You can provide a `function` for version, rather than a string. +This is useful if you want to use the version from your package.json: + +```js +var argv = require('yargs') + .version(function() { + return require('../package').version; + }) + .argv; +``` + +.showHelpOnFail(enable, [message]) +---------------------------------- + +By default, yargs outputs a usage string if any error is detected. Use the +`.showHelpOnFail` method to customize this behaviour. if `enable` is `false`, +the usage string is not output. If the `message` parameter is present, this +message is output after the error message. + +line_count.js + +````javascript +#!/usr/bin/env node +var argv = require('yargs') + .usage('Count the lines in a file.\nUsage: $0') + .demand('f') + .alias('f', 'file') + .describe('f', 'Load a file') + .showHelpOnFail(false, "Specify --help for available options") + .argv; + +// etc. +```` + +*** + + $ node line_count.js --file + Missing argument value: f + + Specify --help for available options + +.showHelp(consoleLevel='error') +--------------------------- + +Print the usage data using the [`console`](https://nodejs.org/api/console.html) function `consoleLevel` for printing. + +Example: + +``` +var yargs = require("yargs") + .usage("$0 -operand1 number -operand2 number -operation [add|subtract]"); +yargs.showHelp(); +``` + +Or, to print the usage data to `stdout` instead, you can specify the use of `console.log`: + +``` +yargs.showHelp("log"); +``` + +Later on, ```argv``` can be retrived with ```yargs.argv``` + +.completion(cmd, [description], [fn]); +------------- + +Enable bash-completion shortcuts for commands and options. + +`cmd`: when present in `argv._`, will result in the `.bashrc` completion script +being outputted. To enable bash completions, concat the generated script to your +`.bashrc`, or `.bash_profile`. + +`description`: provide a description in your usage instructions for the command +that generates bash completion scripts. + +`fn`, rather than relying on yargs' default completion functionlity, which +shiver me timbers is pretty awesome, you can provide your own completion +method. + +```js +var argv = require('yargs') + .completion('completion', function(current, argv) { + // 'current' is the current command being completed. + // 'argv' is the parsed arguments so far. + // simply return an array of completions. + return [ + 'foo', + 'bar' + ]; + }) + .argv; +``` + +But wait, there's more! you can provide asynchronous completions. + +```js +var argv = require('yargs') + .completion('completion', function(current, argv, done) { + setTimeout(function() { + done([ + 'apple', + 'banana' + ]); + }, 500); + }) + .argv; +``` + +.showCompletionScript() +---------------------- + +Generate a bash completion script. Users of your application can install this +script in their `.bashrc`, and yargs will provide completion shortcuts for +commands and options. + +.exitProcess(enable) +---------------------------------- + +By default, yargs exits the process when the user passes a help flag, uses the `.version` functionality or when validation fails. Calling `.exitProcess(false)` disables this behavior, enabling further actions after yargs have been validated. + +.parse(args) +------------ + +Parse `args` instead of `process.argv`. Returns the `argv` object. + +.reset() +-------- + +Reset the argument object built up so far. This is useful for +creating nested command line interfaces. + +```js +var yargs = require('./yargs') + .usage('$0 command') + .command('hello', 'hello command') + .command('world', 'world command') + .demand(1, 'must provide a valid command'), + argv = yargs.argv, + command = argv._[0]; + +if (command === 'hello') { + yargs.reset() + .usage('$0 hello') + .help('h') + .example('$0 hello', 'print the hello message!') + .argv + + console.log('hello!'); +} else if (command === 'world'){ + yargs.reset() + .usage('$0 world') + .help('h') + .example('$0 world', 'print the world message!') + .argv + + console.log('world!'); +} else { + yargs.showHelp(); +} +``` + +.argv +----- + +Get the arguments as a plain old object. + +Arguments without a corresponding flag show up in the `argv._` array. + +The script name or node command is available at `argv.$0` similarly to how `$0` +works in bash or perl. + +parsing tricks +============== + +stop parsing +------------ + +Use `--` to stop parsing flags and stuff the remainder into `argv._`. + + $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 + { _: [ '-c', '3', '-d', '4' ], + '$0': 'node ./examples/reflect.js', + a: 1, + b: 2 } + +negate fields +------------- + +If you want to explicity set a field to false instead of just leaving it +undefined or to override a default you can do `--no-key`. + + $ node examples/reflect.js -a --no-b + { _: [], + '$0': 'node ./examples/reflect.js', + a: true, + b: false } + +numbers +------- + +Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to +one. This way you can just `net.createConnection(argv.port)` and you can add +numbers out of `argv` with `+` without having that mean concatenation, +which is super frustrating. + +duplicates +---------- + +If you specify a flag multiple times it will get turned into an array containing +all the values in order. + + $ node examples/reflect.js -x 5 -x 8 -x 0 + { _: [], + '$0': 'node ./examples/reflect.js', + x: [ 5, 8, 0 ] } + +dot notation +------------ + +When you use dots (`.`s) in argument names, an implicit object path is assumed. +This lets you organize arguments into nested objects. + + $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 + { _: [], + '$0': 'node ./examples/reflect.js', + foo: { bar: { baz: 33 }, quux: 5 } } + +short numbers +------------- + +Short numeric `head -n5` style argument work too: + + $ node reflect.js -n123 -m456 + { '3': true, + '6': true, + _: [], + '$0': 'node ./reflect.js', + n: 123, + m: 456 } + +installation +============ + +With [npm](http://github.com/isaacs/npm), just do: + + npm install yargs + +or clone this project on github: + + git clone http://github.com/bcoe/yargs.git + +To run the tests with npm, just do: + + npm test + +inspired by +=========== + +This module is loosely inspired by Perl's +[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/node_modules/yargs/completion.sh.hbs b/node_modules/yargs/completion.sh.hbs new file mode 100644 index 0000000000000..c52e499144bd0 --- /dev/null +++ b/node_modules/yargs/completion.sh.hbs @@ -0,0 +1,22 @@ +###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} completion >> ~/.bashrc +# or {{app_path}} completion >> ~/.bash_profile on OSX. +# +_yargs_completions() +{ + local cur_word args type_list + + cur_word="${COMP_WORDS[COMP_CWORD]}" + args=$(printf "%s " "${COMP_WORDS[@]}") + + # ask yargs to generate completions. + type_list=`{{app_path}} --get-yargs-completions $args` + + COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) ) + return 0 +} +complete -F _yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### diff --git a/node_modules/yargs/index.js b/node_modules/yargs/index.js new file mode 100644 index 0000000000000..96539b08d0845 --- /dev/null +++ b/node_modules/yargs/index.js @@ -0,0 +1,504 @@ +var assert = require('assert'), + path = require('path'), + Completion = require('./lib/completion'), + Parser = require('./lib/parser'), + Usage = require('./lib/usage'), + Validation = require('./lib/validation') + +Argv(process.argv.slice(2)) + +var exports = module.exports = Argv +function Argv (processArgs, cwd) { + processArgs = processArgs || [] // handle calling yargs(). + + var self = {} + var completion = null + var usage = null + var validation = null + + if (!cwd) cwd = process.cwd() + + self.$0 = process.argv + .slice(0, 2) + .map(function (x, i) { + // ignore the node bin, specify this in your + // bin file with #!/usr/bin/env node + if (i === 0 && /\b(node|iojs)$/.test(x)) return + var b = rebase(cwd, x) + return x.match(/^\//) && b.length < x.length + ? b : x + }) + .join(' ').trim() + + if (process.env._ !== undefined && process.argv[1] === process.env._) { + self.$0 = process.env._.replace( + path.dirname(process.execPath) + '/', '' + ) + } + + var options + self.resetOptions = self.reset = function () { + // put yargs back into its initial + // state, this is useful for creating a + // nested CLI. + options = { + array: [], + boolean: [], + string: [], + narg: {}, + key: {}, + alias: {}, + default: {}, + defaultDescription: {}, + requiresArg: [], + count: [], + normalize: [], + config: [] + } + + usage = Usage(self) // handle usage output. + validation = Validation(self, usage) // handle arg validation. + completion = Completion(self, usage) + + demanded = {} + + exitProcess = true + strict = false + helpOpt = null + versionOpt = null + completionOpt = null + commandHandlers = {} + self.parsed = false + + return self + } + self.resetOptions() + + self.boolean = function (bools) { + options.boolean.push.apply(options.boolean, [].concat(bools)) + return self + } + + self.array = function (arrays) { + options.array.push.apply(options.array, [].concat(arrays)) + return self + } + + self.nargs = function (key, n) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.nargs(k, key[k]) + }) + } else { + options.narg[key] = n + } + return self + } + + self.normalize = function (strings) { + options.normalize.push.apply(options.normalize, [].concat(strings)) + return self + } + + self.config = function (configs) { + options.config.push.apply(options.config, [].concat(configs)) + return self + } + + self.example = function (cmd, description) { + usage.example(cmd, description) + return self + } + + self.command = function (cmd, description, fn) { + usage.command(cmd, description) + if (fn) commandHandlers[cmd] = fn + return self + } + + var commandHandlers = {} + self.getCommandHandlers = function () { + return commandHandlers + } + + self.string = function (strings) { + options.string.push.apply(options.string, [].concat(strings)) + return self + } + + self.default = function (key, value, defaultDescription) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.default(k, key[k]) + }) + } else { + if (typeof value === 'function') { + defaultDescription = usage.functionDescription(value, defaultDescription) + value = value.call() + } + options.defaultDescription[key] = defaultDescription + options.default[key] = value + } + return self + } + + self.alias = function (x, y) { + if (typeof x === 'object') { + Object.keys(x).forEach(function (key) { + self.alias(key, x[key]) + }) + } else { + options.alias[x] = (options.alias[x] || []).concat(y) + } + return self + } + + self.count = function (counts) { + options.count.push.apply(options.count, [].concat(counts)) + return self + } + + var demanded = {} + self.demand = self.required = self.require = function (keys, msg) { + if (typeof keys === 'number') { + if (!demanded._) demanded._ = { count: 0, msg: null } + demanded._.count += keys + demanded._.msg = msg + } else if (Array.isArray(keys)) { + keys.forEach(function (key) { + self.demand(key, msg) + }) + } else { + if (typeof msg === 'string') { + demanded[keys] = { msg: msg } + } else if (msg === true || typeof msg === 'undefined') { + demanded[keys] = { msg: undefined } + } + } + + return self + } + self.getDemanded = function () { + return demanded + } + + self.requiresArg = function (requiresArgs) { + options.requiresArg.push.apply(options.requiresArg, [].concat(requiresArgs)) + return self + } + + self.implies = function (key, value) { + validation.implies(key, value) + return self + } + + self.usage = function (msg, opts) { + if (!opts && typeof msg === 'object') { + opts = msg + msg = null + } + + usage.usage(msg) + + if (opts) self.options(opts) + + return self + } + + self.epilogue = self.epilog = function (msg) { + usage.epilog(msg) + return self + } + + self.fail = function (f) { + usage.failFn(f) + return self + } + + self.check = function (f) { + validation.check(f) + return self + } + + self.defaults = self.default + + self.describe = function (key, desc) { + options.key[key] = true + usage.describe(key, desc) + return self + } + + self.parse = function (args) { + return parseArgs(args) + } + + self.option = self.options = function (key, opt) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.options(k, key[k]) + }) + } else { + assert(typeof opt === 'object', 'second argument to option must be an object') + + options.key[key] = true // track manually set keys. + + if (opt.alias) self.alias(key, opt.alias) + + var demand = opt.demand || opt.required || opt.require + + if (demand) { + self.demand(key, demand) + } if ('default' in opt) { + self.default(key, opt.default) + } if ('nargs' in opt) { + self.nargs(key, opt.nargs) + } if (opt.boolean || opt.type === 'boolean') { + self.boolean(key) + if (opt.alias) self.boolean(opt.alias) + } if (opt.array || opt.type === 'array') { + self.array(key) + if (opt.alias) self.array(opt.alias) + } if (opt.string || opt.type === 'string') { + self.string(key) + if (opt.alias) self.string(opt.alias) + } if (opt.count || opt.type === 'count') { + self.count(key) + } + + var desc = opt.describe || opt.description || opt.desc + if (desc) { + self.describe(key, desc) + } + + if (opt.requiresArg) { + self.requiresArg(key) + } + } + + return self + } + self.getOptions = function () { + return options + } + + self.wrap = function (cols) { + usage.wrap(cols) + return self + } + + var strict = false + self.strict = function () { + strict = true + return self + } + self.getStrict = function () { + return strict + } + + self.showHelp = function (level) { + if (!self.parsed) parseArgs(processArgs) // run parser, if it has not already been executed. + usage.showHelp(level) + return self + } + + var versionOpt = null + self.version = function (ver, opt, msg) { + versionOpt = opt || 'version' + usage.version(ver) + self.boolean(versionOpt) + self.describe(versionOpt, msg || 'Show version number') + return self + } + + var helpOpt = null + self.addHelpOpt = function (opt, msg) { + helpOpt = opt + self.boolean(opt) + self.describe(opt, msg || 'Show help') + return self + } + + self.showHelpOnFail = function (enabled, message) { + usage.showHelpOnFail(enabled, message) + return self + } + + var exitProcess = true + self.exitProcess = function (enabled) { + if (typeof enabled !== 'boolean') { + enabled = true + } + exitProcess = enabled + return self + } + self.getExitProcess = function () { + return exitProcess + } + + self.help = function () { + if (arguments.length > 0) return self.addHelpOpt.apply(self, arguments) + + if (!self.parsed) parseArgs(processArgs) // run parser, if it has not already been executed. + + return usage.help() + } + + var completionOpt = null, + completionCommand = null + self.completion = function (cmd, desc, fn) { + // a function to execute when generating + // completions can be provided as the second + // or third argument to completion. + if (typeof desc === 'function') { + fn = desc + desc = null + } + + // register the completion command. + completionCommand = cmd + completionOpt = completion.completionKey + self.command(completionCommand, desc || 'generate bash completion script') + + // a function can be provided + if (fn) completion.registerFunction(fn) + + return self + } + + self.showCompletionScript = function ($0) { + $0 = $0 || self.$0 + console.log(completion.generateCompletionScript($0)) + return self + } + + self.getUsageInstance = function () { + return usage + } + + self.getValidationInstance = function () { + return validation + } + + self.terminalWidth = function () { + return require('window-size').width + } + + Object.defineProperty(self, 'argv', { + get: function () { + var args = null + + try { + args = parseArgs(processArgs) + } catch (err) { + usage.fail(err.message) + } + + return args + }, + enumerable: true + }) + + function parseArgs (args) { + var parsed = Parser(args, options), + argv = parsed.argv, + aliases = parsed.aliases + + argv.$0 = self.$0 + + self.parsed = parsed + + // generate a completion script for adding to ~/.bashrc. + if (completionCommand && ~argv._.indexOf(completionCommand)) { + self.showCompletionScript() + if (exitProcess) { + process.exit(0) + } + } + + // if there's a handler associated with a + // command defer processing to it. + var handlerKeys = Object.keys(self.getCommandHandlers()) + for (var i = 0, command; (command = handlerKeys[i]) !== undefined; i++) { + if (~argv._.indexOf(command)) { + self.getCommandHandlers()[command](self.reset()) + return self.argv + } + } + + Object.keys(argv).forEach(function (key) { + if (key === helpOpt && argv[key]) { + self.showHelp('log') + if (exitProcess) { + process.exit(0) + } + } else if (key === versionOpt && argv[key]) { + usage.showVersion() + if (exitProcess) { + process.exit(0) + } + } else if (key === completionOpt) { + // we allow for asynchronous completions, + // e.g., loading in a list of commands from an API. + completion.getCompletion(function (completions) { + ;(completions || []).forEach(function (completion) { + console.log(completion) + }) + + if (exitProcess) { + process.exit(0) + } + }) + return + } + }) + + validation.nonOptionCount(argv) + validation.missingArgumentValue(argv) + validation.requiredArguments(argv) + + if (strict) { + validation.unknownArguments(argv, aliases) + } + + validation.customChecks(argv, aliases) + validation.implications(argv) + setPlaceholderKeys(argv) + + return argv + } + + function setPlaceholderKeys (argv) { + Object.keys(options.key).forEach(function (key) { + if (typeof argv[key] === 'undefined') argv[key] = undefined + }) + } + + sigletonify(self) + return self +} + +// rebase an absolute path to a relative one with respect to a base directory +// exported for tests +exports.rebase = rebase +function rebase (base, dir) { + return path.relative(base, dir) +} + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('yargs')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('yargs').argv + to get a parsed version of process.argv. +*/ +function sigletonify (inst) { + Object.keys(inst).forEach(function (key) { + if (key === 'argv') { + Argv.__defineGetter__(key, inst.__lookupGetter__(key)) + } else { + Argv[key] = typeof inst[key] === 'function' + ? inst[key].bind(inst) + : inst[key] + } + }) +} diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js new file mode 100644 index 0000000000000..32387be27a6c5 --- /dev/null +++ b/node_modules/yargs/lib/completion.js @@ -0,0 +1,71 @@ +var fs = require('fs'), + path = require('path') + +// add bash completions to your +// yargs-powered applications. +module.exports = function (yargs, usage) { + var self = { + completionKey: 'get-yargs-completions' + } + + // get a list of completion commands. + self.getCompletion = function (done) { + var completions = [], + current = process.argv[process.argv.length - 1], + previous = process.argv.slice(process.argv.indexOf('--' + self.completionKey) + 1), + argv = yargs.parse(previous) + + // a custom completion function can be provided + // to completion(). + if (completionFunction) { + if (completionFunction.length < 3) { + // synchronous completion function. + return done(completionFunction(current, argv)) + } else { + // asynchronous completion function + return completionFunction(current, argv, function (completions) { + done(completions) + }) + } + } + + if (!current.match(/^-/)) { + usage.getCommands().forEach(function (command) { + completions.push(command[0]) + }) + } + + if (current.match(/^-/)) { + Object.keys(yargs.getOptions().key).forEach(function (key) { + completions.push('--' + key) + }) + } + + done(completions) + } + + // generate the completion script to add to your .bashrc. + self.generateCompletionScript = function ($0) { + var script = fs.readFileSync( + path.resolve(__dirname, '../completion.sh.hbs'), + 'utf-8' + ), + name = path.basename($0) + + // add ./to applications not yet installed as bin. + if ($0.match(/\.js$/)) $0 = './' + $0 + + script = script.replace(/{{app_name}}/g, name) + return script.replace(/{{app_path}}/g, $0) + } + + // register a function to perform your own custom + // completions., this function can be either + // synchrnous or asynchronous. + var completionFunction = null + self.registerFunction = function (fn) { + completionFunction = fn + } + + return self +} diff --git a/node_modules/yargs/lib/parser.js b/node_modules/yargs/lib/parser.js new file mode 100644 index 0000000000000..5e4618cb5c44b --- /dev/null +++ b/node_modules/yargs/lib/parser.js @@ -0,0 +1,448 @@ +// fancy-pants parsing of argv, originally forked +// from minimist: https://www.npmjs.com/package/minimist +var camelCase = require('camelcase'), + path = require('path') + +function increment (orig) { + return orig !== undefined ? orig + 1 : 0 +} + +module.exports = function (args, opts) { + if (!opts) opts = {} + var flags = { arrays: {}, bools: {}, strings: {}, counts: {}, normalize: {}, configs: {} } + + ;[].concat(opts['array']).filter(Boolean).forEach(function (key) { + flags.arrays[key] = true + }) + + ;[].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true + }) + + ;[].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true + }) + + ;[].concat(opts.count).filter(Boolean).forEach(function (key) { + flags.counts[key] = true + }) + + ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { + flags.normalize[key] = true + }) + + ;[].concat(opts.config).filter(Boolean).forEach(function (key) { + flags.configs[key] = true + }) + + var aliases = {}, + newAliases = {} + + extendAliases(opts.key) + extendAliases(opts.alias) + + var defaults = opts['default'] || {} + Object.keys(defaults).forEach(function (key) { + if (/-/.test(key) && !opts.alias[key]) { + aliases[key] = aliases[key] || [] + } + (aliases[key] || []).forEach(function (alias) { + defaults[alias] = defaults[key] + }) + }) + + var argv = { _: [] } + + Object.keys(flags.bools).forEach(function (key) { + setArg(key, !(key in defaults) ? false : defaults[key]) + }) + + var notFlags = [] + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--') + 1) + args = args.slice(0, args.indexOf('--')) + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i], + broken, + key, + letters, + m, + next, + value + + // -- seperated by = + if (arg.match(/^--.+=/)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + m = arg.match(/^--([^=]+)=([\s\S]*)$/) + + // nargs format = '--f=monkey washing cat' + if (checkAllAliases(m[1], opts.narg)) { + args.splice(i + 1, m[1], m[2]) + i = eatNargs(i, m[1], args) + // arrays format = '--f=a b c' + } else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) { + args.splice(i + 1, m[1], m[2]) + i = eatArray(i, m[1], args) + } else { + setArg(m[1], m[2]) + } + } else if (arg.match(/^--no-.+/)) { + key = arg.match(/^--no-(.+)/)[1] + setArg(key, false) + + // -- seperated by space. + } else if (arg.match(/^--.+/)) { + key = arg.match(/^--(.+)/)[1] + + // nargs format = '--foo a b c' + if (checkAllAliases(key, opts.narg)) { + i = eatNargs(i, key, args) + // array format = '--foo a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + i = eatArray(i, key, args) + } else { + next = args[i + 1] + + if (next !== undefined && !next.match(/^-/) + && !checkAllAliases(key, flags.bools) + && !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else if (/^(true|false)$/.test(next)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } + + // dot-notation flag seperated by '='. + } else if (arg.match(/^-.\..+=/)) { + m = arg.match(/^-([^=]+)=([\s\S]*)$/) + setArg(m[1], m[2]) + + // dot-notation flag seperated by space. + } else if (arg.match(/^-.\..+/)) { + next = args[i + 1] + key = arg.match(/^-(.\..+)/)[1] + + if (next !== undefined && !next.match(/^-/) + && !checkAllAliases(key, flags.bools) + && !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } else if (arg.match(/^-[^-]+/)) { + letters = arg.slice(1, -1).split('') + broken = false + + for (var j = 0; j < letters.length; j++) { + next = arg.slice(j + 2) + + if (letters[j + 1] && letters[j + 1] === '=') { + value = arg.slice(j + 3) + key = letters[j] + + // nargs format = '-f=monkey washing cat' + if (checkAllAliases(letters[j], opts.narg)) { + args.splice(i + 1, 0, value) + i = eatNargs(i, key, args) + // array format = '-f=a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + args.splice(i + 1, 0, value) + i = eatArray(i, key, args) + } else { + setArg(key, value) + } + + broken = true + break + } + + if (next === '-') { + setArg(letters[j], next) + continue + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next) + broken = true + break + } + + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], arg.slice(j + 2)) + broken = true + break + } else { + setArg(letters[j], defaultForType(guessType(letters[j], flags))) + } + } + + key = arg.slice(-1)[0] + + if (!broken && key !== '-') { + // nargs format = '-f a b c' + if (checkAllAliases(key, opts.narg)) { + i = eatNargs(i, key, args) + // array format = '-f a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + i = eatArray(i, key, args) + } else { + if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) + && !checkAllAliases(key, flags.bools) + && !checkAllAliases(key, flags.counts)) { + setArg(key, args[i + 1]) + i++ + } else if (args[i + 1] && /true|false/.test(args[i + 1])) { + setArg(key, args[i + 1]) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } + } + } else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ) + } + } + + setConfig(argv) + applyDefaultsAndAliases(argv, aliases, defaults) + + Object.keys(flags.counts).forEach(function (key) { + setArg(key, defaults[key]) + }) + + notFlags.forEach(function (key) { + argv._.push(key) + }) + + // how many arguments should we consume, based + // on the nargs option? + function eatNargs (i, key, args) { + var toEat = checkAllAliases(key, opts.narg) + + if (args.length - (i + 1) < toEat) throw Error('not enough arguments following: ' + key) + + for (var ii = i + 1; ii < (toEat + i + 1); ii++) { + setArg(key, args[ii]) + } + + return (i + toEat) + } + + // if an option is an array, eat all non-hyphenated arguments + // following it... YUM! + // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] + function eatArray (i, key, args) { + for (var ii = i + 1; ii < args.length; ii++) { + if (/^-/.test(args[ii])) break + i = ii + setArg(key, args[ii]) + } + + return i + } + + function setArg (key, val) { + // handle parsing boolean arguments --foo=true --bar false. + if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { + if (typeof val === 'string') val = val === 'true' + } + + if (/-/.test(key) && !(aliases[key] && aliases[key].length)) { + var c = camelCase(key) + aliases[key] = [c] + newAliases[c] = true + } + + var value = !checkAllAliases(key, flags.strings) && isNumber(val) ? Number(val) : val + + if (checkAllAliases(key, flags.counts)) { + value = increment + } + + var splitKey = key.split('.') + setKey(argv, splitKey, value) + + ;(aliases[splitKey[0]] || []).forEach(function (x) { + x = x.split('.') + + // handle populating dot notation for both + // the key and its aliases. + if (splitKey.length > 1) { + var a = [].concat(splitKey) + a.shift() // nuke the old key. + x = x.concat(a) + } + + setKey(argv, x, value) + }) + + var keys = [key].concat(aliases[key] || []) + for (var i = 0, l = keys.length; i < l; i++) { + if (flags.normalize[keys[i]]) { + keys.forEach(function (key) { + argv.__defineSetter__(key, function (v) { + val = path.normalize(v) + }) + + argv.__defineGetter__(key, function () { + return typeof val === 'string' ? + path.normalize(val) : val + }) + }) + break + } + } + } + + // set args from config.json file, this should be + // applied last so that defaults can be applied. + function setConfig (argv) { + var configLookup = {} + + // expand defaults/aliases, in-case any happen to reference + // the config.json file. + applyDefaultsAndAliases(configLookup, aliases, defaults) + + Object.keys(flags.configs).forEach(function (configKey) { + var configPath = argv[configKey] || configLookup[configKey] + if (configPath) { + try { + var config = require(path.resolve(process.cwd(), configPath)) + + Object.keys(config).forEach(function (key) { + // setting arguments via CLI takes precedence over + // values within the config file. + if (argv[key] === undefined) { + delete argv[key] + setArg(key, config[key]) + } + }) + } catch (ex) { + throw Error('invalid json config file: ' + configPath) + } + } + }) + } + + function applyDefaultsAndAliases (obj, aliases, defaults) { + Object.keys(defaults).forEach(function (key) { + if (!hasKey(obj, key.split('.'))) { + setKey(obj, key.split('.'), defaults[key]) + + ;(aliases[key] || []).forEach(function (x) { + setKey(obj, x.split('.'), defaults[key]) + }) + } + }) + } + + function hasKey (obj, keys) { + var o = obj + keys.slice(0, -1).forEach(function (key) { + o = (o[key] || {}) + }) + + var key = keys[keys.length - 1] + return key in o + } + + function setKey (obj, keys, value) { + var o = obj + keys.slice(0, -1).forEach(function (key) { + if (o[key] === undefined) o[key] = {} + o = o[key] + }) + + var key = keys[keys.length - 1] + if (value === increment) { + o[key] = increment(o[key]) + } else if (o[key] === undefined && checkAllAliases(key, flags.arrays)) { + o[key] = Array.isArray(value) ? value : [value] + } else if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value + } else if (Array.isArray(o[key])) { + o[key].push(value) + } else { + o[key] = [ o[key], value ] + } + } + + // extend the aliases list with inferred aliases. + function extendAliases (obj) { + Object.keys(obj || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key] || []) + // For "--option-name", also set argv.optionName + aliases[key].concat(key).forEach(function (x) { + if (/-/.test(x)) { + var c = camelCase(x) + aliases[key].push(c) + newAliases[c] = true + } + }) + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y + })) + }) + }) + } + + // check if a flag is set for any of a key's aliases. + function checkAllAliases (key, flag) { + var isSet = false, + toCheck = [].concat(aliases[key] || [], key) + + toCheck.forEach(function (key) { + if (flag[key]) isSet = flag[key] + }) + + return isSet + } + + // return a default value, given the type of a flag., + // e.g., key of type 'string' will default to '', rather than 'true'. + function defaultForType (type) { + var def = { + boolean: true, + string: '', + array: [] + } + + return def[type] + } + + // given a flag, enforce a default type. + function guessType (key, flags) { + var type = 'boolean' + + if (flags.strings && flags.strings[key]) type = 'string' + else if (flags.arrays && flags.arrays[key]) type = 'array' + + return type + } + + function isNumber (x) { + if (typeof x === 'number') return true + if (/^0x[0-9a-f]+$/i.test(x)) return true + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) + } + + return { + argv: argv, + aliases: aliases, + newAliases: newAliases + } +} diff --git a/node_modules/yargs/lib/usage.js b/node_modules/yargs/lib/usage.js new file mode 100644 index 0000000000000..8cfe9dd0c35b1 --- /dev/null +++ b/node_modules/yargs/lib/usage.js @@ -0,0 +1,314 @@ +// this file handles outputting usage instructions, +// failures, etc. keeps logging in one place. +var cliui = require('cliui'), + decamelize = require('decamelize'), + wsize = require('window-size') + +module.exports = function (yargs) { + var self = {} + + // methods for ouputting/building failure message. + var fails = [] + self.failFn = function (f) { + fails.push(f) + } + + var failMessage = null + var showHelpOnFail = true + self.showHelpOnFail = function (enabled, message) { + if (typeof enabled === 'string') { + message = enabled + enabled = true + } else if (typeof enabled === 'undefined') { + enabled = true + } + failMessage = message + showHelpOnFail = enabled + return self + } + + self.fail = function (msg) { + if (fails.length) { + fails.forEach(function (f) { + f(msg) + }) + } else { + if (showHelpOnFail) yargs.showHelp('error') + if (msg) console.error(msg) + if (failMessage) { + if (msg) console.error('') + console.error(failMessage) + } + if (yargs.getExitProcess()) { + process.exit(1) + } else { + throw new Error(msg) + } + } + } + + // methods for ouputting/building help (usage) message. + var usage + self.usage = function (msg) { + usage = msg + } + + var examples = [] + self.example = function (cmd, description) { + examples.push([cmd, description || '']) + } + + var commands = [] + self.command = function (cmd, description) { + commands.push([cmd, description || '']) + } + self.getCommands = function () { + return commands + } + + var descriptions = {} + self.describe = function (key, desc) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.describe(k, key[k]) + }) + } else { + descriptions[key] = desc + } + } + self.getDescriptions = function () { + return descriptions + } + + var epilog + self.epilog = function (msg) { + epilog = msg + } + + var wrap = windowWidth() + self.wrap = function (cols) { + wrap = cols + } + + self.help = function () { + normalizeAliases() + + var demanded = yargs.getDemanded(), + options = yargs.getOptions(), + keys = Object.keys( + Object.keys(descriptions) + .concat(Object.keys(demanded)) + .concat(Object.keys(options.default)) + .reduce(function (acc, key) { + if (key !== '_') acc[key] = true + return acc + }, {}) + ), + ui = cliui({ + width: wrap, + wrap: !!wrap + }) + + // the usage string. + if (usage) { + var u = usage.replace(/\$0/g, yargs.$0) + ui.div(u + '\n') + } + + // your application's commands, i.e., non-option + // arguments populated in '_'. + if (commands.length) { + ui.div('Commands:') + + commands.forEach(function (command) { + ui.div( + {text: command[0], padding: [0, 2, 0, 2], width: maxWidth(commands) + 4}, + {text: command[1]} + ) + }) + + ui.div() + } + + // the options table. + var aliasKeys = (Object.keys(options.alias) || []) + .concat(Object.keys(yargs.parsed.newAliases) || []) + + keys = keys.filter(function (key) { + return !yargs.parsed.newAliases[key] && aliasKeys.every(function (alias) { + return (options.alias[alias] || []).indexOf(key) === -1 + }) + }) + + var switches = keys.reduce(function (acc, key) { + acc[key] = [ key ].concat(options.alias[key] || []) + .map(function (sw) { + return (sw.length > 1 ? '--' : '-') + sw + }) + .join(', ') + + return acc + }, {}) + + if (keys.length) { + ui.div('Options:') + + keys.forEach(function (key) { + var kswitch = switches[key] + var desc = descriptions[key] || '' + var type = null + + if (~options.boolean.indexOf(key)) type = '[boolean]' + if (~options.count.indexOf(key)) type = '[count]' + if (~options.string.indexOf(key)) type = '[string]' + if (~options.normalize.indexOf(key)) type = '[string]' + if (~options.array.indexOf(key)) type = '[array]' + + var extra = [ + type, + demanded[key] ? '[required]' : null, + defaultString(options.default[key], options.defaultDescription[key]) + ].filter(Boolean).join(' ') + + ui.span( + {text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches) + 4}, + desc + ) + + if (extra) ui.div({text: extra, padding: [0, 0, 0, 2], align: 'right'}) + else ui.div() + }) + + ui.div() + } + + // describe some common use-cases for your application. + if (examples.length) { + ui.div('Examples:') + + examples.forEach(function (example) { + example[0] = example[0].replace(/\$0/g, yargs.$0) + }) + + examples.forEach(function (example) { + ui.div( + {text: example[0], padding: [0, 2, 0, 2], width: maxWidth(examples) + 4}, + example[1] + ) + }) + + ui.div() + } + + // the usage string. + if (epilog) { + var e = epilog.replace(/\$0/g, yargs.$0) + ui.div(e + '\n') + } + + return ui.toString() + } + + // return the maximum width of a string + // in the left-hand column of a table. + function maxWidth (table) { + var width = 0 + + // table might be of the form [leftColumn], + // or {key: leftColumn}} + if (!Array.isArray(table)) { + table = Object.keys(table).map(function (key) { + return [table[key]] + }) + } + + table.forEach(function (v) { + width = Math.max(v[0].length, width) + }) + + // if we've enabled 'wrap' we should limit + // the max-width of the left-column. + if (wrap) width = Math.min(width, parseInt(wrap * 0.5, 10)) + + return width + } + + // make sure any options set for aliases, + // are copied to the keys being aliased. + function normalizeAliases () { + var options = yargs.getOptions(), + demanded = yargs.getDemanded() + + ;(Object.keys(options.alias) || []).forEach(function (key) { + options.alias[key].forEach(function (alias) { + // copy descriptions. + if (descriptions[alias]) self.describe(key, descriptions[alias]) + // copy demanded. + if (demanded[alias]) yargs.demand(key, demanded[alias].msg) + + // type messages. + if (~options.boolean.indexOf(alias)) yargs.boolean(key) + if (~options.count.indexOf(alias)) yargs.count(key) + if (~options.string.indexOf(alias)) yargs.string(key) + if (~options.normalize.indexOf(alias)) yargs.normalize(key) + if (~options.array.indexOf(alias)) yargs.array(key) + }) + }) + } + + self.showHelp = function (level) { + level = level || 'error' + console[level](self.help()) + } + + self.functionDescription = function (fn, defaultDescription) { + if (defaultDescription) { + return defaultDescription + } + var description = fn.name ? decamelize(fn.name, '-') : 'generated-value' + return ['(', description, ')'].join('') + } + + // format the default-value-string displayed in + // the right-hand column. + function defaultString (value, defaultDescription) { + var string = '[default: ' + + if (value === undefined) return null + + if (defaultDescription) { + string += defaultDescription + } else { + switch (typeof value) { + case 'string': + string += JSON.stringify(value) + break + case 'object': + string += JSON.stringify(value) + break + default: + string += value + } + } + + return string + ']' + } + + // guess the width of the console window, max-width 80. + function windowWidth () { + return wsize.width ? Math.min(80, wsize.width) : null + } + + // logic for displaying application version. + var version = null + self.version = function (ver, opt, msg) { + version = ver + } + + self.showVersion = function () { + if (typeof version === 'function') console.log(version()) + else console.log(version) + } + + return self +} diff --git a/node_modules/yargs/lib/validation.js b/node_modules/yargs/lib/validation.js new file mode 100644 index 0000000000000..19afe94015f39 --- /dev/null +++ b/node_modules/yargs/lib/validation.js @@ -0,0 +1,196 @@ +// validation-type-stuff, missing params, +// bad implications, custom checks. +module.exports = function (yargs, usage) { + var self = {} + + // validate appropriate # of non-option + // arguments were provided, i.e., '_'. + self.nonOptionCount = function (argv) { + var demanded = yargs.getDemanded() + + if (demanded._ && argv._.length < demanded._.count) { + if (demanded._.msg !== undefined) { + usage.fail(demanded._.msg) + } else { + usage.fail('Not enough non-option arguments: got ' + + argv._.length + ', need at least ' + demanded._.count + ) + } + } + } + + // make sure that any args that require an + // value (--foo=bar), have a value. + self.missingArgumentValue = function (argv) { + var options = yargs.getOptions(), + defaultValues = [true, false, ''] + + if (options.requiresArg.length > 0) { + var missingRequiredArgs = [] + + options.requiresArg.forEach(function (key) { + var value = argv[key] + + // if a value is explicitly requested, + // flag argument as missing if it does not + // look like foo=bar was entered. + if (~defaultValues.indexOf(value) + || (Array.isArray(value) && !value.length)) { + missingRequiredArgs.push(key) + } + }) + + if (missingRequiredArgs.length === 1) { + usage.fail('Missing argument value: ' + missingRequiredArgs[0]) + } else if (missingRequiredArgs.length > 1) { + var message = 'Missing argument values: ' + missingRequiredArgs.join(', ') + usage.fail(message) + } + } + } + + // make sure all the required arguments are present. + self.requiredArguments = function (argv) { + var demanded = yargs.getDemanded(), + missing = null + + Object.keys(demanded).forEach(function (key) { + if (!argv.hasOwnProperty(key)) { + missing = missing || {} + missing[key] = demanded[key] + } + }) + + if (missing) { + var customMsgs = [] + Object.keys(missing).forEach(function (key) { + var msg = missing[key].msg + if (msg && customMsgs.indexOf(msg) < 0) { + customMsgs.push(msg) + } + }) + + var customMsg = customMsgs.length ? '\n' + customMsgs.join('\n') : '' + usage.fail('Missing required arguments: ' + Object.keys(missing).join(', ') + customMsg) + } + } + + // check for unknown arguments (strict-mode). + self.unknownArguments = function (argv, aliases) { + var descriptions = usage.getDescriptions(), + demanded = yargs.getDemanded(), + unknown = [], + aliasLookup = {} + + Object.keys(aliases).forEach(function (key) { + aliases[key].forEach(function (alias) { + aliasLookup[alias] = key + }) + }) + + Object.keys(argv).forEach(function (key) { + if (key !== '$0' && key !== '_' && + !descriptions.hasOwnProperty(key) && + !demanded.hasOwnProperty(key) && + !aliasLookup.hasOwnProperty(key)) { + unknown.push(key) + } + }) + + if (unknown.length === 1) { + usage.fail('Unknown argument: ' + unknown[0]) + } else if (unknown.length > 1) { + usage.fail('Unknown arguments: ' + unknown.join(', ')) + } + } + + // custom checks, added using the `check` option on yargs. + var checks = [] + self.check = function (f) { + checks.push(f) + } + + self.customChecks = function (argv, aliases) { + checks.forEach(function (f) { + try { + var result = f(argv, aliases) + if (!result) { + usage.fail('Argument check failed: ' + f.toString()) + } else if (typeof result === 'string') { + usage.fail(result) + } + } catch (err) { + usage.fail(err.message ? err.message : err) + } + }) + } + + // check implications, argument foo implies => argument bar. + var implied = {} + self.implies = function (key, value) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.implies(k, key[k]) + }) + } else { + implied[key] = value + } + } + self.getImplied = function () { + return implied + } + + self.implications = function (argv) { + var implyFail = [] + + Object.keys(implied).forEach(function (key) { + var num, + origKey = key, + value = implied[key] + + // convert string '1' to number 1 + num = Number(key) + key = isNaN(num) ? key : num + + if (typeof key === 'number') { + // check length of argv._ + key = argv._.length >= key + } else if (key.match(/^--no-.+/)) { + // check if key doesn't exist + key = key.match(/^--no-(.+)/)[1] + key = !argv[key] + } else { + // check if key exists + key = argv[key] + } + + num = Number(value) + value = isNaN(num) ? value : num + + if (typeof value === 'number') { + value = argv._.length >= value + } else if (value.match(/^--no-.+/)) { + value = value.match(/^--no-(.+)/)[1] + value = !argv[value] + } else { + value = argv[value] + } + + if (key && !value) { + implyFail.push(origKey) + } + }) + + if (implyFail.length) { + var msg = 'Implications failed:\n' + + implyFail.forEach(function (key) { + msg += (' ' + key + ' -> ' + implied[key]) + }) + + usage.fail(msg) + } + } + + return self +} diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json new file mode 100644 index 0000000000000..7dfc3ced784dd --- /dev/null +++ b/node_modules/yargs/package.json @@ -0,0 +1,85 @@ +{ + "name": "yargs", + "version": "3.10.0", + "description": "Light-weight option parsing with an argv hash. No optstrings attached.", + "main": "./index.js", + "files": [ + "index.js", + "lib", + "completion.sh.hbs", + "LICENSE" + ], + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + }, + "devDependencies": { + "chai": "^2.2.0", + "coveralls": "^2.11.2", + "hashish": "0.0.4", + "mocha": "^2.2.1", + "nyc": "^2.2.1", + "standard": "^3.11.1" + }, + "scripts": { + "test": "standard && nyc mocha --check-leaks && nyc report", + "coverage": "nyc report --reporter=text-lcov | coveralls" + }, + "repository": { + "type": "git", + "url": "http://github.com/bcoe/yargs.git" + }, + "standard": { + "ignore": [ + "**/example/**" + ], + "globals": [ + "it" + ] + }, + "keywords": [ + "argument", + "args", + "option", + "parser", + "parsing", + "cli", + "command" + ], + "author": { + "name": "Alex Ford", + "email": "Alex.Ford@CodeTunnel.com", + "url": "http://CodeTunnel.com" + }, + "contributors": [ + { + "name": "Benjamin Coe", + "email": "ben@npmjs.com", + "url": "https://github.com/bcoe" + }, + { + "name": "Chris Needham", + "email": "chris@chrisneedham.com", + "url": "http://chrisneedham.com" + }, + { + "name": "James Nylen", + "email": "jnylen@gmail.com", + "url": "https://github.com/nylen" + }, + { + "name": "Benjamin Horsleben", + "url": "https://github.com/fizker" + }, + { + "name": "Lin Clark", + "url": "https://github.com/linclark" + } + ], + "license": "MIT", + "engine": { + "node": ">=0.4" + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000000..96fd63302d136 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6086 @@ +{ + "name": "minimal-mistakes", + "version": "3.4.2", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "minimal-mistakes", + "version": "3.4.2", + "license": "MIT", + "devDependencies": { + "npm-run-all": "^1.7.0", + "onchange": "^2.2.0", + "uglify-js": "^2.6.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "dependencies": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "node_modules/arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha512-dtXTVMkh6VkEEA7OhXnN1Ecb8aAGFdZ1LFxtOCoqj4qkyOJMt7+qs6Ahdy6p/NQCPYsRSXXivhSB/J5E9jmYKA==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha512-G2n5bG5fSUCpnsXz4+8FUkYsGPkNfLn9YvS66U5qbTIXI2Ynnlo4Bi42bWv+omKUCqz+ejzfClwne0alJWJPhg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dev": true, + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", + "dev": true, + "dependencies": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cache-base/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "dev": true, + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chokidar": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.5.2.tgz", + "integrity": "sha512-Hc3T2qGwrnnZORa+Gmnoa5yGkr4cqYURAYBC/RXxPBAeO12C7/stcWXhjvxSnE3gTJMZvSOimFFarZUdd08NfA==", + "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.", + "dev": true, + "dependencies": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + }, + "optionalDependencies": { + "fsevents": "^1.0.0" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/class-utils/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "dev": true, + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "dev": true, + "hasInstallScript": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA==", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "node_modules/cross-spawn-async": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz", + "integrity": "sha512-snteb3aVrxYYOX9e8BabYFK9WhCDhTlw1YQktfTthBogxri4/2r9U2nQc0ffY73ZAxezDc+U8gvHAeU1wy1ubQ==", + "deprecated": "cross-spawn no longer requires a build toolchain, use it instead", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.0", + "which": "^1.2.8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", + "dev": true, + "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" + } + }, + "node_modules/expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha512-hxx03P2dJxss6ceIeri9cmYOT4SRs3Zk3afZwWpOsRqLqprhTR8u++SlC+sFGsQr7WGFPdMF7Gjc1njDLDK6UA==", + "dev": true, + "dependencies": { + "is-posix-bracket": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha512-AFASGfIlnIbkKPQwX1yHaDjFvh/1gyKJODme52V6IORh69uEYgZp0o9C+qsIGNVEiuuhQU0CSSl++Rlegg1qvA==", + "dev": true, + "dependencies": { + "fill-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha512-1FOj1LOwn42TMrruOHGt18HemVnbwAmAak7krWk+wa93KXxGbK+2jpezm+ytJYDaBX0/SPLZFHKM7m+tKobWGg==", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "node_modules/filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha512-BTCqyBaWBTsauvnHiE8i562+EdJj+oUpkqWp2R1iCoR8f6oo8STRu3of7WJJ0TqWtxN50a5YFpzYK4Jj9esYfQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "dependencies": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==", + "dev": true, + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", + "dev": true + }, + "node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha512-ab1S1g1EbO7YzauaJLkgLp7DZVAqj9M/dvKlTt8DkXA2tiOIcSMrlVI2J1RZyB5iJVccEscjGn+kpOG9788MHA==", + "dev": true, + "dependencies": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", + "dev": true, + "dependencies": { + "is-glob": "^2.0.0" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-value/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/internal-slot": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha512-9YclgOGtN/f8zx0Pr4FQYMdibBiTaH3sn52vjYip4ZSf6C4/6RfTEZ+MR4GvKhCxdPh21Bg42/WL55f6KSnKpg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha512-0EygVC5qPvIyb+gSz7zdD5/AAoS6Qrx1e//6N4yv4oNm30kqvdmG66oZFWVlQHUWe5OjP08FuTw2IdT0EOTcYA==", + "dev": true, + "dependencies": { + "is-primitive": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha512-Yu68oeXJ7LeWNmZ3Zov/xg/oDBnBK2RNxwYY1ilNJX+tKKZqgPK+qOn/Gs9jEu66KDY9Netf5XLKNGzas/vPfQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha512-N3w1tFaRfk3UrPfqeRyD+GYDASU3W5VinKhlORy8EWVf/sIdDL9GAcew85XmktCfH+ngG7SRXEVDoO18WMdB/Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==", + "dev": true + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, + "node_modules/micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", + "dev": true, + "dependencies": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "dev": true, + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-1.8.0.tgz", + "integrity": "sha512-nd09iSzPliO4SFyny0hpgWq0rnWwQfS1+xejnQcb6w4RnWLDlOQiLHW7EJgGFRs54aUkJfmr+TSbY5DaJdsTYQ==", + "dev": true, + "dependencies": { + "babel-runtime": "^6.3.13", + "chalk": "^1.1.3", + "cross-spawn-async": "^2.1.9", + "minimatch": "^3.0.0", + "ps-tree": "^1.0.1", + "read-pkg": "^1.1.0", + "shell-quote": "^1.4.3", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all.js" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-visit/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha512-UiAM5mhmIuKLsOvrL+B0U2d1hXHF3bFYWIuH1LMpuV2EJEHG1Ntz06PgLEHjm6VFd87NpH8rastvPoyv6UW2fA==", + "dev": true, + "dependencies": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/onchange": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/onchange/-/onchange-2.5.0.tgz", + "integrity": "sha512-XCsIq8JCwMsMbJC2ITPD5RlOsJ4ItZ/fkdh+dH3qkQaa/EXhoqXvOyvp+OwhqpAvDA60ljFuzKnNxZ4lcoXR7g==", + "dev": true, + "dependencies": { + "arrify": "~1.0.1", + "chokidar": "~1.5.1", + "cross-spawn": "~4.0.0", + "minimist": "~1.2.0" + }, + "bin": { + "onchange": "cli.js" + } + }, + "node_modules/parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha512-FC5TeK0AwXzq3tUBFtH74naWkPQCEWs4K+xMxWZBlKDWu0bVHXGZa+KKqxKidd7xwhdZ19ZNuF2uO1M/r196HA==", + "dev": true, + "dependencies": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", + "dev": true, + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha512-s/46sYeylUfHNjI+sA/78FAHlmIuKqI9wNnzEOGehAlUUYeObv5C2mOinXBjyUyWmJ2SfcS2/ydApH4hTF4WXQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/ps-tree": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", + "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", + "dev": true, + "dependencies": { + "event-stream": "=3.3.4" + }, + "bin": { + "ps-tree": "bin/ps-tree.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, + "node_modules/randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "dependencies": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/randomatic/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/randomatic/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "dev": true, + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/readdirp/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/readdirp/node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "node_modules/regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "dependencies": { + "is-equal-shallow": "^0.1.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "dev": true, + "dependencies": { + "align-text": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true + }, + "node_modules/split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==", + "dev": true, + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==", + "dev": true, + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string.prototype.padend": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.5.tgz", + "integrity": "sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "dev": true, + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "dev": true, + "dependencies": { + "source-map": "~0.5.1", + "yargs": "~3.10.0" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + }, + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + } + }, + "node_modules/uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "dev": true, + "optional": true + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, + "node_modules/yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "dev": true, + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + }, + "dependencies": { + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha512-dtXTVMkh6VkEEA7OhXnN1Ecb8aAGFdZ1LFxtOCoqj4qkyOJMt7+qs6Ahdy6p/NQCPYsRSXXivhSB/J5E9jmYKA==", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true + }, + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha512-G2n5bG5fSUCpnsXz4+8FUkYsGPkNfLn9YvS66U5qbTIXI2Ynnlo4Bi42bWv+omKUCqz+ejzfClwne0alJWJPhg==", + "dev": true + }, + "arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + } + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true + }, + "async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chokidar": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.5.2.tgz", + "integrity": "sha512-Hc3T2qGwrnnZORa+Gmnoa5yGkr4cqYURAYBC/RXxPBAeO12C7/stcWXhjvxSnE3gTJMZvSOimFFarZUdd08NfA==", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "dev": true + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA==", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "cross-spawn-async": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz", + "integrity": "sha512-snteb3aVrxYYOX9e8BabYFK9WhCDhTlw1YQktfTthBogxri4/2r9U2nQc0ffY73ZAxezDc+U8gvHAeU1wy1ubQ==", + "dev": true, + "requires": { + "lru-cache": "^4.0.0", + "which": "^1.2.8" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true + }, + "define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + } + }, + "define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "requires": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.13" + } + }, + "es-set-tostringtag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", + "dev": true, + "requires": { + "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" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha512-hxx03P2dJxss6ceIeri9cmYOT4SRs3Zk3afZwWpOsRqLqprhTR8u++SlC+sFGsQr7WGFPdMF7Gjc1njDLDK6UA==", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha512-AFASGfIlnIbkKPQwX1yHaDjFvh/1gyKJODme52V6IORh69uEYgZp0o9C+qsIGNVEiuuhQU0CSSl++Rlegg1qvA==", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha512-1FOj1LOwn42TMrruOHGt18HemVnbwAmAak7krWk+wa93KXxGbK+2jpezm+ytJYDaBX0/SPLZFHKM7m+tKobWGg==", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha512-BTCqyBaWBTsauvnHiE8i562+EdJj+oUpkqWp2R1iCoR8f6oo8STRu3of7WJJ0TqWtxN50a5YFpzYK4Jj9esYfQ==", + "dev": true + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", + "dev": true + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true + }, + "function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + } + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, + "get-intrinsic": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dev": true, + "requires": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + } + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha512-ab1S1g1EbO7YzauaJLkgLp7DZVAqj9M/dvKlTt8DkXA2tiOIcSMrlVI2J1RZyB5iJVccEscjGn+kpOG9788MHA==", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha512-JDYOvfxio/t42HKdxkAYaCiBN7oYiuxykOxKxdaUW5Qn0zaYN3gRQWolrwdnf0shM9/EP0ebuuTmyoXNr1cC5w==", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } + }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, + "has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.2" + } + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "requires": { + "function-bind": "^1.1.2" + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "internal-slot": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + } + }, + "is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dev": true, + "requires": { + "hasown": "^2.0.0" + } + }, + "is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, + "is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "requires": { + "hasown": "^2.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dev": true, + "requires": { + "hasown": "^2.0.0" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha512-9YclgOGtN/f8zx0Pr4FQYMdibBiTaH3sn52vjYip4ZSf6C4/6RfTEZ+MR4GvKhCxdPh21Bg42/WL55f6KSnKpg==", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha512-0EygVC5qPvIyb+gSz7zdD5/AAoS6Qrx1e//6N4yv4oNm30kqvdmG66oZFWVlQHUWe5OjP08FuTw2IdT0EOTcYA==", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha512-Yu68oeXJ7LeWNmZ3Zov/xg/oDBnBK2RNxwYY1ilNJX+tKKZqgPK+qOn/Gs9jEu66KDY9Netf5XLKNGzas/vPfQ==", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha512-N3w1tFaRfk3UrPfqeRyD+GYDASU3W5VinKhlORy8EWVf/sIdDL9GAcew85XmktCfH+ngG7SRXEVDoO18WMdB/Q==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "requires": { + "which-typed-array": "^1.1.11" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-all": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-1.8.0.tgz", + "integrity": "sha512-nd09iSzPliO4SFyny0hpgWq0rnWwQfS1+xejnQcb6w4RnWLDlOQiLHW7EJgGFRs54aUkJfmr+TSbY5DaJdsTYQ==", + "dev": true, + "requires": { + "babel-runtime": "^6.3.13", + "chalk": "^1.1.3", + "cross-spawn-async": "^2.1.9", + "minimatch": "^3.0.0", + "ps-tree": "^1.0.1", + "read-pkg": "^1.1.0", + "shell-quote": "^1.4.3", + "string.prototype.padend": "^3.0.0" + } + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + } + } + } + }, + "object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha512-UiAM5mhmIuKLsOvrL+B0U2d1hXHF3bFYWIuH1LMpuV2EJEHG1Ntz06PgLEHjm6VFd87NpH8rastvPoyv6UW2fA==", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "onchange": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/onchange/-/onchange-2.5.0.tgz", + "integrity": "sha512-XCsIq8JCwMsMbJC2ITPD5RlOsJ4ItZ/fkdh+dH3qkQaa/EXhoqXvOyvp+OwhqpAvDA60ljFuzKnNxZ4lcoXR7g==", + "dev": true, + "requires": { + "arrify": "~1.0.1", + "chokidar": "~1.5.1", + "cross-spawn": "~4.0.0", + "minimist": "~1.2.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha512-FC5TeK0AwXzq3tUBFtH74naWkPQCEWs4K+xMxWZBlKDWu0bVHXGZa+KKqxKidd7xwhdZ19ZNuF2uO1M/r196HA==", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", + "dev": true, + "requires": { + "through": "~2.3" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha512-s/46sYeylUfHNjI+sA/78FAHlmIuKqI9wNnzEOGehAlUUYeObv5C2mOinXBjyUyWmJ2SfcS2/ydApH4hTF4WXQ==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "ps-tree": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", + "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", + "dev": true, + "requires": { + "event-stream": "=3.3.4" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true + }, + "resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + }, + "set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "requires": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + } + }, + "set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "requires": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + } + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, + "spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + } + } + } + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==", + "dev": true, + "requires": { + "duplexer": "~0.1.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "string.prototype.padend": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.5.tgz", + "integrity": "sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + } + }, + "string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + } + }, + "string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + } + } + }, + "typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "dev": true, + "optional": true + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } +}